arm: fixed carry for ROR and preserve IRQ_MASK in LDR R15,***

This commit is contained in:
Sandro Ronco 2016-11-12 22:38:35 +01:00
parent 7702f39327
commit 4cb5712cd2

View File

@ -675,7 +675,7 @@ void arm_cpu_device::HandleMemSingle( uint32_t insn )
{
if (rd == eR15)
{
R15 = (cpu_read32(rnv) & ADDRESS_MASK) | (R15 & PSR_MASK) | (R15 & MODE_MASK);
R15 = (cpu_read32(rnv) & ADDRESS_MASK) | (R15 & PSR_MASK) | (R15 & IRQ_MASK) | (R15 & MODE_MASK);
/*
The docs are explicit in that the bottom bits should be masked off
@ -1364,7 +1364,7 @@ uint32_t arm_cpu_device::decodeShift(uint32_t insn, uint32_t *pCarry)
if (k)
{
while (k > 32) k -= 32;
if (pCarry) *pCarry = rm & SIGN_BIT;
if (pCarry) *pCarry = rm & (1 << (k - 1));
return ROR(rm, k);
}
else