INLINE UINT32 cpu_read32( ARM_REGS* cpustate, int addr ) { UINT32 result = memory_read_dword_32le(cpustate->program,addr&ADDRESS_MASK); /* Unaligned reads rotate the word, they never combine words */ if (addr&3) { if (ARM_DEBUG_CORE && addr&1) logerror("%08x: Unaligned byte read %08x\n",R15,addr); if ((addr&3)==1) return ((result&0x000000ff)<<24)|((result&0xffffff00)>> 8); if ((addr&3)==2) return ((result&0x0000ffff)<<16)|((result&0xffff0000)>>16); if ((addr&3)==3) return ((result&0x00ffffff)<< 8)|((result&0xff000000)>>24); } return result; }
INLINE void WWORD(dsp32_state *cpustate, offs_t addr, UINT16 data) { if (addr & 1) fprintf(stderr, "Unaligned word write @ %06X, PC=%06X\n", addr, cpustate->PC); memory_read_dword_32le(cpustate->program, (addr), data); }