Write an operand to memory or an XMM register.
(x86-operand-to-xmm/mem proc-mode operand-size inst-ac? operand seg-reg addr rex-byte r/m mod x86) → (mv * x86)
Based on the ModR/M byte, the operand is written to either a register or memory. The address argument of this function is often the effective address calculated and returned by x86-operand-from-modr/m-and-sib-bytes.
The writing to an XMM register is for a non-VEX-encoded instruction.
Function:
(defun x86-operand-to-xmm/mem (proc-mode operand-size inst-ac? operand seg-reg addr rex-byte r/m mod x86) (declare (xargs :stobjs (x86))) (declare (type (integer 0 4) proc-mode) (type (member 4 8 16) operand-size) (type (integer 0 *) operand) (type (signed-byte 64) addr) (type (unsigned-byte 8) rex-byte) (type (unsigned-byte 3) r/m) (type (unsigned-byte 2) mod)) (declare (xargs :guard (and (booleanp inst-ac?) (integer-range-p 0 *segment-register-names-len* seg-reg)))) (declare (xargs :guard (unsigned-byte-p (ash operand-size 3) operand))) (let ((__function__ 'x86-operand-to-xmm/mem)) (declare (ignorable __function__)) (b* (((when (equal mod 3)) (let* ((x86 (!xmmi-size operand-size (reg-index r/m rex-byte 0) operand x86))) (mv nil x86))) (check-alignment? (and inst-ac? (alignment-checking-enabled-p x86))) ((mv flg x86) (wme-size proc-mode operand-size addr seg-reg operand check-alignment? x86 :mem-ptr? nil))) (mv flg x86))))
Theorem:
(defthm x86p-x86-operand-to-xmm/mem (implies (force (x86p x86)) (x86p (mv-nth 1 (x86-operand-to-xmm/mem proc-mode operand-size inst-ac? operand seg-reg addr rex-byte r/m mod x86)))))