mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-12-25 02:29:49 +00:00
Remove obsolete CFLOW_* constants but keep cpuop_{begin,end} for an
inline-threaded core.
This commit is contained in:
parent
2cda26edae
commit
0a201217bf
@ -5303,7 +5303,7 @@ void alloc_cache(void)
|
||||
|
||||
|
||||
|
||||
extern cpuop_rettype op_illg_1 (uae_u32 opcode) REGPARAM;
|
||||
extern void op_illg_1 (uae_u32 opcode) REGPARAM;
|
||||
|
||||
static void calc_checksum(blockinfo* bi, uae_u32* c1, uae_u32* c2)
|
||||
{
|
||||
|
@ -823,25 +823,6 @@ static int source_is_imm1_8 (struct instr *i)
|
||||
return i->stype == 3;
|
||||
}
|
||||
|
||||
static const char * cflow_string_of(uae_u32 opcode)
|
||||
{
|
||||
const char * cflow_type_str;
|
||||
|
||||
int cflow_type = table68k[opcode].cflow & ~fl_trap;
|
||||
switch (cflow_type) {
|
||||
case fl_branch: cflow_type_str = "CFLOW_BRANCH"; break;
|
||||
case fl_jump: cflow_type_str = "CFLOW_JUMP"; break;
|
||||
case fl_return: cflow_type_str = "CFLOW_RETURN"; break;
|
||||
default: cflow_type_str = "CFLOW_NORMAL";
|
||||
}
|
||||
|
||||
/* Patch M68K_EXEC_RETURN instruction */
|
||||
if (table68k[opcode].mnemo == i_EMULOP_RETURN)
|
||||
cflow_type_str = "CFLOW_EXEC_RETURN";
|
||||
|
||||
return cflow_type_str;
|
||||
}
|
||||
|
||||
static void gen_opcode (unsigned long int opcode)
|
||||
{
|
||||
struct instr *curi = table68k + opcode;
|
||||
@ -1345,7 +1326,7 @@ static void gen_opcode (unsigned long int opcode)
|
||||
}
|
||||
printf ("\tm68k_incpc ((uae_s32)src + 2);\n");
|
||||
fill_prefetch_0 ();
|
||||
printf ("cpuop_return(%s);\n", cflow_string_of(opcode));
|
||||
printf ("return;\n");
|
||||
printf ("didnt_jump:;\n");
|
||||
need_endlabel = 1;
|
||||
}
|
||||
@ -1378,7 +1359,7 @@ static void gen_opcode (unsigned long int opcode)
|
||||
}
|
||||
printf ("\t\t\tm68k_incpc((uae_s32)offs + 2);\n");
|
||||
fill_prefetch_0 ();
|
||||
printf ("cpuop_return(%s);\n", cflow_string_of(opcode));
|
||||
printf ("return;\n");
|
||||
printf ("\t\t}\n");
|
||||
printf ("\t}\n");
|
||||
need_endlabel = 1;
|
||||
@ -2283,7 +2264,7 @@ static void generate_one_opcode (int rp)
|
||||
|
||||
fprintf (headerfile, "extern cpuop_func op_%lx_%d_nf;\n", opcode, postfix);
|
||||
fprintf (headerfile, "extern cpuop_func op_%lx_%d_ff;\n", opcode, postfix);
|
||||
printf ("cpuop_rettype REGPARAM2 CPUFUNC(op_%lx_%d)(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, lookuptab[i].name);
|
||||
printf ("void REGPARAM2 CPUFUNC(op_%lx_%d)(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, lookuptab[i].name);
|
||||
printf ("\tcpuop_begin();\n");
|
||||
|
||||
/* gb-- The "nf" variant for an instruction that doesn't set the condition
|
||||
@ -2414,7 +2395,7 @@ static void generate_one_opcode (int rp)
|
||||
printf ("%s: ;\n", endlabelstr);
|
||||
if (table68k[opcode].flagdead == 0)
|
||||
printf ("\n#endif\n");
|
||||
printf ("\tcpuop_end(%s);\n", cflow_string_of(opcode));
|
||||
printf ("\tcpuop_end();\n");
|
||||
printf ("}\n");
|
||||
opcode_next_clev[rp] = next_cpu_level;
|
||||
opcode_last_postfix[rp] = postfix;
|
||||
|
@ -163,11 +163,11 @@ static __inline__ unsigned int cft_map (unsigned int f)
|
||||
#endif
|
||||
}
|
||||
|
||||
cpuop_rettype REGPARAM2 op_illg_1 (uae_u32 opcode) REGPARAM;
|
||||
void REGPARAM2 op_illg_1 (uae_u32 opcode) REGPARAM;
|
||||
|
||||
cpuop_rettype REGPARAM2 op_illg_1 (uae_u32 opcode)
|
||||
void REGPARAM2 op_illg_1 (uae_u32 opcode)
|
||||
{
|
||||
cpuop_return( op_illg (cft_map (opcode)) );
|
||||
op_illg (cft_map (opcode));
|
||||
}
|
||||
|
||||
static void build_cpufunctbl (void)
|
||||
@ -1189,18 +1189,18 @@ void m68k_emulop(uae_u32 opcode)
|
||||
MakeFromSR();
|
||||
}
|
||||
|
||||
cpuop_rettype REGPARAM2 op_illg (uae_u32 opcode)
|
||||
void REGPARAM2 op_illg (uae_u32 opcode)
|
||||
{
|
||||
uaecptr pc = m68k_getpc ();
|
||||
|
||||
if ((opcode & 0xF000) == 0xA000) {
|
||||
Exception(0xA,0);
|
||||
cpuop_return(CFLOW_TRAP);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((opcode & 0xF000) == 0xF000) {
|
||||
Exception(0xB,0);
|
||||
cpuop_return(CFLOW_TRAP);
|
||||
return;
|
||||
}
|
||||
|
||||
write_log ("Illegal instruction: %04x at %08lx\n", opcode, pc);
|
||||
@ -1209,7 +1209,7 @@ cpuop_rettype REGPARAM2 op_illg (uae_u32 opcode)
|
||||
#endif
|
||||
|
||||
Exception (4,0);
|
||||
cpuop_return(CFLOW_TRAP);
|
||||
return;
|
||||
}
|
||||
|
||||
void mmu_op(uae_u32 opcode, uae_u16 extra)
|
||||
@ -1307,7 +1307,7 @@ int m68k_do_specialties (void)
|
||||
}
|
||||
if (SPCFLAGS_TEST( SPCFLAG_BRK )) {
|
||||
SPCFLAGS_CLEAR( SPCFLAG_BRK );
|
||||
return CFLOW_EXEC_RETURN;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -26,18 +26,6 @@ extern int movem_next[256];
|
||||
|
||||
extern int broken_in;
|
||||
|
||||
/* Control flow information */
|
||||
#define CFLOW_NORMAL 0
|
||||
#define CFLOW_BRANCH 1
|
||||
#define CFLOW_JUMP 2
|
||||
#define CFLOW_RETURN 3
|
||||
#define CFLOW_TRAP 4
|
||||
#define CFLOW_SPCFLAGS 32 /* some spcflags are set */
|
||||
#define CFLOW_EXEC_RETURN 64 /* must exit from the execution loop */
|
||||
|
||||
#define cpuop_rettype void
|
||||
#define cpuop_return(v) do { (v); return; } while (0)
|
||||
|
||||
#ifdef X86_ASSEMBLY
|
||||
/* This hack seems to force all register saves (pushl %reg) to be moved to the
|
||||
begining of the function, thus making it possible to cpuopti to remove them
|
||||
@ -49,9 +37,9 @@ extern int broken_in;
|
||||
#endif
|
||||
|
||||
#define cpuop_begin() do { cpuop_tag("begin"); } while (0)
|
||||
#define cpuop_end(cflow) do { cpuop_tag("end"); cpuop_return(cflow); } while (0)
|
||||
#define cpuop_end() do { cpuop_tag("end"); } while (0)
|
||||
|
||||
typedef cpuop_rettype REGPARAM2 cpuop_func (uae_u32) REGPARAM;
|
||||
typedef void REGPARAM2 cpuop_func (uae_u32) REGPARAM;
|
||||
|
||||
struct cputbl {
|
||||
cpuop_func *handler;
|
||||
@ -71,7 +59,7 @@ struct comptbl {
|
||||
};
|
||||
#endif
|
||||
|
||||
extern cpuop_rettype REGPARAM2 op_illg (uae_u32) REGPARAM;
|
||||
extern void REGPARAM2 op_illg (uae_u32) REGPARAM;
|
||||
|
||||
typedef char flagtype;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user