Home | History | Annotate | Line # | Download | only in arm
      1      1.1  joerg //===-- ltsf2vfp.S - Implement ltsf2vfp -----------------------------------===//
      2      1.1  joerg //
      3      1.1  joerg //                     The LLVM Compiler Infrastructure
      4      1.1  joerg //
      5      1.1  joerg // This file is dual licensed under the MIT and the University of Illinois Open
      6      1.1  joerg // Source Licenses. See LICENSE.TXT for details.
      7      1.1  joerg //
      8      1.1  joerg //===----------------------------------------------------------------------===//
      9      1.1  joerg 
     10      1.1  joerg #include "../assembly.h"
     11      1.1  joerg 
     12      1.1  joerg //
     13      1.1  joerg // extern int __ltsf2vfp(float a, float b);
     14      1.1  joerg //
     15      1.1  joerg // Returns one iff a < b and neither is NaN.
     16      1.1  joerg // Uses Darwin calling convention where single precision arguments are passsed
     17      1.1  joerg // like 32-bit ints
     18      1.1  joerg //
     19      1.1  joerg 	.syntax unified
     20  1.1.1.2  joerg 	.p2align 2
     21      1.1  joerg DEFINE_COMPILERRT_FUNCTION(__ltsf2vfp)
     22      1.1  joerg 	vmov	s14, r0     // move from GPR 0 to float register
     23      1.1  joerg 	vmov	s15, r1     // move from GPR 1 to float register
     24      1.1  joerg 	vcmp.f32 s14, s15
     25      1.1  joerg 	vmrs	apsr_nzcv, fpscr
     26      1.1  joerg 	movmi	r0, #1      // set result register to 1 if equal
     27      1.1  joerg 	movpl	r0, #0
     28      1.1  joerg 	bx	lr
     29      1.1  joerg END_COMPILERRT_FUNCTION(__ltsf2vfp)
     30