Implemented more arm64 instructions
This commit is contained in:
parent
296fc37265
commit
c4d763839a
23 changed files with 290 additions and 53 deletions
|
@ -7,6 +7,6 @@ import "git.urbach.dev/cli/q/src/cpu"
|
|||
// This is the post-index version of the instruction so the offset is applied to the base register after the memory access.
|
||||
func LoadPair(reg1 cpu.Register, reg2 cpu.Register, base cpu.Register, offset int) uint32 {
|
||||
offset /= 8
|
||||
offset &= 0b1111111
|
||||
offset &= 0b111_1111
|
||||
return 0b1010100011<<22 | (uint32(offset) << 15) | (uint32(reg2) << 10) | (uint32(base) << 5) | uint32(reg1)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue