Move some more variables into cpu_state structure. Minor speedup (~2%).
This commit is contained in:
parent
a65411466e
commit
c664682758
43 changed files with 801 additions and 810 deletions
|
|
@ -5,8 +5,8 @@ static int op ## name ## _w_a16(uint32_t fetchdat) \
|
|||
if (abrt) return 1; \
|
||||
cpu_state.pc++; \
|
||||
\
|
||||
ea_seg = &seg; \
|
||||
ssegs = 1; \
|
||||
cpu_state.ea_seg = &seg; \
|
||||
cpu_state.ssegs = 1; \
|
||||
CLOCK_CYCLES(4); \
|
||||
\
|
||||
return x86_opcodes[fetchdat & 0xff](fetchdat >> 8); \
|
||||
|
|
@ -18,8 +18,8 @@ static int op ## name ## _l_a16(uint32_t fetchdat) \
|
|||
if (abrt) return 1; \
|
||||
cpu_state.pc++; \
|
||||
\
|
||||
ea_seg = &seg; \
|
||||
ssegs = 1; \
|
||||
cpu_state.ea_seg = &seg; \
|
||||
cpu_state.ssegs = 1; \
|
||||
CLOCK_CYCLES(4); \
|
||||
\
|
||||
return x86_opcodes[(fetchdat & 0xff) | 0x100](fetchdat >> 8); \
|
||||
|
|
@ -31,8 +31,8 @@ static int op ## name ## _w_a32(uint32_t fetchdat) \
|
|||
if (abrt) return 1; \
|
||||
cpu_state.pc++; \
|
||||
\
|
||||
ea_seg = &seg; \
|
||||
ssegs = 1; \
|
||||
cpu_state.ea_seg = &seg; \
|
||||
cpu_state.ssegs = 1; \
|
||||
CLOCK_CYCLES(4); \
|
||||
\
|
||||
return x86_opcodes[(fetchdat & 0xff) | 0x200](fetchdat >> 8); \
|
||||
|
|
@ -44,8 +44,8 @@ static int op ## name ## _l_a32(uint32_t fetchdat) \
|
|||
if (abrt) return 1; \
|
||||
cpu_state.pc++; \
|
||||
\
|
||||
ea_seg = &seg; \
|
||||
ssegs = 1; \
|
||||
cpu_state.ea_seg = &seg; \
|
||||
cpu_state.ssegs = 1; \
|
||||
CLOCK_CYCLES(4); \
|
||||
\
|
||||
return x86_opcodes[(fetchdat & 0xff) | 0x300](fetchdat >> 8); \
|
||||
|
|
@ -64,9 +64,9 @@ static int op_66(uint32_t fetchdat) /*Data size select*/
|
|||
if (abrt) return 1;
|
||||
cpu_state.pc++;
|
||||
|
||||
op32 = ((use32 & 0x100) ^ 0x100) | (op32 & 0x200);
|
||||
cpu_state.op32 = ((use32 & 0x100) ^ 0x100) | (cpu_state.op32 & 0x200);
|
||||
CLOCK_CYCLES(2);
|
||||
return x86_opcodes[(fetchdat & 0xff) | op32](fetchdat >> 8);
|
||||
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
|
||||
}
|
||||
static int op_67(uint32_t fetchdat) /*Address size select*/
|
||||
{
|
||||
|
|
@ -74,7 +74,7 @@ static int op_67(uint32_t fetchdat) /*Address size select*/
|
|||
if (abrt) return 1;
|
||||
cpu_state.pc++;
|
||||
|
||||
op32 = ((use32 & 0x200) ^ 0x200) | (op32 & 0x100);
|
||||
cpu_state.op32 = ((use32 & 0x200) ^ 0x200) | (cpu_state.op32 & 0x100);
|
||||
CLOCK_CYCLES(2);
|
||||
return x86_opcodes[(fetchdat & 0xff) | op32](fetchdat >> 8);
|
||||
return x86_opcodes[(fetchdat & 0xff) | cpu_state.op32](fetchdat >> 8);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue