def val.le.go

bend-osdev-acpi@0.1.1.0 · aml_value.bend:88

import bend-osdev-acpi@0.1.1.0/aml_value.bend as AmlValue
import Base
import bend-osdev-word64@0.1.1.0/word64.bend as W

88# up to n bytes, little-endian
89def val.le.go(n: Nat, xs: List<&2, U32>, +sh: Nat, acc: W.W64) -> W.W64:
90  match n:
91    case 0n:
92      acc
93    case 1n+p:
94      match xs:
95        case Nil{}:
96          acc
97        case Con{h, t}:
98          val.le.go(p, t, Nat.add(sh, 8n), W.W64.or(acc, W.W64.shl(W.W64.from_u32(U32.and(h, 255)), sh)))

Uses (9)

Used by (1)