From 73f385eec57d4fc28069b60f059fa8553d3a0c1b Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Fri, 16 Aug 2024 11:49:23 +0200 Subject: [PATCH] Update src/arch/x86_64/CodeGen.zig Co-authored-by: Jacob Young --- src/arch/x86_64/CodeGen.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig index 1edf208d4c..bfcc29348c 100644 --- a/src/arch/x86_64/CodeGen.zig +++ b/src/arch/x86_64/CodeGen.zig @@ -1382,7 +1382,10 @@ fn asmImmediate(self: *Self, tag: Mir.Inst.FixedTag, imm: Immediate) !void { .reloc => .rel, }, .data = switch (imm) { - .reloc => |x| .{ .reloc = x }, + .reloc => |x| reloc: { + assert(tag[0] == ._); + break :reloc .{ .reloc = x }; + }, .signed, .unsigned => .{ .i = .{ .fixes = tag[0], .i = switch (imm) {