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