jon.recoil.org

Module Asm_directives.Directive

module Constant : sig ... end
module Constant_with_width : sig ... end
type thing_after_label = private
  1. | Code
  2. | Machine_width_data
type comment = private string
type reloc_type =
  1. | R_X86_64_PLT32
type t = private
  1. | Align of {
    1. bytes : int;
      (*

      The number of bytes to align to. This will be taken log2 by the emitter on Arm and macOS platforms.

      *)
    2. fill_x86_bin_emitter : Asm_targets.Asm_directives.align_padding;
      (*

      The fill_x86_bin_emitter flag controls whether the x86 binary emitter emits NOP instructions or null bytes.

      *)
    }
  2. | Bytes of {
    1. str : string;
    2. comment : string option;
    }
  3. | Cfi_adjust_cfa_offset of int
  4. | Cfi_def_cfa_offset of int
  5. | Cfi_endproc
  6. | Cfi_offset of {
    1. reg : int;
    2. offset : int;
    }
  7. | Cfi_startproc
  8. | Cfi_remember_state
  9. | Cfi_restore_state
  10. | Cfi_def_cfa_register of string
  11. | Comment of Asm_targets.Asm_directives.Directive.comment
  12. | Const of {
    1. constant : Asm_targets.Asm_directives.Directive.Constant_with_width.t;
    2. comment : string option;
    }
  13. | Direct_assignment of string * Asm_targets.Asm_directives.Directive.Constant.t
  14. | File of {
    1. file_num : int option;
    2. filename : string;
    }
  15. | Global of string
  16. | Indirect_symbol of string
  17. | Loc of {
    1. file_num : int;
    2. line : int;
    3. col : int;
    4. discriminator : int option;
    }
  18. | New_label of string * Asm_targets.Asm_directives.Directive.thing_after_label
  19. | New_line
  20. | Private_extern of string
  21. | Section of {
    1. names : string list;
    2. flags : string option;
    3. args : string list;
    4. is_delayed : bool;
    }
  22. | Size of string * Asm_targets.Asm_directives.Directive.Constant.t
  23. | Sleb128 of {
    1. constant : Asm_targets.Asm_directives.Directive.Constant.t;
    2. comment : string option;
    }
  24. | Space of {
    1. bytes : int;
    }
  25. | Type of string * Asm_targets.Asm_directives.symbol_type
  26. | Uleb128 of {
    1. constant : Asm_targets.Asm_directives.Directive.Constant.t;
    2. comment : string option;
    }
  27. | Protected of string
  28. | Hidden of string
  29. | Weak of string
  30. | External of string
  31. | Reloc of {
    1. offset : Asm_targets.Asm_directives.Directive.Constant.t;
    2. name : Asm_targets.Asm_directives.Directive.reloc_type;
    3. expr : Asm_targets.Asm_directives.Directive.Constant.t;
    }

Internal representation of directives. Only needed if writing a custom assembler or printer instead of using print, below. Symbols that occur in values of type t are encoded as strings and have had all necessary prefixing, mangling, escaping and suffixing applied.

Translate the given directive to textual form. This produces output suitable for either gas or MASM as appropriate.