zig

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

commit 44d4656dfc8ecf10a4dea0462767ca4e6513a818 (tree)
parent 37275c0f69769774ba4f1fc577b04aa36e24ac6f
Author: Alex Rønne Petersen <alex@alexrp.com>
Date:   Tue, 23 Jul 2024 07:27:07 +0200

std.os.linux.tls: Add m68k support.

Diffstat:
Mlib/std/os/linux/tls.zig | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/lib/std/os/linux/tls.zig b/lib/std/os/linux/tls.zig @@ -70,6 +70,7 @@ const current_variant: Variant = switch (native_arch) { .thumb, .thumbeb, => .I_original, + .m68k, .mips, .mipsel, .mips64, @@ -90,6 +91,7 @@ const current_variant: Variant = switch (native_arch) { /// The Offset value for the modified Variant I. const current_tp_offset = switch (native_arch) { + .m68k, .mips, .mipsel, .mips64, @@ -104,6 +106,7 @@ const current_tp_offset = switch (native_arch) { /// Usually only used by the modified Variant I. const current_dtv_offset = switch (native_arch) { + .m68k, .mips, .mipsel, .mips64, @@ -236,6 +239,10 @@ pub fn setThreadPointer(addr: usize) void { const rc = @call(.always_inline, linux.syscall1, .{ .set_tls, addr }); assert(rc == 0); }, + .m68k => { + const rc = linux.syscall1(.set_thread_area, addr); + assert(rc == 0); + }, .riscv32, .riscv64 => { asm volatile ( \\ mv tp, %[addr]