brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 3abb622 Raw
37 lines · plain
1//===-- unorddf2vfp.S - Implement unorddf2vfp ------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#include "../assembly.h"10 11//12// extern int __unorddf2vfp(double a, double b);13//14// Returns one iff a or b is NaN15// Uses Darwin calling convention where double precision arguments are passsed16// like in GPR pairs.17//18	.syntax unified19	.p2align 220DEFINE_COMPILERRT_FUNCTION(__unorddf2vfp)21#if defined(COMPILER_RT_ARMHF_TARGET)22	vcmp.f64 d0, d123#else24	VMOV_TO_DOUBLE(d6, r0, r1)	// load r0/r1 pair in double register25	VMOV_TO_DOUBLE(d7, r2, r3)	// load r2/r3 pair in double register26	vcmp.f64 d6, d727#endif28	vmrs	apsr_nzcv, fpscr29	ITE(vs)30	movvs	r0, #1      // set result register to 1 if "overflow" (any NaNs)31	movvc	r0, #032	bx	lr33END_COMPILERRT_FUNCTION(__unorddf2vfp)34 35NO_EXEC_STACK_DIRECTIVE36 37