diff options
Diffstat (limited to 'src/emu/cpu/mips')
-rw-r--r-- | src/emu/cpu/mips/mips3.c | 46 | ||||
-rw-r--r-- | src/emu/cpu/mips/mips3.h | 20 | ||||
-rw-r--r-- | src/emu/cpu/mips/mips3drc.c | 70 | ||||
-rw-r--r-- | src/emu/cpu/mips/psx.c | 26 | ||||
-rw-r--r-- | src/emu/cpu/mips/psx.h | 2 | ||||
-rw-r--r-- | src/emu/cpu/mips/r3000.c | 34 | ||||
-rw-r--r-- | src/emu/cpu/mips/r3000.h | 8 |
7 files changed, 103 insertions, 103 deletions
diff --git a/src/emu/cpu/mips/mips3.c b/src/emu/cpu/mips/mips3.c index 9041f4950dc..a6c98daf7ab 100644 --- a/src/emu/cpu/mips/mips3.c +++ b/src/emu/cpu/mips/mips3.c @@ -244,14 +244,14 @@ static void check_irqs(void) CORE CALLBACKS ***************************************************************************/ -static void mips3_get_context(void *dst) +static CPU_GET_CONTEXT( mips3 ) { if (dst != NULL) *(mips3_regs *)dst = mips3; } -static void mips3_set_context(void *src) +static CPU_SET_CONTEXT( mips3 ) { if (src != NULL) mips3 = *(mips3_regs *)src; @@ -290,14 +290,14 @@ static CPU_RESET( mips3 ) } -static int mips3_translate(int space, int intention, offs_t *address) +static CPU_TRANSLATE( mips3 ) { /* common translate */ return mips3com_translate_address(&mips3.core, space, intention, address); } -offs_t mips3_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) +CPU_DISASSEMBLE( mips3 ) { /* common disassemble */ return mips3com_dasm(&mips3.core, buffer, pc, oprom, opram); @@ -2112,14 +2112,14 @@ static void sdr_le(UINT32 op) GENERIC GET/SET INFO ***************************************************************************/ -static void mips3_set_info(UINT32 state, cpuinfo *info) +static CPU_SET_INFO( mips3 ) { /* everything is handled generically here */ mips3com_set_info(&mips3.core, state, info); } -void mips3_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( mips3 ) { switch (state) { @@ -2128,14 +2128,14 @@ void mips3_get_info(UINT32 state, cpuinfo *info) case CPUINFO_INT_PREVIOUSPC: info->i = mips3.ppc; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case CPUINFO_PTR_SET_INFO: info->setinfo = mips3_set_info; break; - case CPUINFO_PTR_GET_CONTEXT: info->getcontext = mips3_get_context; break; - case CPUINFO_PTR_SET_CONTEXT: info->setcontext = mips3_set_context; break; + case CPUINFO_PTR_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(mips3); break; + case CPUINFO_PTR_GET_CONTEXT: info->getcontext = CPU_GET_CONTEXT_NAME(mips3); break; + case CPUINFO_PTR_SET_CONTEXT: info->setcontext = CPU_SET_CONTEXT_NAME(mips3); break; case CPUINFO_PTR_INIT: /* provided per-CPU */ break; case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(mips3); break; case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(mips3); break; - case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mips3_dasm; break; - case CPUINFO_PTR_TRANSLATE: info->translate = mips3_translate; break; + case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(mips3); break; + case CPUINFO_PTR_TRANSLATE: info->translate = CPU_GET_TRANSLATE_NAME(mips3); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; @@ -2166,7 +2166,7 @@ static CPU_INIT( r4600le ) mips3com_init(&mips3.core, MIPS3_TYPE_R4600, FALSE, index, clock, config, irqcallback, memory); } -void r4600be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4600be ) { switch (state) { @@ -2184,7 +2184,7 @@ void r4600be_get_info(UINT32 state, cpuinfo *info) } } -void r4600le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4600le ) { switch (state) { @@ -2224,7 +2224,7 @@ static CPU_INIT( r4650le ) mips3com_init(&mips3.core, MIPS3_TYPE_R4650, FALSE, index, clock, config, irqcallback, memory); } -void r4650be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4650be ) { switch (state) { @@ -2242,7 +2242,7 @@ void r4650be_get_info(UINT32 state, cpuinfo *info) } } -void r4650le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4650le ) { switch (state) { @@ -2282,7 +2282,7 @@ static CPU_INIT( r4700le ) mips3com_init(&mips3.core, MIPS3_TYPE_R4700, FALSE, index, clock, config, irqcallback, memory); } -void r4700be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4700be ) { switch (state) { @@ -2301,7 +2301,7 @@ void r4700be_get_info(UINT32 state, cpuinfo *info) } -void r4700le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4700le ) { switch (state) { @@ -2341,7 +2341,7 @@ static CPU_INIT( r5000le ) mips3com_init(&mips3.core, MIPS3_TYPE_R5000, FALSE, index, clock, config, irqcallback, memory); } -void r5000be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r5000be ) { switch (state) { @@ -2359,7 +2359,7 @@ void r5000be_get_info(UINT32 state, cpuinfo *info) } } -void r5000le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r5000le ) { switch (state) { @@ -2399,7 +2399,7 @@ static CPU_INIT( qed5271le ) mips3com_init(&mips3.core, MIPS3_TYPE_QED5271, FALSE, index, clock, config, irqcallback, memory); } -void qed5271be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( qed5271be ) { switch (state) { @@ -2417,7 +2417,7 @@ void qed5271be_get_info(UINT32 state, cpuinfo *info) } } -void qed5271le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( qed5271le ) { switch (state) { @@ -2457,7 +2457,7 @@ static CPU_INIT( rm7000le ) mips3com_init(&mips3.core, MIPS3_TYPE_RM7000, FALSE, index, clock, config, irqcallback, memory); } -void rm7000be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( rm7000be ) { switch (state) { @@ -2475,7 +2475,7 @@ void rm7000be_get_info(UINT32 state, cpuinfo *info) } } -void rm7000le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( rm7000le ) { switch (state) { diff --git a/src/emu/cpu/mips/mips3.h b/src/emu/cpu/mips/mips3.h index ef7f990c028..ffc130cb52f 100644 --- a/src/emu/cpu/mips/mips3.h +++ b/src/emu/cpu/mips/mips3.h @@ -226,28 +226,28 @@ struct _mips3_config ***************************************************************************/ #if (HAS_R4600) -void r4600be_get_info(UINT32 state, cpuinfo *info); -void r4600le_get_info(UINT32 state, cpuinfo *info); +CPU_GET_INFO( r4600be ); +CPU_GET_INFO( r4600le ); #endif #if (HAS_R4700) -void r4700be_get_info(UINT32 state, cpuinfo *info); -void r4700le_get_info(UINT32 state, cpuinfo *info); +CPU_GET_INFO( r4700be ); +CPU_GET_INFO( r4700le ); #endif #if (HAS_R5000) -void r5000be_get_info(UINT32 state, cpuinfo *info); -void r5000le_get_info(UINT32 state, cpuinfo *info); +CPU_GET_INFO( r5000be ); +CPU_GET_INFO( r5000le ); #endif #if (HAS_QED5271) -void qed5271be_get_info(UINT32 state, cpuinfo *info); -void qed5271le_get_info(UINT32 state, cpuinfo *info); +CPU_GET_INFO( qed5271be ); +CPU_GET_INFO( qed5271le ); #endif #if (HAS_RM7000) -void rm7000be_get_info(UINT32 state, cpuinfo *info); -void rm7000le_get_info(UINT32 state, cpuinfo *info); +CPU_GET_INFO( rm7000be ); +CPU_GET_INFO( rm7000le ); #endif diff --git a/src/emu/cpu/mips/mips3drc.c b/src/emu/cpu/mips/mips3drc.c index 8293da00a62..35313aa5c1a 100644 --- a/src/emu/cpu/mips/mips3drc.c +++ b/src/emu/cpu/mips/mips3drc.c @@ -540,7 +540,7 @@ static CPU_EXIT( mips3 ) current context -------------------------------------------------*/ -static void mips3_get_context(void *dst) +static CPU_GET_CONTEXT( mips3 ) { if (dst != NULL) *(mips3_state **)dst = mips3; @@ -552,7 +552,7 @@ static void mips3_get_context(void *dst) into the global state -------------------------------------------------*/ -static void mips3_set_context(void *src) +static CPU_SET_CONTEXT( mips3 ) { if (src != NULL) mips3 = *(mips3_state **)src; @@ -564,7 +564,7 @@ static void mips3_set_context(void *src) address translation -------------------------------------------------*/ -static int mips3_translate(int space, int intention, offs_t *address) +static CPU_TRANSLATE( mips3 ) { return mips3com_translate_address(mips3, space, intention, address); } @@ -574,7 +574,7 @@ static int mips3_translate(int space, int intention, offs_t *address) mips3_dasm - disassemble an instruction -------------------------------------------------*/ -static offs_t mips3_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) +static CPU_DISASSEMBLE( mips3 ) { return mips3com_dasm(mips3, buffer, pc, oprom, opram); } @@ -585,7 +585,7 @@ static offs_t mips3_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT CPU instance -------------------------------------------------*/ -static void mips3_set_info(UINT32 state, cpuinfo *info) +static CPU_SET_INFO( mips3 ) { switch (state) { @@ -616,7 +616,7 @@ static void mips3_set_info(UINT32 state, cpuinfo *info) given CPU instance -------------------------------------------------*/ -static void mips3_get_info(UINT32 state, cpuinfo *info) +static CPU_GET_INFO( mips3 ) { switch (state) { @@ -625,15 +625,15 @@ static void mips3_get_info(UINT32 state, cpuinfo *info) case CPUINFO_INT_PREVIOUSPC: /* not implemented */ break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case CPUINFO_PTR_SET_INFO: info->setinfo = mips3_set_info; break; - case CPUINFO_PTR_GET_CONTEXT: info->getcontext = mips3_get_context; break; - case CPUINFO_PTR_SET_CONTEXT: info->setcontext = mips3_set_context; break; + case CPUINFO_PTR_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(mips3); break; + case CPUINFO_PTR_GET_CONTEXT: info->getcontext = CPU_GET_CONTEXT_NAME(mips3); break; + case CPUINFO_PTR_SET_CONTEXT: info->setcontext = CPU_SET_CONTEXT_NAME(mips3); break; case CPUINFO_PTR_INIT: /* provided per-CPU */ break; case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(mips3); break; case CPUINFO_PTR_EXIT: info->exit = CPU_EXIT_NAME(mips3); break; case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(mips3); break; - case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mips3_dasm; break; - case CPUINFO_PTR_TRANSLATE: info->translate = mips3_translate; break; + case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(mips3); break; + case CPUINFO_PTR_TRANSLATE: info->translate = CPU_TRANSLATE_NAME(mips3); break; /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_CORE_FILE: strcpy(info->s, __FILE__); break; @@ -3629,7 +3629,7 @@ static CPU_INIT( r4600le ) mips3_init(MIPS3_TYPE_R4600, FALSE, device, index, clock, config, irqcallback); } -void r4600be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4600be ) { switch (state) { @@ -3643,11 +3643,11 @@ void r4600be_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "R4600 (big)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } -void r4600le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4600le ) { switch (state) { @@ -3661,7 +3661,7 @@ void r4600le_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "R4600 (little)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } #endif @@ -3683,7 +3683,7 @@ static CPU_INIT( r4650le ) mips3_init(MIPS3_TYPE_R4650, FALSE, device, index, clock, config, irqcallback); } -void r4650be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4650be ) { switch (state) { @@ -3697,11 +3697,11 @@ void r4650be_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "IDT R4650 (big)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } -void r4650le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4650le ) { switch (state) { @@ -3715,7 +3715,7 @@ void r4650le_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "IDT R4650 (little)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } #endif @@ -3737,7 +3737,7 @@ static CPU_INIT( r4700le ) mips3_init(MIPS3_TYPE_R4700, FALSE, device, index, clock, config, irqcallback); } -void r4700be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4700be ) { switch (state) { @@ -3751,11 +3751,11 @@ void r4700be_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "R4700 (big)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } -void r4700le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r4700le ) { switch (state) { @@ -3769,7 +3769,7 @@ void r4700le_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "R4700 (little)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } #endif @@ -3791,7 +3791,7 @@ static CPU_INIT( r5000le ) mips3_init(MIPS3_TYPE_R5000, FALSE, device, index, clock, config, irqcallback); } -void r5000be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r5000be ) { switch (state) { @@ -3805,11 +3805,11 @@ void r5000be_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "R5000 (big)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } -void r5000le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r5000le ) { switch (state) { @@ -3823,7 +3823,7 @@ void r5000le_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "R5000 (little)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } #endif @@ -3845,7 +3845,7 @@ static CPU_INIT( qed5271le ) mips3_init(MIPS3_TYPE_QED5271, FALSE, device, index, clock, config, irqcallback); } -void qed5271be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( qed5271be ) { switch (state) { @@ -3859,11 +3859,11 @@ void qed5271be_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "QED5271 (big)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } -void qed5271le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( qed5271le ) { switch (state) { @@ -3877,7 +3877,7 @@ void qed5271le_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "QED5271 (little)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } #endif @@ -3899,7 +3899,7 @@ static CPU_INIT( rm7000le ) mips3_init(MIPS3_TYPE_RM7000, FALSE, device, index, clock, config, irqcallback); } -void rm7000be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( rm7000be ) { switch (state) { @@ -3913,11 +3913,11 @@ void rm7000be_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "RM7000 (big)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } -void rm7000le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( rm7000le ) { switch (state) { @@ -3931,7 +3931,7 @@ void rm7000le_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "RM7000 (little)"); break; /* --- everything else is handled generically --- */ - default: mips3_get_info(state, info); break; + default: CPU_GET_INFO_CALL(mips3); break; } } #endif diff --git a/src/emu/cpu/mips/psx.c b/src/emu/cpu/mips/psx.c index 74cfcbb68cb..29b49f835be 100644 --- a/src/emu/cpu/mips/psx.c +++ b/src/emu/cpu/mips/psx.c @@ -2788,7 +2788,7 @@ static CPU_EXECUTE( mips ) return cycles - mips_ICount; } -static void mips_get_context( void *dst ) +static CPU_GET_CONTEXT( mips ) { if( dst ) { @@ -2796,7 +2796,7 @@ static void mips_get_context( void *dst ) } } -static void mips_set_context( void *src ) +static CPU_SET_CONTEXT( mips ) { if( src ) { @@ -2904,7 +2904,7 @@ ADDRESS_MAP_END * Return a formatted string for a register ****************************************************************************/ -static offs_t mips_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) +static CPU_DISASSEMBLE( mips ) { return DasmMIPS( buffer, pc, opram ); } @@ -3857,7 +3857,7 @@ static void docop2( int gteop ) * Generic set_info **************************************************************************/ -static void mips_set_info(UINT32 state, cpuinfo *info) +static CPU_SET_INFO( mips ) { switch (state) { @@ -3998,7 +3998,7 @@ static void mips_set_info(UINT32 state, cpuinfo *info) * Generic get_info **************************************************************************/ -static void mips_get_info(UINT32 state, cpuinfo *info) +static CPU_GET_INFO( mips ) { switch (state) { @@ -4159,15 +4159,15 @@ static void mips_get_info(UINT32 state, cpuinfo *info) case CPUINFO_INT_REGISTER + MIPS_CP2CR31: info->i = mipscpu.cp2cr[ 31 ].d; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case CPUINFO_PTR_SET_INFO: info->setinfo = mips_set_info; break; - case CPUINFO_PTR_GET_CONTEXT: info->getcontext = mips_get_context; break; - case CPUINFO_PTR_SET_CONTEXT: info->setcontext = mips_set_context; break; + case CPUINFO_PTR_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(mips); break; + case CPUINFO_PTR_GET_CONTEXT: info->getcontext = CPU_GET_CONTEXT_NAME(mips); break; + case CPUINFO_PTR_SET_CONTEXT: info->setcontext = CPU_SET_CONTEXT_NAME(mips); break; case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(mips); break; case CPUINFO_PTR_RESET: info->reset = CPU_RESET_NAME(mips); break; case CPUINFO_PTR_EXIT: info->exit = CPU_EXIT_NAME(mips); break; case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(mips); break; case CPUINFO_PTR_BURN: info->burn = NULL; break; - case CPUINFO_PTR_DISASSEMBLE: info->disassemble = mips_dasm; break; + case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(mips); break; case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &mips_ICount; break; case CPUINFO_PTR_INTERNAL_MEMORY_MAP + ADDRESS_SPACE_PROGRAM: info->internal_map32 = address_map_psxcpu_internal_map; break; @@ -4310,7 +4310,7 @@ static void mips_get_info(UINT32 state, cpuinfo *info) * CPU-specific set_info **************************************************************************/ -void psxcpu_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( psxcpu ) { switch (state) { @@ -4318,7 +4318,7 @@ void psxcpu_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "PSX CPU"); break; default: - mips_get_info(state, info); + CPU_GET_INFO_CALL(mips); break; } } @@ -4326,7 +4326,7 @@ void psxcpu_get_info(UINT32 state, cpuinfo *info) #if (HAS_CXD8661R) -void cxd8661r_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( cxd8661r ) { switch (state) { @@ -4336,7 +4336,7 @@ void cxd8661r_get_info(UINT32 state, cpuinfo *info) case CPUINFO_STR_NAME: strcpy(info->s, "CXD8661R"); break; default: - mips_get_info(state, info); + CPU_GET_INFO_CALL(mips); break; } } diff --git a/src/emu/cpu/mips/psx.h b/src/emu/cpu/mips/psx.h index 0c8197f7d56..c8361d72e5e 100644 --- a/src/emu/cpu/mips/psx.h +++ b/src/emu/cpu/mips/psx.h @@ -208,7 +208,7 @@ enum extern unsigned DasmMIPS( char *buffer, UINT32 pc, const UINT8 *opram ); #if (HAS_PSXCPU) -extern void psxcpu_get_info(UINT32 state, cpuinfo *info); +extern CPU_GET_INFO( psxcpu ); #endif #endif /* __PSX_H__ */ diff --git a/src/emu/cpu/mips/r3000.c b/src/emu/cpu/mips/r3000.c index 2ede60b3786..5e42d29cdd1 100644 --- a/src/emu/cpu/mips/r3000.c +++ b/src/emu/cpu/mips/r3000.c @@ -314,12 +314,12 @@ static void set_irq_line(r3000_state *r3000, int irqline, int state) CONTEXT SWITCHING ***************************************************************************/ -static void r3000_get_context(void *dst) +static CPU_GET_CONTEXT( r3000 ) { } -static void r3000_set_context(void *src) +static CPU_SET_CONTEXT( r3000 ) { r3000_state *r3000; @@ -934,7 +934,7 @@ static CPU_EXECUTE( r3000 ) DISASSEMBLY HOOK ***************************************************************************/ -static offs_t r3000_dasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram) +static CPU_DISASSEMBLE( r3000 ) { extern unsigned dasmr3k(char *, unsigned, UINT32); r3000_state *r3000 = token; @@ -1160,7 +1160,7 @@ static void swr_le(r3000_state *r3000, UINT32 op) * Generic set_info **************************************************************************/ -static void r3000_set_info(UINT32 state, cpuinfo *info) +static CPU_SET_INFO( r3000 ) { r3000_state *r3000 = token; switch (state) @@ -1219,7 +1219,7 @@ static void r3000_set_info(UINT32 state, cpuinfo *info) * Generic get_info **************************************************************************/ -static void r3000_get_info(UINT32 state, cpuinfo *info) +static CPU_GET_INFO( r3000 ) { r3000_state *r3000 = token; switch (state) @@ -1294,15 +1294,15 @@ static void r3000_get_info(UINT32 state, cpuinfo *info) case CPUINFO_INT_REGISTER + R3000_R31: info->i = r3000->r[31]; break; /* --- the following bits of info are returned as pointers to data or functions --- */ - case CPUINFO_PTR_SET_INFO: info->setinfo = r3000_set_info; break; - case CPUINFO_PTR_GET_CONTEXT: info->getcontext = r3000_get_context; break; - case CPUINFO_PTR_SET_CONTEXT: info->setcontext = r3000_set_context; break; + case CPUINFO_PTR_SET_INFO: info->setinfo = CPU_SET_INFO_NAME(r3000); break; + case CPUINFO_PTR_GET_CONTEXT: info->getcontext = CPU_GET_CONTEXT_NAME(r3000); break; + case CPUINFO_PTR_SET_CONTEXT: info->setcontext = CPU_SET_CONTEXT_NAME(r3000); break; case CPUINFO_PTR_INIT: info->init = CPU_INIT_NAME(r3000); break; case CPUINFO_PTR_RESET: /* provided per-CPU */ break; case CPUINFO_PTR_EXIT: info->exit = CPU_EXIT_NAME(r3000); break; case CPUINFO_PTR_EXECUTE: info->execute = CPU_EXECUTE_NAME(r3000); break; case CPUINFO_PTR_BURN: info->burn = NULL; break; - case CPUINFO_PTR_DISASSEMBLE: info->disassemble = r3000_dasm; break; + case CPUINFO_PTR_DISASSEMBLE: info->disassemble = CPU_DISASSEMBLE_NAME(r3000); break; case CPUINFO_PTR_INSTRUCTION_COUNTER: info->icount = &r3000->icount; break; /* --- the following bits of info are returned as NULL-terminated strings --- */ @@ -1357,7 +1357,7 @@ static void r3000_get_info(UINT32 state, cpuinfo *info) * CPU-specific set_info **************************************************************************/ -void r3000be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r3000be ) { switch (state) { @@ -1370,12 +1370,12 @@ void r3000be_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "R3000 (big)"); break; - default: r3000_get_info(state, info); break; + default: CPU_GET_INFO_CALL(r3000); break; } } -void r3000le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r3000le ) { switch (state) { @@ -1388,12 +1388,12 @@ void r3000le_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "R3000 (little)"); break; - default: r3000_get_info(state, info); break; + default: CPU_GET_INFO_CALL(r3000); break; } } -void r3041be_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r3041be ) { switch (state) { @@ -1406,12 +1406,12 @@ void r3041be_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "R3041 (big)"); break; - default: r3000_get_info(state, info); break; + default: CPU_GET_INFO_CALL(r3000); break; } } -void r3041le_get_info(UINT32 state, cpuinfo *info) +CPU_GET_INFO( r3041le ) { switch (state) { @@ -1424,6 +1424,6 @@ void r3041le_get_info(UINT32 state, cpuinfo *info) /* --- the following bits of info are returned as NULL-terminated strings --- */ case CPUINFO_STR_NAME: strcpy(info->s, "R3041 (little)"); break; - default: r3000_get_info(state, info); break; + default: CPU_GET_INFO_CALL(r3000); break; } } diff --git a/src/emu/cpu/mips/r3000.h b/src/emu/cpu/mips/r3000.h index 2ccd86a9aec..0a55b2a1db2 100644 --- a/src/emu/cpu/mips/r3000.h +++ b/src/emu/cpu/mips/r3000.h @@ -60,10 +60,10 @@ struct _r3000_cpu_core PUBLIC FUNCTIONS ***************************************************************************/ -extern void r3000be_get_info(UINT32 state, cpuinfo *info); -extern void r3000le_get_info(UINT32 state, cpuinfo *info); +extern CPU_GET_INFO( r3000be ); +extern CPU_GET_INFO( r3000le ); -extern void r3041be_get_info(UINT32 state, cpuinfo *info); -extern void r3041le_get_info(UINT32 state, cpuinfo *info); +extern CPU_GET_INFO( r3041be ); +extern CPU_GET_INFO( r3041le ); #endif /* __R3000_H__ */ |