Re: [PATCH] libatomic: Cleanup AArch64 ifunc selection

2025-01-10 Thread Wilco Dijkstra
Hi Richard, > Yeah, somewhat.  But won't we go on to test has_lse2 anyway, due to: > > #  elif defined (LSE2_LRCPC3_ATOP) > #   define IFUNC_NCOND(N)   2 > #   define IFUNC_COND_1 (has_rcpc3 (hwcap, features)) > #   define IFUNC_COND_2 (has_lse2 (hwcap, features)) > > If we want to reduce the

Re: [PATCH] libatomic: Cleanup AArch64 ifunc selection

2025-01-10 Thread Richard Sandiford
Wilco Dijkstra writes: > Hi Richard, > >>> +  /* LSE2 is a prerequisite for atomic LDIAPP/STILP.  */ >>> +  if (!(hwcap & HWCAP_USCAT)) >>> return false; >> >> Is there a reason for not using has_lse2 here?  It'd be good to have >> a comment if so. > > Yes, the MRS instructions cause expensiv

Re: [PATCH] libatomic: Cleanup AArch64 ifunc selection

2025-01-10 Thread Wilco Dijkstra
Hi Richard, >> +  /* LSE2 is a prerequisite for atomic LDIAPP/STILP.  */ >> +  if (!(hwcap & HWCAP_USCAT)) >> return false; > > Is there a reason for not using has_lse2 here?  It'd be good to have > a comment if so. Yes, the MRS instructions cause expensive traps, so we try to avoid them whe

Re: [PATCH] libatomic: Cleanup AArch64 ifunc selection

2025-01-10 Thread Richard Sandiford
Wilco Dijkstra writes: > ping >   > > Simplify and cleanup ifunc selection logic.  Since LRCPC3 does > not imply LSE2, has_rcpc3() should also check LSE2 is enabled. > > Passes regress and bootstrap, OK for commit? > > libatomic: >     * config/linux/aarch64/host-config.h (has_lse2): Cleanup.

Re: [PATCH] libatomic: Cleanup AArch64 ifunc selection

2025-01-10 Thread Wilco Dijkstra
ping   Simplify and cleanup ifunc selection logic.  Since LRCPC3 does not imply LSE2, has_rcpc3() should also check LSE2 is enabled. Passes regress and bootstrap, OK for commit? libatomic:     * config/linux/aarch64/host-config.h (has_lse2): Cleanup.     (has_lse128): Likewise.     (

[PATCH] libatomic: Cleanup AArch64 ifunc selection

2024-11-27 Thread Wilco Dijkstra
Simplify and cleanup ifunc selection logic. Since LRCPC3 does not imply LSE2, has_rcpc3() should also check LSE2 is enabled. Passes regress and bootstrap, OK for commit? libatomic: * config/linux/aarch64/host-config.h (has_lse2): Cleanup. (has_lse128): Likewise. (has_rcp