def s32.pick

bend-osdev-crc@0.1.0.0 · crc.bend:100

import bend-osdev-crc@0.1.0.0/crc.bend as Crc
import Base

100def s32.pick(top: Bool, +poly: U32, +mask: U32, c: U32) -> U32:
101  match top:
102    case True{}:
103      U32.and(U32.xor(U32.shl(c), poly), mask)
104    case False{}:
105      U32.and(U32.shl(c), mask)

Uses (5)

Used by (1)