Both recompilers now check for interrupt after every instruction and exit the block if one has happened.
This commit is contained in:
@@ -2062,6 +2062,15 @@ generate_call:
|
||||
codegen_block_full_ins++;
|
||||
codegen_endpc = (cs + cpu_state.pc) + 8;
|
||||
|
||||
/* Check for interrupts. */
|
||||
addbyte(0xE8); /*CALL*/
|
||||
addlong(((uint8_t *)int_check - (uint8_t *)(&block->data[block_pos + 4])));
|
||||
|
||||
addbyte(0x09); /*OR %eax, %eax*/
|
||||
addbyte(0xc0);
|
||||
addbyte(0x0F); addbyte(0x85); /*JNZ 0*/
|
||||
addlong((uint32_t)&block->data[BLOCK_EXIT_OFFSET] - (uint32_t)(&block->data[block_pos + 4]));
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2150,6 +2159,15 @@ generate_call:
|
||||
addbyte(0x0F); addbyte(0x85); /*JNZ 0*/
|
||||
addlong((uint32_t)&block->data[BLOCK_EXIT_OFFSET] - (uint32_t)(&block->data[block_pos + 4]));
|
||||
|
||||
/* Check for interrupts. */
|
||||
addbyte(0xE8); /*CALL*/
|
||||
addlong(((uint8_t *)int_check - (uint8_t *)(&block->data[block_pos + 4])));
|
||||
|
||||
addbyte(0x09); /*OR %eax, %eax*/
|
||||
addbyte(0xc0);
|
||||
addbyte(0x0F); addbyte(0x85); /*JNZ 0*/
|
||||
addlong((uint32_t)&block->data[BLOCK_EXIT_OFFSET] - (uint32_t)(&block->data[block_pos + 4]));
|
||||
|
||||
codegen_endpc = (cs + cpu_state.pc) + 8;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user