Applied patch by Jan Kloetzke:
The PUSHF/POPF instructions were not emulated correctly. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26325 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fc8e77f863
commit
6be60b2d19
@ -44,8 +44,8 @@
|
||||
#define PUSHF 0x9c
|
||||
#define STI 0xfb
|
||||
|
||||
#define I_FLAG (1 << 9)
|
||||
#define DIRECTION_FLAG (1 << 10)
|
||||
#define I_FLAG (1u << 9)
|
||||
#define DIRECTION_FLAG (1u << 10)
|
||||
|
||||
#define CSEG 0x2e
|
||||
#define SSEG 0x36
|
||||
@ -442,7 +442,7 @@ emulate(struct vm86_state *state)
|
||||
uint16 flags = state->regs.flags;
|
||||
|
||||
/* store real IF */
|
||||
flags &= I_FLAG;
|
||||
flags &= ~I_FLAG;
|
||||
flags |= (uint16)state->if_flag << 9;
|
||||
|
||||
pushw(&state->regs, flags);
|
||||
@ -475,10 +475,11 @@ emulate(struct vm86_state *state)
|
||||
case PUSHF:
|
||||
{
|
||||
TRACE_NP("PUSHF");
|
||||
uint16 flags = state->regs.flags & I_FLAG;
|
||||
uint32 flags = state->regs.flags;
|
||||
|
||||
/* store real IF */
|
||||
flags |= (uint16)state->if_flag << 9;
|
||||
flags &= ~I_FLAG;
|
||||
flags |= (uint32)state->if_flag << 9;
|
||||
if (prefix.size)
|
||||
pushl(&state->regs, flags);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user