Semantics of the
We use the 20 bits of the immediate as
the high bits of an unsigned 32-bit integer,
whose low bits are 0.
We write the integer to
Function:
(defun exec64-lui (rd imm stat) (declare (xargs :guard (and (ubyte5p rd) (ubyte20p imm) (state64p stat)))) (let ((__function__ 'exec64-lui)) (declare (ignorable __function__)) (b* ((result (ash (ubyte20-fix imm) 12)) (stat (write64-xreg-32 rd result stat)) (stat (inc64-pc stat))) stat)))
Theorem:
(defthm state64p-of-exec64-lui (b* ((new-stat (exec64-lui rd imm stat))) (state64p new-stat)) :rule-classes :rewrite)
Theorem:
(defthm exec64-lui-of-ubyte5-fix-rd (equal (exec64-lui (ubyte5-fix rd) imm stat) (exec64-lui rd imm stat)))
Theorem:
(defthm exec64-lui-ubyte5-equiv-congruence-on-rd (implies (ubyte5-equiv rd rd-equiv) (equal (exec64-lui rd imm stat) (exec64-lui rd-equiv imm stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-lui-of-ubyte20-fix-imm (equal (exec64-lui rd (ubyte20-fix imm) stat) (exec64-lui rd imm stat)))
Theorem:
(defthm exec64-lui-ubyte20-equiv-congruence-on-imm (implies (acl2::ubyte20-equiv imm imm-equiv) (equal (exec64-lui rd imm stat) (exec64-lui rd imm-equiv stat))) :rule-classes :congruence)
Theorem:
(defthm exec64-lui-of-state64-fix-stat (equal (exec64-lui rd imm (state64-fix stat)) (exec64-lui rd imm stat)))
Theorem:
(defthm exec64-lui-state64-equiv-congruence-on-stat (implies (state64-equiv stat stat-equiv) (equal (exec64-lui rd imm stat) (exec64-lui rd imm stat-equiv))) :rule-classes :congruence)