more accurate GPF generation
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@128 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
455b761956
commit
504e56ebdc
21
op-i386.c
21
op-i386.c
|
@ -616,8 +616,10 @@ void OPPROTO op_jmp_im(void)
|
||||||
|
|
||||||
void OPPROTO op_int_im(void)
|
void OPPROTO op_int_im(void)
|
||||||
{
|
{
|
||||||
EIP = PARAM1;
|
int intno;
|
||||||
raise_exception(EXCP0D_GPF);
|
intno = PARAM1;
|
||||||
|
EIP = PARAM2;
|
||||||
|
raise_exception_err(EXCP0D_GPF, intno * 8 + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPPROTO op_int3(void)
|
void OPPROTO op_int3(void)
|
||||||
|
@ -633,18 +635,23 @@ void OPPROTO op_into(void)
|
||||||
if (eflags & CC_O) {
|
if (eflags & CC_O) {
|
||||||
raise_exception(EXCP04_INTO);
|
raise_exception(EXCP04_INTO);
|
||||||
}
|
}
|
||||||
|
FORCE_RET();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OPPROTO op_gpf(void)
|
||||||
|
{
|
||||||
|
EIP = PARAM1;
|
||||||
|
raise_exception(EXCP0D_GPF);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: add IOPL/CPL tests */
|
|
||||||
void OPPROTO op_cli(void)
|
void OPPROTO op_cli(void)
|
||||||
{
|
{
|
||||||
raise_exception(EXCP0D_GPF);
|
env->eflags &= ~IF_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: add IOPL/CPL tests */
|
|
||||||
void OPPROTO op_sti(void)
|
void OPPROTO op_sti(void)
|
||||||
{
|
{
|
||||||
raise_exception(EXCP0D_GPF);
|
env->eflags |= IF_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vm86plus instructions */
|
/* vm86plus instructions */
|
||||||
|
@ -1097,7 +1104,7 @@ void load_seg(int seg_reg, int selector)
|
||||||
dt = &env->gdt;
|
dt = &env->gdt;
|
||||||
index = selector & ~7;
|
index = selector & ~7;
|
||||||
if ((index + 7) > dt->limit)
|
if ((index + 7) > dt->limit)
|
||||||
raise_exception(EXCP0D_GPF);
|
raise_exception_err(EXCP0D_GPF, selector);
|
||||||
ptr = dt->base + index;
|
ptr = dt->base + index;
|
||||||
e1 = ldl(ptr);
|
e1 = ldl(ptr);
|
||||||
e2 = ldl(ptr + 4);
|
e2 = ldl(ptr + 4);
|
||||||
|
|
Loading…
Reference in a new issue