This commit is contained in:
2024-12-18 21:08:36 -08:00
parent 89800584f4
commit a785612ad1
2 changed files with 31 additions and 2 deletions

View File

@@ -84,8 +84,8 @@ struct Register : Comparable, CustomStringConvertible {
func possibleAs(fromB5 b5Suffix: Int) -> [Register] {
let choices: [Register] = (0b000...0b111).compactMap { aSuffix in
let aShift = aSuffix ^ 1
let b4 = aShift ^ 5
let aShift = aSuffix ^ 1 // Replace this with first XOR literal
let b4 = aShift ^ 5 // Replace this with second XOR literal
let a = Register(value: (b4^b5Suffix) << aShift, mask: 0b111 << aShift)
return a.combine(with: Register(value: aSuffix, mask: 0b111))
}