Write
(!zmmi-size nbytes index val x86 &key (regtype '*zmm-access*)) → x86
Upper bits: For XMM registers, upper
Function:
(defun !zmmi-size$inline (nbytes index val x86 regtype) (declare (xargs :stobjs (x86))) (declare (type (unsigned-byte 7) nbytes) (type (unsigned-byte 5) index) (type integer val)) (declare (xargs :guard (vector-access-type-p regtype))) (declare (xargs :guard (and (member nbytes '(4 8 16 32 64)) (unsigned-byte-p (ash nbytes 3) val)))) (case nbytes (4 (wz32 index val x86 :regtype regtype)) (8 (wz64 index val x86 :regtype regtype)) (16 (wz128 index val x86 :regtype regtype)) (32 (wz256 index val x86 :regtype regtype)) (64 (wz512 index val x86)) (otherwise x86)))
Theorem:
(defthm x86p-of-!zmmi-size (implies (x86p x86) (b* ((x86 (!zmmi-size$inline nbytes index val x86 regtype))) (x86p x86))) :rule-classes :rewrite)