diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2022-02-22 19:33:00 +0100 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2022-02-22 21:57:44 +0100 |
| commit | d657ede32421910d5cba5b749182dcd1875efe18 (patch) | |
| tree | f7c5a598876124ed2af8cdf43dc676a0b1630b2b /src | |
| parent | 25e4b16e25502ca5e76e4049ed9f727168782dde (diff) | |
| download | zig-d657ede32421910d5cba5b749182dcd1875efe18.tar.gz zig-d657ede32421910d5cba5b749182dcd1875efe18.zip | |
x64: disable printing results on macos until I fix the linker
Hopefully, this will make the CI green, and in the meantime I can
fix the bugs in the MachO linker.
Diffstat (limited to 'src')
| -rw-r--r-- | src/arch/x86_64/CodeGen.zig | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig index 68fc9b1ce5..e59161a766 100644 --- a/src/arch/x86_64/CodeGen.zig +++ b/src/arch/x86_64/CodeGen.zig @@ -3880,6 +3880,10 @@ fn genCondSwitchMir(self: *Self, ty: Type, condition: MCValue, case: MCValue) !u .compare_flags_unsigned => unreachable, .register => |cond_reg| { try self.spillCompareFlagsIfOccupied(); + + self.register_manager.freezeRegs(&.{cond_reg}); + defer self.register_manager.unfreezeRegs(&.{cond_reg}); + switch (case) { .none => unreachable, .undef => unreachable, @@ -3930,6 +3934,18 @@ fn genCondSwitchMir(self: *Self, ty: Type, condition: MCValue, case: MCValue) !u }, } }, + .stack_offset => { + try self.spillCompareFlagsIfOccupied(); + + if (abi_size <= 8) { + const reg = try self.copyToTmpRegister(ty, condition); + self.register_manager.freezeRegs(&.{reg}); + defer self.register_manager.unfreezeRegs(&.{reg}); + return self.genCondSwitchMir(ty, .{ .register = reg }, case); + } + + return self.fail("TODO implement switch mir when condition is stack offset with abi larger than 8 bytes", .{}); + }, else => { return self.fail("TODO implemenent switch mir when condition is {}", .{condition}); }, |
