| ... | ... | @@ -78,6 +78,8 @@ const current_variant: Variant = switch (native_arch) { |
| 78 | 78 | .sheb, |
| 79 | 79 | .thumb, |
| 80 | 80 | .thumbeb, |
| 81 | .xtensa, |
| 82 | .xtensaeb, |
| 81 | 83 | => .I_original, |
| 82 | 84 | .loongarch32, |
| 83 | 85 | .loongarch64, |
| ... | ... | @@ -152,6 +154,8 @@ const AbiTcb = switch (current_variant) { |
| 152 | 154 | .sheb, |
| 153 | 155 | .thumb, |
| 154 | 156 | .thumbeb, |
| 157 | .xtensa, |
| 158 | .xtensaeb, |
| 155 | 159 | => extern struct { |
| 156 | 160 | /// This is offset by `current_dtv_offset`. |
| 157 | 161 | dtv: usize, |
| ... | ... | @@ -364,6 +368,13 @@ pub fn setThreadPointer(addr: usize) void { |
| 364 | 368 | : [addr] "r" (addr), |
| 365 | 369 | ); |
| 366 | 370 | }, |
| 371 | .xtensa, .xtensaeb => { |
| 372 | asm volatile ( |
| 373 | \\ wur %[addr], threadptr |
| 374 | : |
| 375 | : [addr] "a" (addr), |
| 376 | ); |
| 377 | }, |
| 367 | 378 | else => @compileError("Unsupported architecture"), |
| 368 | 379 | } |
| 369 | 380 | } |