package arm import "git.urbach.dev/cli/q/src/cpu" // LoadRegister loads from memory into a register. func LoadRegister(destination cpu.Register, base cpu.Register, offset int16, length byte) uint32 { if offset < 0 { offset &= 0xFF offset |= 1 << 8 } return 0b11111000010<<21 | uint32(offset)<<12 | uint32(base)<<5 | uint32(destination) }