blob: d4384ec0e5ea2e8f7271e8042c87e0016e8416f2 [file] [log] [blame]
Nick Kledzik91300112009-09-12 01:23:481//===-- eqdf2vfp.S - Implement eqdf2vfp -----------------------------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Daniel Dunbar7d504782009-10-27 17:49:5010#include "../assembly.h"
Nick Kledzik91300112009-09-12 01:23:4811
12//
13// extern int __eqdf2vfp(double a, double b);
14//
15// Returns one iff a == b and neither is NaN.
16// Uses Darwin calling convention where double precision arguments are passsed
17// like in GPR pairs.
18//
Nick Kledzik8e7ebea2010-04-21 22:36:2319 .align 2
Daniel Dunbar9ff93712009-10-27 17:50:2120DEFINE_COMPILERRT_FUNCTION(__eqdf2vfp)
Nick Kledzik91300112009-09-12 01:23:4821 fmdrr d6, r0, r1 // load r0/r1 pair in double register
22 fmdrr d7, r2, r3 // load r2/r3 pair in double register
23 fcmpd d6, d7
24 fmstat
25 moveq r0, #1 // set result register to 1 if equal
26 movne r0, #0
27 bx lr