Semantics of the
Only little endian is supported for now.
We calculate the effective address.
We read an unsigned 32-bit integer from the effective address,
which is also implicitly zero-extended to 64 bits.
We write the result to
Function:
(defun exec64-lwu (rd rs1 imm stat) (declare (xargs :guard (and (ubyte5p rd) (ubyte5p rs1) (ubyte12p imm) (state64p stat)))) (let ((__function__ 'exec64-lwu)) (declare (ignorable __function__)) (b* ((addr (eff64-addr rs1 imm stat)) (result (read64-mem-ubyte32-lendian addr stat)) (stat (write64-xreg rd result stat)) (stat (inc64-pc stat))) stat)))
Theorem:
(defthm state64p-of-exec64-lwu (b* ((new-stat (exec64-lwu rd rs1 imm stat))) (state64p new-stat)) :rule-classes :rewrite)
Theorem:
(defthm exec64-lwu-of-ubyte5-fix-rd (equal (exec64-lwu (ubyte5-fix rd) rs1 imm stat) (exec64-lwu rd rs1 imm stat)))
Theorem:
(defthm exec64-lwu-ubyte5-equiv-congruence-on-rd (implies (ubyte5-equiv rd rd-equiv) (equal (exec64-lwu rd rs1 imm stat) (exec64-lwu rd-equiv rs1 imm stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-lwu-of-ubyte5-fix-rs1 (equal (exec64-lwu rd (ubyte5-fix rs1) imm stat) (exec64-lwu rd rs1 imm stat)))
Theorem:
(defthm exec64-lwu-ubyte5-equiv-congruence-on-rs1 (implies (ubyte5-equiv rs1 rs1-equiv) (equal (exec64-lwu rd rs1 imm stat) (exec64-lwu rd rs1-equiv imm stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-lwu-of-ubyte12-fix-imm (equal (exec64-lwu rd rs1 (ubyte12-fix imm) stat) (exec64-lwu rd rs1 imm stat)))
Theorem:
(defthm exec64-lwu-ubyte12-equiv-congruence-on-imm (implies (acl2::ubyte12-equiv imm imm-equiv) (equal (exec64-lwu rd rs1 imm stat) (exec64-lwu rd rs1 imm-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-lwu-of-state64-fix-stat (equal (exec64-lwu rd rs1 imm (state64-fix stat)) (exec64-lwu rd rs1 imm stat)))
Theorem:
(defthm exec64-lwu-state64-equiv-congruence-on-stat (implies (state64-equiv stat stat-equiv) (equal (exec64-lwu rd rs1 imm stat) (exec64-lwu rd rs1 imm stat-equiv))) :rule-classes :congruence)