eqsf2vfp.S revision 214152
131492Swollman//===-- eqsf2vfp.S - Implement eqsf2vfp -----------------------------------===//
231780Sbde//
31553Srgrimes//                     The LLVM Compiler Infrastructure
41553Srgrimes//
531492Swollman// This file is distributed under the University of Illinois Open Source
631492Swollman// License. See LICENSE.TXT for details.
71553Srgrimes//
81553Srgrimes//===----------------------------------------------------------------------===//
91553Srgrimes
101553Srgrimes#include "../assembly.h"
111863Swollman
121553Srgrimes//
1331780Sbde// extern int __eqsf2vfp(float a, float b);
1431492Swollman//
151553Srgrimes// Returns one iff a == b and neither is NaN.
161553Srgrimes// Uses Darwin calling convention where single precision arguments are passsed
17// like 32-bit ints
18//
19	.align 2
20DEFINE_COMPILERRT_FUNCTION(__eqsf2vfp)
21	fmsr	s14, r0     // move from GPR 0 to float register
22	fmsr	s15, r1	    // move from GPR 1 to float register
23	fcmps	s14, s15
24	fmstat
25	moveq	r0, #1      // set result register to 1 if equal
26	movne	r0, #0
27	bx	lr
28
29