Path: blob/main/contrib/llvm-project/compiler-rt/lib/builtins/arm/gesf2vfp.S
35292 views
//===-- gesf2vfp.S - Implement gesf2vfp -----------------------------------===//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 __gesf2vfp(float a, float b);12//13// Returns one iff a >= b and neither is NaN.14// Uses Darwin calling convention where single precision arguments are passsed15// like 32-bit ints16//17.syntax unified18.p2align 219DEFINE_COMPILERRT_FUNCTION(__gesf2vfp)20#if defined(COMPILER_RT_ARMHF_TARGET)21vcmp.f32 s0, s122#else23vmov s14, r0 // move from GPR 0 to float register24vmov s15, r1 // move from GPR 1 to float register25vcmp.f32 s14, s1526#endif27vmrs apsr_nzcv, fpscr28ITE(ge)29movge r0, #1 // set result register to 1 if greater than or equal30movlt r0, #031bx lr32END_COMPILERRT_FUNCTION(__gesf2vfp)3334NO_EXEC_STACK_DIRECTIVE35363738