mirror of
https://github.com/mamedev/mame.git
synced 2024-11-16 07:48:32 +01:00
sparc: STD/STDA/LDD/LDDA when RD is odd is an illegal instruction
This commit is contained in:
parent
aaef28cd47
commit
fc48b58205
1 changed files with 11 additions and 2 deletions
|
@ -2570,7 +2570,7 @@ void sparc_base_device::execute_store(uint32_t op)
|
||||||
m_icount = 0;
|
m_icount = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (USEIMM && (STDA || STA || STHA || STBA))
|
else if ((USEIMM && (STDA || STA || STHA || STBA)) || ((STD || STDA) && (RD & 1)))
|
||||||
{
|
{
|
||||||
m_trap = 1;
|
m_trap = 1;
|
||||||
m_illegal_instruction = 1;
|
m_illegal_instruction = 1;
|
||||||
|
@ -2888,6 +2888,15 @@ if (((trap = 0) and (LDD or LDDA or LDDF or LDDC)) then (
|
||||||
|
|
||||||
inline void sparc_base_device::execute_ldd(uint32_t op)
|
inline void sparc_base_device::execute_ldd(uint32_t op)
|
||||||
{
|
{
|
||||||
|
if (RD & 1)
|
||||||
|
{
|
||||||
|
m_trap = 1;
|
||||||
|
m_illegal_instruction = 1;
|
||||||
|
m_stashed_icount = m_icount;
|
||||||
|
m_icount = 0;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const uint32_t address = RS1REG + (USEIMM ? SIMM13 : RS2REG);
|
const uint32_t address = RS1REG + (USEIMM ? SIMM13 : RS2REG);
|
||||||
|
|
||||||
if (address & 7)
|
if (address & 7)
|
||||||
|
@ -3403,7 +3412,7 @@ inline void sparc_base_device::execute_ldda(uint32_t op)
|
||||||
m_icount = 0;
|
m_icount = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (USEIMM)
|
else if (USEIMM || (RD & 1))
|
||||||
{
|
{
|
||||||
m_trap = 1;
|
m_trap = 1;
|
||||||
m_illegal_instruction = 1;
|
m_illegal_instruction = 1;
|
||||||
|
|
Loading…
Reference in a new issue