jon.recoil.org

Module X86_peephole_utils

module DLL = Oxcaml_utils.Doubly_linked_list
type rule_result =
  1. | No_match
  2. | Matched of X86_ast.asm_line DLL.cell option

Type for the result of applying a peephole rewrite rule

Navigation and inspection

val get_cells : X86_ast.asm_line DLL.cell -> int -> X86_ast.asm_line DLL.cell list
val is_hard_barrier : X86_ast.asm_line -> bool
val is_control_flow : X86_ast.instruction -> bool

Register operations

val is_register : X86_ast.arg -> bool
val underlying_reg64 : X86_ast.arg -> X86_ast.reg64 option

Instruction analysis

val writes_to_reg64 : X86_ast.reg64 -> X86_ast.instruction -> bool
val reads_from_reg64 : X86_ast.reg64 -> X86_ast.instruction -> bool
val writes_flags : X86_ast.instruction -> bool

Liveness analysis

val reg64_is_never_read : X86_ast.reg64 -> X86_ast.asm_line DLL.cell -> bool