def AmlUnit.hole
import bend-osdev-acpi@0.1.1.0/aml_field.bend as AmlFieldimport Base
import bend-osdev-word64@0.1.1.0/word64.bend as W
113# the unit's own bits that belong to the field
114def AmlUnit.hole(u: AmlUnit) -> W.W64:
115 match u:
116 case AmlUnit{a, +s, +n, d, ok}:
117 W.W64.shl(fld.mask(n), s)