• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
        • Defun
        • Declare
        • System-utilities
        • Stobj
        • State
        • Memoize
        • Mbe
        • Io
        • Defpkg
        • Apply$
        • Mutual-recursion
        • Loop$
        • Programming-with-state
        • Arrays
        • Characters
        • Time$
        • Loop$-primer
        • Fast-alists
        • Defmacro
        • Defconst
        • Evaluation
        • Guard
        • Equality-variants
        • Compilation
        • Hons
        • ACL2-built-ins
        • Developers-guide
        • System-attachments
        • Advanced-features
        • Set-check-invariant-risk
        • Numbers
        • Irrelevant-formals
        • Efficiency
        • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
        • Redefining-programs
        • Lists
        • Invariant-risk
        • Errors
        • Defabbrev
        • Conses
        • Alists
        • Set-register-invariant-risk
        • Strings
        • Program-wrapper
        • Get-internal-time
        • Basics
          • Let
          • Return-last
          • Mv-let
          • Or
          • Flet
          • Mv
          • And
          • Booleanp
          • If
          • Not
          • Equal
          • Implies
          • Iff
          • Quote
            • Create-inst-doc
            • Opcode
            • Select-insts
            • Inst
            • Op/en-p
            • Operands
            • Operand-type-p
            • Strict-opcode-p
            • Opcode-extension-group-p
            • Create-insts-doc
            • Create-insts-doc-aux
            • Superscripts-p
            • Maybe-operands-p
            • Inst-list-p
            • Exception-desc-p
            • Count-avx-pfx-cases
            • Mnemonic-p
            • Maybe-3bits-p
            • Op-pfx-p
            • Maybe-vex-p
            • Maybe-evex-p
            • Fn-desc-p
            • Chk-exc-fn
            • Remove-insts-with-feat
            • Op-mode-p
            • Keep-insts-with-feat
            • Rex-p
            • Mod-p
            • Gen-operand-type-code-doc
            • Gen-addressing-method-code-doc
              • Create-arg-doc
              • Create-extra-info-doc
              • Avx-pfx-well-formed-p
              • Create-extra-info-doc-string
              • Create-args-doc
              • Symbol-list-to-string
              • Get-operand-type-code-doc
              • Get-addressing-method-doc
              • Unquote
              • Any-present-in
              • Eval-pre-map
              • Superscripts-fix
              • Strict-opcode-fix
              • Operand-type-fix
              • Opcode-extension-group-fix
              • Maybe-operands-fix
              • Maybe-evex-fix
              • Maybe-3bits-fix
              • Keyword-list-fix
              • Exception-desc-fix
              • Rex-fix
              • Op-pfx-fix
              • Op-mode-fix
              • Mod-fix
              • Mnemonic-fix
              • Maybe-vex-fix
              • Fn-desc-fix
              • Vex-p
              • Evex-p
            • Macrolet
            • Let*
            • Case-match
            • ACL2-count
            • Good-bye
            • Case
            • Cond
            • Null
            • Progn$
            • Identity
            • Xor
          • Packages
          • Oracle-eval
          • Defmacro-untouchable
          • Primitive
          • <<
          • Revert-world
          • Set-duplicate-keys-action
          • Unmemoize
          • Symbols
          • Def-list-constructor
          • Easy-simplify-term
          • Defiteration
          • Fake-oracle-eval
          • Defopen
          • Sleep
        • Real
        • Start-here
        • Debugging
        • Miscellaneous
        • Output-controls
        • Macros
        • Interfacing-tools
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Quote
    • Opcode-maps

    Gen-addressing-method-code-doc

    Signature
    (gen-addressing-method-code-doc z-info) → *
    Arguments
    z-info — Guard (alistp z-info).

    Definitions and Theorems

    Function: get-addressing-method-doc

    (defun get-addressing-method-doc (code)
      (declare (xargs :guard (addressing-method-code-p code)))
      (let ((__function__ 'get-addressing-method-doc))
        (declare (ignorable __function__))
        (b* ((alst (cdr (assoc-equal code *z-addressing-method-info*)))
             (doc (cdr (assoc-equal :doc alst)))
             ((unless doc) ""))
          doc)))

    Theorem: stringp-of-get-addressing-method-doc

    (defthm stringp-of-get-addressing-method-doc
      (b* ((str (get-addressing-method-doc code)))
        (stringp str))
      :rule-classes :rewrite)

    Function: gen-addressing-method-code-doc

    (defun gen-addressing-method-code-doc (z-info)
     (declare (xargs :guard (alistp z-info)))
     (let ((__function__ 'gen-addressing-method-code-doc))
      (declare (ignorable __function__))
      (if (endp z-info)
          nil
        (b*
         ((code (caar z-info))
          ((unless (addressing-method-code-p code))
           (er hard? __function__
               "~% Bad code ~x0 encountered! ~%" code))
          (codestr (str::pretty code
                                :config *x86isa-printconfig-base-10*))
          (docstr (str::cat "@(' " codestr "'): "
                            (get-addressing-method-doc code)))
          (topic-name (intern$ (str::cat codestr "-Z-ADDRESSING-METHOD")
                               "X86ISA"))
          (form (cons (cons 'defxdoc
                            (cons topic-name
                                  (cons ':long (cons docstr 'nil))))
                      'nil))
          (rest (gen-addressing-method-code-doc (cdr z-info))))
         (append form rest)))))