ALL: Huge upstream synch + PerRom DelaySI & CountPerOp parameters
[mupen64plus-pandora.git] / source / mupen64plus-core / src / r4300 / x86 / gr4300.c
index d2ed999..830d4c3 100644 (file)
@@ -47,22 +47,18 @@ int branch_taken;
 
 static void genupdate_count(unsigned int addr)
 {
-#ifndef COMPARE_CORE
-#ifndef DBG
+#if !defined(COMPARE_CORE) && !defined(DBG)
    mov_reg32_imm32(EAX, addr);
    sub_reg32_m32(EAX, (unsigned int*)(&last_addr));
-   shr_reg32_imm8(EAX, 1);
+   shr_reg32_imm8(EAX, 2);
+   mov_reg32_m32(EDX, &count_per_op);
+   mul_reg32(EDX);
    add_m32_reg32((unsigned int*)(&Count), EAX);
 #else
    mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst+1));
    mov_reg32_imm32(EAX, (unsigned int)update_count);
    call_reg32(EAX);
 #endif
-#else
-   mov_m32_imm32((unsigned int*)(&PC), (unsigned int)(dst+1));
-   mov_reg32_imm32(EAX, (unsigned int)update_count);
-   call_reg32(EAX);
-#endif
 }
 
 static void gencheck_interupt(unsigned int instr_structure)