Commit Graph

42824 Commits

Author SHA1 Message Date
Uros Bizjak 3014dec3ad x86: Remove obsolete "*&" GCC asm memory operand workaround
GCC now accept plain variable names as valid lvalues for "m"
constraints, automatically spilling locals to memory if necessary.
The long-standing "*&" pattern was originally used as a defensive
workaround for older compiler versions that rejected operands
such as:

     asm ("incl %0" : "+m"(x));

with errors like "memory input is not directly addressable".

Modern compilers (GCC >= 9) reliably generate correct code
without the workaround, and the resulting assembly is identical.

No functional changes intended.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-09-22 17:33:25 +02:00
Wilco Dijkstra eba46f7077 benchtests: Fix warning in bench-strchr.c
Ensure benchtests compile with trunk GCC.
2025-09-22 12:42:57 +00:00
Wilco Dijkstra 9825f9b823 NEWS: Update with removal of dumped heaps
Support for dumped heaps has been removed - malloc_set_state() now always
returns the error code -1.
2025-09-22 12:42:43 +00:00
Samuel Thibault b7e0ec907b hurd: Fix RLIM_INFINITY on 64b
rlim_t is 64b on 64b systems, so we should extend RLIM_INFINITY to that,
not only RLIM64_INFINITY or requiring 64b offsets.

This is similar to Linux headers.
2025-09-22 02:30:14 +02:00
Samuel Thibault 81a6e97791 hurd: Note BZ #30166 as fixed
802b0eba51 ("hurd: implement RLIMIT_AS against Mach RPCs") brought the
needed RLIMIT_AS support for memory-crunchy tests.
2025-09-22 02:17:50 +02:00
Diego Nieto Cid 802b0eba51 hurd: implement RLIMIT_AS against Mach RPCs
Check for VM limit RPCs

  * config.h.in: add #undef for HAVE_MACH_VM_GET_SIZE_LIMIT and
    HAVE_MACH_VM_SET_SIZE_LIMIT.
  * sysdeps/mach/configure.ac: use mach_RPC_CHECK to check for
    vm_set_size_limit and vm_get_size_limit RPCs in gnumach.defs.
  * sysdeps/mach/configure: regenerate file.

Use vm_get_size_limit to initialize RLIMIT_AS

  * hurd/hurdrlimit.c(init_rlimit): use vm_get_size_limit to initialize
    RLIMIT_AS entry of the _hurd_rlimits array.

Notify the kernel of the new VM size limits

  * sysdeps/mach/hurd/setrlimit.c: use the vm_set_size_limit RPC,
    if available, to notify the kernel of the new limits. Retry RPC
    calls if they were interrupted by a signal.
Message-ID: <03fb90a795b354a366ee73f56f73e6ad22a86cda.1755220108.git.dnietoc@gmail.com>
2025-09-22 00:52:37 +02:00
Samuel Thibault c9cc047e9f hurd: catch SIGSEGV on returning from signal handler
On stack overflow typically, we may not actually have room on the stack to
trampoline back from the signal handler.  We have to detect this before
locking the ss, otherwise the signal thread will be stuck on taking the
ss lock while trying to post SIGSEGV.
2025-09-21 23:45:40 +02:00
DJ Delorie 8aa99c592b manual: Explain our implementation-defined memstream semantics
Posix Issue 8 adds an implementation-defined item we don't already
cover, about seeking backwards.  This defines our implentation.

https://issues.redhat.com/browse/RHEL-3008
https://pubs.opengroup.org/onlinepubs/9799919799/functions/open_memstream.html

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Reviewed-by Collin Funk <collin.funk1@gmail.com>
2025-09-19 14:51:05 -04:00
Wilco Dijkstra 85c5b504aa malloc: Remove dumped heap support
Remove support for obsolete dumped heaps.  Dumping heaps was discontinued
8 years ago, however loading a dumped heap is still supported. This blocks
changes and improvements of the malloc data structures - hence it is time
to remove this.  Ancient binaries that still call malloc_set_state will now
get the -1 error code.  Update tst-mallocstate.c to just check for this.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2025-09-19 13:11:56 +00:00
Wilco Dijkstra aebaeb2c33 AArch64: Update math-vector-fortran.h
Update math-vector-fortran.h with the latest set of math functions
and sort by name.

Reviewed-by: Yury Khrustalev <yury.khrustalev@arm.com>
2025-09-19 12:57:47 +00:00
Yury Khrustalev 20446e3502 manual: fix typo in tunables.texi 2025-09-19 12:03:38 +01:00
Dev Jain f807e85c31 malloc: Hoist common unlock out of if-else control block
We currently unlock the arena mutex in arena_get_retry() unconditionally.
Therefore, hoist out the unlock from the if-else control block.

Signed-off-by: Dev Jain <dev.jain@arm.com>
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-18 15:50:15 -04:00
Florian Weimer 855a67c3cc stdlib: Use support_accept_oom in test-bz22786
The realpath call may trigger OOM termination of the test process
under difficult-to-predict circumstances.  (It depends on available
RAM and swap.)  Therefore, instruct the test driver to ignore
an OOM process termination during the realpath call.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-09-18 19:11:38 +02:00
Florian Weimer 480660e270 support: Add support_accept_oom to heuristically support OOM errors
Some tests may trigger the kernel OOM handler under conditions
which are difficult to predict (depending on available RAM and
swap space).  If we can determine specific regions which might
do this and this does not contradict the test object, the
functions support_accept_oom (true) and support_accept_oom (false)
can be called at the start and end, and the test driver will
ignore SIGKILL signals.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-09-18 19:11:38 +02:00
Yury Khrustalev 3fd794264e support: fix build failure due to lack of stdbool.h
On some targets using bool in support/check_mem_access.h resulted
in build error due to stdbool.h not being included, fix this.

See 9be489d778 for details.

Reported-by: Joseph Myers <josmyers@redhat.com>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2025-09-17 13:02:01 +01:00
H.J. Lu 1fa5773eb1 x86: Don't use asm statement for trunc/truncf
Compiler inlines trunc and truncf with SSE4.1.  But older versions of GCC
doesn't inline them with -Os:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121861

Don't use asm statement for trunc and truncf if compiler can inline them
with -Os.  It removes one register move with GCC 16:

__modff_sse41:                        __modff_sse41:
.LFB23:                               .LFB23:
   .cfi_startproc                        .cfi_startproc
   endbr64                               endbr64
   subq  $24, %rsp                       subq  $24, %rsp
   .cfi_def_cfa_offset 32                .cfi_def_cfa_offset 32
   movq  %fs:40, %rax                    movq  %fs:40, %rax
   movq  %rax, 8(%rsp)                   movq  %rax, 8(%rsp)
   xorl  %eax, %eax                      xorl  %eax, %eax
   movd  %xmm0, %eax                     movd  %xmm0, %eax
   addl  %eax, %eax                      addl  %eax, %eax
   cmpl  $-16777216, %eax                cmpl  $-16777216, %eax
   je .L7                                je .L7
                                   >     movaps   %xmm0, %xmm3
   movaps   %xmm0, %xmm4                 movaps   %xmm0, %xmm4
   movss .LC0(%rip), %xmm2         |     movss .LC0(%rip), %xmm1
   movaps   %xmm2, %xmm3           |     movaps   %xmm1, %xmm2
   andps %xmm0, %xmm2              |     roundss  $11, %xmm3, %xmm3
   roundss $11, %xmm0, %xmm1       |     subss %xmm3, %xmm4
   subss %xmm1, %xmm4              |     andps %xmm0, %xmm1
   andnps   %xmm4, %xmm3           |     andnps   %xmm4, %xmm2
   orps  %xmm3, %xmm2              |     orps  %xmm2, %xmm1
.L3:                                  .L3:
   movss %xmm1, (%rdi)             |     movss %xmm3, (%rdi)
   movq  8(%rsp), %rax                   movq  8(%rsp), %rax
   subq  %fs:40, %rax                    subq  %fs:40, %rax
   jne   .L8                             jne   .L8
   movaps   %xmm2, %xmm0           |     movaps   %xmm1, %xmm0
   addq  $24, %rsp                       addq  $24, %rsp
   .cfi_remember_state                   .cfi_remember_state
   .cfi_def_cfa_offset 8                 .cfi_def_cfa_offset 8
   ret                                   ret

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Uros Bizjak <ubizjak@gmail.com>
2025-09-17 04:30:11 -07:00
Aurelien Jarno 13d67746cb ldd: define the "unused" variable
The "unused" variable could be use unitialized, which is an issue if ldd
is ran with "-u". Fix that by defining the variable to an empty value,
just like it is already done for the bind_now, warn and verbose
variables.

Reported-by: Johan Palmqvist <johan.palmqvist@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
2025-09-15 20:52:23 +02:00
H.J. Lu d6666eea3e i686: Compile .op files and gmon tests with -mfentry
On i686, after GCC 16 commit:

commit 07d8de9174c421d719649639a1452b8b9f2eee32
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Wed Jul 2 08:58:23 2025 +0800

    x86-64: Add --enable-x86-64-mfentry

which warns ‘-pg’ without ‘-mfentry’, when glibc is configured with
--disable-default-pie, GCC 16 fails to compile .op files and gmon tests
with error:

cc1: error: ‘-pg’ without ‘-mfentry’ may be unreliable with shrink wrapping [-Werror]

Compile .op files and gmon tests with -mfentry if it is supported by
CC/TEST_CC and glibc is configured with --disable-default-pie.  This
fixes BZ #33376.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Joseph Myers <josmyers@redhat.com>
2025-09-15 11:14:03 -07:00
Yury Khrustalev 9be489d778 support: add check_mem_access function
Add check_mem_access(addr) function to check if memory at addr can
be written or read returning false if memory is not accessible.

This function changes signal handler for SIGSEGV and SIGBUS signals
when it is called first, and it is not thread-safe.

Co-authored-by: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2025-09-15 09:47:41 +01:00
Uros Bizjak 041151f439 i386: Use __seg_gs qualifier to cast access to TCB in THREAD_GSCOPE_RESET_FLAG()
Use the __seg_gs named address space qualifier to cast access to the
gscope_flag in the TCB as a %gs: prefixed address.  This enables the
use of the "m" operand constraint, which informs the compiler about
memory access in the inline assembly.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
2025-09-14 21:50:50 +02:00
Uros Bizjak 3628351bcd x86_64: Use __seg_fs qualifier to cast access to TCB in THREAD_GSCOPE_RESET_FLAG()
Use the __seg_fs named address space qualifier to cast access to the
gscope_flag in the TCB as a %fs: prefixed address.  This enables the
use of the "m" operand constraint, which informs the compiler about
memory access in the inline assembly.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
2025-09-14 21:50:50 +02:00
Joseph Myers 273f80374a Fix RISC-V soft-float _FPU_SETCW for GCC 16 set-but-not-used warnings
The soft-float RISC-V definition of _FPU_SETCW results in a
-Werror=unused-but-set-variable= build failure with GCC mainline (in
math/setfpucw.c) because it does not use the dummy cw variable.
Change it to (void) (cw) as on other architectures to avoid this build
failure.

Tested with build-many-glibcs.py (compilers) for
riscv64-linux-gnu-rv64imac-lp64, which previously failed.
Reviewed-by: Sam James <sam@gentoo.org>
2025-09-13 07:11:44 -07:00
Florian Weimer 0fceed2545 nss: Group merge does not react to ERANGE during merge (bug 33361)
The break statement in CHECK_MERGE is expected to exit the surrounding
while loop, not the do-while loop with in the macro.  Remove the
do-while loop from the macro.  It is not needed to turn the macro
expansion into a single statement due to the way CHECK_MERGE is used
(and the statement expression would cover this anyway).

Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-09-12 21:33:34 +02:00
caiyinyu cae3c9e3a1 LoongArch: Use the generic shmlab.h.
The shmlba.h file related to the LoongArch architecture was introduced
in commit 3eed5f3a1e to address the mismatch in the SHMLBA definition
between glibc and the kernel. See [1].  The SHMLBA definition was later
updated in commit d23b77953f5a. See [2].  Now, we adopt the definition
from the common layer.

[1]:
commit 3eed5f3a1e
Author: caiyinyu <caiyinyu@loongson.cn>
Date:   Thu May 25 17:01:11 2023 +0800

    LoongArch: Fix inconsistency in SHMLBA macro values between glibc and kernel

    The LoongArch glibc was using the value of the SHMLBA macro from common code,
    which is __getpagesize() (16k), but this was inconsistent with the value of
    the SHMLBA macro in the kernel, which is SZ_64K (64k). This caused several
    shmat-related tests in LTP (Linux Test Project) to fail. This commit fixes
    the issue by ensuring that the glibc's SHMLBA macro value matches the value
    used in the kernel like other architectures.

[2]:
commit d23b77953f5a4fbf94c05157b186aac2a247ae32
Author: Huacai Chen <chenhuacai@kernel.org>
Date:   Wed Jan 17 12:43:08 2024 +0800

    LoongArch: Change SHMLBA from SZ_64K to PAGE_SIZE

    LoongArch has hardware page coloring for L1 Cache, so we don't have
    cache aliases. But SFB (Store Fill Buffer) still has aliases. So we
    define SHMLBA to SZ_64K previously. But there are losts of applications
    use PAGE_SIZE rather than SHMLBA to mmap() file pages and shared pages.
    Of course we can fix them one by one, but not easy.

    On the other hand, we can simply disable SFB for 4KB page size to fix
    cache alias (there will be performance decrease, but acceptable), and
    in future we will fix SFB in hardware. So we can safely define SHMLBA to
    PAGE_SIZE (use the generic shmparam.h) to make life easier.

Signed-off-by: caiyinyu <caiyinyu@loongson.cn>
Reported-by: lixing <lixing@loongson.cn>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2025-09-12 09:42:19 +08:00
Adhemerval Zanella dbebe0c418 alpha: Fix missing inexact-flag raising for lround/lrint
The l*[rint|round]f implements uses alpha 'cvtst/s', 'addt/suc',
adn 'cvttq/svd' which are not not fully IEEE compliant w.r.t
inexact-flag raising..  Use the software fallback implementation
instead.

Checked on alpha-linux-gnu.

Tested-by: Michael Cree <mcree@orcon.net.nz>
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2025-09-11 14:48:00 -03:00
Adhemerval Zanella cde86de627 math: Remove clz_uint64/ctz_uint64 and use stdbit.h
Checked on aarch64-linux-gnu and x86_64-linux-gnu
Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-09-11 14:47:25 -03:00
Adhemerval Zanella bd7b04ec7c math: Split erf and erfc
Checked on x86_64-linux-gnu, aarch64-linux-gnu, and
powerpc64le-linux-gnu.
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:59 -03:00
Adhemerval Zanella f40cdb65f5 math: Use internal fesetround alias on fma
To avoid linknamespace issues on old standards.  It is required
if the fallback fma implementation is used if/when it is also
used internally for other implementation.
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:07 -03:00
Adhemerval Zanella adecb3bec1 math: Use internal fetestexcept alias on fma
To avoid linknamespace issues on old standards.  It is required
if the fallback fma implementation is used if/when it is also
used internally for other implementation.
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:07 -03:00
Adhemerval Zanella 63ba1a1509 math: Add fetestexcept internal alias
To avoid linknamespace issues on old standards.  It is required
if the fallback fma implementation is used if/when it is also
used internally for other implementation.
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:07 -03:00
Adhemerval Zanella 41c2f1d9a3 math: Use internal feholdexcept alias on fma
To avoid linknamespace issues on old standards.  It is required
if the fallback fma implementation is used if/when it is also
used internally for other implementation.
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:07 -03:00
Adhemerval Zanella 08c68809d0 math: Use internal feupdateenv alias on fma
To avoid linknamespace issues on old standards.  It is required
if the fallback fma implementation is used if/when it is also
used internally for other implementation.
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:07 -03:00
Adhemerval Zanella 5624ee0482 math: Use internal feholdexcept alias on fma
To avoid linknamespace issues on old standards.  It is required
if the fallback fma implementation is used if/when it is also
used internally for other implementation.
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:07 -03:00
Adhemerval Zanella 2eb8836de7 math: Add feclearexcept internal alias
To avoid linknamespace issues on old standards.  It is required
if the fallback fma implementation is used if/when it is also
used internally for other implementation.
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:07 -03:00
Adhemerval Zanella 1fdb73fb3c benchtests: Add workload directive for tgamma 2025-09-11 14:46:07 -03:00
Adhemerval Zanella 5abfa1365b benchtests: Add workload directive for erf and erfc 2025-09-11 14:46:07 -03:00
Adhemerval Zanella 56e4da7ca5 benchtests: Add workload for lgamma
Random inputs in range [-20.00,20.00].
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:07 -03:00
Adhemerval Zanella 2c25058aa5 benchtests: Add workload for asinh
Random input in range [-10,10].
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:07 -03:00
Adhemerval Zanella ddd8c33f87 benchtests: Add workload for acosh
Random inputs in range [1.00,21.00]
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:07 -03:00
Adhemerval Zanella 10ca44f1cc SHARED-FILES: Adjust core-math entries
And remove duplicate info on each file wrt glibc changes.  Also
add the core-math git repository link.
Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-11 14:46:07 -03:00
Adhemerval Zanella b5d88fa6c3 math: Fix x86_64 build for -Os (BZ 33367)
The compiler might not inline the trunc function call for
USE_TRUNC_BUILTIN [1].

This patch adds an optimized __trunc/__truncf for x86 used
on modf ifunc variant to avoid the trunc libcall.

Checked on x86_64, x86_64-v2, x86_64-v3, and x86_64-v4. Used -O2 and
-Os options. Performed a full make check on x86_64 with both
 optimizations.

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121861
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-09-11 06:23:33 -07:00
Yury Khrustalev f0b88eb784 manual: fix typo 2025-09-11 10:50:43 +01:00
Mike FABIAN 88dc93cb40 Update to Unicode 17.0.0 [BZ #33289]
Unicode 17.0.0 Support: Character encoding, character type info, and
transliteration tables are all updated to Unicode 17.0.0, using
the generator scripts contributed by Mike FABIAN (Red Hat).

Changes in CHARMAP and WIDTH:

    Total added characters in newly generated CHARMAP: 4803
    Total removed characters in newly generated WIDTH: 0
    Total changed characters in newly generated WIDTH: 0
    Total added characters in newly generated WIDTH: 4512

Some combining characters and other non-spacing marks have been added
with WIDTH 0. Lots of characters have been added with WIDTH 2, most of
them are CJK Ideographs plus a few Tangut characters and 7 emoji.

Changes in ctype:

    alpha: Added 4672 characters in new ctype which were not in old ctype
    combining: Added 42 characters in new ctype which were not in old ctype
    combining_level3: Added 8 characters in new ctype which were not in old ctype
    graph: Added 4803 characters in new ctype which were not in old ctype
    lower: Missing: ʕ 0x295 LATIN LETTER PHARYNGEAL VOICED FRICATIVE
    lower: Added 27 characters in new ctype which were not in old ctype
    print: Added 4803 characters in new ctype which were not in old ctype
    punct: Added 131 characters in new ctype which were not in old ctype
    tolower: Added 28 characters in new ctype which were not in old ctype
    totitle: Added 28 characters in new ctype which were not in old ctype
    toupper: Added 28 characters in new ctype which were not in old ctype
    upper: Added 28 characters in new ctype which were not in old ctype

Nothing suspicious in the additions.

About the character removed from lower:

ʕ 0x295 LATIN LETTER PHARYNGEAL VOICED FRICATIVE

In UnicodeData.txt it changed from 'Ll' (Letter Lowercase) to 'Lo' (Letter Other):

-0295;LATIN LETTER PHARYNGEAL VOICED FRICATIVE;Ll;0;L;;;;;N;LATIN LETTER REVERSED GLOTTAL STOP;;;;
+0295;LATIN LETTER PHARYNGEAL VOICED FRICATIVE;Lo;0;L;;;;;N;LATIN LETTER REVERSED GLOTTAL STOP;;;;

Resolves: BZ #33289

Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-09-11 09:42:18 +02:00
remph e20ca759af AArch64: add optimised strspn/strcspn
Requires Neon (aka. Advanced SIMD).  Looks up 16 characters at a time,
for a 2-3x perfomance improvement, and a ~30% speedup on the strtok &
strsep benchtests, as tested on Cortex A-{53,72}.

Signed-off-by: remph <lhr@disroot.org>

Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
2025-09-10 16:12:23 +00:00
Uros Bizjak 1a076b5c21 i386: Use __seg_gs qualifiers in {STACK, POINTER}_CHK_GUARD macros
Use the __seg_gs named address space qualifiers to cast reads of
the guard values in the TCB as %gs: prefixed addresses.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-09-10 05:32:40 -07:00
Uros Bizjak f402c54483 x86_64: Use __seg_fs qualifiers in {STACK, POINTER}_CHK_GUARD macros
Use the __seg_fs named address space qualifiers to cast reads of
the guard values in the TCB as %fs: prefixed addresses.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-09-10 05:32:17 -07:00
Uros Bizjak 4be94f6a9c x86: Remove x86 version of thread_pointer.h
The x86 version of thread_pointer.h is the same as the generic one.

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-09-10 05:30:07 -07:00
Uros Bizjak e5222ceb73 x86: Remove stale __GNUC_PREREQ (11, 1) test from __thread_pointer()
GCC 12 is currently the minimum supported compiler version.
Remove no longer needed __GNUC_PREREQ (11, 1) test from
__thread_pointer().

Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Cc: H.J.Lu <hjl.tools@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>
Cc: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-09-10 05:30:07 -07:00
Wilco Dijkstra 19442c052c malloc: Cleanup libc_realloc
Minor cleanup of libc_realloc: remove unnecessary special cases for mmap, move
ar_ptr initialization, first check for oldmem == NULL.

Reviewed-by: DJ Delorie <dj@redhat.com>
2025-09-10 09:18:06 +00:00
Wilco Dijkstra 210ee29503 atomics: Remove unused atomics
Remove all unused atomics.  Replace uses of catomic_increment and
catomic_decrement with atomic_fetch_add_relaxed which maps to a standard
compiler builtin. Relaxed memory ordering is correct for simple counters
since they only need atomicity.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2025-09-10 09:18:06 +00:00