• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
        • Program-execution
        • Sdm-instruction-set-summary
        • Tlb
        • Running-linux
        • Introduction
        • Asmtest
        • X86isa-build-instructions
        • Publications
        • Contributors
        • Machine
          • X86isa-state
          • Syscalls
          • Cpuid
          • Linear-memory
          • Rflag-specifications
          • Characterizing-undefined-behavior
          • App-view
          • Top-level-memory
          • X86-decoder
          • Physical-memory
          • Decoding-and-spec-utils
          • Instructions
          • Register-readers-and-writers
          • X86-modes
          • Segmentation
            • Ea-to-la
            • Segment-base-and-bounds
            • Ia32e-segmentation
            • Eas-to-las
            • Ia32-segmentation
              • Ia32-valid-code-segment-descriptor-p
            • Other-non-deterministic-computations
            • Environment
            • Paging
          • Implemented-opcodes
          • To-do
          • Proof-utilities
          • Peripherals
          • Model-validation
          • Modelcalls
          • Concrete-simulation-examples
          • Utils
          • Debugging-code-proofs
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Ia32-segmentation

    Ia32-valid-code-segment-descriptor-p

    Recognizer for a valid code segment descriptor in 32-bit mode

    Signature
    (ia32-valid-code-segment-descriptor-p descriptor) → (mv * *)

    Definitions and Theorems

    Function: ia32-valid-code-segment-descriptor-p

    (defun ia32-valid-code-segment-descriptor-p (descriptor)
     (declare (type (unsigned-byte 64) descriptor))
     (let ((__function__ 'ia32-valid-code-segment-descriptor-p))
      (declare (ignorable __function__))
      (b*
       (((when
          (not
            (equal (code-segment-descriptorbits->msb-of-type descriptor)
                   1)))
         (mv nil
             (cons :invalid-segment-type descriptor)))
        ((when (not (equal (code-segment-descriptorbits->s descriptor)
                           1)))
         (mv nil
             (cons :invalid-segment-type descriptor)))
        ((when (not (equal (code-segment-descriptorbits->p descriptor)
                           1)))
         (mv nil
             (cons :segment-not-present descriptor)))
        ((when (not (equal (code-segment-descriptorbits->l descriptor)
                           0)))
         (mv nil (cons :ia32e-mode-off descriptor))))
       (mv t 0))))