authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-10-27 22:10:19+02:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2023-10-28 03:48:18-04:00
log396003fb06b7187917d2bebbfb494839988945fe
tree72e8b8d4e7bd2d4b0c3545315e61c0d576c9e87a
parent493f786b381ed45343f0a997f77edd642035a64f

x86_64: assert fixes are ._ for linker_reloc


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

src/arch/x86_64/Lower.zig+3
...@@ -414,6 +414,7 @@ fn generic(lower: *Lower, inst: Mir.Inst) Error!void {...@@ -414,6 +414,7 @@ fn generic(lower: *Lower, inst: Mir.Inst) Error!void {
414 => ._,414 => ._,
415 .linker_reloc => {415 .linker_reloc => {
416 if (lower.bin_file.options.pic) {416 if (lower.bin_file.options.pic) {
417 assert(inst.data.rx.fixes == ._);
417 const reg = inst.data.rx.r1;418 const reg = inst.data.rx.r1;
418 const extra = lower.mir.extraData(Mir.Reloc, inst.data.rx.payload).data;419 const extra = lower.mir.extraData(Mir.Reloc, inst.data.rx.payload).data;
419 _ = lower.reloc(.{ .linker_reloc = extra });420 _ = lower.reloc(.{ .linker_reloc = extra });
...@@ -435,6 +436,7 @@ fn generic(lower: *Lower, inst: Mir.Inst) Error!void {...@@ -435,6 +436,7 @@ fn generic(lower: *Lower, inst: Mir.Inst) Error!void {
435 });436 });
436 },437 },
437 .lea => {438 .lea => {
439 assert(inst.data.rx.fixes == ._);
438 const reg = inst.data.rx.r1;440 const reg = inst.data.rx.r1;
439 const extra = lower.mir.extraData(Mir.Reloc, inst.data.rx.payload).data;441 const extra = lower.mir.extraData(Mir.Reloc, inst.data.rx.payload).data;
440 try lower.emit(.none, .mov, &.{442 try lower.emit(.none, .mov, &.{
...@@ -443,6 +445,7 @@ fn generic(lower: *Lower, inst: Mir.Inst) Error!void {...@@ -443,6 +445,7 @@ fn generic(lower: *Lower, inst: Mir.Inst) Error!void {
443 });445 });
444 },446 },
445 .mov => {447 .mov => {
448 assert(inst.data.rx.fixes == ._);
446 const reg = inst.data.rx.r1;449 const reg = inst.data.rx.r1;
447 const extra = lower.mir.extraData(Mir.Reloc, inst.data.rx.payload).data;450 const extra = lower.mir.extraData(Mir.Reloc, inst.data.rx.payload).data;
448 _ = lower.reloc(.{ .linker_reloc = extra });451 _ = lower.reloc(.{ .linker_reloc = extra });