aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug/cpu_context.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-10-19 23:32:47 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-10-23 09:27:17 +0200
commit3e2daa509a897a4e10d5e6f28731b33ac2cc3dc2 (patch)
tree6475c28a83f4b9495a4554a9bf9b06c8410dbc2f /lib/std/debug/cpu_context.zig
parentdda05b29c06731895970e75c7444f0d30c7d334f (diff)
downloadzig-3e2daa509a897a4e10d5e6f28731b33ac2cc3dc2.tar.gz
zig-3e2daa509a897a4e10d5e6f28731b33ac2cc3dc2.zip
std.Target: add arceb and xtensaeb Cpu.Arch tags
Diffstat (limited to 'lib/std/debug/cpu_context.zig')
-rw-r--r--lib/std/debug/cpu_context.zig10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/std/debug/cpu_context.zig b/lib/std/debug/cpu_context.zig
index caed9e3289..0b1a4e34b7 100644
--- a/lib/std/debug/cpu_context.zig
+++ b/lib/std/debug/cpu_context.zig
@@ -5,7 +5,7 @@ pub const Native = if (@hasDecl(root, "debug") and @hasDecl(root.debug, "CpuCont
root.debug.CpuContext
else switch (native_arch) {
.aarch64, .aarch64_be => Aarch64,
- .arc => Arc,
+ .arc, .arceb => Arc,
.arm, .armeb, .thumb, .thumbeb => Arm,
.csky => Csky,
.hexagon => Hexagon,
@@ -36,7 +36,7 @@ pub fn fromPosixSignalContext(ctx_ptr: ?*const anyopaque) ?Native {
const uc: *const signal_ucontext_t = @ptrCast(@alignCast(ctx_ptr));
// Deal with some special cases first.
- if (native_arch == .arc and native_os == .linux) {
+ if (native_arch.isArc() and native_os == .linux) {
var native: Native = .{
.r = [_]u32{ uc.mcontext.r31, uc.mcontext.r30, 0, uc.mcontext.r28 } ++
uc.mcontext.r27_26 ++
@@ -1553,6 +1553,7 @@ const signal_ucontext_t = switch (native_os) {
},
// https://github.com/torvalds/linux/blob/cd5a0afbdf8033dc83786315d63f8b325bdba2fd/include/uapi/asm-generic/ucontext.h
.arc,
+ .arceb,
.csky,
.hexagon,
.m68k,
@@ -1565,13 +1566,14 @@ const signal_ucontext_t = switch (native_os) {
.x86,
.x86_64,
.xtensa,
+ .xtensaeb,
=> extern struct {
_flags: usize,
_link: ?*signal_ucontext_t,
_stack: std.os.linux.stack_t,
mcontext: switch (native_arch) {
// https://github.com/torvalds/linux/blob/cd5a0afbdf8033dc83786315d63f8b325bdba2fd/arch/arc/include/uapi/asm/sigcontext.h
- .arc => extern struct {
+ .arc, .arceb => extern struct {
_pad1: u32,
_bta: u32,
_lp: extern struct {
@@ -1691,7 +1693,7 @@ const signal_ucontext_t = switch (native_os) {
rip: u64,
},
// https://github.com/torvalds/linux/blob/cd5a0afbdf8033dc83786315d63f8b325bdba2fd/arch/xtensa/include/uapi/asm/sigcontext.h
- .xtensa => extern struct {
+ .xtensa, .xtensaeb => extern struct {
pc: u32,
_ps: u32,
_l: extern struct {