From a01cc90866594d6cc3838298ab4fcd02818e4453 Mon Sep 17 00:00:00 2001 From: SarahW Date: Mon, 9 Nov 2020 08:07:36 +0000 Subject: [PATCH] Tweak search range when codegen looking for start uOP for given instruction. Fixes range when unrolling LOOP instruction pointing to itself (which could skip initial cycle count update), fixes Windows 98 boot on 6x86 chips. --- src/codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.c b/src/codegen.c index 4206db3..373c15c 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -29,7 +29,7 @@ int codegen_get_instruction_uop(codeblock_t *block, uint32_t pc, int *first_inst { int c; - for (c = 0; c < block->ins; c++) + for (c = 0; c <= block->ins; c++) { if (codegen_instructions[c].pc == pc) {