diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-08-21 17:30:26 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2005-08-21 17:30:26 +0000 |
commit | 3f20e1ddf2770016f8c8fa15971e0d0ebdd1c731 (patch) | |
tree | f7530ec0b9beef55a25a2c83868decf6cd4b291f /target-i386 | |
parent | 75913b727e2702b7ee3099c0388502778554f681 (diff) |
TSS error code push fix (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1558 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/helper.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target-i386/helper.c b/target-i386/helper.c index 424dc52848..c7fea9553e 100644 --- a/target-i386/helper.c +++ b/target-i386/helper.c @@ -622,9 +622,10 @@ static void do_interrupt_protected(int intno, int is_int, int error_code, raise_exception_err(EXCP0B_NOSEG, intno * 8 + 2); switch_tss(intno * 8, e1, e2, SWITCH_TSS_CALL, old_eip); if (has_error_code) { - int mask; + int mask, type; /* push the error code */ - shift = (env->segs[R_CS].flags >> DESC_B_SHIFT) & 1; + type = (env->tr.flags >> DESC_TYPE_SHIFT) & 0xf; + shift = type >> 3; if (env->segs[R_SS].flags & DESC_B_MASK) mask = 0xffffffff; else |