10 Commits
Author SHA1 Message Date
Alex Rønne PetersenandRich Felker b37d241dfe fenv: add missing C dummy functions for loongarch64 soft float
analogous to fenv-sf.c for all other archs with softfloat variants.
2026-03-10 23:36:59 -04:00
Alex Rønne PetersenandRich Felker 1b76ff0767 s390x: shuffle register usage in __tls_get_offset to avoid r0 as address
This fixes an error in 6af4f25b89: The
r0 register is special in addressing modes on s390x and is interpreted
as constant zero, i.e. lg %r5, 8(%r0) would effectively become lg %r5,
8. So care should be taken to never use r0 as an address register in
s390x assembly.
2025-10-12 16:15:47 -04:00
Alex Rønne PetersenandRich Felker 0b86d60bad riscv: fix setjmp assembly when compiling for ilp32f/lp64f.
per the psABI, floating point register contents beyond the register
size of the targeted ABI variant are never call-saved, so no
hwcap-conditional logic is needed here and the assembly-time
conditions are based purely on ABI variant macros, not the targeted
ISA level.
2025-08-16 23:17:56 -04:00
Alex Rønne PetersenandRich Felker b6b81f697b clone: clear the frame pointer in the child process on relevant ports
This just mirrors what is done in the start code for the affected
ports, as well as what is already done for the three x86 ports.

Clearing the frame pointer helps protect FP-based unwinders from
wrongly attempting to traverse into the parent thread's call frame
stack.
2025-02-21 20:53:41 -05:00
Alex Rønne PetersenandRich Felker 5e03c03fcd clone: align the given stack pointer on or1k and riscv
This was an oversight specific to these archs; others have always
aligned the new stack pointer correctly.
2025-02-21 19:56:28 -05:00
Alex Rønne PetersenandRich Felker 362fc54572 riscv: mark __restore and __restore_rt hidden 2025-02-21 19:30:42 -05:00
Alex Rønne PetersenandRich Felker f1cda422cd i386, x86_64, x32: set the symbol type for the crt1 START function 2025-02-21 19:29:44 -05:00
Alex Rønne PetersenandRich Felker 6af4f25b89 s390x: manually inline __tls_get_addr in __tls_get_offset
Calling __tls_get_addr with brasl is not valid since it's a global symbol; doing
so results in an R_390_PC32DBL relocation error from lld. We could fix this by
marking __tls_get_addr hidden since it is not part of the s390x ABI, or by using
a different instruction. However, given its simplicity, it makes more sense to
just manually inline it into __tls_get_offset for performance.

The patch has been tested by applying to Zig's bundled musl copy and running the
full Zig test suite under qemu-s390x.
2025-02-09 09:46:53 -05:00
Alex Rønne PetersenandRich Felker bc5f816a7a mips: use preferred asm mnemomic jr for better assembler compatibility
The LLVM assembler reportedly assembles the form using the j mnemonic
incorrectly (see issue 107460). The jr form is canonical and avoids
this problem, so use it instead.
2024-10-22 18:58:02 -04:00
Alex Rønne PetersenandRich Felker 9929a571b5 arm: fix _init/_fini alignment in crti.o
This is just cbf59dd6 applied to arm.
2024-10-22 17:44:23 -04:00