Path: blob/main/contrib/llvm-project/compiler-rt/lib/builtins/arm/gedf2vfp.S
35292 views
//===-- gedf2vfp.S - Implement gedf2vfp -----------------------------------===//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//11// extern int __gedf2vfp(double a, double b);12//13// Returns one iff a >= b and neither is NaN.14// Uses Darwin calling convention where double precision arguments are passsed15// like in GPR pairs.16//17.syntax unified18.p2align 219DEFINE_COMPILERRT_FUNCTION(__gedf2vfp)20#if defined(COMPILER_RT_ARMHF_TARGET)21vcmp.f64 d0, d122#else23vmov d6, r0, r1 // load r0/r1 pair in double register24vmov d7, r2, r3 // load r2/r3 pair in double register25vcmp.f64 d6, d726#endif27vmrs apsr_nzcv, fpscr28ITE(ge)29movge r0, #1 // set result register to 1 if greater than or equal30movlt r0, #031bx lr32END_COMPILERRT_FUNCTION(__gedf2vfp)3334NO_EXEC_STACK_DIRECTIVE35363738