mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
std.os.linux.tls: Add m68k support.
This commit is contained in:
parent
37275c0f69
commit
44d4656dfc
@ -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]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user