13e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen(*===-- llvm_target.ml - LLVM Ocaml Interface ------------------*- OCaml -*-===* 23e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen * 33e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen * The LLVM Compiler Infrastructure 43e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen * 53e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen * This file is distributed under the University of Illinois Open Source 63e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen * License. See LICENSE.TXT for details. 73e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen * 83e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen *===----------------------------------------------------------------------===*) 93e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen 103e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenmodule Endian = struct 113e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen type t = 123e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen | Big 133e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen | Little 143e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenend 153e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen 163e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenmodule TargetData = struct 173e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen type t 183e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen 193e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen external create : string -> t = "llvm_targetdata_create" 203e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen external add : t -> [<Llvm.PassManager.any] Llvm.PassManager.t -> unit 213e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen = "llvm_targetdata_add" 223e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen external as_string : t -> string = "llvm_targetdata_as_string" 233e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen external dispose : t -> unit = "llvm_targetdata_dispose" 243e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenend 253e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen 263e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal byte_order : TargetData.t -> Endian.t = "llvm_byte_order" 273e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal pointer_size : TargetData.t -> int = "llvm_pointer_size" 283e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal intptr_type : TargetData.t -> Llvm.lltype = "LLVMIntPtrType" 293e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal size_in_bits : TargetData.t -> Llvm.lltype -> Int64.t 303e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen = "llvm_size_in_bits" 313e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal store_size : TargetData.t -> Llvm.lltype -> Int64.t = "llvm_store_size" 323e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal abi_size : TargetData.t -> Llvm.lltype -> Int64.t = "llvm_abi_size" 333e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal abi_align : TargetData.t -> Llvm.lltype -> int = "llvm_abi_align" 343e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal stack_align : TargetData.t -> Llvm.lltype -> int = "llvm_stack_align" 353e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal preferred_align : TargetData.t -> Llvm.lltype -> int 363e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen = "llvm_preferred_align" 373e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal preferred_align_of_global : TargetData.t -> Llvm.llvalue -> int 383e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen = "llvm_preferred_align_of_global" 393e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal element_at_offset : TargetData.t -> Llvm.lltype -> Int64.t -> int 403e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen = "llvm_element_at_offset" 413e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksenexternal offset_of_element : TargetData.t -> Llvm.lltype -> int -> Int64.t 423e0c83559397c87e06ef29c41385e7adc34573c2Gordon Henriksen = "llvm_offset_of_element" 43