Semantics of the
We read a signed 32-bit integer from
Function:
(defun exec64-sraiw (rd rs1 imm stat) (declare (xargs :guard (and (ubyte5p rd) (ubyte5p rs1) (ubyte5p imm) (state64p stat)))) (let ((__function__ 'exec64-sraiw)) (declare (ignorable __function__)) (b* ((rs1-operand (read64-xreg-signed32 rs1 stat)) (shift-amount (ubyte5-fix imm)) (result (ash rs1-operand (- shift-amount))) (stat (write64-xreg-32 rd result stat)) (stat (inc64-pc stat))) stat)))
Theorem:
(defthm state64p-of-exec64-sraiw (b* ((new-stat (exec64-sraiw rd rs1 imm stat))) (state64p new-stat)) :rule-classes :rewrite)
Theorem:
(defthm exec64-sraiw-of-ubyte5-fix-rd (equal (exec64-sraiw (ubyte5-fix rd) rs1 imm stat) (exec64-sraiw rd rs1 imm stat)))
Theorem:
(defthm exec64-sraiw-ubyte5-equiv-congruence-on-rd (implies (ubyte5-equiv rd rd-equiv) (equal (exec64-sraiw rd rs1 imm stat) (exec64-sraiw rd-equiv rs1 imm stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-sraiw-of-ubyte5-fix-rs1 (equal (exec64-sraiw rd (ubyte5-fix rs1) imm stat) (exec64-sraiw rd rs1 imm stat)))
Theorem:
(defthm exec64-sraiw-ubyte5-equiv-congruence-on-rs1 (implies (ubyte5-equiv rs1 rs1-equiv) (equal (exec64-sraiw rd rs1 imm stat) (exec64-sraiw rd rs1-equiv imm stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-sraiw-of-ubyte5-fix-imm (equal (exec64-sraiw rd rs1 (ubyte5-fix imm) stat) (exec64-sraiw rd rs1 imm stat)))
Theorem:
(defthm exec64-sraiw-ubyte5-equiv-congruence-on-imm (implies (ubyte5-equiv imm imm-equiv) (equal (exec64-sraiw rd rs1 imm stat) (exec64-sraiw rd rs1 imm-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-sraiw-of-state64-fix-stat (equal (exec64-sraiw rd rs1 imm (state64-fix stat)) (exec64-sraiw rd rs1 imm stat)))
Theorem:
(defthm exec64-sraiw-state64-equiv-congruence-on-stat (implies (state64-equiv stat stat-equiv) (equal (exec64-sraiw rd rs1 imm stat) (exec64-sraiw rd rs1 imm stat-equiv))) :rule-classes :congruence)