Skip to main content

borrowing_sub

Function borrowing_sub 

Source
pub(crate) const fn borrowing_sub(
    lhs: Word,
    rhs: Word,
    borrow: Word,
) -> (Word, Word)
Expand description

Computes lhs - rhs - borrow, using word-sized borrow masks.

The incoming borrow is the most significant bit of borrow; all other bits are ignored. The outgoing borrow is Word::MAX if the subtraction underflows, or zero otherwise.