Semantics of the
We read two unsigned 32-bit integers from
Function:
(defun exec32-or (rd rs1 rs2 stat) (declare (xargs :guard (and (ubyte5p rd) (ubyte5p rs1) (ubyte5p rs2) (state32p stat)))) (let ((__function__ 'exec32-or)) (declare (ignorable __function__)) (b* ((rs1-operand (read32-xreg-unsigned rs1 stat)) (rs2-operand (read32-xreg-unsigned rs2 stat)) (result (logior rs1-operand rs2-operand)) (stat (write32-xreg rd result stat)) (stat (inc32-pc stat))) stat)))
Theorem:
(defthm state32p-of-exec32-or (b* ((new-stat (exec32-or rd rs1 rs2 stat))) (state32p new-stat)) :rule-classes :rewrite)
Theorem:
(defthm exec32-or-of-ubyte5-fix-rd (equal (exec32-or (ubyte5-fix rd) rs1 rs2 stat) (exec32-or rd rs1 rs2 stat)))
Theorem:
(defthm exec32-or-ubyte5-equiv-congruence-on-rd (implies (ubyte5-equiv rd rd-equiv) (equal (exec32-or rd rs1 rs2 stat) (exec32-or rd-equiv rs1 rs2 stat))) :rule-classes :congruence)
Theorem:
(defthm exec32-or-of-ubyte5-fix-rs1 (equal (exec32-or rd (ubyte5-fix rs1) rs2 stat) (exec32-or rd rs1 rs2 stat)))
Theorem:
(defthm exec32-or-ubyte5-equiv-congruence-on-rs1 (implies (ubyte5-equiv rs1 rs1-equiv) (equal (exec32-or rd rs1 rs2 stat) (exec32-or rd rs1-equiv rs2 stat))) :rule-classes :congruence)
Theorem:
(defthm exec32-or-of-ubyte5-fix-rs2 (equal (exec32-or rd rs1 (ubyte5-fix rs2) stat) (exec32-or rd rs1 rs2 stat)))
Theorem:
(defthm exec32-or-ubyte5-equiv-congruence-on-rs2 (implies (ubyte5-equiv rs2 rs2-equiv) (equal (exec32-or rd rs1 rs2 stat) (exec32-or rd rs1 rs2-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm exec32-or-of-state32-fix-stat (equal (exec32-or rd rs1 rs2 (state32-fix stat)) (exec32-or rd rs1 rs2 stat)))
Theorem:
(defthm exec32-or-state32-equiv-congruence-on-stat (implies (state32-equiv stat stat-equiv) (equal (exec32-or rd rs1 rs2 stat) (exec32-or rd rs1 rs2 stat-equiv))) :rule-classes :congruence)