mirror of
https://github.com/holub/mame
synced 2025-04-24 17:30:55 +03:00
cpu/arm: Use rotr_32 for handling unaligned reads
This commit is contained in:
parent
1af48b762c
commit
cb2175d259
@ -264,11 +264,11 @@ uint32_t arm_cpu_device::cpu_read32( int addr )
|
||||
logerror("%08x: Unaligned byte read %08x\n",R15,addr);
|
||||
|
||||
if ((addr&3)==1)
|
||||
return ((result&0x000000ff)<<24)|((result&0xffffff00)>> 8);
|
||||
return rotr_32(result, 8);
|
||||
if ((addr&3)==2)
|
||||
return ((result&0x0000ffff)<<16)|((result&0xffff0000)>>16);
|
||||
return rotr_32(result, 16);
|
||||
if ((addr&3)==3)
|
||||
return ((result&0x00ffffff)<< 8)|((result&0xff000000)>>24);
|
||||
return rotr_32(result, 24);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user