x86_64/Emit: don't misisel push/pop for extended regs

This commit is contained in:
Jacob G-W 2021-11-10 14:25:43 -05:00 committed by Jakub Konka
parent e5bc092408
commit f3ba72cf5a

View File

@ -197,7 +197,10 @@ fn mirPushPop(emit: *Emit, tag: Mir.Inst.Tag, inst: Mir.Inst.Index) InnerError!v
.pop => 0x58,
else => unreachable,
};
const encoder = try Encoder.init(emit.code, 1);
const encoder = try Encoder.init(emit.code, 2);
encoder.rex(.{
.b = ops.reg1.isExtended(),
});
encoder.opcode_withReg(opc, ops.reg1.lowId());
},
0b01 => {