Implemented more arm64 instructions

This commit is contained in:
Eduard Urbach 2025-03-13 23:12:15 +01:00
parent 29ee6730f2
commit b7d76ff3e3
Signed by: eduard
GPG key ID: 49226B848C78F6C8
18 changed files with 218 additions and 29 deletions

View file

@ -4,5 +4,10 @@ import "git.urbach.dev/cli/q/src/cpu"
// SubRegisterNumber subtracts a number from the given register.
func SubRegisterNumber(destination cpu.Register, source cpu.Register, number int) uint32 {
return encodeRegisterNumberFlags(0b11, destination, source, number, false)
return addRegisterNumber(0b11, 0, destination, source, number)
}
// SubRegisterRegister subtracts a register from a register.
func SubRegisterRegister(destination cpu.Register, source cpu.Register, operand cpu.Register) uint32 {
return addRegisterRegister(0b11, 0, destination, source, operand)
}