trunk/src/emu/cpu/i386/i386.c
| r32571 | r32572 | |
| 901 | 901 | newESP = i386_get_stack_ptr(DPL); |
| 902 | 902 | if(type & 0x08) // 32-bit gate |
| 903 | 903 | { |
| 904 | | if(newESP < (V8086_MODE?36:20)) |
| 904 | if(((newESP < (V8086_MODE?36:20)) && !(stack.flags & 0x4)) || ((~stack.limit < (~(newESP - 1) + (V8086_MODE?36:20))) && (stack.flags & 0x4))) |
| 905 | 905 | { |
| 906 | 906 | logerror("IRQ: New stack has no space for return addresses.\n"); |
| 907 | 907 | FAULT_EXP(FAULT_SS,0) |
| r32571 | r32572 | |
| 910 | 910 | else // 16-bit gate |
| 911 | 911 | { |
| 912 | 912 | newESP &= 0xffff; |
| 913 | | if(newESP < (V8086_MODE?18:10)) |
| 913 | if(((newESP < (V8086_MODE?18:10)) && !(stack.flags & 0x4)) || ((~stack.limit < (~(newESP - 1) + (V8086_MODE?18:10))) && (stack.flags & 0x4))) |
| 914 | 914 | { |
| 915 | 915 | logerror("IRQ: New stack has no space for return addresses.\n"); |
| 916 | 916 | FAULT_EXP(FAULT_SS,0) |