Semantics of the instructions with the
Function:
(defun exec64-op (funct rd rs1 rs2 stat) (declare (xargs :guard (and (op-funct-p funct) (ubyte5p rd) (ubyte5p rs1) (ubyte5p rs2) (state64p stat)))) (let ((__function__ 'exec64-op)) (declare (ignorable __function__)) (op-funct-case funct :add (exec64-add rd rs1 rs2 stat) :sub (exec64-sub rd rs1 rs2 stat) :slt (exec64-slt rd rs1 rs2 stat) :sltu (exec64-sltu rd rs1 rs2 stat) :and (exec64-and rd rs1 rs2 stat) :or (exec64-or rd rs1 rs2 stat) :xor (exec64-xor rd rs1 rs2 stat) :sll (exec64-sll rd rs1 rs2 stat) :srl (exec64-srl rd rs1 rs2 stat) :sra (exec64-sra rd rs1 rs2 stat) :mul (exec64-mul rd rs1 rs2 stat) :mulh (exec64-mulh rd rs1 rs2 stat) :mulhu (exec64-mulhu rd rs1 rs2 stat) :mulhsu (exec64-mulhsu rd rs1 rs2 stat) :div (exec64-div rd rs1 rs2 stat) :divu (exec64-divu rd rs1 rs2 stat) :rem (exec64-rem rd rs1 rs2 stat) :remu (exec64-remu rd rs1 rs2 stat))))
Theorem:
(defthm state64p-of-exec64-op (b* ((new-stat (exec64-op funct rd rs1 rs2 stat))) (state64p new-stat)) :rule-classes :rewrite)
Theorem:
(defthm exec64-op-of-op-funct-fix-funct (equal (exec64-op (op-funct-fix funct) rd rs1 rs2 stat) (exec64-op funct rd rs1 rs2 stat)))
Theorem:
(defthm exec64-op-op-funct-equiv-congruence-on-funct (implies (op-funct-equiv funct funct-equiv) (equal (exec64-op funct rd rs1 rs2 stat) (exec64-op funct-equiv rd rs1 rs2 stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-op-of-ubyte5-fix-rd (equal (exec64-op funct (ubyte5-fix rd) rs1 rs2 stat) (exec64-op funct rd rs1 rs2 stat)))
Theorem:
(defthm exec64-op-ubyte5-equiv-congruence-on-rd (implies (ubyte5-equiv rd rd-equiv) (equal (exec64-op funct rd rs1 rs2 stat) (exec64-op funct rd-equiv rs1 rs2 stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-op-of-ubyte5-fix-rs1 (equal (exec64-op funct rd (ubyte5-fix rs1) rs2 stat) (exec64-op funct rd rs1 rs2 stat)))
Theorem:
(defthm exec64-op-ubyte5-equiv-congruence-on-rs1 (implies (ubyte5-equiv rs1 rs1-equiv) (equal (exec64-op funct rd rs1 rs2 stat) (exec64-op funct rd rs1-equiv rs2 stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-op-of-ubyte5-fix-rs2 (equal (exec64-op funct rd rs1 (ubyte5-fix rs2) stat) (exec64-op funct rd rs1 rs2 stat)))
Theorem:
(defthm exec64-op-ubyte5-equiv-congruence-on-rs2 (implies (ubyte5-equiv rs2 rs2-equiv) (equal (exec64-op funct rd rs1 rs2 stat) (exec64-op funct rd rs1 rs2-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-op-of-state64-fix-stat (equal (exec64-op funct rd rs1 rs2 (state64-fix stat)) (exec64-op funct rd rs1 rs2 stat)))
Theorem:
(defthm exec64-op-state64-equiv-congruence-on-stat (implies (state64-equiv stat stat-equiv) (equal (exec64-op funct rd rs1 rs2 stat) (exec64-op funct rd rs1 rs2 stat-equiv))) :rule-classes :congruence)