def CapSet.subset
import bend-osdev-caps@0.1.0.0/caps.bend as Capsimport Base
289# a within b: no bit of a outside b (on the low word, a & ~b == 0)
290def CapSet.subset(a: CapSet(), b: CapSet()) -> Bool:
291 match a b:
292 case CapSetW{al, ah} CapSetW{bl, bh}:
293 Bool.and(U32.is_eq(U32.and(al, U32.not(bl)), 0), CapBits.subset(9n, ah, bh))