Semantics of the SLLI instruction [ISA:2.4.1].
We read an unsigned 32-bit integer from
Function:
(defun exec32-slli (rd rs1 imm stat) (declare (xargs :guard (and (ubyte5p rd) (ubyte5p rs1) (ubyte5p imm) (state32p stat)))) (let ((__function__ 'exec32-slli)) (declare (ignorable __function__)) (b* ((rs1-operand (read32-xreg-unsigned rs1 stat)) (shift-amount (ubyte5-fix imm)) (result (ash rs1-operand shift-amount)) (stat (write32-xreg rd result stat)) (stat (inc32-pc stat))) stat)))
Theorem:
(defthm state32p-of-exec32-slli (b* ((new-stat (exec32-slli rd rs1 imm stat))) (state32p new-stat)) :rule-classes :rewrite)
Theorem:
(defthm exec32-slli-of-ubyte5-fix-rd (equal (exec32-slli (ubyte5-fix rd) rs1 imm stat) (exec32-slli rd rs1 imm stat)))
Theorem:
(defthm exec32-slli-ubyte5-equiv-congruence-on-rd (implies (ubyte5-equiv rd rd-equiv) (equal (exec32-slli rd rs1 imm stat) (exec32-slli rd-equiv rs1 imm stat))) :rule-classes :congruence)
Theorem:
(defthm exec32-slli-of-ubyte5-fix-rs1 (equal (exec32-slli rd (ubyte5-fix rs1) imm stat) (exec32-slli rd rs1 imm stat)))
Theorem:
(defthm exec32-slli-ubyte5-equiv-congruence-on-rs1 (implies (ubyte5-equiv rs1 rs1-equiv) (equal (exec32-slli rd rs1 imm stat) (exec32-slli rd rs1-equiv imm stat))) :rule-classes :congruence)
Theorem:
(defthm exec32-slli-of-ubyte5-fix-imm (equal (exec32-slli rd rs1 (ubyte5-fix imm) stat) (exec32-slli rd rs1 imm stat)))
Theorem:
(defthm exec32-slli-ubyte5-equiv-congruence-on-imm (implies (ubyte5-equiv imm imm-equiv) (equal (exec32-slli rd rs1 imm stat) (exec32-slli rd rs1 imm-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm exec32-slli-of-state32-fix-stat (equal (exec32-slli rd rs1 imm (state32-fix stat)) (exec32-slli rd rs1 imm stat)))
Theorem:
(defthm exec32-slli-state32-equiv-congruence-on-stat (implies (state32-equiv stat stat-equiv) (equal (exec32-slli rd rs1 imm stat) (exec32-slli rd rs1 imm stat-equiv))) :rule-classes :congruence)