drc: fix a silly mistake of overwriting a reg
authornotaz <notasas@gmail.com>
Thu, 11 Aug 2022 19:52:54 +0000 (22:52 +0300)
committernotaz <notasas@gmail.com>
Thu, 11 Aug 2022 19:54:32 +0000 (22:54 +0300)
libpcsxcore/new_dynarec/new_dynarec.c

index b9e7c14..1c70856 100644 (file)
@@ -3179,10 +3179,10 @@ static void do_invstub(int n)
 
   set_jump_target(stubs[n].addr, out);
   save_regs(reglist);
-  emit_readword(&inv_code_start, 2);
-  emit_readword(&inv_code_end, 3);
   if (addrr != 0 || ofs_start != 0)
     emit_addimm(addrr, ofs_start, 0);
+  emit_readword(&inv_code_start, 2);
+  emit_readword(&inv_code_end, 3);
   if (len != 0)
     emit_addimm(0, len + 4, (rightr = 1));
   emit_cmp(0, 2);