ltdf2vfp.S revision 285830
1356843Sdim//===-- ltdf2vfp.S - Implement ltdf2vfp -----------------------------------===// 2356843Sdim// 3356843Sdim// The LLVM Compiler Infrastructure 4356843Sdim// 5356843Sdim// This file is dual licensed under the MIT and the University of Illinois Open 6356843Sdim// Source Licenses. See LICENSE.TXT for details. 7356843Sdim// 8356843Sdim//===----------------------------------------------------------------------===// 9356843Sdim 10356843Sdim#include "../assembly.h" 11356843Sdim 12356843Sdim// 13356843Sdim// extern double __ltdf2vfp(double a, double b); 14356843Sdim// 15356843Sdim// Returns one iff a < b and neither is NaN. 16356843Sdim// Uses Darwin calling convention where double precision arguments are passsed 17356843Sdim// like in GPR pairs. 18356843Sdim// 19356843Sdim .syntax unified 20356843Sdim .align 2 21356843SdimDEFINE_COMPILERRT_FUNCTION(__ltdf2vfp) 22356843Sdim vmov d6, r0, r1 // load r0/r1 pair in double register 23356843Sdim vmov d7, r2, r3 // load r2/r3 pair in double register 24356843Sdim vcmp.f64 d6, d7 25356843Sdim vmrs apsr_nzcv, fpscr 26356843Sdim movmi r0, #1 // set result register to 1 if equal 27356843Sdim movpl r0, #0 28356843Sdim bx lr 29356843Sdim