1156cd587Sjoerg//===-- floatunssidfvfp.S - Implement floatunssidfvfp ---------------------===// 2156cd587Sjoerg// 3156cd587Sjoerg// The LLVM Compiler Infrastructure 4156cd587Sjoerg// 5156cd587Sjoerg// This file is dual licensed under the MIT and the University of Illinois Open 6156cd587Sjoerg// Source Licenses. See LICENSE.TXT for details. 7156cd587Sjoerg// 8156cd587Sjoerg//===----------------------------------------------------------------------===// 9156cd587Sjoerg 10156cd587Sjoerg#include "../assembly.h" 11156cd587Sjoerg 12156cd587Sjoerg// 13156cd587Sjoerg// extern double __floatunssidfvfp(unsigned int a); 14156cd587Sjoerg// 15156cd587Sjoerg// Converts a 32-bit int to a double precision float. 16156cd587Sjoerg// Uses Darwin calling convention where a double precision result is 17156cd587Sjoerg// return in GPR register pair. 18156cd587Sjoerg// 19156cd587Sjoerg .syntax unified 20*61f2f256Sjoerg .p2align 2 21156cd587SjoergDEFINE_COMPILERRT_FUNCTION(__floatunssidfvfp) 22156cd587Sjoerg vmov s15, r0 // move int to float register s15 23156cd587Sjoerg vcvt.f64.u32 d7, s15 // convert 32-bit int in s15 to double in d7 24156cd587Sjoerg vmov r0, r1, d7 // move d7 to result register pair r0/r1 25156cd587Sjoerg bx lr 26156cd587SjoergEND_COMPILERRT_FUNCTION(__floatunssidfvfp) 27