616 |
|
|
617 |
void OPPROTO op_int_im(void) |
void OPPROTO op_int_im(void) |
618 |
{ |
{ |
619 |
EIP = PARAM1; |
int intno; |
620 |
raise_exception(EXCP0D_GPF); |
intno = PARAM1; |
621 |
|
EIP = PARAM2; |
622 |
|
raise_exception_err(EXCP0D_GPF, intno * 8 + 2); |
623 |
} |
} |
624 |
|
|
625 |
void OPPROTO op_int3(void) |
void OPPROTO op_int3(void) |
635 |
if (eflags & CC_O) { |
if (eflags & CC_O) { |
636 |
raise_exception(EXCP04_INTO); |
raise_exception(EXCP04_INTO); |
637 |
} |
} |
638 |
|
FORCE_RET(); |
639 |
} |
} |
640 |
|
|
641 |
/* XXX: add IOPL/CPL tests */ |
void OPPROTO op_gpf(void) |
|
void OPPROTO op_cli(void) |
|
642 |
{ |
{ |
643 |
|
EIP = PARAM1; |
644 |
raise_exception(EXCP0D_GPF); |
raise_exception(EXCP0D_GPF); |
645 |
} |
} |
646 |
|
|
647 |
/* XXX: add IOPL/CPL tests */ |
void OPPROTO op_cli(void) |
648 |
|
{ |
649 |
|
env->eflags &= ~IF_MASK; |
650 |
|
} |
651 |
|
|
652 |
void OPPROTO op_sti(void) |
void OPPROTO op_sti(void) |
653 |
{ |
{ |
654 |
raise_exception(EXCP0D_GPF); |
env->eflags |= IF_MASK; |
655 |
} |
} |
656 |
|
|
657 |
/* vm86plus instructions */ |
/* vm86plus instructions */ |
1104 |
dt = &env->gdt; |
dt = &env->gdt; |
1105 |
index = selector & ~7; |
index = selector & ~7; |
1106 |
if ((index + 7) > dt->limit) |
if ((index + 7) > dt->limit) |
1107 |
raise_exception(EXCP0D_GPF); |
raise_exception_err(EXCP0D_GPF, selector); |
1108 |
ptr = dt->base + index; |
ptr = dt->base + index; |
1109 |
e1 = ldl(ptr); |
e1 = ldl(ptr); |
1110 |
e2 = ldl(ptr + 4); |
e2 = ldl(ptr + 4); |