def CapSetW.word_u32

bend-osdev-caps@0.1.0.0 · caps.bend:373

import bend-osdev-caps@0.1.0.0/caps.bend as Caps
import Base

373# the value of the n bits of w, and the n low bits of a, as native words
374def CapSetW.word_u32(n: Nat, w: Word(n)) -> U32:
375  match n:
376    case 0n:
377      0
378    case 1n+p:
379      match w:
380        case WCon{b, t}:
381          U32.or(CapSetW.bit(b), U32.shl(CapSetW.word_u32(p, t)))

Uses (7)

Used by (1)