mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 11:13: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,
|
.mipsel,
|
||||||
.mips64,
|
.mips64,
|
||||||
.mips64el,
|
.mips64el,
|
||||||
|
.or1k,
|
||||||
.powerpc,
|
.powerpc,
|
||||||
.powerpcle,
|
.powerpcle,
|
||||||
.powerpc64,
|
.powerpc64,
|
||||||
@ -285,6 +286,13 @@ pub fn setThreadPointer(addr: usize) void {
|
|||||||
const rc = @call(.always_inline, linux.syscall1, .{ .set_thread_area, addr });
|
const rc = @call(.always_inline, linux.syscall1, .{ .set_thread_area, addr });
|
||||||
assert(rc == 0);
|
assert(rc == 0);
|
||||||
},
|
},
|
||||||
|
.or1k => {
|
||||||
|
asm volatile (
|
||||||
|
\\ l.ori r10, %[addr], 0
|
||||||
|
:
|
||||||
|
: [addr] "r" (addr),
|
||||||
|
);
|
||||||
|
},
|
||||||
.powerpc, .powerpcle => {
|
.powerpc, .powerpcle => {
|
||||||
asm volatile (
|
asm volatile (
|
||||||
\\ mr 2, %[addr]
|
\\ mr 2, %[addr]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user