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