Encode the name of
a non-shift instruction with the
(encode-op-imm-funct funct) → funct3
Function:
(defun encode-op-imm-funct (funct) (declare (xargs :guard (op-imm-funct-p funct))) (op-imm-funct-case funct :addi 0 :slti 2 :sltiu 3 :andi 7 :ori 6 :xori 4))
Theorem:
(defthm ubyte3p-of-encode-op-imm-funct (b* ((funct3 (encode-op-imm-funct funct))) (ubyte3p funct3)) :rule-classes :rewrite)
Theorem:
(defthm encode-op-imm-funct-of-op-imm-funct-fix-funct (equal (encode-op-imm-funct (op-imm-funct-fix funct)) (encode-op-imm-funct funct)))
Theorem:
(defthm encode-op-imm-funct-op-imm-funct-equiv-congruence-on-funct (implies (op-imm-funct-equiv funct funct-equiv) (equal (encode-op-imm-funct funct) (encode-op-imm-funct funct-equiv))) :rule-classes :congruence)