floatsisfvfp.S revision 309124
1276789Sdim//===-- floatsisfvfp.S - Implement floatsisfvfp ---------------------------===// 2276789Sdim// 3276789Sdim// The LLVM Compiler Infrastructure 4276789Sdim// 5276789Sdim// This file is dual licensed under the MIT and the University of Illinois Open 6276789Sdim// Source Licenses. See LICENSE.TXT for details. 7276789Sdim// 8276789Sdim//===----------------------------------------------------------------------===// 9276789Sdim 10276789Sdim#include "../assembly.h" 11276789Sdim 12276789Sdim// 13276789Sdim// extern float __floatsisfvfp(int a); 14276789Sdim// 15276789Sdim// Converts single precision float to a 32-bit int rounding towards zero. 16276789Sdim// Uses Darwin calling convention where a single precision result is 17276789Sdim// return in a GPR.. 18276789Sdim// 19276789Sdim .syntax unified 20276789Sdim .p2align 2 21276789SdimDEFINE_COMPILERRT_FUNCTION(__floatsisfvfp) 22276789Sdim vmov s15, r0 // move int to float register s15 23276789Sdim vcvt.f32.s32 s15, s15 // convert 32-bit int in s15 to float in s15 24276789Sdim vmov r0, s15 // move s15 to result register 25276789Sdim bx lr 26276789SdimEND_COMPILERRT_FUNCTION(__floatsisfvfp) 27309124Sdim 28309124SdimNO_EXEC_STACK_DIRECTIVE 29309124Sdim 30