Instruction set

x86-64

Also known as AMD64, Intel 64, x64

The instruction set of most desktop and server processors (Intel and AMD).

What do you want to prove about your x86-64 code?

Where proofs can attach

Toolchains that verify x86-64 directly, and those that verify what it compiles to. A proof about compiled code also relies on the compiler that produced it.

  1. Compiled from Languages that compile to x86-64
    C++
    • to LLVM IR via clang trusted
    • to x86-64 via LLVM backend (llc) trusted
    • to LLVM IR via rustc trusted
    • to x86-64 via LLVM backend (llc) trusted
    Go
    • to x86-64 via gc (the Go compiler) trusted
    Dafny verification language
    • to Go via Dafny compiler (Go backend) trusted
    • to x86-64 via gc (the Go compiler) trusted
    F* (Low*) verification language
    • to C via KaRaMeL trusted
    • to x86-64 via CompCert verified
    • to x86-64 via LLVM backend (llc) trusted
  2. Machine code

Verify x86-64 directly

Ranked by stage, feature coverage and trust.

Toolchain Stage Trust Effort Feature coverage
s2n-bignum

Prove hand-written x86-64 or Arm64 assembly correct in HOL Light, on the exact bytes of the built object file; used for AWS's cryptography code.

Stage 1 · Usable Trust: Checker strong, Semantics partial, Frontend strong, Binary gap strong, Escape hatches strong 4/5 Interactive 0/6full, 2 partial

Feature coverage

Which language features each toolchain handles. Hover or focus a mark for the note and source. Toolchains on compiled code are shown for common features only.

Feature s2n-bignum
ISA-level features
User-level instructionsThe ordinary integer, memory and branch instructions programs use. s2n-bignum, User-level instructions: Partial.Only the user-mode integer, load/store and branch instructions needed so far are modeled ("modeled by need").
Source
Floating-point instructionsScalar floating-point instructions. s2n-bignum, Floating-point instructions: Not supported.No floating-point arithmetic; on Arm only register moves such as FMOV and FCSEL are modeled.
Source
Vector / SIMD instructionsVector and SIMD extensions. s2n-bignum, Vector / SIMD instructions: Partial.A subset of Arm NEON (including AES, SHA-3 and polynomial-multiply instructions) and of x86 SSE/AVX, added as needed.
Source
Privileged modePrivilege levels, control registers, traps and exceptions. s2n-bignum, Privileged mode: Not supported.No system registers, privilege levels, interrupts or exceptions.
Source
Virtual memoryPage tables and address translation. s2n-bignum, Virtual memory: Not supported.Flat address space; no page tables or page faults.
Source
Concurrency memory modelThe multiprocessor memory model (for example x86-TSO, Arm, RVWMO). s2n-bignum, Concurrency memory model: Not supported.No caches, memory ordering or multiple cores.
Source

Supported Partial Not supported Unknown

Formal semantics of x86-64

Models that proofs about x86-64 can be stated against. See formal semanticsFormal semantics. A precise, mathematical definition of what programs in a language do..

  • ACL2 x86 ISA model (x86isa) Stage 0 · Mechanized

    An executable model of x86-64 machine code in the ACL2 theorem prover, from UT Austin. It can run programs, including a lightly modified Linux, and is used to prove properties of x86 machine code.

esc