| ... | @@ -78,6 +78,8 @@ const current_variant: Variant = switch (native_arch) { | ... | @@ -78,6 +78,8 @@ const current_variant: Variant = switch (native_arch) { |
| 78 | .sheb, | 78 | .sheb, |
| 79 | .thumb, | 79 | .thumb, |
| 80 | .thumbeb, | 80 | .thumbeb, |
| | 81 | .xtensa, |
| | 82 | .xtensaeb, |
| 81 | => .I_original, | 83 | => .I_original, |
| 82 | .loongarch32, | 84 | .loongarch32, |
| 83 | .loongarch64, | 85 | .loongarch64, |
| ... | @@ -152,6 +154,8 @@ const AbiTcb = switch (current_variant) { | ... | @@ -152,6 +154,8 @@ const AbiTcb = switch (current_variant) { |
| 152 | .sheb, | 154 | .sheb, |
| 153 | .thumb, | 155 | .thumb, |
| 154 | .thumbeb, | 156 | .thumbeb, |
| | 157 | .xtensa, |
| | 158 | .xtensaeb, |
| 155 | => extern struct { | 159 | => extern struct { |
| 156 | /// This is offset by `current_dtv_offset`. | 160 | /// This is offset by `current_dtv_offset`. |
| 157 | dtv: usize, | 161 | dtv: usize, |
| ... | @@ -364,6 +368,13 @@ pub fn setThreadPointer(addr: usize) void { | ... | @@ -364,6 +368,13 @@ pub fn setThreadPointer(addr: usize) void { |
| 364 | : [addr] "r" (addr), | 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 | else => @compileError("Unsupported architecture"), | 378 | else => @compileError("Unsupported architecture"), |
| 368 | } | 379 | } |
| 369 | } | 380 | } |