zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 396003fb06b7187917d2bebbfb494839988945fe (tree)
parent 493f786b381ed45343f0a997f77edd642035a64f
Author: Jakub Konka <kubkon@jakubkonka.com>
Date:   Fri, 27 Oct 2023 22:10:19 +0200

x86_64: assert fixes are ._ for linker_reloc

Diffstat:
Msrc/arch/x86_64/Lower.zig | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/arch/x86_64/Lower.zig b/src/arch/x86_64/Lower.zig @@ -414,6 +414,7 @@ fn generic(lower: *Lower, inst: Mir.Inst) Error!void { => ._, .linker_reloc => { if (lower.bin_file.options.pic) { + assert(inst.data.rx.fixes == ._); const reg = inst.data.rx.r1; const extra = lower.mir.extraData(Mir.Reloc, inst.data.rx.payload).data; _ = lower.reloc(.{ .linker_reloc = extra }); @@ -435,6 +436,7 @@ fn generic(lower: *Lower, inst: Mir.Inst) Error!void { }); }, .lea => { + assert(inst.data.rx.fixes == ._); const reg = inst.data.rx.r1; const extra = lower.mir.extraData(Mir.Reloc, inst.data.rx.payload).data; try lower.emit(.none, .mov, &.{ @@ -443,6 +445,7 @@ fn generic(lower: *Lower, inst: Mir.Inst) Error!void { }); }, .mov => { + assert(inst.data.rx.fixes == ._); const reg = inst.data.rx.r1; const extra = lower.mir.extraData(Mir.Reloc, inst.data.rx.payload).data; _ = lower.reloc(.{ .linker_reloc = extra });