Path: blob/main/contrib/llvm-project/compiler-rt/lib/builtins/arm/eqdf2vfp.S
35292 views
//===-- eqdf2vfp.S - Implement eqdf2vfp -----------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#include "../assembly.h"910// extern int __eqdf2vfp(double a, double b);11//12// Returns one iff a == b and neither is NaN.13// Uses Darwin calling convention where double precision arguments are passsed14// like in GPR pairs.1516.syntax unified17.p2align 218DEFINE_COMPILERRT_FUNCTION(__eqdf2vfp)19#if defined(COMPILER_RT_ARMHF_TARGET)20vcmp.f64 d0, d121#else22vmov d6, r0, r1 // load r0/r1 pair in double register23vmov d7, r2, r3 // load r2/r3 pair in double register24vcmp.f64 d6, d725#endif26vmrs apsr_nzcv, fpscr27ITE(eq)28moveq r0, #1 // set result register to 1 if equal29movne r0, #030bx lr31END_COMPILERRT_FUNCTION(__eqdf2vfp)3233NO_EXEC_STACK_DIRECTIVE34353637