diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-10-07 00:50:29 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-10-07 16:47:57 +0200 |
| commit | de3b22db4db5e95d3a4a30333784e8d6c2cc3818 (patch) | |
| tree | a1b9b3a137ced530ef8519f8cb8db8771f4a1dfc /lib/std/debug/cpu_context.zig | |
| parent | 9cd37a06965f1993f6e70ca3f10008d02f77334b (diff) | |
| download | zig-de3b22db4db5e95d3a4a30333784e8d6c2cc3818.tar.gz zig-de3b22db4db5e95d3a4a30333784e8d6c2cc3818.zip | |
std.debug.cpu_context: remove support for s390x float registers
Let's for the moment assume that compilers haven't lost the plot.
Fingers crossed.
Diffstat (limited to 'lib/std/debug/cpu_context.zig')
| -rw-r--r-- | lib/std/debug/cpu_context.zig | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/lib/std/debug/cpu_context.zig b/lib/std/debug/cpu_context.zig index b899d76f1b..5b4f842fcd 100644 --- a/lib/std/debug/cpu_context.zig +++ b/lib/std/debug/cpu_context.zig @@ -239,7 +239,6 @@ pub fn fromPosixSignalContext(ctx_ptr: ?*const anyopaque) ?Native { .s390x => switch (builtin.os.tag) { .linux => .{ .r = uc.mcontext.gregs, - .f = uc.mcontext.fregs, .psw = .{ .mask = uc.mcontext.psw.mask, .addr = uc.mcontext.psw.addr, @@ -1029,8 +1028,6 @@ pub const Riscv = extern struct { pub const S390x = extern struct { /// The numbered general-purpose registers r0 - r15. r: [16]u64, - /// The numbered floating-point registers f0 - f15. Yes, really - they can be used in DWARF CFI. - f: [16]f64, /// The program counter. psw: extern struct { mask: u64, @@ -1041,26 +1038,10 @@ pub const S390x = extern struct { var ctx: S390x = undefined; asm volatile ( \\ stmg %%r0, %%r15, 0(%%r2) - \\ std %%f0, 128(%%r2) - \\ std %%f1, 136(%%r2) - \\ std %%f2, 144(%%r2) - \\ std %%f3, 152(%%r2) - \\ std %%f4, 160(%%r2) - \\ std %%f5, 168(%%r2) - \\ std %%f6, 176(%%r2) - \\ std %%f7, 184(%%r2) - \\ std %%f8, 192(%%r2) - \\ std %%f9, 200(%%r2) - \\ std %%f10, 208(%%r2) - \\ std %%f11, 216(%%r2) - \\ std %%f12, 224(%%r2) - \\ std %%f13, 232(%%r2) - \\ std %%f14, 240(%%r2) - \\ std %%f15, 248(%%r2) \\ epsw %%r0, %%r1 - \\ stm %%r0, %%r1, 256(%%r2) + \\ stm %%r0, %%r1, 128(%%r2) \\ larl %%r0, . - \\ stg %%r0, 264(%%r2) + \\ stg %%r0, 136(%%r2) \\ lg %%r0, 0(%%r2) \\ lg %%r1, 8(%%r2) : @@ -1072,26 +1053,10 @@ pub const S390x = extern struct { pub fn dwarfRegisterBytes(ctx: *S390x, register_num: u16) DwarfRegisterError![]u8 { switch (register_num) { 0...15 => return @ptrCast(&ctx.r[register_num]), - // Why??? - 16 => return @ptrCast(&ctx.f[0]), - 17 => return @ptrCast(&ctx.f[2]), - 18 => return @ptrCast(&ctx.f[4]), - 19 => return @ptrCast(&ctx.f[6]), - 20 => return @ptrCast(&ctx.f[1]), - 21 => return @ptrCast(&ctx.f[3]), - 22 => return @ptrCast(&ctx.f[5]), - 23 => return @ptrCast(&ctx.f[7]), - 24 => return @ptrCast(&ctx.f[8]), - 25 => return @ptrCast(&ctx.f[10]), - 26 => return @ptrCast(&ctx.f[12]), - 27 => return @ptrCast(&ctx.f[14]), - 28 => return @ptrCast(&ctx.f[9]), - 29 => return @ptrCast(&ctx.f[11]), - 30 => return @ptrCast(&ctx.f[13]), - 31 => return @ptrCast(&ctx.f[15]), 64 => return @ptrCast(&ctx.psw.mask), 65 => return @ptrCast(&ctx.psw.addr), + 16...31 => return error.UnsupportedRegister, // f0 - f15 48...63 => return error.UnsupportedRegister, // a0 - a15 68...83 => return error.UnsupportedRegister, // v16 - v31 |
