Effective address for a load or store instruction [ISA:2.6].
We read an unsigned 64-bit integer from
Function:
(defun eff64-addr (rs1 imm stat) (declare (xargs :guard (and (ubyte5p rs1) (ubyte12p imm) (state64p stat)))) (let ((__function__ 'eff64-addr)) (declare (ignorable __function__)) (b* ((base (read64-xreg-unsigned rs1 stat)) (offset (loghead 64 (logext 12 (ubyte12-fix imm))))) (+ base offset))))
Theorem:
(defthm integerp-of-eff64-addr (b* ((addr (eff64-addr rs1 imm stat))) (integerp addr)) :rule-classes :rewrite)
Theorem:
(defthm eff64-addr-of-ubyte5-fix-rs1 (equal (eff64-addr (ubyte5-fix rs1) imm stat) (eff64-addr rs1 imm stat)))
Theorem:
(defthm eff64-addr-ubyte5-equiv-congruence-on-rs1 (implies (ubyte5-equiv rs1 rs1-equiv) (equal (eff64-addr rs1 imm stat) (eff64-addr rs1-equiv imm stat))) :rule-classes :congruence)
Theorem:
(defthm eff64-addr-of-ubyte12-fix-imm (equal (eff64-addr rs1 (ubyte12-fix imm) stat) (eff64-addr rs1 imm stat)))
Theorem:
(defthm eff64-addr-ubyte12-equiv-congruence-on-imm (implies (acl2::ubyte12-equiv imm imm-equiv) (equal (eff64-addr rs1 imm stat) (eff64-addr rs1 imm-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm eff64-addr-of-state64-fix-stat (equal (eff64-addr rs1 imm (state64-fix stat)) (eff64-addr rs1 imm stat)))
Theorem:
(defthm eff64-addr-state64-equiv-congruence-on-stat (implies (state64-equiv stat stat-equiv) (equal (eff64-addr rs1 imm stat) (eff64-addr rs1 imm stat-equiv))) :rule-classes :congruence)