aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Gregoratto <dev@sgregoratto.me>2023-01-19 00:55:51 +1100
committerVeikka Tuominen <git@vexu.eu>2023-01-21 23:20:50 +0200
commit7f635ae7bdf63da19d09763c7fdbdc61fa035282 (patch)
tree02bdc2a4af9b840364b15b3eb1fd89913e45d3d4 /src
parent38eebf3c4d68239e1d29118234a3165355a3a5fc (diff)
downloadzig-7f635ae7bdf63da19d09763c7fdbdc61fa035282.tar.gz
zig-7f635ae7bdf63da19d09763c7fdbdc61fa035282.zip
FreeBSD: add mcontext_t for aarch64
What isn't disabled for test-std mostly passes, except for the copysign and signbit tests for f16. Seemingly related to #14366.
Diffstat (limited to 'src')
-rw-r--r--src/crash_report.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/crash_report.zig b/src/crash_report.zig
index 1bc0dd7626..b2e3018de6 100644
--- a/src/crash_report.zig
+++ b/src/crash_report.zig
@@ -238,12 +238,14 @@ fn handleSegfaultPosix(sig: i32, info: *const os.siginfo_t, ctx_ptr: ?*const any
const ip = switch (native_os) {
.macos => @intCast(usize, ctx.mcontext.ss.pc),
.netbsd => @intCast(usize, ctx.mcontext.gregs[os.REG.PC]),
+ .freebsd => @intCast(usize, ctx.mcontext.gpregs.elr),
else => @intCast(usize, ctx.mcontext.pc),
};
// x29 is the ABI-designated frame pointer
const bp = switch (native_os) {
.macos => @intCast(usize, ctx.mcontext.ss.fp),
.netbsd => @intCast(usize, ctx.mcontext.gregs[os.REG.FP]),
+ .freebsd => @intCast(usize, ctx.mcontext.gpregs.x[os.REG.FP]),
else => @intCast(usize, ctx.mcontext.regs[29]),
};
break :ctx StackContext{ .exception = .{ .bp = bp, .ip = ip } };