diff options
author | Nick Kledzik <kledzik@apple.com> | 2009-09-14 23:26:56 +0000 |
---|---|---|
committer | Nick Kledzik <kledzik@apple.com> | 2009-09-14 23:26:56 +0000 |
commit | 0963c9e8ea7f97732b0fce419fa6f2e96d951969 (patch) | |
tree | 160eb55d25c2194d7b82cf1cb038c50e2c2373fa /lib/arm/fixunssfsivfp.S | |
parent | 7b268dc996e9683b634072759eb8537e21284827 (diff) |
add conversion functions and test cases for ARM
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@81809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/arm/fixunssfsivfp.S')
-rw-r--r-- | lib/arm/fixunssfsivfp.S | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/arm/fixunssfsivfp.S b/lib/arm/fixunssfsivfp.S new file mode 100644 index 000000000..c39c69839 --- /dev/null +++ b/lib/arm/fixunssfsivfp.S @@ -0,0 +1,24 @@ +//===-- fixunssfsivfp.S - Implement fixunssfsivfp -------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + + +// +// extern unsigned int __fixunssfsivfp(float a); +// +// Converts single precision float to a 32-bit unsigned int rounding towards +// zero. All negative values become zero. +// Uses Darwin calling convention where a single precision parameter is +// passed in a GPR.. +// + .globl ___fixunssfsivfp +___fixunssfsivfp: + fmsr s15, r0 // load float register from R0 + ftouizs s15, s15 // convert single to 32-bit unsigned into s15 + fmrs r0, s15 // move s15 to result register + bx lr |