(x86-call-e8-op/en-m proc-mode start-rip temp-rip prefixes rex-byte opcode modr/m sib x86) → x86
Function:
(defun x86-call-e8-op/en-m (proc-mode start-rip temp-rip prefixes rex-byte opcode modr/m sib x86) (declare (xargs :stobjs (x86))) (declare (type (integer 0 4) proc-mode) (type (signed-byte 48) start-rip) (type (signed-byte 48) temp-rip) (type (unsigned-byte 52) prefixes) (type (unsigned-byte 8) rex-byte) (type (unsigned-byte 8) opcode) (type (unsigned-byte 8) modr/m) (type (unsigned-byte 8) sib)) (declare (ignorable proc-mode start-rip temp-rip prefixes rex-byte opcode modr/m sib)) (declare (xargs :guard (and (prefixes-p prefixes) (modr/m-p modr/m) (sib-p sib) (rip-guard-okp proc-mode temp-rip)))) (let ((__function__ 'x86-call-e8-op/en-m)) (declare (ignorable __function__)) (b* ((?ctx 'x86-call-e8-op/en-m)) (b* (((the (integer 0 4) offset-size) (select-operand-size proc-mode nil rex-byte nil prefixes nil t t x86)) ((mv flg0 (the (signed-byte 32) rel16/32) x86) (rime-size-opt proc-mode offset-size temp-rip 1 :x nil x86)) ((when flg0) (!!ms-fresh :rime-size-opt-error flg0)) ((mv flg (the (signed-byte 49) next-rip)) (add-to-*ip proc-mode temp-rip offset-size x86)) ((when flg) (!!ms-fresh :rip-increment-error next-rip)) (badlength? (check-instruction-length start-rip next-rip 0)) ((when badlength?) (!!fault-fresh :gp 0 :instruction-length badlength?)) ((mv flg (the (signed-byte 48) call-rip)) (add-to-*ip proc-mode next-rip rel16/32 x86)) ((when flg) (!!ms-fresh :call-rip-invalid call-rip)) (rsp (read-*sp proc-mode x86)) ((the (integer 2 8) addr-size) (select-address-size proc-mode nil x86)) ((mv flg new-rsp) (add-to-*sp proc-mode rsp (- addr-size) x86)) ((when flg) (!!fault-fresh :ss 0 :call flg)) ((mv flg x86) (if (equal proc-mode 0) (wime-size-opt 0 addr-size (the (signed-byte 48) new-rsp) 2 next-rip (alignment-checking-enabled-p x86) x86) (wme-size-opt proc-mode addr-size (the (signed-byte 48) new-rsp) 2 (if (= addr-size 2) (n16 next-rip) (n32 next-rip)) (alignment-checking-enabled-p x86) x86))) ((when flg) (!!ms-fresh :stack-writing-error flg)) (x86 (write-*ip proc-mode call-rip x86)) (x86 (write-*sp proc-mode new-rsp x86))) x86))))
Theorem:
(defthm x86p-of-x86-call-e8-op/en-m (implies (x86p x86) (b* ((x86 (x86-call-e8-op/en-m proc-mode start-rip temp-rip prefixes rex-byte opcode modr/m sib x86))) (x86p x86))) :rule-classes :rewrite)