std.os.linux.tls: add hppa support

Turns out Linux on PA-RISC does system calls in a pretty fascinating way; see
arch/parisc/kernel/syscall.S for details.
This commit is contained in:
Alex Rønne Petersen 2025-10-21 04:26:27 +02:00
parent aff557e4e8
commit f723d69a58
No known key found for this signature in database

View File

@ -71,6 +71,7 @@ const current_variant: Variant = switch (native_arch) {
.arm,
.armeb,
.csky,
.hppa,
.microblaze,
.microblazeel,
.sh,
@ -144,6 +145,7 @@ const AbiTcb = switch (current_variant) {
.alpha,
.arm,
.armeb,
.hppa,
.microblaze,
.microblazeel,
.sh,
@ -285,6 +287,13 @@ pub fn setThreadPointer(addr: usize) void {
: [addr] "r" (addr),
);
},
.hppa => {
asm volatile (
\\ ble 0xe0(%%sr2, %%r0)
:
: [addr] "={r26}" (addr),
: .{ .r29 = true });
},
.loongarch32, .loongarch64 => {
asm volatile (
\\ move $tp, %[addr]