diff options
Diffstat (limited to 'src/devices/cpu/m68000/m68kcpu.h')
-rw-r--r-- | src/devices/cpu/m68000/m68kcpu.h | 404 |
1 files changed, 202 insertions, 202 deletions
diff --git a/src/devices/cpu/m68000/m68kcpu.h b/src/devices/cpu/m68000/m68kcpu.h index 2c30bf78a98..5cec889e002 100644 --- a/src/devices/cpu/m68000/m68kcpu.h +++ b/src/devices/cpu/m68000/m68kcpu.h @@ -496,119 +496,119 @@ extern const UINT8 m68ki_exception_cycle_table[][256]; extern const UINT8 m68ki_ea_idx_cycle_table[]; /* Read data immediately after the program counter */ -INLINE UINT32 m68ki_read_imm_16(m68000_base_device *m68k); -INLINE UINT32 m68ki_read_imm_32(m68000_base_device *m68k); +static inline UINT32 m68ki_read_imm_16(m68000_base_device *m68k); +static inline UINT32 m68ki_read_imm_32(m68000_base_device *m68k); /* Read data with specific function code */ -INLINE UINT32 m68ki_read_8_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc); -INLINE UINT32 m68ki_read_16_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc); -INLINE UINT32 m68ki_read_32_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc); +static inline UINT32 m68ki_read_8_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc); +static inline UINT32 m68ki_read_16_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc); +static inline UINT32 m68ki_read_32_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc); /* Write data with specific function code */ -INLINE void m68ki_write_8_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value); -INLINE void m68ki_write_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value); -INLINE void m68ki_write_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value); -INLINE void m68ki_write_32_pd_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value); +static inline void m68ki_write_8_fc (m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value); +static inline void m68ki_write_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value); +static inline void m68ki_write_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value); +static inline void m68ki_write_32_pd_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value); /* Indexed and PC-relative ea fetching */ -INLINE UINT32 m68ki_get_ea_pcdi(m68000_base_device *m68k); -INLINE UINT32 m68ki_get_ea_pcix(m68000_base_device *m68k); -INLINE UINT32 m68ki_get_ea_ix(m68000_base_device *m68k, UINT32 An); +static inline UINT32 m68ki_get_ea_pcdi(m68000_base_device *m68k); +static inline UINT32 m68ki_get_ea_pcix(m68000_base_device *m68k); +static inline UINT32 m68ki_get_ea_ix(m68000_base_device *m68k, UINT32 An); /* Operand fetching */ -INLINE UINT32 OPER_AY_AI_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_AI_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_AI_32(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_PI_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_PI_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_PI_32(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_PD_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_PD_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_PD_32(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_DI_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_DI_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_DI_32(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_IX_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_IX_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AY_IX_32(m68000_base_device *m68k); - -INLINE UINT32 OPER_AX_AI_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_AI_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_AI_32(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_PI_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_PI_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_PI_32(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_PD_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_PD_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_PD_32(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_DI_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_DI_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_DI_32(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_IX_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_IX_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AX_IX_32(m68000_base_device *m68k); - -INLINE UINT32 OPER_A7_PI_8(m68000_base_device *m68k); -INLINE UINT32 OPER_A7_PD_8(m68000_base_device *m68k); - -INLINE UINT32 OPER_AW_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AW_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AW_32(m68000_base_device *m68k); -INLINE UINT32 OPER_AL_8(m68000_base_device *m68k); -INLINE UINT32 OPER_AL_16(m68000_base_device *m68k); -INLINE UINT32 OPER_AL_32(m68000_base_device *m68k); -INLINE UINT32 OPER_PCDI_8(m68000_base_device *m68k); -INLINE UINT32 OPER_PCDI_16(m68000_base_device *m68k); -INLINE UINT32 OPER_PCDI_32(m68000_base_device *m68k); -INLINE UINT32 OPER_PCIX_8(m68000_base_device *m68k); -INLINE UINT32 OPER_PCIX_16(m68000_base_device *m68k); -INLINE UINT32 OPER_PCIX_32(m68000_base_device *m68k); +static inline UINT32 OPER_AY_AI_8(m68000_base_device *m68k); +static inline UINT32 OPER_AY_AI_16(m68000_base_device *m68k); +static inline UINT32 OPER_AY_AI_32(m68000_base_device *m68k); +static inline UINT32 OPER_AY_PI_8(m68000_base_device *m68k); +static inline UINT32 OPER_AY_PI_16(m68000_base_device *m68k); +static inline UINT32 OPER_AY_PI_32(m68000_base_device *m68k); +static inline UINT32 OPER_AY_PD_8(m68000_base_device *m68k); +static inline UINT32 OPER_AY_PD_16(m68000_base_device *m68k); +static inline UINT32 OPER_AY_PD_32(m68000_base_device *m68k); +static inline UINT32 OPER_AY_DI_8(m68000_base_device *m68k); +static inline UINT32 OPER_AY_DI_16(m68000_base_device *m68k); +static inline UINT32 OPER_AY_DI_32(m68000_base_device *m68k); +static inline UINT32 OPER_AY_IX_8(m68000_base_device *m68k); +static inline UINT32 OPER_AY_IX_16(m68000_base_device *m68k); +static inline UINT32 OPER_AY_IX_32(m68000_base_device *m68k); + +static inline UINT32 OPER_AX_AI_8(m68000_base_device *m68k); +static inline UINT32 OPER_AX_AI_16(m68000_base_device *m68k); +static inline UINT32 OPER_AX_AI_32(m68000_base_device *m68k); +static inline UINT32 OPER_AX_PI_8(m68000_base_device *m68k); +static inline UINT32 OPER_AX_PI_16(m68000_base_device *m68k); +static inline UINT32 OPER_AX_PI_32(m68000_base_device *m68k); +static inline UINT32 OPER_AX_PD_8(m68000_base_device *m68k); +static inline UINT32 OPER_AX_PD_16(m68000_base_device *m68k); +static inline UINT32 OPER_AX_PD_32(m68000_base_device *m68k); +static inline UINT32 OPER_AX_DI_8(m68000_base_device *m68k); +static inline UINT32 OPER_AX_DI_16(m68000_base_device *m68k); +static inline UINT32 OPER_AX_DI_32(m68000_base_device *m68k); +static inline UINT32 OPER_AX_IX_8(m68000_base_device *m68k); +static inline UINT32 OPER_AX_IX_16(m68000_base_device *m68k); +static inline UINT32 OPER_AX_IX_32(m68000_base_device *m68k); + +static inline UINT32 OPER_A7_PI_8(m68000_base_device *m68k); +static inline UINT32 OPER_A7_PD_8(m68000_base_device *m68k); + +static inline UINT32 OPER_AW_8(m68000_base_device *m68k); +static inline UINT32 OPER_AW_16(m68000_base_device *m68k); +static inline UINT32 OPER_AW_32(m68000_base_device *m68k); +static inline UINT32 OPER_AL_8(m68000_base_device *m68k); +static inline UINT32 OPER_AL_16(m68000_base_device *m68k); +static inline UINT32 OPER_AL_32(m68000_base_device *m68k); +static inline UINT32 OPER_PCDI_8(m68000_base_device *m68k); +static inline UINT32 OPER_PCDI_16(m68000_base_device *m68k); +static inline UINT32 OPER_PCDI_32(m68000_base_device *m68k); +static inline UINT32 OPER_PCIX_8(m68000_base_device *m68k); +static inline UINT32 OPER_PCIX_16(m68000_base_device *m68k); +static inline UINT32 OPER_PCIX_32(m68000_base_device *m68k); /* Stack operations */ -INLINE void m68ki_push_16(m68000_base_device *m68k, UINT32 value); -INLINE void m68ki_push_32(m68000_base_device *m68k, UINT32 value); -INLINE UINT32 m68ki_pull_16(m68000_base_device *m68k); -INLINE UINT32 m68ki_pull_32(m68000_base_device *m68k); +static inline void m68ki_push_16(m68000_base_device *m68k, UINT32 value); +static inline void m68ki_push_32(m68000_base_device *m68k, UINT32 value); +static inline UINT32 m68ki_pull_16(m68000_base_device *m68k); +static inline UINT32 m68ki_pull_32(m68000_base_device *m68k); /* Program flow operations */ -INLINE void m68ki_jump(m68000_base_device *m68k, UINT32 new_pc); -INLINE void m68ki_jump_vector(m68000_base_device *m68k, UINT32 vector); -INLINE void m68ki_branch_8(m68000_base_device *m68k, UINT32 offset); -INLINE void m68ki_branch_16(m68000_base_device *m68k, UINT32 offset); -INLINE void m68ki_branch_32(m68000_base_device *m68k, UINT32 offset); +static inline void m68ki_jump(m68000_base_device *m68k, UINT32 new_pc); +static inline void m68ki_jump_vector(m68000_base_device *m68k, UINT32 vector); +static inline void m68ki_branch_8(m68000_base_device *m68k, UINT32 offset); +static inline void m68ki_branch_16(m68000_base_device *m68k, UINT32 offset); +static inline void m68ki_branch_32(m68000_base_device *m68k, UINT32 offset); /* Status register operations. */ -INLINE void m68ki_set_s_flag(m68000_base_device *m68k, UINT32 value); /* Only bit 2 of value should be set (i.e. 4 or 0) */ -INLINE void m68ki_set_sm_flag(m68000_base_device *m68k, UINT32 value); /* only bits 1 and 2 of value should be set */ -INLINE void m68ki_set_ccr(m68000_base_device *m68k, UINT32 value); /* set the condition code register */ -INLINE void m68ki_set_sr(m68000_base_device *m68k, UINT32 value); /* set the status register */ -INLINE void m68ki_set_sr_noint(m68000_base_device *m68k, UINT32 value); /* set the status register */ +static inline void m68ki_set_s_flag(m68000_base_device *m68k, UINT32 value); /* Only bit 2 of value should be set (i.e. 4 or 0) */ +static inline void m68ki_set_sm_flag(m68000_base_device *m68k, UINT32 value); /* only bits 1 and 2 of value should be set */ +static inline void m68ki_set_ccr(m68000_base_device *m68k, UINT32 value); /* set the condition code register */ +static inline void m68ki_set_sr(m68000_base_device *m68k, UINT32 value); /* set the status register */ +static inline void m68ki_set_sr_noint(m68000_base_device *m68k, UINT32 value); /* set the status register */ /* Exception processing */ -INLINE UINT32 m68ki_init_exception(m68000_base_device *m68k); /* Initial exception processing */ - -INLINE void m68ki_stack_frame_3word(m68000_base_device *m68k, UINT32 pc, UINT32 sr); /* Stack various frame types */ -INLINE void m68ki_stack_frame_buserr(m68000_base_device *m68k, UINT32 sr); - -INLINE void m68ki_stack_frame_0000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector); -INLINE void m68ki_stack_frame_0001(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector); -INLINE void m68ki_stack_frame_0010(m68000_base_device *m68k, UINT32 sr, UINT32 vector); -INLINE void m68ki_stack_frame_1000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector); -INLINE void m68ki_stack_frame_1010(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address); -INLINE void m68ki_stack_frame_1011(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address); -INLINE void m68ki_stack_frame_0111(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address, bool in_mmu); - -INLINE void m68ki_exception_trap(m68000_base_device *m68k, UINT32 vector); -INLINE void m68ki_exception_trapN(m68000_base_device *m68k, UINT32 vector); -INLINE void m68ki_exception_trace(m68000_base_device *m68k); -INLINE void m68ki_exception_privilege_violation(m68000_base_device *m68k); -INLINE void m68ki_exception_1010(m68000_base_device *m68k); -INLINE void m68ki_exception_1111(m68000_base_device *m68k); -INLINE void m68ki_exception_illegal(m68000_base_device *m68k); -INLINE void m68ki_exception_format_error(m68000_base_device *m68k); -INLINE void m68ki_exception_address_error(m68000_base_device *m68k); - -INLINE void m68ki_check_interrupts(m68000_base_device *m68k); /* ASG: check for interrupts */ +static inline UINT32 m68ki_init_exception(m68000_base_device *m68k); /* Initial exception processing */ + +static inline void m68ki_stack_frame_3word(m68000_base_device *m68k, UINT32 pc, UINT32 sr); /* Stack various frame types */ +static inline void m68ki_stack_frame_buserr(m68000_base_device *m68k, UINT32 sr); + +static inline void m68ki_stack_frame_0000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector); +static inline void m68ki_stack_frame_0001(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector); +static inline void m68ki_stack_frame_0010(m68000_base_device *m68k, UINT32 sr, UINT32 vector); +static inline void m68ki_stack_frame_1000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector); +static inline void m68ki_stack_frame_1010(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address); +static inline void m68ki_stack_frame_1011(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address); +static inline void m68ki_stack_frame_0111(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address, bool in_mmu); + +static inline void m68ki_exception_trap(m68000_base_device *m68k, UINT32 vector); +static inline void m68ki_exception_trapN(m68000_base_device *m68k, UINT32 vector); +static inline void m68ki_exception_trace(m68000_base_device *m68k); +static inline void m68ki_exception_privilege_violation(m68000_base_device *m68k); +static inline void m68ki_exception_1010(m68000_base_device *m68k); +static inline void m68ki_exception_1111(m68000_base_device *m68k); +static inline void m68ki_exception_illegal(m68000_base_device *m68k); +static inline void m68ki_exception_format_error(m68000_base_device *m68k); +static inline void m68ki_exception_address_error(m68000_base_device *m68k); + +static inline void m68ki_check_interrupts(m68000_base_device *m68k); /* ASG: check for interrupts */ /* quick disassembly (used for logging) */ char* m68ki_disassemble_quick(unsigned int pc, unsigned int cpu_type); @@ -619,12 +619,12 @@ char* m68ki_disassemble_quick(unsigned int pc, unsigned int cpu_type); /* ======================================================================== */ -INLINE unsigned int m68k_read_pcrelative_8(m68000_base_device *m68k, unsigned int address) +static inline unsigned int m68k_read_pcrelative_8(m68000_base_device *m68k, unsigned int address) { return ((m68k->readimm16(address&~1)>>(8*(1-(address & 1))))&0xff); } -INLINE unsigned int m68k_read_pcrelative_16(m68000_base_device *m68k, unsigned int address) +static inline unsigned int m68k_read_pcrelative_16(m68000_base_device *m68k, unsigned int address) { if(address & 1) return @@ -636,7 +636,7 @@ INLINE unsigned int m68k_read_pcrelative_16(m68000_base_device *m68k, unsigned i (m68k->readimm16(address ) ); } -INLINE unsigned int m68k_read_pcrelative_32(m68000_base_device *m68k, unsigned int address) +static inline unsigned int m68k_read_pcrelative_32(m68000_base_device *m68k, unsigned int address) { if(address & 1) return @@ -656,7 +656,7 @@ INLINE unsigned int m68k_read_pcrelative_32(m68000_base_device *m68k, unsigned i * A real 68k first writes the high word to [address+2], and then writes the * low word to [address]. */ -INLINE void m68kx_write_memory_32_pd(m68000_base_device *m68k, unsigned int address, unsigned int value) +static inline void m68kx_write_memory_32_pd(m68000_base_device *m68k, unsigned int address, unsigned int value) { m68k->/*memory.*/write16(address+2, value>>16); m68k->/*memory.*/write16(address, value&0xffff); @@ -666,7 +666,7 @@ INLINE void m68kx_write_memory_32_pd(m68000_base_device *m68k, unsigned int addr /* ---------------------------- Read Immediate ---------------------------- */ // clear the instruction cache -INLINE void m68ki_ic_clear(m68000_base_device *m68k) +static inline void m68ki_ic_clear(m68000_base_device *m68k) { int i; for (i=0; i< M68K_IC_SIZE; i++) { @@ -676,7 +676,7 @@ INLINE void m68ki_ic_clear(m68000_base_device *m68k) // read immediate word using the instruction cache -INLINE UINT32 m68ki_ic_readimm16(m68000_base_device *m68k, UINT32 address) +static inline UINT32 m68ki_ic_readimm16(m68000_base_device *m68k, UINT32 address) { if (m68k->cacr & M68K_CACR_EI) { @@ -725,7 +725,7 @@ INLINE UINT32 m68ki_ic_readimm16(m68000_base_device *m68k, UINT32 address) /* Handles all immediate reads, does address error check, function code setting, * and prefetching if they are enabled in m68kconf.h */ -INLINE UINT32 m68ki_read_imm_16(m68000_base_device *m68k) +static inline UINT32 m68ki_read_imm_16(m68000_base_device *m68k) { UINT32 result; @@ -752,7 +752,7 @@ INLINE UINT32 m68ki_read_imm_16(m68000_base_device *m68k) return result; } -INLINE UINT32 m68ki_read_imm_32(m68000_base_device *m68k) +static inline UINT32 m68ki_read_imm_32(m68000_base_device *m68k) { UINT32 temp_val; @@ -789,13 +789,13 @@ INLINE UINT32 m68ki_read_imm_32(m68000_base_device *m68k) * These functions will also check for address error and set the function * code if they are enabled in m68kconf.h. */ -INLINE UINT32 m68ki_read_8_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc) +static inline UINT32 m68ki_read_8_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc) { m68k->mmu_tmp_fc = fc; m68k->mmu_tmp_rw = 1; return m68k->/*memory.*/read8(address); } -INLINE UINT32 m68ki_read_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc) +static inline UINT32 m68ki_read_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc) { if (CPU_TYPE_IS_010_LESS(m68k->cpu_type)) { @@ -805,7 +805,7 @@ INLINE UINT32 m68ki_read_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 m68k->mmu_tmp_rw = 1; return m68k->/*memory.*/read16(address); } -INLINE UINT32 m68ki_read_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc) +static inline UINT32 m68ki_read_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc) { if (CPU_TYPE_IS_010_LESS(m68k->cpu_type)) { @@ -816,13 +816,13 @@ INLINE UINT32 m68ki_read_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 return m68k->/*memory.*/read32(address); } -INLINE void m68ki_write_8_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value) +static inline void m68ki_write_8_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value) { m68k->mmu_tmp_fc = fc; m68k->mmu_tmp_rw = 0; m68k->/*memory.*/write8(address, value); } -INLINE void m68ki_write_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value) +static inline void m68ki_write_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value) { if (CPU_TYPE_IS_010_LESS(m68k->cpu_type)) { @@ -832,7 +832,7 @@ INLINE void m68ki_write_16_fc(m68000_base_device *m68k, UINT32 address, UINT32 f m68k->mmu_tmp_rw = 0; m68k->/*memory.*/write16(address, value); } -INLINE void m68ki_write_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value) +static inline void m68ki_write_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value) { if (CPU_TYPE_IS_010_LESS(m68k->cpu_type)) { @@ -848,7 +848,7 @@ INLINE void m68ki_write_32_fc(m68000_base_device *m68k, UINT32 address, UINT32 f * A real 68k first writes the high word to [address+2], and then writes the * low word to [address]. */ -INLINE void m68ki_write_32_pd_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value) +static inline void m68ki_write_32_pd_fc(m68000_base_device *m68k, UINT32 address, UINT32 fc, UINT32 value) { if (CPU_TYPE_IS_010_LESS(m68k->cpu_type)) { @@ -866,14 +866,14 @@ INLINE void m68ki_write_32_pd_fc(m68000_base_device *m68k, UINT32 address, UINT3 /* The program counter relative addressing modes cause operands to be * retrieved from program space, not data space. */ -INLINE UINT32 m68ki_get_ea_pcdi(m68000_base_device *m68k) +static inline UINT32 m68ki_get_ea_pcdi(m68000_base_device *m68k) { UINT32 old_pc = REG_PC(m68k); return old_pc + MAKE_INT_16(m68ki_read_imm_16(m68k)); } -INLINE UINT32 m68ki_get_ea_pcix(m68000_base_device *m68k) +static inline UINT32 m68ki_get_ea_pcix(m68000_base_device *m68k) { return m68ki_get_ea_ix(m68k, REG_PC(m68k)); } @@ -920,7 +920,7 @@ INLINE UINT32 m68ki_get_ea_pcix(m68000_base_device *m68k) * 1 011 mem indir with long outer * 1 100-111 reserved */ -INLINE UINT32 m68ki_get_ea_ix(m68000_base_device *m68k, UINT32 An) +static inline UINT32 m68ki_get_ea_ix(m68000_base_device *m68k, UINT32 An) { /* An = base register */ UINT32 extension = m68ki_read_imm_16(m68k); @@ -993,78 +993,78 @@ INLINE UINT32 m68ki_get_ea_ix(m68000_base_device *m68k, UINT32 An) /* Fetch operands */ -INLINE UINT32 OPER_AY_AI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AY_AI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AY_AI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_32(m68k); return m68ki_read_32(m68k, ea);} -INLINE UINT32 OPER_AY_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AY_PI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AY_PI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_32(m68k); return m68ki_read_32(m68k, ea);} -INLINE UINT32 OPER_AY_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AY_PD_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AY_PD_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_32(m68k); return m68ki_read_32(m68k, ea);} -INLINE UINT32 OPER_AY_DI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AY_DI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AY_DI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_32(m68k); return m68ki_read_32(m68k, ea);} -INLINE UINT32 OPER_AY_IX_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AY_IX_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AY_IX_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_32(m68k); return m68ki_read_32(m68k, ea);} - -INLINE UINT32 OPER_AX_AI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AX_AI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AX_AI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_32(m68k); return m68ki_read_32(m68k, ea);} -INLINE UINT32 OPER_AX_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AX_PI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AX_PI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_32(m68k); return m68ki_read_32(m68k, ea);} -INLINE UINT32 OPER_AX_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AX_PD_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AX_PD_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_32(m68k); return m68ki_read_32(m68k, ea);} -INLINE UINT32 OPER_AX_DI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AX_DI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AX_DI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_32(m68k); return m68ki_read_32(m68k, ea);} -INLINE UINT32 OPER_AX_IX_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AX_IX_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AX_IX_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_32(m68k); return m68ki_read_32(m68k, ea);} - -INLINE UINT32 OPER_A7_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_A7_PI_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_A7_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_A7_PD_8(m68k); return m68ki_read_8(m68k, ea); } - -INLINE UINT32 OPER_AW_8(m68000_base_device *m68k) {UINT32 ea = EA_AW_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AW_16(m68000_base_device *m68k) {UINT32 ea = EA_AW_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AW_32(m68000_base_device *m68k) {UINT32 ea = EA_AW_32(m68k); return m68ki_read_32(m68k, ea);} -INLINE UINT32 OPER_AL_8(m68000_base_device *m68k) {UINT32 ea = EA_AL_8(m68k); return m68ki_read_8(m68k, ea); } -INLINE UINT32 OPER_AL_16(m68000_base_device *m68k) {UINT32 ea = EA_AL_16(m68k); return m68ki_read_16(m68k, ea);} -INLINE UINT32 OPER_AL_32(m68000_base_device *m68k) {UINT32 ea = EA_AL_32(m68k); return m68ki_read_32(m68k, ea);} -INLINE UINT32 OPER_PCDI_8(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_8(m68k); return m68ki_read_pcrel_8(m68k, ea); } -INLINE UINT32 OPER_PCDI_16(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_16(m68k); return m68ki_read_pcrel_16(m68k, ea);} -INLINE UINT32 OPER_PCDI_32(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_32(m68k); return m68ki_read_pcrel_32(m68k, ea);} -INLINE UINT32 OPER_PCIX_8(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_8(m68k); return m68ki_read_pcrel_8(m68k, ea); } -INLINE UINT32 OPER_PCIX_16(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_16(m68k); return m68ki_read_pcrel_16(m68k, ea);} -INLINE UINT32 OPER_PCIX_32(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_32(m68k); return m68ki_read_pcrel_32(m68k, ea);} +static inline UINT32 OPER_AY_AI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AY_AI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AY_AI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_AI_32(m68k); return m68ki_read_32(m68k, ea);} +static inline UINT32 OPER_AY_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AY_PI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AY_PI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_PI_32(m68k); return m68ki_read_32(m68k, ea);} +static inline UINT32 OPER_AY_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AY_PD_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AY_PD_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_PD_32(m68k); return m68ki_read_32(m68k, ea);} +static inline UINT32 OPER_AY_DI_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AY_DI_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AY_DI_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_DI_32(m68k); return m68ki_read_32(m68k, ea);} +static inline UINT32 OPER_AY_IX_8(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AY_IX_16(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AY_IX_32(m68000_base_device *m68k) {UINT32 ea = EA_AY_IX_32(m68k); return m68ki_read_32(m68k, ea);} + +static inline UINT32 OPER_AX_AI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AX_AI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AX_AI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_AI_32(m68k); return m68ki_read_32(m68k, ea);} +static inline UINT32 OPER_AX_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AX_PI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AX_PI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_PI_32(m68k); return m68ki_read_32(m68k, ea);} +static inline UINT32 OPER_AX_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AX_PD_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AX_PD_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_PD_32(m68k); return m68ki_read_32(m68k, ea);} +static inline UINT32 OPER_AX_DI_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AX_DI_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AX_DI_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_DI_32(m68k); return m68ki_read_32(m68k, ea);} +static inline UINT32 OPER_AX_IX_8(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AX_IX_16(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AX_IX_32(m68000_base_device *m68k) {UINT32 ea = EA_AX_IX_32(m68k); return m68ki_read_32(m68k, ea);} + +static inline UINT32 OPER_A7_PI_8(m68000_base_device *m68k) {UINT32 ea = EA_A7_PI_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_A7_PD_8(m68000_base_device *m68k) {UINT32 ea = EA_A7_PD_8(m68k); return m68ki_read_8(m68k, ea); } + +static inline UINT32 OPER_AW_8(m68000_base_device *m68k) {UINT32 ea = EA_AW_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AW_16(m68000_base_device *m68k) {UINT32 ea = EA_AW_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AW_32(m68000_base_device *m68k) {UINT32 ea = EA_AW_32(m68k); return m68ki_read_32(m68k, ea);} +static inline UINT32 OPER_AL_8(m68000_base_device *m68k) {UINT32 ea = EA_AL_8(m68k); return m68ki_read_8(m68k, ea); } +static inline UINT32 OPER_AL_16(m68000_base_device *m68k) {UINT32 ea = EA_AL_16(m68k); return m68ki_read_16(m68k, ea);} +static inline UINT32 OPER_AL_32(m68000_base_device *m68k) {UINT32 ea = EA_AL_32(m68k); return m68ki_read_32(m68k, ea);} +static inline UINT32 OPER_PCDI_8(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_8(m68k); return m68ki_read_pcrel_8(m68k, ea); } +static inline UINT32 OPER_PCDI_16(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_16(m68k); return m68ki_read_pcrel_16(m68k, ea);} +static inline UINT32 OPER_PCDI_32(m68000_base_device *m68k) {UINT32 ea = EA_PCDI_32(m68k); return m68ki_read_pcrel_32(m68k, ea);} +static inline UINT32 OPER_PCIX_8(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_8(m68k); return m68ki_read_pcrel_8(m68k, ea); } +static inline UINT32 OPER_PCIX_16(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_16(m68k); return m68ki_read_pcrel_16(m68k, ea);} +static inline UINT32 OPER_PCIX_32(m68000_base_device *m68k) {UINT32 ea = EA_PCIX_32(m68k); return m68ki_read_pcrel_32(m68k, ea);} /* ---------------------------- Stack Functions --------------------------- */ /* Push/pull data from the stack */ -INLINE void m68ki_push_16(m68000_base_device *m68k, UINT32 value) +static inline void m68ki_push_16(m68000_base_device *m68k, UINT32 value) { REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) - 2); m68ki_write_16(m68k, REG_SP(m68k), value); } -INLINE void m68ki_push_32(m68000_base_device *m68k, UINT32 value) +static inline void m68ki_push_32(m68000_base_device *m68k, UINT32 value) { REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) - 4); m68ki_write_32(m68k, REG_SP(m68k), value); } -INLINE UINT32 m68ki_pull_16(m68000_base_device *m68k) +static inline UINT32 m68ki_pull_16(m68000_base_device *m68k) { REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) + 2); return m68ki_read_16(m68k, REG_SP(m68k)-2); } -INLINE UINT32 m68ki_pull_32(m68000_base_device *m68k) +static inline UINT32 m68ki_pull_32(m68000_base_device *m68k) { REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) + 4); return m68ki_read_32(m68k, REG_SP(m68k)-4); @@ -1074,22 +1074,22 @@ INLINE UINT32 m68ki_pull_32(m68000_base_device *m68k) /* Increment/decrement the stack as if doing a push/pull but * don't do any memory access. */ -INLINE void m68ki_fake_push_16(m68000_base_device *m68k) +static inline void m68ki_fake_push_16(m68000_base_device *m68k) { REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) - 2); } -INLINE void m68ki_fake_push_32(m68000_base_device *m68k) +static inline void m68ki_fake_push_32(m68000_base_device *m68k) { REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) - 4); } -INLINE void m68ki_fake_pull_16(m68000_base_device *m68k) +static inline void m68ki_fake_pull_16(m68000_base_device *m68k) { REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) + 2); } -INLINE void m68ki_fake_pull_32(m68000_base_device *m68k) +static inline void m68ki_fake_pull_32(m68000_base_device *m68k) { REG_SP(m68k) = MASK_OUT_ABOVE_32(REG_SP(m68k) + 4); } @@ -1101,12 +1101,12 @@ INLINE void m68ki_fake_pull_32(m68000_base_device *m68k) * These functions will also call the pc_changed callback if it was enabled * in m68kconf.h. */ -INLINE void m68ki_jump(m68000_base_device *m68k, UINT32 new_pc) +static inline void m68ki_jump(m68000_base_device *m68k, UINT32 new_pc) { REG_PC(m68k) = new_pc; } -INLINE void m68ki_jump_vector(m68000_base_device *m68k, UINT32 vector) +static inline void m68ki_jump_vector(m68000_base_device *m68k, UINT32 vector) { REG_PC(m68k) = (vector<<2) + m68k->vbr; REG_PC(m68k) = m68ki_read_data_32(m68k, REG_PC(m68k)); @@ -1118,17 +1118,17 @@ INLINE void m68ki_jump_vector(m68000_base_device *m68k, UINT32 vector) * So far I've found no problems with not calling pc_changed for 8 or 16 * bit branches. */ -INLINE void m68ki_branch_8(m68000_base_device *m68k, UINT32 offset) +static inline void m68ki_branch_8(m68000_base_device *m68k, UINT32 offset) { REG_PC(m68k) += MAKE_INT_8(offset); } -INLINE void m68ki_branch_16(m68000_base_device *m68k, UINT32 offset) +static inline void m68ki_branch_16(m68000_base_device *m68k, UINT32 offset) { REG_PC(m68k) += MAKE_INT_16(offset); } -INLINE void m68ki_branch_32(m68000_base_device *m68k, UINT32 offset) +static inline void m68ki_branch_32(m68000_base_device *m68k, UINT32 offset) { REG_PC(m68k) += offset; } @@ -1140,7 +1140,7 @@ INLINE void m68ki_branch_32(m68000_base_device *m68k, UINT32 offset) /* Set the S flag and change the active stack pointer. * Note that value MUST be 4 or 0. */ -INLINE void m68ki_set_s_flag(m68000_base_device *m68k, UINT32 value) +static inline void m68ki_set_s_flag(m68000_base_device *m68k, UINT32 value) { /* Backup the old stack pointer */ REG_SP_BASE(m68k)[m68k->s_flag | ((m68k->s_flag>>1) & m68k->m_flag)] = REG_SP(m68k); @@ -1153,7 +1153,7 @@ INLINE void m68ki_set_s_flag(m68000_base_device *m68k, UINT32 value) /* Set the S and M flags and change the active stack pointer. * Note that value MUST be 0, 2, 4, or 6 (bit2 = S, bit1 = M). */ -INLINE void m68ki_set_sm_flag(m68000_base_device *m68k, UINT32 value) +static inline void m68ki_set_sm_flag(m68000_base_device *m68k, UINT32 value) { /* Backup the old stack pointer */ REG_SP_BASE(m68k)[m68k->s_flag | ((m68k->s_flag>>1) & m68k->m_flag)] = REG_SP(m68k); @@ -1165,7 +1165,7 @@ INLINE void m68ki_set_sm_flag(m68000_base_device *m68k, UINT32 value) } /* Set the S and M flags. Don't touch the stack pointer. */ -INLINE void m68ki_set_sm_flag_nosp(m68000_base_device *m68k, UINT32 value) +static inline void m68ki_set_sm_flag_nosp(m68000_base_device *m68k, UINT32 value) { /* Set the S and M flags */ m68k->s_flag = value & SFLAG_SET; @@ -1174,7 +1174,7 @@ INLINE void m68ki_set_sm_flag_nosp(m68000_base_device *m68k, UINT32 value) /* Set the condition code register */ -INLINE void m68ki_set_ccr(m68000_base_device *m68k, UINT32 value) +static inline void m68ki_set_ccr(m68000_base_device *m68k, UINT32 value) { m68k->x_flag = BIT_4(value) << 4; m68k->n_flag = BIT_3(value) << 4; @@ -1184,7 +1184,7 @@ INLINE void m68ki_set_ccr(m68000_base_device *m68k, UINT32 value) } /* Set the status register but don't check for interrupts */ -INLINE void m68ki_set_sr_noint(m68000_base_device *m68k, UINT32 value) +static inline void m68ki_set_sr_noint(m68000_base_device *m68k, UINT32 value) { /* Mask out the "unimplemented" bits */ value &= m68k->sr_mask; @@ -1200,7 +1200,7 @@ INLINE void m68ki_set_sr_noint(m68000_base_device *m68k, UINT32 value) /* Set the status register but don't check for interrupts nor * change the stack pointer */ -INLINE void m68ki_set_sr_noint_nosp(m68000_base_device *m68k, UINT32 value) +static inline void m68ki_set_sr_noint_nosp(m68000_base_device *m68k, UINT32 value) { /* Mask out the "unimplemented" bits */ value &= m68k->sr_mask; @@ -1214,7 +1214,7 @@ INLINE void m68ki_set_sr_noint_nosp(m68000_base_device *m68k, UINT32 value) } /* Set the status register and check for interrupts */ -INLINE void m68ki_set_sr(m68000_base_device *m68k, UINT32 value) +static inline void m68ki_set_sr(m68000_base_device *m68k, UINT32 value) { m68ki_set_sr_noint(m68k, value); m68ki_check_interrupts(m68k); @@ -1224,7 +1224,7 @@ INLINE void m68ki_set_sr(m68000_base_device *m68k, UINT32 value) /* ------------------------- Exception Processing ------------------------- */ /* Initiate exception processing */ -INLINE UINT32 m68ki_init_exception(m68000_base_device *m68k) +static inline UINT32 m68ki_init_exception(m68000_base_device *m68k) { /* Save the old status register */ UINT32 sr = m68ki_get_sr(m68k); @@ -1239,7 +1239,7 @@ INLINE UINT32 m68ki_init_exception(m68000_base_device *m68k) } /* 3 word stack frame (68000 only) */ -INLINE void m68ki_stack_frame_3word(m68000_base_device *m68k, UINT32 pc, UINT32 sr) +static inline void m68ki_stack_frame_3word(m68000_base_device *m68k, UINT32 pc, UINT32 sr) { m68ki_push_32(m68k, pc); m68ki_push_16(m68k, sr); @@ -1248,7 +1248,7 @@ INLINE void m68ki_stack_frame_3word(m68000_base_device *m68k, UINT32 pc, UINT32 /* Format 0 stack frame. * This is the standard stack frame for 68010+. */ -INLINE void m68ki_stack_frame_0000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector) +static inline void m68ki_stack_frame_0000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector) { /* Stack a 3-word frame if we are 68000 */ if(m68k->cpu_type == CPU_TYPE_000 || m68k->cpu_type == CPU_TYPE_008) @@ -1264,7 +1264,7 @@ INLINE void m68ki_stack_frame_0000(m68000_base_device *m68k, UINT32 pc, UINT32 s /* Format 1 stack frame (68020). * For 68020, this is the 4 word throwaway frame. */ -INLINE void m68ki_stack_frame_0001(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector) +static inline void m68ki_stack_frame_0001(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector) { m68ki_push_16(m68k, 0x1000 | (vector<<2)); m68ki_push_32(m68k, pc); @@ -1274,7 +1274,7 @@ INLINE void m68ki_stack_frame_0001(m68000_base_device *m68k, UINT32 pc, UINT32 s /* Format 2 stack frame. * This is used only by 68020 for trap exceptions. */ -INLINE void m68ki_stack_frame_0010(m68000_base_device *m68k, UINT32 sr, UINT32 vector) +static inline void m68ki_stack_frame_0010(m68000_base_device *m68k, UINT32 sr, UINT32 vector) { m68ki_push_32(m68k, REG_PPC(m68k)); m68ki_push_16(m68k, 0x2000 | (vector<<2)); @@ -1285,7 +1285,7 @@ INLINE void m68ki_stack_frame_0010(m68000_base_device *m68k, UINT32 sr, UINT32 v /* Bus error stack frame (68000 only). */ -INLINE void m68ki_stack_frame_buserr(m68000_base_device *m68k, UINT32 sr) +static inline void m68ki_stack_frame_buserr(m68000_base_device *m68k, UINT32 sr) { m68ki_push_32(m68k, REG_PC(m68k)); m68ki_push_16(m68k, sr); @@ -1302,7 +1302,7 @@ INLINE void m68ki_stack_frame_buserr(m68000_base_device *m68k, UINT32 sr) /* Format 8 stack frame (68010). * 68010 only. This is the 29 word bus/address error frame. */ -INLINE void m68ki_stack_frame_1000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector) +static inline void m68ki_stack_frame_1000(m68000_base_device *m68k, UINT32 pc, UINT32 sr, UINT32 vector) { /* VERSION * NUMBER @@ -1356,7 +1356,7 @@ INLINE void m68ki_stack_frame_1000(m68000_base_device *m68k, UINT32 pc, UINT32 s * if the error happens at an instruction boundary. * PC stacked is address of next instruction. */ -INLINE void m68ki_stack_frame_1010(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address) +static inline void m68ki_stack_frame_1010(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address) { int orig_rw = m68k->mmu_tmp_buserror_rw; // this gets splatted by the following pushes, so save it now int orig_fc = m68k->mmu_tmp_buserror_fc; @@ -1408,7 +1408,7 @@ INLINE void m68ki_stack_frame_1010(m68000_base_device *m68k, UINT32 sr, UINT32 v * if the error happens during instruction execution. * PC stacked is address of instruction in progress. */ -INLINE void m68ki_stack_frame_1011(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address) +static inline void m68ki_stack_frame_1011(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address) { int orig_rw = m68k->mmu_tmp_buserror_rw; // this gets splatted by the following pushes, so save it now int orig_fc = m68k->mmu_tmp_buserror_fc; @@ -1482,7 +1482,7 @@ INLINE void m68ki_stack_frame_1011(m68000_base_device *m68k, UINT32 sr, UINT32 v * This is used by the 68040 for bus fault and mmu trap * 30 words */ -INLINE void m68ki_stack_frame_0111(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address, bool in_mmu) +static inline void m68ki_stack_frame_0111(m68000_base_device *m68k, UINT32 sr, UINT32 vector, UINT32 pc, UINT32 fault_address, bool in_mmu) { int orig_rw = m68k->mmu_tmp_buserror_rw; // this gets splatted by the following pushes, so save it now int orig_fc = m68k->mmu_tmp_buserror_fc; @@ -1525,7 +1525,7 @@ INLINE void m68ki_stack_frame_0111(m68000_base_device *m68k, UINT32 sr, UINT32 v /* Used for Group 2 exceptions. * These stack a type 2 frame on the 020. */ -INLINE void m68ki_exception_trap(m68000_base_device *m68k, UINT32 vector) +static inline void m68ki_exception_trap(m68000_base_device *m68k, UINT32 vector) { UINT32 sr = m68ki_init_exception(m68k); @@ -1541,7 +1541,7 @@ INLINE void m68ki_exception_trap(m68000_base_device *m68k, UINT32 vector) } /* Trap#n stacks a 0 frame but behaves like group2 otherwise */ -INLINE void m68ki_exception_trapN(m68000_base_device *m68k, UINT32 vector) +static inline void m68ki_exception_trapN(m68000_base_device *m68k, UINT32 vector) { UINT32 sr = m68ki_init_exception(m68k); m68ki_stack_frame_0000(m68k, REG_PC(m68k), sr, vector); @@ -1552,7 +1552,7 @@ INLINE void m68ki_exception_trapN(m68000_base_device *m68k, UINT32 vector) } /* Exception for trace mode */ -INLINE void m68ki_exception_trace(m68000_base_device *m68k) +static inline void m68ki_exception_trace(m68000_base_device *m68k) { UINT32 sr = m68ki_init_exception(m68k); @@ -1577,7 +1577,7 @@ INLINE void m68ki_exception_trace(m68000_base_device *m68k) } /* Exception for privilege violation */ -INLINE void m68ki_exception_privilege_violation(m68000_base_device *m68k) +static inline void m68ki_exception_privilege_violation(m68000_base_device *m68k) { UINT32 sr = m68ki_init_exception(m68k); @@ -1594,7 +1594,7 @@ INLINE void m68ki_exception_privilege_violation(m68000_base_device *m68k) } /* Exception for A-Line instructions */ -INLINE void m68ki_exception_1010(m68000_base_device *m68k) +static inline void m68ki_exception_1010(m68000_base_device *m68k) { UINT32 sr; @@ -1607,7 +1607,7 @@ INLINE void m68ki_exception_1010(m68000_base_device *m68k) } /* Exception for F-Line instructions */ -INLINE void m68ki_exception_1111(m68000_base_device *m68k) +static inline void m68ki_exception_1111(m68000_base_device *m68k) { UINT32 sr; @@ -1620,7 +1620,7 @@ INLINE void m68ki_exception_1111(m68000_base_device *m68k) } /* Exception for illegal instructions */ -INLINE void m68ki_exception_illegal(m68000_base_device *m68k) +static inline void m68ki_exception_illegal(m68000_base_device *m68k) { UINT32 sr; @@ -1639,7 +1639,7 @@ INLINE void m68ki_exception_illegal(m68000_base_device *m68k) } /* Exception for format errror in RTE */ -INLINE void m68ki_exception_format_error(m68000_base_device *m68k) +static inline void m68ki_exception_format_error(m68000_base_device *m68k) { UINT32 sr = m68ki_init_exception(m68k); m68ki_stack_frame_0000(m68k, REG_PC(m68k), sr, EXCEPTION_FORMAT_ERROR); @@ -1650,7 +1650,7 @@ INLINE void m68ki_exception_format_error(m68000_base_device *m68k) } /* Exception for address error */ -INLINE void m68ki_exception_address_error(m68000_base_device *m68k) +static inline void m68ki_exception_address_error(m68000_base_device *m68k) { UINT32 sr = m68ki_init_exception(m68k); @@ -1678,7 +1678,7 @@ INLINE void m68ki_exception_address_error(m68000_base_device *m68k) /* ASG: Check for interrupts */ -INLINE void m68ki_check_interrupts(m68000_base_device *m68k) +static inline void m68ki_check_interrupts(m68000_base_device *m68k) { if(m68k->nmi_pending) { |