| ... | @@ -69,7 +69,7 @@ const tls_tcb_size = switch (builtin.arch) { | ... | @@ -69,7 +69,7 @@ const tls_tcb_size = switch (builtin.arch) { |
| 69 | | 69 | |
| 70 | // Controls if the TP points to the end of the TCB instead of its beginning | 70 | // Controls if the TP points to the end of the TCB instead of its beginning |
| 71 | const tls_tp_points_past_tcb = switch (builtin.arch) { | 71 | const tls_tp_points_past_tcb = switch (builtin.arch) { |
| 72 | .riscv32, .riscv64, .mips, .mipsel, .powerpc64, .powerpc64le => true, | 72 | .riscv32, .riscv64, .mips, .mipsel, .powerpc, .powerpc64, .powerpc64le => true, |
| 73 | else => false, | 73 | else => false, |
| 74 | }; | 74 | }; |
| 75 | | 75 | |
| ... | @@ -165,7 +165,14 @@ pub fn setThreadPointer(addr: usize) void { | ... | @@ -165,7 +165,14 @@ pub fn setThreadPointer(addr: usize) void { |
| 165 | const rc = std.os.linux.syscall1(.set_thread_area, addr); | 165 | const rc = std.os.linux.syscall1(.set_thread_area, addr); |
| 166 | assert(rc == 0); | 166 | assert(rc == 0); |
| 167 | }, | 167 | }, |
| 168 | .powerpc, .powerpc64, .powerpc64le => { | 168 | .powerpc => { |
| | 169 | asm volatile ( |
| | 170 | \\ mr 2, %[addr] |
| | 171 | : |
| | 172 | : [addr] "r" (addr) |
| | 173 | ); |
| | 174 | }, |
| | 175 | .powerpc64, .powerpc64le => { |
| 169 | asm volatile ( | 176 | asm volatile ( |
| 170 | \\ mr 13, %[addr] | 177 | \\ mr 13, %[addr] |
| 171 | : | 178 | : |