std.os.linux.tls: implement or1k support

This commit is contained in:
Alex Rønne Petersen 2025-10-18 15:02:31 +02:00
parent e646c47f67
commit 35e819aac8
No known key found for this signature in database

View File

@ -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]