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