authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-11 09:21:19+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-11 09:23:44+02:00
log8b06537d92e3ab59694453154f17f51cce594cb9
tree6615f8f7b32b034d03975f2801827be90738e913
parent9276a56e3cee12a067f93d719a5e7f2762dd4603
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

compiler_rt.elf.tls: fix AbiTcb for arc and csky

Also simplify the logic since it turns out to really just depend on the variant.

1 files changed, 6 insertions(+), 24 deletions(-)

lib/compiler_rt/elf/tls.zig+6-24
...@@ -158,30 +158,12 @@ const current_dtv_offset = switch (native_arch) {...@@ -158,30 +158,12 @@ const current_dtv_offset = switch (native_arch) {
158158
159/// Per-thread storage for the ELF TLS ABI.159/// Per-thread storage for the ELF TLS ABI.
160const AbiTcb = switch (current_variant) {160const AbiTcb = switch (current_variant) {
161 .I_original, .I_modified => switch (native_arch) {161 .I_original => extern struct {
162 .aarch64,162 dtv: usize,
163 .aarch64_be,163 _reserved: ?*anyopaque,
164 .alpha,164 },
165 .arm,165 .I_modified => extern struct {
166 .armeb,166 dtv: usize,
167 .hppa,
168 .microblaze,
169 .microblazeel,
170 .sh,
171 .sheb,
172 .thumb,
173 .thumbeb,
174 .xtensa,
175 .xtensaeb,
176 => extern struct {
177 /// This is offset by `current_dtv_offset`.
178 dtv: usize,
179 _reserved: ?*anyopaque,
180 },
181 else => extern struct {
182 /// This is offset by `current_dtv_offset`.
183 dtv: usize,
184 },
185 },167 },
186 .II => extern struct {168 .II => extern struct {
187 /// This is self-referential.169 /// This is self-referential.