diff options
author | 2016-01-30 13:25:32 -0500 | |
---|---|---|
committer | 2016-01-30 13:25:32 -0500 | |
commit | 83e6738a0a26282606b21848a027963d63ef8f78 (patch) | |
tree | 313ce111894087682675cc4b6559d94baa1af9e6 /src/devices/cpu/arm/arm.cpp | |
parent | 37adee5d3eaf57ef1a7554781349eb6724326776 (diff) |
Add macros for alignment checking (nw)
Diffstat (limited to 'src/devices/cpu/arm/arm.cpp')
-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 41724668f53..34dc1635639 100644 --- a/src/devices/cpu/arm/arm.cpp +++ b/src/devices/cpu/arm/arm.cpp @@ -259,7 +259,7 @@ void arm_cpu_device::cpu_write32( int addr, UINT32 data ) { /* Unaligned writes are treated as normal writes */ m_program->write_dword(addr&ADDRESS_MASK,data); - if (ARM_DEBUG_CORE && addr&3) logerror("%08x: Unaligned write %08x\n",R15,addr); + if (ARM_DEBUG_CORE && !DWORD_ALIGNED(addr)) logerror("%08x: Unaligned write %08x\n",R15,addr); } void arm_cpu_device::cpu_write8( int addr, UINT8 data ) @@ -272,9 +272,9 @@ UINT32 arm_cpu_device::cpu_read32( int addr ) UINT32 result = m_program->read_dword(addr&ADDRESS_MASK); /* Unaligned reads rotate the word, they never combine words */ - if (addr&3) + if (!DWORD_ALIGNED(addr)) { - if (ARM_DEBUG_CORE && addr&1) + if (ARM_DEBUG_CORE && !WORD_ALIGNED(addr)) logerror("%08x: Unaligned byte read %08x\n",R15,addr); if ((addr&3)==1) |