]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ocaml/ocaml/contrib/asmcomp/linearize.mli
Update
[l4.git] / l4 / pkg / ocaml / ocaml / contrib / asmcomp / linearize.mli
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                           Objective Caml                            *)
4 (*                                                                     *)
5 (*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         *)
6 (*                                                                     *)
7 (*  Copyright 1996 Institut National de Recherche en Informatique et   *)
8 (*  en Automatique.  All rights reserved.  This file is distributed    *)
9 (*  under the terms of the Q Public License version 1.0.               *)
10 (*                                                                     *)
11 (***********************************************************************)
12
13 (* $Id: linearize.mli 7812 2007-01-29 12:11:18Z xleroy $ *)
14
15 (* Transformation of Mach code into a list of pseudo-instructions. *)
16
17 type label = int
18 val new_label: unit -> label
19
20 type 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
28 and 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
42
43 val has_fallthrough :  instruction_desc -> bool
44 val end_instr: instruction
45 val instr_cons: 
46   instruction_desc -> Reg.t array -> Reg.t array -> instruction -> instruction
47 val invert_test: Mach.test -> Mach.test
48
49 type fundecl =
50   { fun_name: string;
51     fun_body: instruction;
52     fun_fast: bool }
53
54 val fundecl: Mach.fundecl -> fundecl
55