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