lib: Remove __ARM_ARCH checks that are always true

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D45559
This commit is contained in:
Andrew Turner 2024-06-12 11:49:05 +00:00
parent f0a0420dfd
commit b8a496dfb6
5 changed files with 8 additions and 19 deletions

View file

@ -65,7 +65,7 @@
* C Helper macros
*/
#if __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC)
#if !defined(SOFTFLOAT_FOR_GCC)
/*
* Generate a function that will either call into the VFP implementation,
* or the soft float version for a given __aeabi_* helper. The function

View file

@ -58,12 +58,12 @@
ENTRY(_setjmp)
ldr r1, .L_setjmp_magic
#if !defined(_STANDALONE) && __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC)
#if !defined(_STANDALONE) && !defined(SOFTFLOAT_FOR_GCC)
add r2, r0, #(_JB_REG_D8 * 4)
vstmia r2, {d8-d15}
vmrs r2, fpscr
str r2, [r0, #(_JB_REG_FPSCR * 4)]
#endif /* !_STANDALONE && __ARM_ARCH >= 6 */
#endif /* !_STANDALONE && !SOFTFLOAT_FOR_GCC */
str r1, [r0]
@ -91,12 +91,12 @@ ENTRY(_longjmp)
teq ip, r2 /* magic correct? */
bne botch /* no, botch */
#if !defined(_STANDALONE) && __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC)
#if !defined(_STANDALONE) && !defined(SOFTFLOAT_FOR_GCC)
add ip, r0, #(_JB_REG_D8 * 4)
vldmia ip, {d8-d15}
ldr ip, [r0, #(_JB_REG_FPSCR * 4)]
vmsr fpscr, ip
#endif /* !_STANDALONE && __ARM_ARCH >= 6 */
#endif /* !_STANDALONE && !SOFTFLOAT_FOR_GCC */
add r0, r0, #(_JB_REG_R4 * 4)
/* Restore integer registers */

View file

@ -61,7 +61,7 @@ ENTRY(setjmp)
ldr r1, .Lsetjmp_magic
#if __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC)
#if !defined(SOFTFLOAT_FOR_GCC)
add r2, r0, #(_JB_REG_D8 * 4)
vstmia r2, {d8-d15}
vmrs r2, fpscr
@ -102,7 +102,7 @@ ENTRY(__longjmp)
bl PIC_SYM(_C_LABEL(sigprocmask), PLT)
ldmfd sp!, {r0-r2, r14}
#if __ARM_ARCH >= 6 && !defined(SOFTFLOAT_FOR_GCC)
#if !defined(SOFTFLOAT_FOR_GCC)
add ip, r0, #(_JB_REG_D8 * 4)
vldmia ip, {d8-d15}
ldr ip, [r0, #(_JB_REG_FPSCR * 4)]

View file

@ -37,7 +37,6 @@
#include <errno.h>
#include "libc_private.h"
#if __ARM_ARCH >= 6
static inline uint64_t
cp15_cntvct_get(void)
{
@ -55,7 +54,6 @@ cp15_cntpct_get(void)
__asm __volatile("mrrc\tp15, 0, %Q0, %R0, c14" : "=r" (reg));
return (reg);
}
#endif
#pragma weak __vdso_gettc
int
@ -64,7 +62,6 @@ __vdso_gettc(const struct vdso_timehands *th, u_int *tc)
if (th->th_algo != VDSO_TH_ALGO_ARM_GENTIM)
return (ENOSYS);
#if __ARM_ARCH >= 6
/*
* Userspace gettimeofday() is only enabled on ARMv7 CPUs, but
* libc is compiled for ARMv6. Due to clang issues, .arch
@ -73,10 +70,6 @@ __vdso_gettc(const struct vdso_timehands *th, u_int *tc)
__asm __volatile(".word\t0xf57ff06f" : : : "memory"); /* isb */
*tc = th->th_physical == 0 ? cp15_cntvct_get() : cp15_cntpct_get();
return (0);
#else
*tc = 0;
return (ENOSYS);
#endif
}
#pragma weak __vdso_gettimekeep

View file

@ -32,10 +32,6 @@
#include <machine/acle-compat.h>
#if __ARM_ARCH >= 6
#define FENV_ARMv6
#endif
/* When SOFTFP_ABI is defined we are using the softfp ABI. */
#if defined(__VFP_FP__) && !defined(__ARM_PCS_VFP)
#define SOFTFP_ABI
@ -52,7 +48,7 @@ const fenv_t __fe_dfl_env = 0;
/* If this is a non-mangled softfp version special processing is required */
#if defined(FENV_MANGLE) || !defined(SOFTFP_ABI) || !defined(FENV_ARMv6)
#if defined(FENV_MANGLE) || !defined(SOFTFP_ABI)
/*
* The following macros map between the softfloat emulator's flags and