Implemented arm64 instructions: ldp and stp

This commit is contained in:
2025-03-12 12:29:55 +01:00
parent 03c8dfa34c
commit 450e634d79
8 changed files with 100 additions and 4 deletions

@ -6,6 +6,10 @@ import (
// MoveRegisterRegister copies a register to another register.
func MoveRegisterRegister(destination cpu.Register, source cpu.Register) uint32 {
if source == SP || destination == SP {
return AddRegisterNumber(destination, source, 0)
}
return 0b10101010<<24 | uint32(source)<<16 | 0b11111<<5 | uint32(destination)
}