Added arm package
All checks were successful
/ test (push) Successful in 19s

This commit is contained in:
Eduard Urbach 2025-06-23 11:49:39 +02:00
parent bac5986425
commit 3ae47f93eb
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
45 changed files with 1417 additions and 0 deletions

17
src/arm/Compare.go Normal file
View file

@ -0,0 +1,17 @@
package arm
import "git.urbach.dev/cli/q/src/cpu"
// CompareRegisterNumber is an alias for a subtraction that updates the conditional flags and discards the result.
func CompareRegisterNumber(register cpu.Register, number int) (code uint32, encodable bool) {
if number < 0 {
return addRegisterNumber(ZR, register, -number, 1)
}
return subRegisterNumber(ZR, register, number, 1)
}
// CompareRegisterRegister is an alias for a subtraction that updates the conditional flags and discards the result.
func CompareRegisterRegister(reg1 cpu.Register, reg2 cpu.Register) uint32 {
return subRegisterRegister(ZR, reg1, reg2, 1)
}