mirror of
https://github.com/holub/mame
synced 2025-10-06 09:00:04 +03:00
i386: fix stack size in call too (nw)
This commit is contained in:
parent
73e9041964
commit
de007f3e5f
@ -1720,7 +1720,8 @@ void i386_device::i386_protected_mode_call(uint16_t seg, uint32_t off, int indir
|
||||
}
|
||||
if (operand32 != 0) // if 32-bit
|
||||
{
|
||||
if(i386_limit_check(SS, REG32(ESP) - 8))
|
||||
uint32_t offset = (STACK_32BIT ? REG32(ESP) : REG16(SP));
|
||||
if(i386_limit_check(SS, offset - 8))
|
||||
{
|
||||
logerror("CALL (%08x): Stack has no room for return address.\n",m_pc);
|
||||
FAULT(FAULT_SS,0) // #SS(0)
|
||||
@ -1728,7 +1729,8 @@ void i386_device::i386_protected_mode_call(uint16_t seg, uint32_t off, int indir
|
||||
}
|
||||
else
|
||||
{
|
||||
if(i386_limit_check(SS, (REG16(SP) - 4) & 0xffff))
|
||||
uint32_t offset = (STACK_32BIT ? REG32(ESP) : REG16(SP));
|
||||
if(i386_limit_check(SS, (offset - 4) & 0xffff))
|
||||
{
|
||||
logerror("CALL (%08x): Stack has no room for return address.\n",m_pc);
|
||||
FAULT(FAULT_SS,0) // #SS(0)
|
||||
@ -1978,7 +1980,8 @@ void i386_device::i386_protected_mode_call(uint16_t seg, uint32_t off, int indir
|
||||
/* same privilege */
|
||||
if (operand32 != 0) // if 32-bit
|
||||
{
|
||||
if(i386_limit_check(SS, REG32(ESP) - 8))
|
||||
uint32_t stkoff = (STACK_32BIT ? REG32(ESP) : REG16(SP));
|
||||
if(i386_limit_check(SS, stkoff - 8))
|
||||
{
|
||||
logerror("CALL: Stack has no room for return address.\n");
|
||||
FAULT(FAULT_SS,0) // #SS(0)
|
||||
@ -1988,7 +1991,8 @@ void i386_device::i386_protected_mode_call(uint16_t seg, uint32_t off, int indir
|
||||
}
|
||||
else
|
||||
{
|
||||
if(i386_limit_check(SS, (REG16(SP) - 4) & 0xffff))
|
||||
uint32_t stkoff = (STACK_32BIT ? REG32(ESP) : REG16(SP));
|
||||
if(i386_limit_check(SS, (stkoff - 4) & 0xffff))
|
||||
{
|
||||
logerror("CALL: Stack has no room for return address.\n");
|
||||
FAULT(FAULT_SS,0) // #SS(0)
|
||||
|
@ -4709,7 +4709,8 @@ void i386_device::x87_fstsw_m2byte(uint8_t modrm)
|
||||
void i386_device::x87_invalid(uint8_t modrm)
|
||||
{
|
||||
// TODO
|
||||
fatalerror("x87 invalid instruction (PC:%.4x)\n", m_pc);
|
||||
report_invalid_opcode();
|
||||
i386_trap(6, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user