From b759773b3b76c62200ecd4e097ec6ecfd825aacb Mon Sep 17 00:00:00 2001 From: MerryMage Date: Fri, 19 Jun 2020 00:44:37 +0100 Subject: [PATCH] a32_emit_x64: EmitVAddrLookup: Use 64-bit registers where required --- src/backend/x64/a32_emit_x64.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/x64/a32_emit_x64.cpp b/src/backend/x64/a32_emit_x64.cpp index b8088e26..f9882c6a 100644 --- a/src/backend/x64/a32_emit_x64.cpp +++ b/src/backend/x64/a32_emit_x64.cpp @@ -933,7 +933,7 @@ Xbyak::RegExp EmitVAddrLookup(BlockOfCode& code, A32EmitContext& ctx, size_t bit code.mov(tmp, vaddr.cvt32()); code.shr(tmp, static_cast(page_bits)); - code.mov(page, qword[r14 + tmp * sizeof(void*)]); + code.mov(page, qword[r14 + tmp.cvt64() * sizeof(void*)]); code.test(page, page); code.jz(abort, code.T_NEAR); if (ctx.conf.absolute_offset_page_table) { @@ -941,7 +941,7 @@ Xbyak::RegExp EmitVAddrLookup(BlockOfCode& code, A32EmitContext& ctx, size_t bit } code.mov(tmp, vaddr.cvt32()); code.and_(tmp, static_cast(page_mask)); - return page + tmp; + return page + tmp.cvt64(); } template