diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-10-19 23:32:47 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-10-23 09:27:17 +0200 |
| commit | 3e2daa509a897a4e10d5e6f28731b33ac2cc3dc2 (patch) | |
| tree | 6475c28a83f4b9495a4554a9bf9b06c8410dbc2f /lib/std/debug | |
| parent | dda05b29c06731895970e75c7444f0d30c7d334f (diff) | |
| download | zig-3e2daa509a897a4e10d5e6f28731b33ac2cc3dc2.tar.gz zig-3e2daa509a897a4e10d5e6f28731b33ac2cc3dc2.zip | |
std.Target: add arceb and xtensaeb Cpu.Arch tags
Diffstat (limited to 'lib/std/debug')
| -rw-r--r-- | lib/std/debug/Dwarf.zig | 6 | ||||
| -rw-r--r-- | lib/std/debug/SelfInfo/Elf.zig | 2 | ||||
| -rw-r--r-- | lib/std/debug/cpu_context.zig | 10 |
3 files changed, 10 insertions, 8 deletions
diff --git a/lib/std/debug/Dwarf.zig b/lib/std/debug/Dwarf.zig index 7229dcdf4c..11dc6e5429 100644 --- a/lib/std/debug/Dwarf.zig +++ b/lib/std/debug/Dwarf.zig @@ -1430,7 +1430,7 @@ pub fn compactUnwindToDwarfRegNumber(unwind_reg_number: u3) !u16 { pub fn ipRegNum(arch: std.Target.Cpu.Arch) ?u16 { return switch (arch) { .aarch64, .aarch64_be => 32, - .arc => 160, + .arc, .arceb => 160, .arm, .armeb, .thumb, .thumbeb => 15, .csky => 64, .hexagon => 76, @@ -1453,7 +1453,7 @@ pub fn ipRegNum(arch: std.Target.Cpu.Arch) ?u16 { pub fn fpRegNum(arch: std.Target.Cpu.Arch) u16 { return switch (arch) { .aarch64, .aarch64_be => 29, - .arc => 27, + .arc, .arceb => 27, .arm, .armeb, .thumb, .thumbeb => 11, .csky => 14, .hexagon => 30, @@ -1476,7 +1476,7 @@ pub fn fpRegNum(arch: std.Target.Cpu.Arch) u16 { pub fn spRegNum(arch: std.Target.Cpu.Arch) u16 { return switch (arch) { .aarch64, .aarch64_be => 31, - .arc => 28, + .arc, .arceb => 28, .arm, .armeb, .thumb, .thumbeb => 13, .csky => 14, .hexagon => 29, diff --git a/lib/std/debug/SelfInfo/Elf.zig b/lib/std/debug/SelfInfo/Elf.zig index 5713542510..d9f48281de 100644 --- a/lib/std/debug/SelfInfo/Elf.zig +++ b/lib/std/debug/SelfInfo/Elf.zig @@ -102,7 +102,7 @@ pub const can_unwind: bool = s: { .x86, .x86_64, }, - // Not supported yet: arm/armeb/thumb/thumbeb, xtensa + // Not supported yet: arm/armeb/thumb/thumbeb, xtensa/xtensaeb .linux => &.{ .aarch64, .aarch64_be, 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 { |
