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 =
|
|
|
|
{ desc: instruction_desc;
|
|
|
|
next: instruction;
|
|
|
|
arg: Reg.t array;
|
|
|
|
res: Reg.t array;
|
|
|
|
live: Reg.Set.t }
|
|
|
|
|
|
|
|
and instruction_desc =
|
|
|
|
Lend
|
|
|
|
| Lop of Mach.operation
|
|
|
|
| Lreturn
|
|
|
|
| Llabel of label
|
|
|
|
| Lbranch of label
|
|
|
|
| Lcondbranch of Mach.test * label
|
|
|
|
| Lswitch of label array
|
|
|
|
| Lpushtrap of label
|
|
|
|
| Lpoptrap
|
|
|
|
| Lentertrap
|
|
|
|
| Lraise
|
|
|
|
|
|
|
|
type fundecl =
|
|
|
|
{ fun_name: string;
|
1995-07-02 09:41:48 -07:00
|
|
|
fun_body: instruction;
|
|
|
|
fun_fast: bool }
|
1995-06-15 01:17:29 -07:00
|
|
|
|
|
|
|
val fundecl: Mach.fundecl -> fundecl
|
|
|
|
|