Fix Musashi compilation with trace emulation enabled

This commit is contained in:
beeanyew
2021-08-30 23:57:45 +02:00
parent a83d7c4320
commit a1a6da9a22
3 changed files with 6 additions and 11 deletions

View File

@@ -251,7 +251,7 @@ static inline void m68k_execute_bef(m68ki_cpu_core *state, int num_cycles)
USE_CYCLES(CYC_INSTRUCTION[REG_IR]);
/* Trace m68k_exception, if necessary */
m68ki_exception_if_trace(); /* auto-disable (see m68kcpu.h) */
m68ki_exception_if_trace(state); /* auto-disable (see m68kcpu.h) */
} while(GET_CYCLES() > 0);
/* set previous PC to current PC for the next entry into the loop */

View File

@@ -1019,7 +1019,7 @@ int m68k_execute(m68ki_cpu_core *state, int num_cycles)
USE_CYCLES(CYC_INSTRUCTION[REG_IR]);
/* Trace m68k_exception, if necessary */
m68ki_exception_if_trace(); /* auto-disable (see m68kcpu.h) */
m68ki_exception_if_trace(state); /* auto-disable (see m68kcpu.h) */
} while(GET_CYCLES() > 0);
/* set previous PC to current PC for the next entry into the loop */
@@ -1259,7 +1259,6 @@ inline unsigned int m68k_read_pcrelative_32(m68ki_cpu_core *state, unsigned int
}
#endif
uint m68ki_read_imm16_addr_slowpath(m68ki_cpu_core *state, uint32_t pc, address_translation_cache *cache)
{
uint32_t address = ADDRESS_68K(pc);
@@ -1306,8 +1305,6 @@ uint m68ki_read_imm16_addr_slowpath(m68ki_cpu_core *state, uint32_t pc, address_
#endif /* M68K_EMULATE_PREFETCH */
}
void m68k_add_ram_range(uint32_t addr, uint32_t upper, unsigned char *ptr)
{
m68ki_cpu.code_translation_cache.lower = 0;

View File

@@ -603,12 +603,12 @@ typedef uint32 uint64;
/* Clear all tracing */
#define m68ki_clear_trace() m68ki_tracing = 0
/* Cause a trace exception if we are tracing */
#define m68ki_exception_if_trace() if(m68ki_tracing) m68ki_exception_trace()
#define m68ki_exception_if_trace(a) if(m68ki_tracing) m68ki_exception_trace(a)
#else
#define m68ki_trace_t1()
#define m68ki_trace_t0()
#define m68ki_clear_trace()
#define m68ki_exception_if_trace()
#define m68ki_exception_if_trace(...)
#endif /* M68K_EMULATE_TRACE */
@@ -1172,8 +1172,6 @@ static inline uint32 m68ki_ic_readimm16(m68ki_cpu_core *state, uint32 address)
*/
uint m68ki_read_imm16_addr_slowpath(m68ki_cpu_core *state, uint32_t pc, address_translation_cache *cache);
static inline uint m68ki_read_imm_16(m68ki_cpu_core *state)
{
uint32_t pc = REG_PC;
@@ -1329,7 +1327,7 @@ static inline uint m68ki_read_16_fc(m68ki_cpu_core *state, uint address, uint fc
if (address & 0x01) {
return ((ps_read_8(address) << 8) | ps_read_8(address + 1));
}
return ps_read_16_ex(state->gpio, address);
return ps_read_16(address);
}
#endif
@@ -1371,7 +1369,7 @@ static inline uint m68ki_read_32_fc(m68ki_cpu_core *state, uint address, uint fc
c |= (ps_read_8(address + 3) << 24);
return htobe32(c);
}
return ps_read_32_ex(state->gpio, address);
return ps_read_32(address);
}
#endif