1214152Sed//===-- eqsf2vfp.S - Implement eqsf2vfp -----------------------------------===//
2214152Sed//
3214152Sed//                     The LLVM Compiler Infrastructure
4214152Sed//
5222656Sed// This file is dual licensed under the MIT and the University of Illinois Open
6222656Sed// Source Licenses. See LICENSE.TXT for details.
7214152Sed//
8214152Sed//===----------------------------------------------------------------------===//
9214152Sed
10214152Sed#include "../assembly.h"
11214152Sed
12214152Sed//
13214152Sed// extern int __eqsf2vfp(float a, float b);
14214152Sed//
15214152Sed// Returns one iff a == b and neither is NaN.
16214152Sed// Uses Darwin calling convention where single precision arguments are passsed
17214152Sed// like 32-bit ints
18214152Sed//
19236011Smarius	.syntax unified
20214152Sed	.align 2
21214152SedDEFINE_COMPILERRT_FUNCTION(__eqsf2vfp)
22236011Smarius	vmov	s14, r0     // move from GPR 0 to float register
23236011Smarius	vmov	s15, r1	    // move from GPR 1 to float register
24236011Smarius	vcmp.f32 s14, s15
25236011Smarius	vmrs	apsr_nzcv, fpscr
26214152Sed	moveq	r0, #1      // set result register to 1 if equal
27214152Sed	movne	r0, #0
28214152Sed	bx	lr
29214152Sed
30