Sys.Signals module for a Variant type of signals (and a set_signal function that...
[ocaml.git] / asmcomp / mach.mli
blobf1b5eae8b6b9a957899c9a460c8366adf21bc4c5
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 (***********************************************************************)
13 (* $Id$ *)
15 (* Representation of machine code by sequences of pseudoinstructions *)
17 type integer_comparison =
18 Isigned of Cmm.comparison
19 | Iunsigned of Cmm.comparison
21 type integer_operation =
22 Iadd | Isub | Imul | Idiv | Imod
23 | Iand | Ior | Ixor | Ilsl | Ilsr | Iasr
24 | Icomp of integer_comparison
25 | Icheckbound
27 type test =
28 Itruetest
29 | Ifalsetest
30 | Iinttest of integer_comparison
31 | Iinttest_imm of integer_comparison * int
32 | Ifloattest of Cmm.comparison * bool
33 | Ioddtest
34 | Ieventest
36 type operation =
37 Imove
38 | Ispill
39 | Ireload
40 | Iconst_int of nativeint
41 | Iconst_float of string
42 | Iconst_symbol of string
43 | Icall_ind
44 | Icall_imm of string
45 | Itailcall_ind
46 | Itailcall_imm of string
47 | Iextcall of string * bool
48 | Istackoffset of int
49 | Iload of Cmm.memory_chunk * Arch.addressing_mode
50 | Istore of Cmm.memory_chunk * Arch.addressing_mode
51 | Ialloc of int
52 | Iintop of integer_operation
53 | Iintop_imm of integer_operation * int
54 | Inegf | Iabsf | Iaddf | Isubf | Imulf | Idivf
55 | Ifloatofint | Iintoffloat
56 | Ispecific of Arch.specific_operation
58 type instruction =
59 { desc: instruction_desc;
60 next: instruction;
61 arg: Reg.t array;
62 res: Reg.t array;
63 dbg: Debuginfo.t;
64 mutable live: Reg.Set.t }
66 and instruction_desc =
67 Iend
68 | Iop of operation
69 | Ireturn
70 | Iifthenelse of test * instruction * instruction
71 | Iswitch of int array * instruction array
72 | Iloop of instruction
73 | Icatch of int * instruction * instruction
74 | Iexit of int
75 | Itrywith of instruction * instruction
76 | Iraise
78 type fundecl =
79 { fun_name: string;
80 fun_args: Reg.t array;
81 fun_body: instruction;
82 fun_fast: bool }
84 val dummy_instr: instruction
85 val end_instr: unit -> instruction
86 val instr_cons:
87 instruction_desc -> Reg.t array -> Reg.t array -> instruction ->
88 instruction
89 val instr_cons_debug:
90 instruction_desc -> Reg.t array -> Reg.t array -> Debuginfo.t ->
91 instruction -> instruction
92 val instr_iter: (instruction -> unit) -> instruction -> unit