• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
        • Riscv
          • Specification
          • Executable
            • Decoding-left-inverse
              • Decodex-of-encode-of-instr
              • Get-opcode-of-encode-of-instr
                • Get-funct3-of-encode-of-instr
                • Get-rd-of-encode-of-instr
                • Get-rs1-of-encode-of-instr
                • Get-fields-itype-of-encode-of-instr
                • Get-imm-itype-of-encode-of-instr
                • Get-rs2-of-encode-of-instr
                • Encode-injective
                • Get-fields-rtype-of-encode-of-instr
                • Get-funct7-of-encode-of-instr
                • Get-fields-utype-of-encode-of-instr
                • Decodex-of-encode
                • Get-imm-utype-of-encode-of-instr
                • Get-fields-stype-of-encode-of-instr
                • Get-fields-btype-of-encode-of-instr
                • Get-imm-stype-of-encode-of-instr
                • Get-imm-jtype-of-encode-of-instr
                • Get-imm-btype-of-encode-of-instr
                • Get-fields-jtype-of-encode-of-instr
              • Decoding-executable
              • Decoding-right-inverse
              • Execution-executable
              • Decoding-correct
            • Specialized
            • Optimized
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Decoding-left-inverse

    Get-opcode-of-encode-of-instr

    Theorems about get-opcode applied to the encoding of different instructions.

    Definitions and Theorems

    Theorem: get-opcode-of-encode-of-instr-op-imm

    (defthm get-opcode-of-encode-of-instr-op-imm
      (equal (get-opcode (encode (instr-op-imm funct rd rs1 imm)
                                 feat))
             19))

    Theorem: get-opcode-of-encode-of-instr-op-imms32

    (defthm get-opcode-of-encode-of-instr-op-imms32
      (equal (get-opcode (encode (instr-op-imms32 funct rd rs1 imm)
                                 feat))
             19))

    Theorem: get-opcode-of-encode-of-instr-op-imms64

    (defthm get-opcode-of-encode-of-instr-op-imms64
      (equal (get-opcode (encode (instr-op-imms64 funct rd rs1 imm)
                                 feat))
             19))

    Theorem: get-opcode-of-encode-of-instr-op-imm-32

    (defthm get-opcode-of-encode-of-instr-op-imm-32
      (equal (get-opcode (encode (instr-op-imm-32 funct rd rs1 imm)
                                 feat))
             27))

    Theorem: get-opcode-of-encode-of-instr-op-imms-32

    (defthm get-opcode-of-encode-of-instr-op-imms-32
      (equal (get-opcode (encode (instr-op-imms-32 funct rd rs1 imm)
                                 feat))
             27))

    Theorem: get-opcode-of-encode-of-instr-lui

    (defthm get-opcode-of-encode-of-instr-lui
      (equal (get-opcode (encode (instr-lui rd imm) feat))
             55))

    Theorem: get-opcode-of-encode-of-instr-auipc

    (defthm get-opcode-of-encode-of-instr-auipc
      (equal (get-opcode (encode (instr-auipc rd imm) feat))
             23))

    Theorem: get-opcode-of-encode-of-instr-op

    (defthm get-opcode-of-encode-of-instr-op
      (equal (get-opcode (encode (instr-op funct rd rs1 imm)
                                 feat))
             51))

    Theorem: get-opcode-of-encode-of-instr-op-32

    (defthm get-opcode-of-encode-of-instr-op-32
      (equal (get-opcode (encode (instr-op-32 funct rd rs1 imm)
                                 feat))
             59))

    Theorem: get-opcode-of-encode-of-instr-jal

    (defthm get-opcode-of-encode-of-instr-jal
      (equal (get-opcode (encode (instr-jal rd imm) feat))
             111))

    Theorem: get-opcode-of-encode-of-instr-jalr

    (defthm get-opcode-of-encode-of-instr-jalr
      (equal (get-opcode (encode (instr-jalr rd rs1 imm) feat))
             103))

    Theorem: get-opcode-of-encode-of-instr-branch

    (defthm get-opcode-of-encode-of-instr-branch
      (equal (get-opcode (encode (instr-branch funct rs1 rs2 imm)
                                 feat))
             99))

    Theorem: get-opcode-of-encode-of-instr-load

    (defthm get-opcode-of-encode-of-instr-load
      (equal (get-opcode (encode (instr-load funct rd rs1 imm)
                                 feat))
             3))

    Theorem: get-opcode-of-encode-of-instr-store

    (defthm get-opcode-of-encode-of-instr-store
      (equal (get-opcode (encode (instr-store funct rs1 rs2 imm)
                                 feat))
             35))