IADD3_WIDE

sm86.sail

function IADD3_WIDE() -> unit = {
    let a0 = SrcBitsAt(0, A);
    let b0 = SrcBitsAt(0, B);
    let a1 = SrcBitsAt(1, A);
    let b1 = SrcBitsAt(1, B);
    let sub = SrcNegAt(0, B);
    let lo = if sub then a0 - b0 else a0 + b0;
    /* the low word's carry: no borrow of a subtraction, a sum that wrapped */
    let carry = if sub then UInt(a0) >= UInt(b0) else UInt(lo) < UInt(a0);
    let hi = a1 + (if sub then not_vec(b1) else b1) + (if carry then 0x00000001 else 0x00000000);
    D_writeAt(0, lo);
    PredWrite(UInt(FieldAt(0, 81, 3)), carry, 0);
    D_writeAt(1, hi)
}

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.