freebsd-dev/contrib/compiler-rt/lib/arm/eqdf2vfp.S

29 lines
877 B
ArmAsm
Raw Normal View History

2010-10-21 19:02:02 +00:00
//===-- eqdf2vfp.S - Implement eqdf2vfp -----------------------------------===//
//
// The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
2010-10-21 19:02:02 +00:00
//
//===----------------------------------------------------------------------===//
#include "../assembly.h"
//
// extern int __eqdf2vfp(double a, double b);
//
// Returns one iff a == b and neither is NaN.
// Uses Darwin calling convention where double precision arguments are passsed
// like in GPR pairs.
//
2011-12-31 14:55:23 +00:00
.syntax unified
2010-10-21 19:02:02 +00:00
.align 2
DEFINE_COMPILERRT_FUNCTION(__eqdf2vfp)
2011-12-31 14:55:23 +00:00
vmov d6, r0, r1 // load r0/r1 pair in double register
vmov d7, r2, r3 // load r2/r3 pair in double register
vcmp.f64 d6, d7
vmrs apsr_nzcv, fpscr
2010-10-21 19:02:02 +00:00
moveq r0, #1 // set result register to 1 if equal
movne r0, #0
bx lr