2001-12-16 Dietmar Maurer <dietmar@ximian.com>
[mono.git] / mono / jit / ChangeLog
1 2001-12-16  Dietmar Maurer  <dietmar@ximian.com>
2
3         * emit-x86.c (arch_handle_exception): new code to handle
4         exceptions inside unmanaged code.
5
6         * x86.brg: impl. SAVE_LMF, RESTORE_LMF, pass implizit valuetype
7         address as first argument.
8
9 2001-12-15  Dietmar Maurer  <dietmar@ximian.com>
10
11         * x86.brg: pass exceptions on the stack
12
13         * jit.h (ISSTRUCT): new macro to check for real value types
14         (return false for enum types). 
15
16 2001-12-11  Dietmar Maurer  <dietmar@ximian.com>
17
18         * x86.brg: use position indepentent code if possible. 
19
20         * x86.brg (EMIT_COND_EXCEPTION): new macro.
21
22         * emit-x86.c (mono_emit_cfg): impl. variable code buffer size
23
24 2001-12-10  Dietmar Maurer  <dietmar@ximian.com>
25
26         * jit.c (mono_analyze_flow): use g_malloc0 o allocate large bcinfo
27         blocks.
28         (mono_analyze_flow): use g_malloc0 o allocate large bblocks array.
29
30         * x86.brg (stmt): added opt. for STIND_R4/STIND_R8
31
32 2001-12-07  Dietmar Maurer  <dietmar@ximian.com>
33
34         * jit.c (mono_allocate_intvar): bug fix.
35
36         * emit-x86.c (get_unbox_trampoline): impl.
37
38         * jit.c (mono_analyze_stack): impl STOBJ, LEAVE
39
40 2001-12-06  Dietmar Maurer  <dietmar@ximian.com>
41
42         * x86.brg: raise exceptions.
43
44 2001-12-05  Dietmar Maurer  <dietmar@ximian.com>
45
46         * x86.brg: impl. CEQ for freg, NEWSTRUCT now allocates valuetypes on
47         the stack. 
48
49 2001-12-06  Miguel de Icaza  <miguel@ximian.com>
50
51         * jit.c (mono_analyze_stack), x86.brg: Implement CONV.OVF.I1,
52         CONV.OVF.I4, CONV.OVF.I1.UN, CONV.OVF.U1, CONV.OVF.U1.UN,
53         CONV.OVF.I2.UN, CONV.OVF.I8.UN
54
55 2001-12-04  Dietmar Maurer  <dietmar@ximian.com>
56
57         * x86.brg: impl. UNBOX, NEWSTRUCT, removed VTYPE, bug fixes,
58         removed the locaddr nonterminal, reimplemented value types
59         
60         * jit.c: reimplemented value type support, better support for
61         enumeration types. 
62
63 2001-12-03  Miguel de Icaza  <miguel@ximian.com>
64
65         * x86.brg, jit.c: Implement conv.ovf.u4, conv.ovf.u2, conv.ovf.i2,
66         conv.ovf.u8 
67
68 Mon Dec 3 17:16:36 CET 2001 Paolo Molaro <lupus@ximian.com>
69
70         * jit.c: call mono_init() after registering internal calls.
71
72 2001-11-30  Dietmar Maurer  <dietmar@ximian.com>
73
74         * emit-x86.c (tree_preallocate_regs): improved register allocation
75
76         * x86.brg: impl. ISINST, CASTCLASS
77
78 Fri Nov 30 12:02:24 CET 2001 Paolo Molaro <lupus@ximian.com>
79
80         * x86.brg: rearrange fields to reduce struct size.
81         * jit.c: use signature->param_count, not signature->params_size.
82         * debug.c: off-by-one error fix.
83
84 2001-11-29  Radek Doulik  <rodo@ximian.com>
85
86         * Makefile.am: build mono only for X86 architecture, compilation
87         fails for ppc now because of accessing registers in sigcontext
88         structure
89
90 2001-11-29  Dietmar Maurer  <dietmar@ximian.com>
91
92         * jit.c (mono_analyze_stack): bug fix in DUP
93
94 Thu Nov 29 12:32:01 CET 2001 Paolo Molaro <lupus@ximian.com>
95
96         * debug.c: fix type handling. Position function position at start of
97         IL code. Output more fine-grained stepping information.
98
99 2001-11-28  Dietmar Maurer  <dietmar@ximian.com>
100
101         * x86.brg (LDIND_I1, LDIND_I2): use x86_widen_ instead of x86_mov_
102
103         * jit.c (mono_analyze_stack): record the cli_address for later use
104         with gdb.
105         (sigsegv_signal_handler): translate sigsegv into "Internal error"
106         exception.
107
108 Tue Nov 27 16:32:41 CET 2001 Paolo Molaro <lupus@ximian.com>
109
110         * debug.c, debug.h: added support for generating stabs.
111         Stabs can be compiled with as and the resulting object file can be
112         loaded in a gdb session with add-symbol-file object.o.
113         * jit.c, jit.h: add --stabs and --debug command line arguments. Keep track
114         where locals and arguments are stored in the stack. Add support for
115         passing command line arguments to CLR programs.
116         * emit-x86.c: insert a breakpoint at method invocation if needed.
117
118 2001-11-27  Dietmar Maurer  <dietmar@ximian.com>
119
120         * jit.c: exception support
121
122         * emit-x86.c (arch_emit_epilogue): bug fix: restore the regs in
123         the right order.
124
125 2001-11-26  Dick Porter  <dick@ximian.com>
126
127         * Makefile.am (mono_LDADD): Add io-layer library
128
129 2001-11-19  Dietmar Maurer  <dietmar@ximian.com>
130
131         * jit.c (mono_analyze_stack): impl. LDFTN
132         (MAKE_SPILLED_BI_ALU): always spill DIV/REM results to memory to
133         make register allocation easier on x86
134
135         * emit-x86.c (enter_method): more debugging output for Strings
136         (arch_compile_method): added delegate support
137         (arch_compile_method): align EBP to 8 byte boundary
138
139 Mon Nov 19 11:36:22 CET 2001 Paolo Molaro <lupus@ximian.com>
140
141         * jit.c: use mono_install_trampoline (), instead of exporting
142         a function to a lower-level library.
143
144 2001-11-16  Dietmar Maurer  <dietmar@ximian.com>
145
146         * x86.brg (STRING_ARG): impl. a way to marshal strings. This
147         will be extensible to handle all possible kinds of marshalling
148         requirements. 
149
150         * jit.c (map_call_type): added MB_TERM_CALL_VOID
151         (mono_analyze_stack): impl. LDELEMA, reimplemented CALL
152         instructions to handle this arguments more effectively.
153
154 2001-11-15  Dietmar Maurer  <dietmar@ximian.com>
155
156         * Makefile.am (mono_SOURCES): renamed testjit to mono
157
158         * x86.brg: added debugging support 
159
160         * testjit.c: added support for value types, CFG improvements
161
162         * emit-x86.c (enter_method): handle value types
163         (tree_allocate_regs): impl. a better way to handle chain rules
164
165 2001-11-10  Dietmar Maurer  <dietmar@ximian.com>
166
167         * x86.brg (INITOBJ): bug fix: initialize data before use,
168         simplified the code.
169
170 2001-11-09  Miguel de Icaza  <miguel@ximian.com>
171
172         * testjit.c (mono_analyze_stack): Remove compiler warning by
173         testing against NULL.
174
175 2001-11-09  Dick Porter  <dick@ximian.com>
176
177         * Makefile.am (testjit_LDADD): Don't need THREAD_LIBS any more
178
179 2001-11-09  Dietmar Maurer  <dietmar@ximian.com>
180
181         * testjit.c (mono_analyze_stack): new BOX impl.
182
183         * x86.brg: implemented INITOBJ
184
185         * testjit.c (mono_analyze_stack): finished array support
186         (mono_analyze_stack): reimplemented DUP instruction
187
188 2001-11-08  Dietmar Maurer  <dietmar@ximian.com>
189
190         * testjit.c (MAKE_STELEM, MAKE_LDELEM): we build a tree which
191         represents the address of the element. This way we can emit highly
192         optimized x86 instructions to access elements (using base+index+offset
193         adressing mode)
194
195 2001-11-07  Miguel de Icaza  <miguel@ximian.com>
196
197         * mempool.c: Include string.h to kill warning.
198
199         * testjit.c: Add typecast to kill warning.
200
201         * x86.brg: Include string.h to eliminate warning.
202
203         * emit-x86.c (tree_allocate_regs): Fix arguments to g_warning to
204         kill warning.
205
206 2001-11-07  Dietmar Maurer  <dietmar@ximian.com>
207
208         * emit-x86.c (enter_method): print out all method arguments
209         (x86_magic_trampoline): impl.
210         (arch_create_simple_jit_trampoline): we use different trampolines
211         for static methods (no need to write the address back into to
212         vtable).
213
214 2001-11-06  Dietmar Maurer  <dietmar@ximian.com>
215
216         * emit-x86.c (arch_create_jit_trampoline): optimised trampoline to
217         use less the 16 bytes.
218
219         * x86.brg: code cleanup
220
221 2001-11-05  Dietmar Maurer  <dietmar@ximian.com>
222
223         * testjit.c: bug fixes.
224
225         * emit-x86.c (leave_method): print result values
226
227 2001-11-03  Dietmar Maurer  <dietmar@ximian.com>
228
229         * emit-x86.c (enter_method): new debugging code
230         (leave_method): new debbuging code, this functions are called
231         when you use the new option --trace-calls
232
233 2001-11-02  Dietmar Maurer  <dietmar@ximian.com>
234
235         * testjit.c: impl. STELEM_XX, STELEM_XX
236
237         * x86.brg: impl. LDLEN, LDELEMA
238         
239
240 2001-10-15  Dietmar Maurer  <dietmar@ximian.com>
241
242         * x86.brg: added some experimental code for CALL
243         instructions - still not found the optimal way to do it.
244
245         * testjit.c (map_stind_type): add support for value types with
246         a size of 1, 2 or 4 bytes, implemented CEE_UNBOX, CEE_LDOBJ,
247         CEE_LDSTR, CEE_LDFLD, CEE_LDFLDA, CEE_STFLD, CEE_NEWOBJ, CEE_CEQ
248         (ctree_create_newobj): impl.
249         
250
251         * emit-x86.c (tree_allocate_regs): removed allocation code for
252         addr nonterminal.
253         (get_address): use a simple, but bug free search instead of the
254         buggy binary search.
255
256 2001-10-12  Dietmar Maurer  <dietmar@ximian.com>
257
258         * testjit.c: support virtual functions
259
260         * x86.brg: support different addressing modes for calls
261
262 2001-10-11  Dietmar Maurer  <dietmar@ximian.com>
263
264         * testjit.c: impl. STFLD
265
266 2001-10-10  Dietmar Maurer  <dietmar@ximian.com>
267
268         * x86.brg: impl. CEQ
269
270 2001-10-04  Dick Porter  <dick@ximian.com>
271
272         * testjit.c:
273         * emit-x86.c: include mono-endian.h not endian.h
274
275 2001-10-02  Dietmar Maurer  <dietmar@ximian.com>
276
277         * testjit.c (ctree_create_dup): really duplicate the tree.
278         attach the arguments to the CALL node. Added a new macro to
279         make argument order configurable (ARCH_ARGS_RIGHT_TO_LEFT).
280
281 2001-10-01  Dietmar Maurer  <dietmar@ximian.com>
282
283         * interp.brg: the burm based interpreter: added the file as example.
284
285 2001-09-27  Dietmar Maurer  <dietmar@ximian.com>
286
287         * x86.brg: cleanup
288
289         * testjit.c: impl. LDIND/STIND/LDLOCA, use g_malloc to alloc static
290         data.
291         (map_stind_type): support enum types
292         (map_ldind_type): support enum types
293
294         * emit-x86.c (tree_allocate_regs): added code to support
295         register allocation for addressing modes trees.
296         (tree_emit): bug fix: we have to emit all mono_burg_functins. The
297         previous impl. did not work for chain rules.
298         (compute_branches): support for SWITCH statements
299
300         * x86.brg: added rules to model x86 addressing modes
301
302 2001-09-26  Dietmar Maurer  <dietmar@ximian.com>
303
304         * emit-x86.c (compute_branches): implemented SWITCH
305
306         * testjit.c (mono_create_forest): implemented LDIND/STIND opcodes
307         (map_ldind_type): add enumeration types.
308         (map_stind_type): add enumeration types.
309
310         * emit-x86.c (arch_compile_method): more documentation.
311
312         * testjit.c: moved the architecture specific things to emit-x86.c
313         and x86.brg. Added more documentation. code cleanup.
314
315 2001-09-25  Dietmar Maurer  <dietmar@ximian.com>
316
317         * x86.brg: we now have different types of addresses: ADDR_L for local
318         values, ADDR_A for arguments and ADDR_G for global addresses. We
319         also use LDIND_XX token to load values from a specific address
320         instead of LDLOC/STLOC. 
321
322         * testjit.c: use the new adressing scheme everywhere:
323         LDIND _XX (ADDR_X), and STIND_XX (ADDR_X, tree)  
324
325 2001-09-24  Dietmar Maurer  <dietmar@ximian.com>
326
327         * testjit.c (main): fix bug in parameter parsing
328
329         * x86.brg: impl. more opcodes
330
331 2001-09-23  Dick Porter  <dick@ximian.com>
332
333         * Makefile.am (testjit_LDADD): rename PTHREAD_LIBS to THREAD_LIBS
334
335 2001-09-23  Dietmar Maurer  <dietmar@ximian.com>
336
337         * testjit.c: use the memory pool to avoid memory leaks
338
339 2001-09-22  Dietmar Maurer  <dietmar@ximian.com>
340
341         * x86.brg: increment the stack pointer after function calls
342
343 2001-09-21  Dick Porter  <dick@ximian.com>
344
345         * Makefile.am (testjit_LDADD): Added PTHREAD_LIBS to the link line
346
347 2001-09-21  Dietmar Maurer  <dietmar@ximian.com>
348
349         * x86.brg: implemented long MUL/DIV
350         (MB_OPT_LEVEL): define optimisation level macro
351
352         * testjit.c (tree_allocate_regs): added a way to prevent EDX usage
353         for operations like idiv. it is also possible to assign specific registers.
354
355 2001-09-20  Dietmar Maurer  <dietmar@ximian.com>
356
357         * x86.brg: added basic support for long
358
359         * testjit.c (mono_compile_method): implemented POP
360
361 2001-09-19  Miguel de Icaza  <miguel@ximian.com>
362
363         * testjit.c (usage): Added a couple of more usage options.
364
365 2001-09-19  Dietmar Maurer  <dietmar@ximian.com>
366
367         * x86.brg: added more floating point grammar 
368
369         * testjit.c (mono_compile_method): make local offsets negative
370
371         * x86.brg: added some floating point trees
372
373         * testjit.c (mono_compile_method): arguments on the runtime 
374         stack are at least 4 bytes
375
376         * x86.brg: partly implemented 8,16 bit integers
377
378         * testjit.c (get_address): mark basic blocks
379
380 2001-09-18  Dietmar Maurer  <dietmar@ximian.com>
381
382         * x86.brg: added some rules to optimize code
383
384         * testjit.c (get_address): use a binary search to get the address
385         (main): added an option to debug the jit (-d)
386
387 Tue Sep 18 13:19:16 CEST 2001 Paolo Molaro <lupus@ximian.com>
388
389         * testjit.c: better/faster align code. Handle ldloc.s and stloc.s.
390
391 2001-09-17  Miguel de Icaza  <miguel@ximian.com>
392
393         * testjit.c (mono_compile_method): Provide better error reporting.
394
395 2001-09-17  Dietmar Maurer  <dietmar@ximian.com>
396
397         * testjit.c (tree_get_address): impl. to fix address bug
398         (tree_get_address): make sure that we can only jump to the first
399         instruction of a tree.
400
401         * x86.brg: emit real code for calls
402
403         * testjit.c (create_jit_trampoline): creates a function to trigger jit
404         compilation.
405         (mono_compile_method): reversed argument order
406
407 2001-09-15  Dietmar Maurer  <dietmar@ximian.com>
408
409         * x86.brg (stmt): don't emit unnecessary register moves
410
411         * testjit.c (tree_allocate_regs): free registers earlier
412
413 2001-09-14  Dietmar Maurer  <dietmar@ximian.com>
414
415         * x86.brg: branch addresses are now resolved
416
417         * testjit.c (compute_branches): compute address of branches
418
419         * x86.brg: emit real x86 instructions
420
421         * testjit.c: call objdump to disassemble the output
422
423 2001-09-13  Dietmar Maurer  <dietmar@ximian.com>
424
425         * x86.brg: use the right offsets to access local variables
426         and arguments.
427
428         * emit-x86.c: only save/restore callee saved registers if they are
429         really modified.
430
431         * testjit.c (tree_allocate_regs): use the new MonoRegSet to
432         allocate registers.
433         (mono_compile_method): changed the tree for mothod calls
434
435         * regset.h: impl.
436         
437         * regset.c: impl.
438         
439
440 2001-09-10  Miguel de Icaza  <miguel@ximian.com>
441
442         * x86.brg: Use Unix assembly syntax.
443
444         * emit-x86.c: support code, should be moved
445
446         * testjit.c: Use GPtrArrays instead of GLists, as those are very
447         inefficient at appends.
448
449         * Renamed `create_new_leave' to `create_new_leaf'
450
451         
452