X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=source%2Fmupen64plus-core%2Fsrc%2Fr4300%2Fr4300.c;h=b7ed7c383c3d82d89719f20765a0261b369108db;hb=7b232824d043e2cc90e94d40b6b0a7df4b3d5692;hp=9a64fdb480602359359ba7e41fc6f7945fe1852a;hpb=451ab91e3827a6384981b3300e2a7000d2eaba58;p=mupen64plus-pandora.git diff --git a/source/mupen64plus-core/src/r4300/r4300.c b/source/mupen64plus-core/src/r4300/r4300.c old mode 100644 new mode 100755 index 9a64fdb..b7ed7c3 --- a/source/mupen64plus-core/src/r4300/r4300.c +++ b/source/mupen64plus-core/src/r4300/r4300.c @@ -45,6 +45,7 @@ unsigned int r4300emu = 0; int no_compiled_jump = 0; +unsigned int count_per_op = 2; int llbit, rompause; #if NEW_DYNAREC != NEW_DYNAREC_ARM int stop; @@ -60,7 +61,6 @@ long long int local_rs; long long int reg_cop1_fgr_64[32]; tlb tlb_e[32]; unsigned int delay_slot, skip_jump = 0, dyna_interp = 0, last_addr; -unsigned long long int debug_count = 0; unsigned int CIC_Chip; char invalid_code[0x100000]; @@ -167,15 +167,15 @@ int rounding_mode = 0x33F, trunc_mode = 0xF3F, round_mode = 0x33F, current_instruction_table.NOTCOMPILED) \ invalid_code[address>>12] = 1; -#include "interpreter.def" - // two functions are defined from the macros above but never used // these prototype declarations will prevent a warning #if defined(__GNUC__) - void JR_IDLE(void) __attribute__((used)); - void JALR_IDLE(void) __attribute__((used)); + static void JR_IDLE(void) __attribute__((used)); + static void JALR_IDLE(void) __attribute__((used)); #endif +#include "interpreter.def" + // ----------------------------------------------------------- // Flow control 'fake' instructions // ----------------------------------------------------------- @@ -705,7 +705,7 @@ void update_count(void) if (r4300emu != CORE_DYNAREC) { #endif - Count = Count + (PC->addr - last_addr)/2; + Count += ((PC->addr - last_addr) >> 2) * count_per_op; last_addr = PC->addr; #ifdef NEW_DYNAREC } @@ -982,7 +982,6 @@ void r4300_execute(void) current_instruction_table = cached_interpreter_table; - debug_count = 0; delay_slot=0; stop = 0; rompause = 0; @@ -1066,7 +1065,6 @@ void r4300_execute(void) free_blocks(); } - debug_count+= Count; DebugMessage(M64MSG_INFO, "R4300 emulator finished."); /* print instruction counts */