Takes in a single instruction and figures out if it is a prefix byte; if so, the prefix group number is returned.
(inst-prefix-byte-group-code inst) → *
The return value
Note that legacy prefixes are a part of the one-byte opcode map.
Function:
(defun inst-prefix-byte-group-code (inst) (declare (xargs :guard (inst-p inst))) (let ((__function__ 'inst-prefix-byte-group-code)) (declare (ignorable __function__)) (b* (((inst inst))) (cond ((keywordp inst.mnemonic) (case inst.mnemonic (:prefix-lock 1) (:prefix-repne 1) (:prefix-rep/repe 1) (:prefix-es 2) (:prefix-cs 2) (:prefix-ss 2) (:prefix-ds 2) (:prefix-fs 2) (:prefix-gs 2) (:prefix-opsize 3) (:prefix-addrsize 4) (t 0))) (t 0)))))