mirror of
https://github.com/holub/mame
synced 2025-05-29 00:53:09 +03:00
i386: Trap flag support [Carl]
This commit is contained in:
parent
345d5bc6a1
commit
ff2e20a96b
@ -3099,6 +3099,7 @@ static CPU_EXECUTE( i386 )
|
|||||||
cpustate->address_prefix = 0;
|
cpustate->address_prefix = 0;
|
||||||
|
|
||||||
cpustate->ext = 1;
|
cpustate->ext = 1;
|
||||||
|
cpustate->old_tf = cpustate->TF;
|
||||||
|
|
||||||
cpustate->segment_prefix = 0;
|
cpustate->segment_prefix = 0;
|
||||||
cpustate->prev_eip = cpustate->eip;
|
cpustate->prev_eip = cpustate->eip;
|
||||||
@ -3113,6 +3114,13 @@ static CPU_EXECUTE( i386 )
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
I386OP(decode_opcode)(cpustate);
|
I386OP(decode_opcode)(cpustate);
|
||||||
|
if(cpustate->TF && cpustate->old_tf)
|
||||||
|
{
|
||||||
|
cpustate->prev_eip = cpustate->eip;
|
||||||
|
cpustate->ext = 0;
|
||||||
|
i386_trap(cpustate,1,0,0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch(UINT64 e)
|
catch(UINT64 e)
|
||||||
{
|
{
|
||||||
|
@ -240,6 +240,7 @@ struct _i386_state
|
|||||||
|
|
||||||
UINT8 performed_intersegment_jump;
|
UINT8 performed_intersegment_jump;
|
||||||
UINT8 delayed_interrupt_enable;
|
UINT8 delayed_interrupt_enable;
|
||||||
|
UINT8 old_tf;
|
||||||
|
|
||||||
UINT32 cr[5]; // Control registers
|
UINT32 cr[5]; // Control registers
|
||||||
UINT32 dr[8]; // Debug registers
|
UINT32 dr[8]; // Debug registers
|
||||||
|
Loading…
Reference in New Issue
Block a user