Old recompiler improvements: limited in-block IRQ checking to floppy IRQ's only, rewrote the GPF handlers in ASM, and changed the recompiled INC and DEC instructions to actually use INC and DEC on host. Also removed the keyboard_at.c timer hack.
This commit is contained in:
@@ -1440,6 +1440,7 @@ void codegen_block_start_recompile(codeblock_t *block)
|
||||
block->status = cpu_cur_status;
|
||||
|
||||
block_pos = BLOCK_GPF_OFFSET;
|
||||
#ifdef OLD_GPF
|
||||
addbyte(0xc7); /*MOV [ESP],0*/
|
||||
addbyte(0x04);
|
||||
addbyte(0x24);
|
||||
@@ -1451,6 +1452,16 @@ void codegen_block_start_recompile(codeblock_t *block)
|
||||
addlong(0);
|
||||
addbyte(0xe8); /*CALL x86gpf*/
|
||||
addlong((uint32_t)x86gpf - (uint32_t)(&codeblock[block_current].data[block_pos + 4]));
|
||||
#else
|
||||
addbyte(0xc6); /* mov byte ptr[&(cpu_state.abrt)],ABRT_GPF */
|
||||
addbyte(0x05);
|
||||
addlong((uint32_t) (uintptr_t) &(cpu_state.abrt));
|
||||
addbyte(ABRT_GPF);
|
||||
addbyte(0x31); /* xor eax,eax */
|
||||
addbyte(0xc0);
|
||||
addbyte(0xa3); /* mov [&(abrt_error)],eax */
|
||||
addlong((uint32_t) (uintptr_t) &(abrt_error));
|
||||
#endif
|
||||
block_pos = BLOCK_EXIT_OFFSET; /*Exit code*/
|
||||
addbyte(0x83); /*ADDL $16,%esp*/
|
||||
addbyte(0xC4);
|
||||
|
||||
Reference in New Issue
Block a user