Reorganised REP instructions.

This commit is contained in:
SarahW 2017-07-20 21:06:21 +01:00
commit a96e87527e
12 changed files with 1037 additions and 899 deletions

View file

@ -1991,6 +1991,15 @@ void codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t
case 0xf0: /*LOCK*/
break;
case 0xf2: /*REPNE*/
op_table = x86_dynarec_opcodes_REPNE;
recomp_op_table = recomp_opcodes_REPNE;
break;
case 0xf3: /*REPE*/
op_table = x86_dynarec_opcodes_REPE;
recomp_op_table = recomp_opcodes_REPE;
break;
default:
goto generate_call;
@ -2044,6 +2053,12 @@ generate_call:
#endif
}
if ((op_table == x86_opcodes_REPNE || op_table == x86_opcodes_REPE) && !op_table[opcode | op_32])
{
op_table = x86_dynarec_opcodes;
recomp_op_table = recomp_opcodes;
}
if (recomp_op_table && recomp_op_table[(opcode | op_32) & 0x1ff])
{
uint32_t new_pc = recomp_op_table[(opcode | op_32) & 0x1ff](opcode, fetchdat, op_32, op_pc, block);