Update the |EXLD|::|SHNDX| field of a elf64_sym bit structure.
(!elf64_sym->shndx shndx x) → new-x
Function:
(defun !elf64_sym->shndx (shndx x) (declare (xargs :guard (and (elf_bits16-p shndx) (elf64_sym-p x)))) (mbe :logic (b* ((shndx (mbe :logic (elf_bits16-fix shndx) :exec shndx)) (x (elf64_sym-fix x))) (part-install shndx x :width 16 :low 48)) :exec (the (unsigned-byte 192) (logior (the (unsigned-byte 192) (logand (the (unsigned-byte 192) x) (the (signed-byte 65) -18446462598732840961))) (the (unsigned-byte 64) (ash (the (unsigned-byte 16) shndx) 48))))))
Theorem:
(defthm elf64_sym-p-of-!elf64_sym->shndx (b* ((new-x (!elf64_sym->shndx shndx x))) (elf64_sym-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm !elf64_sym->shndx-of-elf_bits16-fix-shndx (equal (!elf64_sym->shndx (elf_bits16-fix shndx) x) (!elf64_sym->shndx shndx x)))
Theorem:
(defthm !elf64_sym->shndx-elf_bits16-equiv-congruence-on-shndx (implies (elf_bits16-equiv shndx shndx-equiv) (equal (!elf64_sym->shndx shndx x) (!elf64_sym->shndx shndx-equiv x))) :rule-classes :congruence)
Theorem:
(defthm !elf64_sym->shndx-of-elf64_sym-fix-x (equal (!elf64_sym->shndx shndx (elf64_sym-fix x)) (!elf64_sym->shndx shndx x)))
Theorem:
(defthm !elf64_sym->shndx-elf64_sym-equiv-congruence-on-x (implies (elf64_sym-equiv x x-equiv) (equal (!elf64_sym->shndx shndx x) (!elf64_sym->shndx shndx x-equiv))) :rule-classes :congruence)
Theorem:
(defthm !elf64_sym->shndx-is-elf64_sym (equal (!elf64_sym->shndx shndx x) (change-elf64_sym x :shndx shndx)))
Theorem:
(defthm elf64_sym->shndx-of-!elf64_sym->shndx (b* ((?new-x (!elf64_sym->shndx shndx x))) (equal (elf64_sym->shndx new-x) (elf_bits16-fix shndx))))
Theorem:
(defthm !elf64_sym->shndx-equiv-under-mask (b* ((?new-x (!elf64_sym->shndx shndx x))) (elf64_sym-equiv-under-mask new-x x -18446462598732840961)))