def hst.rd

bend-osdev-acpi@0.1.1.0 · aml_host.bend:60

import bend-osdev-acpi@0.1.1.0/aml_host.bend as AmlHost
import Base
import bend-osdev-word64@0.1.1.0/word64.bend as W

60# n bytes from address a, little-endian, into acc from bit sh
61def hst.rd(n: Nat, +m: Map<&2, U32>, +space: U32, +a: W.W64, +sh: Nat, acc: W.W64) -> W.W64:
62  match n:
63    case 0n:
64      acc
65    case 1n+p:
66      hst.rd(p, m, space, W.W64.add(a, W.W64.one()), Nat.add(sh, 8n), W.W64.or(acc, W.W64.shl(W.W64.from_u32(hst.byte(m, space, a)), sh)))

Uses (11)

Used by (1)