1(**************************************************************************) 2(* *) 3(* OCaml *) 4(* *) 5(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) 6(* *) 7(* Copyright 1996 Institut National de Recherche en Informatique et *) 8(* en Automatique. *) 9(* *) 10(* All rights reserved. This file is distributed under the terms of *) 11(* the GNU Lesser General Public License version 2.1, with the *) 12(* special exception on linking described in the file LICENSE. *) 13(* *) 14(**************************************************************************) 15 16(* Transformation of Mach code into a list of pseudo-instructions. *) 17 18type label = Cmm.label 19 20type instruction = 21 { mutable desc: instruction_desc; 22 mutable next: instruction; 23 arg: Reg.t array; 24 res: Reg.t array; 25 dbg: Debuginfo.t; 26 live: Reg.Set.t } 27 28and instruction_desc = 29 Lend 30 | Lop of Mach.operation 31 | Lreloadretaddr 32 | Lreturn 33 | Llabel of label 34 | Lbranch of label 35 | Lcondbranch of Mach.test * label 36 | Lcondbranch3 of label option * label option * label option 37 | Lswitch of label array 38 | Lsetuptrap of label 39 | Lpushtrap 40 | Lpoptrap 41 | Lraise of Cmm.raise_kind 42 43val has_fallthrough : instruction_desc -> bool 44val end_instr: instruction 45val instr_cons: 46 instruction_desc -> Reg.t array -> Reg.t array -> instruction -> instruction 47val invert_test: Mach.test -> Mach.test 48 49type fundecl = 50 { fun_name: string; 51 fun_body: instruction; 52 fun_fast: bool; 53 fun_dbg : Debuginfo.t; 54 fun_spacetime_shape : Mach.spacetime_shape option; 55 } 56 57val fundecl: Mach.fundecl -> fundecl 58