Module X86Util


module X86Util: sig .. end
Utility functions


Conversion functions


In this module, a function X_to_int converts an X into its x86 machine language integer representation, a function X_to_string converts an X into a human-readable string, and a function int_to_X reverses the operation of X_to_int.
val reg8_to_int : X86Types.reg8 -> int
val reg8_to_string : X86Types.reg8 -> string
val int_to_reg8 : int -> X86Types.reg8
val reg16_to_int : X86Types.reg16 -> int
val reg16_to_string : X86Types.reg16 -> string
val int_to_reg16 : int -> X86Types.reg16
val reg32_to_int : X86Types.reg32 -> int
val reg32_to_string : X86Types.reg32 -> string
val int_to_reg32 : int -> X86Types.reg32
val segment_reg_to_int : X86Types.segment_reg -> int
val segment_reg_to_string : X86Types.segment_reg -> string
val int_to_segment_reg : int -> X86Types.segment_reg
val float_reg_to_int : X86Types.float_reg -> int
val float_reg_to_string : X86Types.float_reg -> string
val int_to_float_reg : int -> X86Types.float_reg
val mmx_reg_to_int : X86Types.mmx_reg -> int
val mmx_reg_to_string : X86Types.mmx_reg -> string
val int_to_mmx_reg : int -> X86Types.mmx_reg
val control_reg_to_int : X86Types.control_reg -> int
val control_reg_to_string : X86Types.control_reg -> string
val int_to_control_reg : int -> X86Types.control_reg
val debug_reg_to_int : X86Types.debug_reg -> int
val debug_reg_to_string : X86Types.debug_reg -> string
val int_to_debug_reg : int -> X86Types.debug_reg
val test_reg_to_int : X86Types.test_reg -> int
val test_reg_to_string : X86Types.test_reg -> string
val int_to_test_reg : int -> X86Types.test_reg
val condition_to_int : X86Types.condition -> int
val condition_to_string : X86Types.condition -> string
val int_to_condition : int -> X86Types.condition
val cc_to_int : X86Types.cc -> int
val cc_to_string : X86Types.cc -> string
val int_to_cc : int -> X86Types.cc
val sse_to_int : X86Types.sse -> int
val sse_to_string : X86Types.sse -> string
val int_to_sse : int -> X86Types.sse
val scale_to_size : X86Types.scale -> int
val scale_to_int : X86Types.scale -> int
val scale_to_string : X86Types.scale -> string
val int_to_scale : int -> X86Types.scale
val arith_op_to_int : X86Types.arith_op -> int
val arith_op_to_string : X86Types.arith_op -> string
val int_to_arith_op : int -> X86Types.arith_op
val shift_op_to_int : X86Types.shift_op -> int
val shift_op_to_string : X86Types.shift_op -> string
val int_to_shift_op : int -> X86Types.shift_op

x86 register/memory operands

val read_rm : (int -> 'a) -> AsmUtil.bits -> 'a X86Types.genop * AsmUtil.bits
Read a register-or-memory operand, given a way to convert integers to registers.
val read_rm32 : AsmUtil.bits -> X86Types.genop32 * AsmUtil.bits
val read_rm8 : AsmUtil.bits -> X86Types.genop8 * AsmUtil.bits
Specialized versions for particular register sets
val read_rm_with_spare : (int -> 'a) -> AsmUtil.bits -> 'a X86Types.genop * AsmUtil.bits * int
Like read_rm, but also tells you the contents of the "spare" bits of the r/m byte.
val read_rm32_with_spare : AsmUtil.bits -> X86Types.genop32 * AsmUtil.bits * int
val read_rm8_with_spare : AsmUtil.bits -> X86Types.genop8 * AsmUtil.bits * int