Path: blob/main/contrib/llvm-project/compiler-rt/lib/builtins/arm/eqsf2vfp.S
35292 views
//===-- eqsf2vfp.S - Implement eqsf2vfp -----------------------------------===//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 __eqsf2vfp(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(__eqsf2vfp)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(eq)29moveq r0, #1 // set result register to 1 if equal30movne r0, #031bx lr32END_COMPILERRT_FUNCTION(__eqsf2vfp)3334NO_EXEC_STACK_DIRECTIVE35363738