def t32.update.go

bend-osdev-crc@0.1.0.0 · table.bend:72

import bend-osdev-crc@0.1.0.0/table.bend as Table
import Base
import bend-osdev-crc@0.1.0.0/crc.bend as C

72def t32.update.go(reflected: Bool, +width: Nat, +poly: U32, c: U32, xs: List<&2, U32>) -> U32:
73  match reflected:
74    case True{}:
75      +rp = C.reflect32(poly, width)
76      t32.snd(t32.r.raw(xs, (t32.fill.r(256n, [0 : U32*256n], rp, 0), c)))
77    case False{}:
78      t32.update.msb(Nat.is_lt(width, 8n), width, poly, c, xs)

Uses (12)

Used by (1)