Initial snarf.
[shack.git] / arch / noarch / util / noarch_backend.ml
blobc52ec6638a87477ad4064a49f710a2f029e56f1b
1 (*
2 * This is the generic backend modules.
4 * ----------------------------------------------------------------
6 * @begin[license]
7 * Copyright (C) 2002 Justin David Smith, Caltech
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 * Author: Jason Hickey
24 * @email{jyh@cs.caltech.edu}
25 * @end[license]
28 open Symbol
29 open Frame_type
33 * WARNING: The values in here are nonsensical.
34 * Do not use them as real backend values.
38 let null_symbol = new_symbol_string "null"
39 let fail_miserably _ = raise (Failure "Noarch_backend: cannot compile to assembly")
42 module Backend : BackendSig =
43 struct
44 (* Type of an assembly block *)
45 type block = unit
47 (* Pointer table descriptors *)
48 let pointer_base = null_symbol
49 let pointer_size = null_symbol
51 (* Closure table descriptors *)
52 let function_base = null_symbol
53 let function_size = null_symbol
55 (* Segmentation faults *)
56 let other_fault = 0
57 let index_fault = 0
58 let fun_index_fault = 0
59 let fun_arity_tag_fault = 0
60 let pointer_index_fault = 0
61 let bounds_fault = 0
62 let lower_bounds_fault = 0
63 let upper_bounds_fault = 0
64 let null_pointer_fault = 0
65 let fault_count = 0
66 let seg_fault_labels = [||]
68 (* Debug labels *)
69 let debug_alloc = 0
70 let debug_let_poly = 0
71 let debug_let_pointer = 0
72 let debug_let_function = 0
73 let debug_set_poly = 0
74 let debug_set_pointer = 0
75 let debug_set_function = 0
76 let debug_pre_let_poly = 0
77 let debug_pre_let_pointer = 0
78 let debug_pre_let_function = 0
79 let debug_pre_set_pointer = 0
80 let debug_pre_set_function = 0
81 let debug_count = 0
82 let debug_labels = [||]
84 (* Hash value for pointer entries *)
85 let hash_index_label = null_symbol
86 let hash_fun_index_label = null_symbol
87 let index_shift32 = Int32.zero
89 (* Pointer table masks *)
90 let ptable_pointer_mask = Int32.zero
91 let ptable_valid_bit_off = 0
93 (* Size constants *)
94 let aggr_header_size = 0
95 let block_header_size = 0
97 (* Special tags *)
98 let rttd_tag = 0
100 (* Migration values *)
101 let migrate_debug_gdbhooks = Int32.zero
103 (* Arity tags *)
104 let backend_arity_tags = []
109 * The abstract frame.
111 module Frame =
112 struct
113 type 'a block = unit
114 type spset = unit
115 type reg_class = int
116 type inst = unit
118 let def_cost = 0
119 let use_cost = 0
120 let mov_def_cost = 0
121 let mov_use_cost = 0
123 let block_label = fail_miserably
124 let block_code = fail_miserably
125 let block_live = fail_miserably
126 let print_blocks = fail_miserably
127 let print_live_blocks = fail_miserably
129 let reg_class_count = 0
130 let registers = [||]
131 let registers_special = [||]
133 let spset_spill = fail_miserably
134 let spset_add = fail_miserably
136 let subst_blocks = fail_miserably
138 let vars_blocks = fail_miserably