mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 19:23:08 +00:00
std.os.linux.tls: implement or1k support
This commit is contained in:
parent
e646c47f67
commit
35e819aac8
@ -79,6 +79,7 @@ const current_variant: Variant = switch (native_arch) {
|
||||
.mipsel,
|
||||
.mips64,
|
||||
.mips64el,
|
||||
.or1k,
|
||||
.powerpc,
|
||||
.powerpcle,
|
||||
.powerpc64,
|
||||
@ -285,6 +286,13 @@ pub fn setThreadPointer(addr: usize) void {
|
||||
const rc = @call(.always_inline, linux.syscall1, .{ .set_thread_area, addr });
|
||||
assert(rc == 0);
|
||||
},
|
||||
.or1k => {
|
||||
asm volatile (
|
||||
\\ l.ori r10, %[addr], 0
|
||||
:
|
||||
: [addr] "r" (addr),
|
||||
);
|
||||
},
|
||||
.powerpc, .powerpcle => {
|
||||
asm volatile (
|
||||
\\ mr 2, %[addr]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user