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

14
src/arm/Xor.go Normal file
View file

@ -0,0 +1,14 @@
package arm
import "git.urbach.dev/cli/q/src/cpu"
// XorRegisterNumber performs a bitwise XOR using a register and a number.
func XorRegisterNumber(destination cpu.Register, source cpu.Register, number int) (uint32, bool) {
n, immr, imms, encodable := encodeLogicalImmediate(uint(number))
return 0b110100100<<23 | reg2BitmaskImm(destination, source, n, immr, imms), encodable
}
// XorRegisterRegister performs a bitwise XOR using two registers.
func XorRegisterRegister(destination cpu.Register, source cpu.Register, operand cpu.Register) uint32 {
return 0b11001010<<24 | reg3(destination, source, operand)
}