Module Asm_directives.Directive
module Constant : sig ... endmodule Constant_with_width : sig ... endtype t = | Align of {bytes : int;(*The number of bytes to align to. This will be taken log2 by the emitter on Arm and macOS platforms.
*)fill : align_padding;(*The
*)fillflag controls whether the binary emitter emits NOP instructions or null bytes.
}| Bytes of {}| Cfi_adjust_cfa_offset of int| Cfi_def_cfa_offset of int| Cfi_endproc| Cfi_offset of {}| Cfi_startproc| Cfi_remember_state| Cfi_restore_state| Cfi_def_cfa_register of string| Comment of comment| Const of {constant : Constant_with_width.t;comment : string option;
}| Direct_assignment of string * Constant.t| File of {}| Global of Asm_symbol.t| Indirect_symbol of Asm_symbol.t| Loc of {}| New_label of label_or_symbol * thing_after_label| New_line| Private_extern of Asm_symbol.t| Section of Asm_section.t * [ `First_occurrence | `Not_first_occurrence ]| Size of Asm_symbol.t * Constant.t| Sleb128 of {constant : Constant.t;comment : string option;
}| Space of {}| Type of label_or_symbol * symbol_type| Uleb128 of {constant : Constant.t;comment : string option;
}| Protected of Asm_symbol.t| Hidden of Asm_symbol.t| Weak of Asm_symbol.t| External of Asm_symbol.t| Reloc of {offset : Constant.t;name : reloc_type;target_symbol : Asm_symbol.t;addend : int64;
}
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.
Binary emission helpers
val increment_offset_in_bytes : t -> offset_in_bytes:int -> intGiven a directive and a current offset in bytes into some section, compute the new offset after the directive is emitted. This accounts for the size of data directives (Bytes, Const, Space, Sleb128, Uleb128) and alignment padding (Align). Directives that don't emit data return the offset unchanged.
val emit_uleb128 : Buffer.t -> int64 -> unitEmit an unsigned LEB128 encoded value to a buffer.
val emit_sleb128 : Buffer.t -> int64 -> unitEmit a signed LEB128 encoded value to a buffer.
val emit_int_le : Buffer.t -> width_bytes:int -> int64 -> unitEmit a little-endian integer value of the given width to a buffer.
val map_new_label : (Asm_label.t -> Asm_label.t) -> t -> tReplace the Asm_label.t inside a New_label (Label _, _) directive using the given function. Other directives are returned unchanged.