Commit 3f20e1ddf2770016f8c8fa15971e0d0ebdd1c731
1 parent
75913b72
TSS error code push fix (malc)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1558 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
3 additions
and
2 deletions
target-i386/helper.c
... | ... | @@ -622,9 +622,10 @@ static void do_interrupt_protected(int intno, int is_int, int error_code, |
622 | 622 | raise_exception_err(EXCP0B_NOSEG, intno * 8 + 2); |
623 | 623 | switch_tss(intno * 8, e1, e2, SWITCH_TSS_CALL, old_eip); |
624 | 624 | if (has_error_code) { |
625 | - int mask; | |
625 | + int mask, type; | |
626 | 626 | /* push the error code */ |
627 | - shift = (env->segs[R_CS].flags >> DESC_B_SHIFT) & 1; | |
627 | + type = (env->tr.flags >> DESC_TYPE_SHIFT) & 0xf; | |
628 | + shift = type >> 3; | |
628 | 629 | if (env->segs[R_SS].flags & DESC_B_MASK) |
629 | 630 | mask = 0xffffffff; |
630 | 631 | else | ... | ... |