zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 975cd9fc4ff8c12ae1f54e470b72be04d26e0837 (tree)
parent bfabb703e32c8bbca3724ee1fa79d565adc1a200
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Sat,  8 Feb 2025 05:31:27 +0100

musl: Align the stack pointer given to clone() on riscv.

Diffstat:
Mlib/libc/musl/src/thread/riscv32/clone.s | 2++
Mlib/libc/musl/src/thread/riscv64/clone.s | 2++
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/lib/libc/musl/src/thread/riscv32/clone.s b/lib/libc/musl/src/thread/riscv32/clone.s @@ -7,6 +7,8 @@ .global __clone .type __clone, %function __clone: + andi a1, a1, -16 + # Save func and arg to stack addi a1, a1, -16 sw a0, 0(a1) diff --git a/lib/libc/musl/src/thread/riscv64/clone.s b/lib/libc/musl/src/thread/riscv64/clone.s @@ -7,6 +7,8 @@ .global __clone .type __clone, %function __clone: + andi a1, a1, -16 + # Save func and arg to stack addi a1, a1, -16 sd a0, 0(a1)