a term of a 64-bit sum: its two's complement as NAK's fold reads it, ~x + 1 in 33 bits. With the carries in (.X) the modifier is the complement alone, ~x: the low word's sum gave the + 1 as a carry. One game's 64-bit subtractions are IADD3 a, b, -c then IADD3.X a', b', ~c', and with ~c' + 1 their high word was one too many
function Term64(s : Operand, x : bool) -> bits(64) = {
let v = SrcBits(s);
if not_bool(SrcNeg(s)) then ZeroExtend(v, 64) else {
let n = ZeroExtend(not_vec(v), 64);
if x then n else n + 0x0000000000000001
}
}Made from ScarletNX's Sail at 166ad3910f80. The Sail and the encodings' file are ScarletNX's (GPL-3.0-or-later); its encodings are from Mesa's NAK (sm70_encode.rs, MIT) and CuAssembler's sm_86 records.