x64: Fix RETHI/RETLO swap after call.

Reported by savilli.
This commit is contained in:
Mike Pall 2022-04-05 09:55:15 +02:00
parent 20aea93915
commit 5e3c45c43b

View File

@ -847,7 +847,8 @@ static void ra_destpair(ASMState *as, IRIns *ir)
if (destlo == RID_RETHI) {
if (desthi == RID_RETLO) {
#if LJ_TARGET_X86ORX64
*--as->mcp = REX_64IR(irx, XI_XCHGa + RID_RETHI);
*--as->mcp = XI_XCHGa + RID_RETHI;
if (LJ_64 && irt_is64(irx->t)) *--as->mcp = 0x48;
#else
emit_movrr(as, irx, RID_RETHI, RID_TMP);
emit_movrr(as, irx, RID_RETLO, RID_RETHI);