Remove test-USE32-and-mask-PC operation from interpreter as well.

This commit is contained in:
SarahW 2019-01-27 21:22:35 +00:00
commit 889ca7f3f2
3 changed files with 11 additions and 8 deletions

View file

@ -263,8 +263,6 @@ dontprint=0;
break;
}
if (!use32) cpu_state.pc &= 0xffff;
if (cpu_state.abrt)
{
flags_rebuild();

View file

@ -567,8 +567,6 @@ void exec386_dynarec(int cycs)
x86_opcodes[(opcode | cpu_state.op32) & 0x3ff](fetchdat);
}
if (!use32) cpu_state.pc &= 0xffff;
if (((cs + cpu_state.pc) >> 12) != pccache)
CPU_BLOCK_END();
@ -731,8 +729,6 @@ inrecomp=0;
break;
}
if (!use32) cpu_state.pc &= 0xffff;
/*Cap source code at 4000 bytes per block; this
will prevent any block from spanning more than
2 pages. In practice this limit will never be
@ -808,8 +804,6 @@ inrecomp=0;
break;
}
if (!use32) cpu_state.pc &= 0xffff;
/*Cap source code at 4000 bytes per block; this
will prevent any block from spanning more than
2 pages. In practice this limit will never be

View file

@ -23,6 +23,8 @@
if (cond_ ## condition) \
{ \
cpu_state.pc += offset; \
if (!(cpu_state.op32 & 0x100)) \
cpu_state.pc &= 0xffff; \
CLOCK_CYCLES_ALWAYS(timing_bt); \
CPU_BLOCK_END(); \
PREFETCH_RUN(timing_bt+timing_bnt, 2, -1, 0,0,0,0, 0); \
@ -40,6 +42,7 @@
if (cond_ ## condition) \
{ \
cpu_state.pc += offset; \
cpu_state.pc &= 0xffff; \
CLOCK_CYCLES_ALWAYS(timing_bt); \
CPU_BLOCK_END(); \
PREFETCH_RUN(timing_bt+timing_bnt, 3, -1, 0,0,0,0, 0); \
@ -95,6 +98,7 @@ static int opLOOPNE_w(uint32_t fetchdat)
if (CX && !ZF_SET())
{
cpu_state.pc += offset;
cpu_state.pc &= 0xffff;
CPU_BLOCK_END();
PREFETCH_FLUSH();
return 1;
@ -126,6 +130,7 @@ static int opLOOPE_w(uint32_t fetchdat)
if (CX && ZF_SET())
{
cpu_state.pc += offset;
cpu_state.pc &= 0xffff;
CPU_BLOCK_END();
PREFETCH_FLUSH();
return 1;
@ -157,6 +162,7 @@ static int opLOOP_w(uint32_t fetchdat)
if (CX)
{
cpu_state.pc += offset;
cpu_state.pc &= 0xffff;
CPU_BLOCK_END();
PREFETCH_FLUSH();
return 1;
@ -186,6 +192,7 @@ static int opJCXZ(uint32_t fetchdat)
if (!CX)
{
cpu_state.pc += offset;
cpu_state.pc &= 0xffff;
CLOCK_CYCLES(4);
CPU_BLOCK_END();
PREFETCH_RUN(9, 2, -1, 0,0,0,0, 0);
@ -217,6 +224,8 @@ static int opJMP_r8(uint32_t fetchdat)
{
int8_t offset = (int8_t)getbytef();
cpu_state.pc += offset;
if (!(cpu_state.op32 & 0x100))
cpu_state.pc &= 0xffff;
CPU_BLOCK_END();
CLOCK_CYCLES((is486) ? 3 : 7);
PREFETCH_RUN(7, 2, -1, 0,0,0,0, 0);
@ -227,6 +236,7 @@ static int opJMP_r16(uint32_t fetchdat)
{
int16_t offset = (int16_t)getwordf();
cpu_state.pc += offset;
cpu_state.pc &= 0xffff;
CPU_BLOCK_END();
CLOCK_CYCLES((is486) ? 3 : 7);
PREFETCH_RUN(7, 3, -1, 0,0,0,0, 0);
@ -274,6 +284,7 @@ static int opCALL_r16(uint32_t fetchdat)
int16_t addr = (int16_t)getwordf();
PUSH_W(cpu_state.pc);
cpu_state.pc += addr;
cpu_state.pc &= 0xffff;
CPU_BLOCK_END();
CLOCK_CYCLES((is486) ? 3 : 7);
PREFETCH_RUN(7, 3, -1, 0,0,1,0, 0);