From 04ea7ae5e83132df18f3fc23947de40c0a210a38 Mon Sep 17 00:00:00 2001 From: Exverge Date: Sat, 8 Aug 2026 22:48:11 +0200 Subject: [PATCH] Update src/dynarmic/src/dynarmic/backend/x64/emit_x64_memory.h Signed-off-by: Exverge --- .../dynarmic/backend/x64/emit_x64_memory.h | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/dynarmic/src/dynarmic/backend/x64/emit_x64_memory.h b/src/dynarmic/src/dynarmic/backend/x64/emit_x64_memory.h index ead16fdc47..ffe18eccb6 100644 --- a/src/dynarmic/src/dynarmic/backend/x64/emit_x64_memory.h +++ b/src/dynarmic/src/dynarmic/backend/x64/emit_x64_memory.h @@ -90,17 +90,17 @@ template<> code.mov(page, qword[r14 + tmp.cvt64()]); // check for marked bit, use as unmapped if marked - if (ctx.conf.page_table_marked_bit) { - // zero page, we can use it as scratch register before it's initialized - code.xor_(page, page); - if (*ctx.conf.page_table_marked_bit >= 30) { - code.bt(tmp, *ctx.conf.page_table_marked_bit); - code.cmovc(tmp, page); - } else { - code.test(tmp, 1ULL << *ctx.conf.page_table_marked_bit); - code.cmovnz(tmp, page); - } - } + if (ctx.conf.page_table_marked_bit) { + // zero tmp + code.xor_(tmp, tmp); + if (*ctx.conf.page_table_marked_bit >= 30) { + code.bt(page, *ctx.conf.page_table_marked_bit); + code.cmovc(page, tmp); + } else { + code.test(page, 1ULL << *ctx.conf.page_table_marked_bit); + code.cmovnz(page, tmp); + } + } // mask away attributes if (ctx.conf.page_table_pointer_mask == 0) { code.test(page, page);