diff options
author | 2022-10-29 19:46:50 -0400 | |
---|---|---|
committer | 2022-10-29 19:46:50 -0400 | |
commit | cb2175d2596174a9994d1c4090bc5428801214b8 (patch) | |
tree | c15f57ef4eaff28bd88997a7a5cecd7f3cb840af | |
parent | 1af48b762c29e0f0a5dfddd1e5500623dc5baa99 (diff) |
cpu/arm: Use rotr_32 for handling unaligned reads
-rw-r--r-- | src/devices/cpu/arm/arm.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/cpu/arm/arm.cpp b/src/devices/cpu/arm/arm.cpp index 749b14d9bf8..6a99468da75 100644 --- a/src/devices/cpu/arm/arm.cpp +++ b/src/devices/cpu/arm/arm.cpp @@ -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; |