package bap-std

  1. Overview
  2. Docs
The Binary Analysis Platform Standard Library

Install

Dune Dependency

Authors

Maintainers

Sources

v2.3.0.tar.gz
sha256=a6e80853aaaa26b7ca564d9878891d7146ec1c83852541387c1bba1ad036b8ea
md5=13f2cb1e3b9d90348852252fb0f2d09f

doc/bap/Bap/Std/Disasm_expert/Basic/Insn/index.html

Module Basic.Insn

Basic instruction aka machine-specific instruction.

The machine-specific instruction is composed of a name, operands, and kinds (or flags) that denote additional information about the instruction.

The meaning of the name and operands is specific to a particular machine and encoding (see Insn.encoding). The meaning of the instruction kinds is more or less universal.

type ('a, 'k) t = ('a, 'k) insn
val sexp_of_t : ('a, 'k) t -> Core_kernel.Sexp.t

sexp_of_t insn returns a sexp representation of insn

val compare : ('a, 'k) t -> ('a, 'k) t -> int

compare i1 i2 compares instruction i1 and i2

val code : ('a, 'k) t -> int

code insn returns an integer code, that is bijective with instruction opcode. It might not be the actual opcode, it may also change between different backends, and different versions of the same backend.

val name : ('a, 'k) t -> string

name insn returns a textual representation of the instruction name. It might be the mnemonics, or a name, specific to a backend. The name is guaranteed to biject with the opcode (and thus to code).

val encoding : ('a, 'k) t -> string

returns the name of the backend that encoded this instruction.

  • since 2.1.0
val kinds : ('a, kinds) t -> Kind.t list

kinds insn returns a high-level semantic information about the instruction. See Kind for the description of semantic codes.

val is : ('a, kinds) t -> Kind.t -> bool

is insn kind checks whether instruction insn belongs to the semantic kind

val asm : (asm, 'k) t -> string

asm insn returns assembly representation of the instruction

val ops : ('a, 'k) t -> op array

ops insn gives an access to insn's operands.

OCaml

Innovation. Community. Security.