mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
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.
This commit is contained in:
parent
9cd37a0696
commit
de3b22db4d
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user