• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Riscv
        • Specification
          • Semantics
          • Features
          • Instructions
          • Encoding
          • States
          • Reads-over-writes
          • Semantics-equivalences
            • Exec-xori-alt-defs
            • Exec-ori-alt-defs
              • Exec-andi-alt-defs
              • Exec-addi-alt-defs
              • Exec-xor-alt-defs
              • Exec-or-alt-defs
              • Exec-and-alt-defs
              • Exec-add-alt-defs
              • Exec-sll-alt-defs
              • Exec-sub-alt-defs
            • Decoding
            • Execution
          • Executable
          • Specialized
          • Optimized
        • Taspi
        • Bitcoin
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • 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
    • Semantics-equivalences

    Exec-ori-alt-defs

    Equivalent semantic definitions of ORI.

    Definitions and Theorems

    Theorem: exec-ori-alt-def-signed-signed

    (defthm exec-ori-alt-def-signed-signed
      (equal (exec-ori rd rs1 imm stat feat)
             (b* ((rs1-operand (read-xreg-signed (ubyte5-fix rs1)
                                                 stat feat))
                  (imm-operand (logext 12 (ubyte12-fix imm)))
                  (result (logior rs1-operand imm-operand))
                  (stat (write-xreg (ubyte5-fix rd)
                                    result stat feat))
                  (stat (inc4-pc stat feat)))
               stat)))

    Theorem: exec-ori-alt-def-unsigned-signed

    (defthm exec-ori-alt-def-unsigned-signed
      (equal (exec-ori rd rs1 imm stat feat)
             (b* ((rs1-operand (read-xreg-unsigned (ubyte5-fix rs1)
                                                   stat feat))
                  (imm-operand (logext 12 (ubyte12-fix imm)))
                  (result (logior rs1-operand imm-operand))
                  (stat (write-xreg (ubyte5-fix rd)
                                    result stat feat))
                  (stat (inc4-pc stat feat)))
               stat)))

    Theorem: exec-ori-alt-def-signed-unsigned

    (defthm exec-ori-alt-def-signed-unsigned
      (equal (exec-ori rd rs1 imm stat feat)
             (b* ((rs1-operand (read-xreg-signed (ubyte5-fix rs1)
                                                 stat feat))
                  (imm-operand (loghead (feat->xlen feat)
                                        (logext 12 (ubyte12-fix imm))))
                  (result (logior rs1-operand imm-operand))
                  (stat (write-xreg (ubyte5-fix rd)
                                    result stat feat))
                  (stat (inc4-pc stat feat)))
               stat)))