Module of module types for OrderedType,ComparableType,Printable,Serializable,Discrete...
[ocaml.git] / asmcomp / cmm.mli
blob5cabc0066a26052bc1909d7c587c0bfdc43a8125
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 (* Second intermediate language (machine independent) *)
17 type machtype_component =
18 Addr
19 | Int
20 | Float
22 type machtype = machtype_component array
24 val typ_void: machtype
25 val typ_addr: machtype
26 val typ_int: machtype
27 val typ_float: machtype
29 val size_component: machtype_component -> int
30 val size_machtype: machtype -> int
32 type comparison =
33 Ceq
34 | Cne
35 | Clt
36 | Cle
37 | Cgt
38 | Cge
40 val negate_comparison: comparison -> comparison
41 val swap_comparison: comparison -> comparison
43 type memory_chunk =
44 Byte_unsigned
45 | Byte_signed
46 | Sixteen_unsigned
47 | Sixteen_signed
48 | Thirtytwo_unsigned
49 | Thirtytwo_signed
50 | Word
51 | Single
52 | Double (* 64-bit-aligned 64-bit float *)
53 | Double_u (* word-aligned 64-bit float *)
55 type operation =
56 Capply of machtype * Debuginfo.t
57 | Cextcall of string * machtype * bool * Debuginfo.t
58 | Cload of memory_chunk
59 | Calloc
60 | Cstore of memory_chunk
61 | Caddi | Csubi | Cmuli | Cdivi | Cmodi
62 | Cand | Cor | Cxor | Clsl | Clsr | Casr
63 | Ccmpi of comparison
64 | Cadda | Csuba
65 | Ccmpa of comparison
66 | Cnegf | Cabsf
67 | Caddf | Csubf | Cmulf | Cdivf
68 | Cfloatofint | Cintoffloat
69 | Ccmpf of comparison
70 | Craise of Debuginfo.t
71 | Ccheckbound of Debuginfo.t
73 type expression =
74 Cconst_int of int
75 | Cconst_natint of nativeint
76 | Cconst_float of string
77 | Cconst_symbol of string
78 | Cconst_pointer of int
79 | Cconst_natpointer of nativeint
80 | Cvar of Ident.t
81 | Clet of Ident.t * expression * expression
82 | Cassign of Ident.t * expression
83 | Ctuple of expression list
84 | Cop of operation * expression list
85 | Csequence of expression * expression
86 | Cifthenelse of expression * expression * expression
87 | Cswitch of expression * int array * expression array
88 | Cloop of expression
89 | Ccatch of int * Ident.t list * expression * expression
90 | Cexit of int * expression list
91 | Ctrywith of expression * Ident.t * expression
93 type fundecl =
94 { fun_name: string;
95 fun_args: (Ident.t * machtype) list;
96 fun_body: expression;
97 fun_fast: bool }
99 type data_item =
100 Cdefine_symbol of string
101 | Cdefine_label of int
102 | Cglobal_symbol of string
103 | Cint8 of int
104 | Cint16 of int
105 | Cint32 of nativeint
106 | Cint of nativeint
107 | Csingle of string
108 | Cdouble of string
109 | Csymbol_address of string
110 | Clabel_address of int
111 | Cstring of string
112 | Cskip of int
113 | Calign of int
115 type phrase =
116 Cfunction of fundecl
117 | Cdata of data_item list