authorgravatar for lewis.gaul@gmail.comLewis Gaul <lewis.gaul@gmail.com> 2021-07-18 23:26:02+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-07-20 12:19:16-07:00
logbf8e347b1b99ab711036c76df44a4eed2f6677d5
treecb8a57abf019d50c6c56500360646e94dca1a020
parent7381431e68eba09f76ddc41cff8931d3e4f1a798

Get codegen.zig to compile - use '{d}' format for Air.Inst.Index values


1 files changed, 3 insertions(+), 3 deletions(-)

src/codegen.zig+3-3
...@@ -1048,7 +1048,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {...@@ -1048,7 +1048,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {
10481048
1049 pub fn spillInstruction(self: *Self, reg: Register, inst: Air.Inst.Index) !void {1049 pub fn spillInstruction(self: *Self, reg: Register, inst: Air.Inst.Index) !void {
1050 const stack_mcv = try self.allocRegOrMem(inst, false);1050 const stack_mcv = try self.allocRegOrMem(inst, false);
1051 log.debug("spilling {*} to stack mcv {any}", .{ inst, stack_mcv });1051 log.debug("spilling {d} to stack mcv {any}", .{ inst, stack_mcv });
1052 const reg_mcv = self.getResolvedInstValue(inst);1052 const reg_mcv = self.getResolvedInstValue(inst);
1053 assert(reg == toCanonicalReg(reg_mcv.register));1053 assert(reg == toCanonicalReg(reg_mcv.register));
1054 const branch = &self.branch_stack.items[self.branch_stack.items.len - 1];1054 const branch = &self.branch_stack.items[self.branch_stack.items.len - 1];
...@@ -3115,7 +3115,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {...@@ -3115,7 +3115,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {
3115 }3115 }
3116 }3116 }
3117 };3117 };
3118 log.debug("consolidating else_entry {*} {}=>{}", .{ else_key, else_value, canon_mcv });3118 log.debug("consolidating else_entry {d} {}=>{}", .{ else_key, else_value, canon_mcv });
3119 // TODO make sure the destination stack offset / register does not already have something3119 // TODO make sure the destination stack offset / register does not already have something
3120 // going on there.3120 // going on there.
3121 try self.setRegOrMem(self.air.typeOfIndex(else_key), canon_mcv, else_value);3121 try self.setRegOrMem(self.air.typeOfIndex(else_key), canon_mcv, else_value);
...@@ -3142,7 +3142,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {...@@ -3142,7 +3142,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type {
3142 }3142 }
3143 }3143 }
3144 };3144 };
3145 log.debug("consolidating then_entry {*} {}=>{}", .{ then_key, parent_mcv, then_value });3145 log.debug("consolidating then_entry {d} {}=>{}", .{ then_key, parent_mcv, then_value });
3146 // TODO make sure the destination stack offset / register does not already have something3146 // TODO make sure the destination stack offset / register does not already have something
3147 // going on there.3147 // going on there.
3148 try self.setRegOrMem(self.air.typeOfIndex(then_key), parent_mcv, then_value);3148 try self.setRegOrMem(self.air.typeOfIndex(then_key), parent_mcv, then_value);