A faster constructor for tlb-keys.
(tlb-key-fast wp smep smap ac nxe implicit-supervisor-access r-w-x cpl vpn) → *
The defbitstruct book creates a
This version is faster because it uses a macro which expands to a
composition of
We use mbe and leave this enabled so it rewrites to
Function:
(defun tlb-key-fast (wp smep smap ac nxe implicit-supervisor-access r-w-x cpl vpn) (declare (type (unsigned-byte 1) wp) (type (unsigned-byte 1) smep) (type (unsigned-byte 1) smap) (type (unsigned-byte 1) ac) (type (unsigned-byte 1) nxe) (type (unsigned-byte 1) implicit-supervisor-access) (type (unsigned-byte 2) r-w-x) (type (unsigned-byte 2) cpl) (type (unsigned-byte 36) vpn)) (let ((__function__ 'tlb-key-fast)) (declare (ignorable __function__)) (mbe :logic (tlb-key wp smep smap ac nxe implicit-supervisor-access r-w-x cpl vpn) :exec (the (unsigned-byte 46) (logapp-inline 1 wp (the (unsigned-byte 45) (logapp-inline 1 smep (the (unsigned-byte 44) (logapp-inline 1 smap (the (unsigned-byte 43) (logapp-inline 1 ac (the (unsigned-byte 42) (logapp-inline 1 nxe (the (unsigned-byte 41) (logapp-inline 1 implicit-supervisor-access (the (unsigned-byte 40) (logapp-inline 2 r-w-x (the (unsigned-byte 38) (logapp-inline 2 cpl (the (unsigned-byte 36) vpn))))))))))))))))))))