| ... | ... | @@ -133,6 +133,20 @@ test "alignment and size of structs with 128-bit fields" { |
| 133 | 133 | y: u8, |
| 134 | 134 | }; |
| 135 | 135 | const expected = switch (builtin.cpu.arch) { |
| 136 | .s390x, |
| 137 | => .{ |
| 138 | .a_align = 8, |
| 139 | .a_size = 16, |
| 140 | |
| 141 | .b_align = 8, |
| 142 | .b_size = 24, |
| 143 | |
| 144 | .u128_align = 8, |
| 145 | .u128_size = 16, |
| 146 | .u129_align = 8, |
| 147 | .u129_size = 24, |
| 148 | }, |
| 149 | |
| 136 | 150 | .amdgcn, |
| 137 | 151 | .arm, |
| 138 | 152 | .armeb, |
| ... | ... | @@ -145,7 +159,6 @@ test "alignment and size of structs with 128-bit fields" { |
| 145 | 159 | .powerpc, |
| 146 | 160 | .powerpcle, |
| 147 | 161 | .riscv32, |
| 148 | | .s390x, |
| 149 | 162 | => .{ |
| 150 | 163 | .a_align = 8, |
| 151 | 164 | .a_size = 16, |
| ... | ... | @@ -191,7 +204,7 @@ test "alignment and size of structs with 128-bit fields" { |
| 191 | 204 | |
| 192 | 205 | else => return error.SkipZigTest, |
| 193 | 206 | }; |
| 194 | | const min_struct_align = if (builtin.zig_backend == .stage2_c) 16 else 0; |
| 207 | const min_struct_align = if (builtin.zig_backend == .stage2_c) if (builtin.cpu.arch == .s390x) 8 else 16 else 0; |
| 195 | 208 | comptime { |
| 196 | 209 | assert(@alignOf(A) == @max(expected.a_align, min_struct_align)); |
| 197 | 210 | assert(@sizeOf(A) == expected.a_size); |