1995-08-09 08:06:35 -07:00
|
|
|
(***********************************************************************)
|
|
|
|
(* *)
|
2011-07-27 07:17:02 -07:00
|
|
|
(* OCaml *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
|
|
|
|
(* *)
|
1996-04-30 07:53:58 -07:00
|
|
|
(* Copyright 1996 Institut National de Recherche en Informatique et *)
|
1999-11-17 10:59:06 -08:00
|
|
|
(* en Automatique. All rights reserved. This file is distributed *)
|
|
|
|
(* under the terms of the Q Public License version 1.0. *)
|
1995-08-09 08:06:35 -07:00
|
|
|
(* *)
|
|
|
|
(***********************************************************************)
|
|
|
|
|
1995-06-15 01:17:29 -07:00
|
|
|
(* Transformation of Mach code into a list of pseudo-instructions. *)
|
|
|
|
|
|
|
|
type label = int
|
|
|
|
val new_label: unit -> label
|
|
|
|
|
|
|
|
type instruction =
|
1997-03-07 07:32:26 -08:00
|
|
|
{ mutable desc: instruction_desc;
|
2002-01-09 11:40:48 -08:00
|
|
|
mutable next: instruction;
|
1995-06-15 01:17:29 -07:00
|
|
|
arg: Reg.t array;
|
|
|
|
res: Reg.t array;
|
2007-01-29 04:11:18 -08:00
|
|
|
dbg: Debuginfo.t;
|
1995-06-15 01:17:29 -07:00
|
|
|
live: Reg.Set.t }
|
|
|
|
|
|
|
|
and instruction_desc =
|
|
|
|
Lend
|
|
|
|
| Lop of Mach.operation
|
1995-08-25 01:46:03 -07:00
|
|
|
| Lreloadretaddr
|
1995-06-15 01:17:29 -07:00
|
|
|
| Lreturn
|
|
|
|
| Llabel of label
|
|
|
|
| Lbranch of label
|
|
|
|
| Lcondbranch of Mach.test * label
|
1995-08-12 07:26:23 -07:00
|
|
|
| Lcondbranch3 of label option * label option * label option
|
1995-06-15 01:17:29 -07:00
|
|
|
| Lswitch of label array
|
1995-07-07 05:07:07 -07:00
|
|
|
| Lsetuptrap of label
|
|
|
|
| Lpushtrap
|
1995-06-15 01:17:29 -07:00
|
|
|
| Lpoptrap
|
2013-10-14 07:33:27 -07:00
|
|
|
| Lraise of Lambda.raise_kind
|
1995-06-15 01:17:29 -07:00
|
|
|
|
2001-02-05 00:49:10 -08:00
|
|
|
val has_fallthrough : instruction_desc -> bool
|
1995-08-13 02:31:50 -07:00
|
|
|
val end_instr: instruction
|
2010-01-22 04:48:24 -08:00
|
|
|
val instr_cons:
|
1995-08-13 02:31:50 -07:00
|
|
|
instruction_desc -> Reg.t array -> Reg.t array -> instruction -> instruction
|
2002-01-09 11:40:48 -08:00
|
|
|
val invert_test: Mach.test -> Mach.test
|
1995-08-13 02:31:50 -07:00
|
|
|
|
1995-06-15 01:17:29 -07:00
|
|
|
type fundecl =
|
|
|
|
{ fun_name: string;
|
1995-07-02 09:41:48 -07:00
|
|
|
fun_body: instruction;
|
2012-02-21 09:41:02 -08:00
|
|
|
fun_fast: bool;
|
|
|
|
fun_dbg : Debuginfo.t }
|
1995-06-15 01:17:29 -07:00
|
|
|
|
2014-05-09 05:01:21 -07:00
|
|
|
val reset : unit -> unit
|
1995-06-15 01:17:29 -07:00
|
|
|
val fundecl: Mach.fundecl -> fundecl
|