authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-05-30 23:17:25+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-05-30 23:17:25+02:00
log417758b1e60fa6c259b098b1782ad454fb44864f
tree74f924d728e219113dc1e3cd63e0639983f881c3
parent7cfe6c7c13e9931c162edc88d7e0c79fe17752f2
parent14b43a0e9e3db53531fcc6ab0afb436f919d7297

Merge pull request 'std: fix a couple of issues for `arc(eb)-linux`' (#35545) from alexrp/zig:arc-linux into master

Reviewed-on: https://codeberg.org/ziglang/zig/pulls/35545

2 files changed, 11 insertions(+), 1 deletions(-)

lib/std/Thread.zig+10
...@@ -1220,6 +1220,16 @@ const LinuxThreadImpl = struct {...@@ -1220,6 +1220,16 @@ const LinuxThreadImpl = struct {
1220 : [ptr] "{$16}" (@intFromPtr(self.mapped.ptr)),1220 : [ptr] "{$16}" (@intFromPtr(self.mapped.ptr)),
1221 [len] "{$17}" (self.mapped.len),1221 [len] "{$17}" (self.mapped.len),
1222 ),1222 ),
1223 .arc, .arceb => asm volatile (
1224 \\ mov r8, 215 # SYS_munmap
1225 \\ trap_s 0
1226 \\ mov r8, 93 # SYS_exit
1227 \\ mov r0, 0
1228 \\ trap_s 0
1229 :
1230 : [ptr] "{r0}" (@intFromPtr(self.mapped.ptr)),
1231 [len] "{r1}" (self.mapped.len),
1232 ),
1223 .hexagon => asm volatile (1233 .hexagon => asm volatile (
1224 \\ r6 = #215 // SYS_munmap1234 \\ r6 = #215 // SYS_munmap
1225 \\ trap0(#1)1235 \\ trap0(#1)
lib/std/debug/cpu_context.zig+1-1
...@@ -50,7 +50,7 @@ pub fn fromPosixSignalContext(ctx_ptr: ?*const anyopaque) ?Native {...@@ -50,7 +50,7 @@ pub fn fromPosixSignalContext(ctx_ptr: ?*const anyopaque) ?Native {
50 };50 };
5151
52 // I have no idea why the kernel is storing these registers in such a bizarre order...52 // I have no idea why the kernel is storing these registers in such a bizarre order...
53 std.mem.reverse(native.r[0..]);53 std.mem.reverse(u32, native.r[0..]);
5454
55 return native;55 return native;
56 } else if (native_arch == .loongarch32 and native_os == .linux) {56 } else if (native_arch == .loongarch32 and native_os == .linux) {