source: Deliverables/D2.2/8051/src/clight/runtime.mli @ 3673

Last change on this file since 3673 was 818, checked in by ayache, 9 years ago

32 and 16 bits operations support in D2.2/8051

File size: 1006 bytes
Line 
1
2(** This module adds runtime functions in a [Clight] program. These functions
3    implement unsupported functions by the target architecture that introduce a
4    branch. We need to define them at the [Clight] level in order to have a
5    correct labelling. *)
6
7type operation =
8  | Unary of Clight.unary_operation * Clight.ctype
9  | Binary of Clight.binary_operation * Clight.ctype * Clight.ctype
10  | Cast of Clight.ctype (* destination type *) * Clight.ctype (* source type *)
11  | Fun of string (* name of the function *)
12
13type op_replacement =
14    (* operation to be replaced *)
15    operation *
16    (* base name of the replacement function *)
17    string *
18    (* C definition of the replacement function, provided a name for the
19       function *)
20    (string -> string) *
21    (* dependences *)
22    operation list
23
24val add :
25  Clight.program -> op_replacement list ->
26  (Clight.program * (operation * string) list (* operation association *))
27
28val replace_unsupported : Clight.program -> Clight.program
Note: See TracBrowser for help on using the repository browser.