Encode the name of
a shift instruction with the
(encode-op-imms-32-funct funct) → (mv funct3 hi6imm)
Function:
(defun encode-op-imms-32-funct (funct) (declare (xargs :guard (op-imms-32-funct-p funct))) (let ((__function__ 'encode-op-imms-32-funct)) (declare (ignorable __function__)) (op-imms-32-funct-case funct :slliw (mv 1 0) :srliw (mv 5 0) :sraiw (mv 5 16))))
Theorem:
(defthm ubyte3p-of-encode-op-imms-32-funct.funct3 (b* (((mv ?funct3 ?hi6imm) (encode-op-imms-32-funct funct))) (ubyte3p funct3)) :rule-classes :rewrite)
Theorem:
(defthm ubyte6p-of-encode-op-imms-32-funct.hi6imm (b* (((mv ?funct3 ?hi6imm) (encode-op-imms-32-funct funct))) (ubyte6p hi6imm)) :rule-classes :rewrite)
Theorem:
(defthm encode-op-imms-32-funct-of-op-imms-32-funct-fix-funct (equal (encode-op-imms-32-funct (op-imms-32-funct-fix funct)) (encode-op-imms-32-funct funct)))
Theorem:
(defthm encode-op-imms-32-funct-op-imms-32-funct-equiv-congruence-on-funct (implies (op-imms-32-funct-equiv funct funct-equiv) (equal (encode-op-imms-32-funct funct) (encode-op-imms-32-funct funct-equiv))) :rule-classes :congruence)