2003-09-26 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / mini / ChangeLog
1 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
2
3         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
4         jumps, since the method we are jumping to might be domain-specific.
5
6         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
7
8 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
9
10         * inssel.brg: string chars are unsigned.
11
12 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
13
14         * TODO: New todo item.
15
16         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
17         which calls mono_runtime_class_init and patches the call site to
18         avoid further calls.
19         (mono_arch_create_class_init_trampoline): New arch specific function 
20         to create a class init trampoline.
21         (create_trampoline_code): Generalized so it can create
22         class init trampolines as well.
23
24         * mini.c (helper_sig_class_init_trampoline): New helper variable.
25         (mono_create_class_init_trampoline): New function to create and cache
26         class init trampolines.
27         (mono_find_class_init_trampoline_by_addr): New function to lookup the
28         vtable given the address of a class init trampoline. Used by the
29         patching process.
30         (mono_codegen): Generate a call to a trampoline instead of
31         mono_runtime_class_init in LDSFLD[A].
32         (mono_codegen): Add relocations for the new trampoline.
33         
34         * mini.h mini-x86.c aot.c: Added a new relocation type: 
35         MONO_PATCH_INFO_CLASS_INIT.
36
37         * mini.h: Bump AOT version number.
38
39         * aot.c: Create a copy of the loaded code instead of using the original
40         so methods which call each other will be close in memory, improving
41         cache behaviour.
42         
43         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
44         patch since it breaks the regression tests.
45         
46         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
47         for the register saving instruction sequence since the 
48         frame_state_for function in glibc 2.3.2 don't seem to detect it.
49
50 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
51
52         * TODO: Fix todo item && remove another.
53
54 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
55
56         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
57         previous checkin.
58
59         * aot.c: Moved the check for MONO_LASTAOT into the initialization
60         function of the module.
61
62         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
63         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
64         --no-aot command line option.
65
66 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
67
68         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
69         by Bernie Solomon (bernard@ugsolutions.com).
70
71         * inssel.brg: Refactor the interface offset table related code into
72         its separate functions and add support for the AOT case.
73
74 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
75
76         * aot.c (mono_aot_get_method_inner): Fix memory leak.
77         
78         * aot.c: Added mono_aot_verbose variable and made all debugging
79         output depend on the value of this variable.
80
81         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
82         method_label and info_label.
83
84         * mini.h mini-x86.c aot.c: Added a new relocation type 
85         MONO_PATCH_INFO_IID for klass->interface_id.
86
87         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
88         the MonoJitInfo structure.
89
90         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
91         a non-root appdomain in shared mode.
92
93 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
94
95         * aot.c: make aot loader less verbose. Remove free of unused variable.
96
97 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
98
99         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
100
101         * .cvsignore: Added *.dll.
102
103         * mini.c (mono_print_tree_nl): New function callable while debugging.
104
105         * mini.c (mono_print_code): Export this.
106
107         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
108         patched code.
109
110 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
111
112         * mini.h (MonoCompile): Added 'jit_info' field.
113
114         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
115         the cfg structure, since it is needed by the AOT compiler.
116
117         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
118
119         * aot.c: A major rewrite. Changes include:
120         - save exception tables for methods which have them.
121         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
122         to g_module_symbol.
123         - reworked the file format so it is now much smaller and needs
124         fewer relocation entries.
125         
126 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
127
128         * aot.c (load_aot_module): Fix build bustage on platforms without
129         Boehm GC.
130
131 2003-09-04  Martin Baulig  <martin@ximian.com>
132
133         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
134
135 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
136
137         * TODO: Some new optimization ideas.
138
139         * aot.c: Move AOT module loading logic here from mono_assembly_open.
140
141         * aot.c: Save the optimization flags used to compile the code into
142         the AOT module.
143
144         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
145         support emitting domain specific code.
146         
147         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
148         no longer domain neutral. It can be made domain neutral by compiling 
149         with --optimize=shared.
150
151         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
152         between appdomains.
153
154         * driver.c mini.h mini.c: New --no-aot debugging option which disables
155         loading of AOT code.
156
157         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
158         
159         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
160         if there is no domain neutrality information.
161
162 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
163
164         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
165         format version into the generated library.
166
167         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
168         callee method into the caller since one of them could be shared.
169
170         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
171         system exceptions from AOT code now works.
172
173         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
174         method if it is domain neutral and the callee is not.
175
176         * graph.c (cfg_emit_one_loop_level): Fix warning.
177
178 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
179
180         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
181         last checkin.
182
183 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
184
185         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
186         is needed  by code which is executed before mono_runtime_init ().
187         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
188         
189         * mini.c (mono_thread_abort): Fix warning.
190         (mono_jit_compile_method): Call static constructor in the AOT case too.
191
192         * aot.c (mono_compile_assembly): Fix warning.
193
194 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
195
196         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
197
198 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
199
200         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
201
202         * cpu-pentium.md: Fix the length of call opcodes so they include the
203         ESP restoring instruction. Fixes #47968.
204
205 2003-08-28  Martin Baulig  <martin@ximian.com>
206
207         * mini-x86.c (mono_arch_call_opcode): Added support for
208         MONO_TYPE_GENERICINST.
209
210         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
211
212 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
213
214         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
215         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
216
217         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
218         metadata_section.
219
220 2003-08-26  Martin Baulig  <martin@ximian.com>
221
222         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
223         when reporting an error, set this to the actual error location.
224         (mono_method_to_ir): Report the correct error location if
225         get_basic_blocks() returned an error.
226
227 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
228
229         * mini.c (mono_type_blittable): OBJECT is not blittable.
230         (mono_method_blittable): Methods which have marshalling descriptors
231         are not blittable either. Fixes #47842.
232
233 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
234
235         * driver.c mini.c: Use an environment variable instead of a global 
236         variable. Also fix the build.
237
238         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
239         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
240         reporting this. 
241
242         * driver.c mini.c: Added --with-valgrind option to turn off some
243         code which prevents mono from running under valgrind.
244
245         * mini.c (mono_emit_call_args): Fixed warning.
246
247         * mini.c (mono_emulate_opcode): Fixed warning.
248
249 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
250
251         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
252         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
253         regalloc.c, regalloc.h: specify available registers in arch-specific
254         code and support floats in the regallocator (patch by Laurent Morichetti 
255         <l_m@pacbell.net>)
256
257 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
258
259         * mini.c: mono_thread_current() can be called only after
260         mono_runtime_init(): rearrange code to not call it early on.
261
262 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
263
264         * mini.c: allocate jump tables in the code mempools.
265
266 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
267
268         * mini.c, mini.h: make sure per-thread data allocated by the jit is
269         freed.
270
271 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
272
273         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
274         12 to 16.  This fixes bug #47453.
275
276
277 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
278
279         * mini-ppc.c: fixed indexed load and unsigned compares.
280
281 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
282
283         * mini.c: reenabled installation of handler for
284           thread abort signal.
285
286 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
287
288         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
289         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
290         until it's fixed and actually useful.
291
292 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
293
294         * inssel-long32.brg: couple more opcodes implemented.
295
296 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
297         
298         * mini-sparc.c: Even more opcodes implemeted.
299
300 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
301
302         * mini-sparc.c: More opcodes implemented.
303
304 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
305
306         * mini-sparc.c: More opcodes implemented.
307
308 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
309
310         * inssel-sparc.brg: Add some needed rules.  Direct
311         copy from PPC.
312         * Makefile.am: Use inssel-sparc.brg
313         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
314         an assert happy for now.
315
316 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
317
318         * mini-sparc.c: Fixed compile errors.
319         * exceptions-sparc.c: Same.  We now produce a mono binary 
320         on sparc-linux.  Yea.
321
322 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
323
324         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
325         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
326         They compile, but do not work.
327
328 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
329
330         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
331         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
332         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
333         (ct@gentoo.org).
334
335 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
336
337         * mini.c: more opcodes implemented and better support for generics.
338
339 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
340
341         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
342         * mini.c, mini.h: first cut at generics support: some new instructions 
343         added and changed the behaviour of some of the existing ones.
344
345 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
346
347         * mini.c: Removed definition of metadata_shared mutex here.
348
349 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
350
351         * mini-x86.c: make vararg calls work for instance methods.
352
353 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
354
355         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
356         returns the arguments in a separte list, now.
357
358 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
359
360         * aot.c, mini.c: updates for array type representation changes.
361
362 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
363
364         * mini.c: register function to perform jit shutdown.
365
366 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
367
368         * mini.c: use a faster allocator if possible.
369
370 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
371
372         * aot.c: some cleanups and portability changes.
373
374 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
375
376         * mini.c: use faster allocation for CEE_BOX if possible.
377
378 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
379
380         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
381         Moved inlined mempcy code to its own function so that is can be
382         reused. Added an inline memset function as well (optimized initobj).
383         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
384
385 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
386
387         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
388
389 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
390
391         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
392         arch code can setup the cpu for CLR execution, if needed.
393         We use it on x86 to set the precision of FP operations.
394
395 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
396
397         * mini.c: disable some optimizations if we can guess they'll cost too
398         much for a given method.
399
400 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
401
402         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
403         
404 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
405         * mini.h mini.c mini-x86.c: Added instruction level coverage 
406         info collection support.
407
408 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
409
410         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
411         is now implemented in the profiling API. Get rid of a couple of
412         unnecessary global variables.
413
414 2003-06-15  Nick Drochak <ndrochak@gol.com>
415
416         * basic-long.cs: tests for negative values for bigmul, and unsigned.
417         * cpu-g4.md: add op_bigmul and op_bigmul_un
418         * cpu_pentium.md: add op_bigmul_un
419         * inssel-long32.brg: add rule for unsigned bigmul
420         * mini-ops.h: define OP_BIGMUL_UN
421         * mini-x86.c: THE BUG: handle (un)signed properly
422         * mini.c: choose unsigned opcode if needed.
423         This set of patches fixes bug #44291
424
425 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
426
427         * mini.c (optimize_branches): improved to handle all kinds of
428         conditional branches.
429
430 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
431
432         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
433         don't raise exceptions.
434
435 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
436
437         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
438         to arch-specific files.
439
440 2003-06-09  Martin Baulig  <martin@ximian.com>
441
442         * Makefile.am (libs): Added $(LIBGC_LIBS).
443
444 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
445
446         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
447         and OP_ATAN (fixes bug#44293).
448
449 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
450
451         * Makefile.am, mini-x86.c: rename cpu description array to
452         pentium_desc, since some compilers define the 'pentium' preprocessor
453         symbol.
454
455 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
456
457         * mini.c (mini_select_instructions): add explicit branch if the
458         following block is not the false target of a conditional branch -
459         we need this with any optimization that reorder or remove bblocks
460
461         * mini.c (optimize_branches): bug fixes
462
463 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
464
465         * mini.c (mono_method_to_ir): inline static readonly fields
466
467         * ssa.c (fold_tree): start cfold support for long (very simple
468         cases only)
469
470         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
471
472 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
473
474         * inssel.brg: fixed memcpy (bug #44219).
475
476 2003-06-05  Dick Porter  <dick@ximian.com>
477
478         * driver.c: Set the glib log levels to not abort if g_message
479         recurses.
480
481         g_set_prgname() has to happen before mini_init() so that the
482         process handle gets the info.
483         
484 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
485
486         * driver.c: add intrins to the default optimizations to get wider
487         exposure.
488
489 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
490
491         * mini.h: some large basic blocks will overflow a 16-bit
492         integers for symbolic registers.
493
494 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
495
496         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
497         (mono_arch_output_basic_block): fix bug 43499 
498
499 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
500
501         * mini.c: kill duplicated definition of mono_debug_format.
502
503 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
504
505         * mini-x86.c, arrays.cs: fixed register allocation bug.
506
507 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
508
509         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
510
511         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
512
513 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
514
515         * mini.c:
516         (print_method_from_ip): also print source location information if
517         available.
518
519 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
520
521         * mini.c (mono_find_block_region): bug fix in region code
522         (mini_method_compile): enable removing unreachable code again, but
523         only in methods without exception clauses.
524
525 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
526
527         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
528         Implemented arglist opcode and handling of TypedReference type.
529         Fixed x86 call convention when a structure is returned.
530         Minimal support for calling static vararg methods.
531
532 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
533
534         * mini.c (mini_method_compile):  always remove unreachable code,
535         because the code in them may be inconsistent  (access to dead
536         variables for example).
537
538 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
539
540         * driver.c, debug-mini.c: warning fixes.
541
542 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
543
544         * Makefile.am, jit.h, mini.h: install header for embedding mono.
545
546 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
547
548         * mini.c: thread-static fields are registered in mono_class_vtable(),
549         so ensure the function is called before checking for them.
550
551 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
552
553         * mini.c (optimize_branches): fix for bug 43586
554
555         * jit-icalls.c (mono_llmult_ovf): added an additional check for
556         overflow (fixes Bug #43639)
557
558 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
559
560         * mini.c, objects.cs: allow the use of stobj for primitive types.
561
562 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
563
564         * mini.c: be less strict about argument checking until we support
565         running the verifier.
566
567 2003-05-27  Nick Drochak <ndrochak@gol.com>
568
569         * basic-long.cs: tests for (ulong)int * (ulong)int also
570         * mini.c: use the same trick for (ulong)int * (ulong)int
571
572 2003-05-27  Nick Drochak <ndrochak@gol.com>
573
574         * basic-long.cs: add regression test for (long)int * (long)int
575         * cpu-pentium.md: add op_bigmul specification
576         * inssel-long32.brg: add OP_BIGMUL rule
577         * mini-ops.h: add OP_BIGMUL
578         * mini-x86.c: register allocator: handle case where src1 needs to be
579         in EAX.
580         * mini.c: substitute special BIGMUL opcode in the tree for 
581         (long)int * (long)int
582
583 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
584
585         * jit-icalls.c: call the type ctor on field access if needed.
586
587 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
588
589         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
590         to a method (including results of ldelema, bug#43207).
591
592 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
593
594         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
595         colors to show exception handler blocks.
596
597         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
598         (fix for pinvoke7.cs).
599
600 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
601
602         * mini.h, mini.c: ensure correct initialization order for types that
603         require it. Prepare for lazy compilation of jit icall wrappers.
604         Provide a name for opcode emulation to reduce unneeded mallocing.
605
606 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
607
608         * mini-x86.c: better register restoring code and profiling
609         support for tail calls.
610
611 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
612
613         * mini.h, driver.c: prepare for leaf methods optimization.
614
615 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
616
617         * mini.c: get targets of branches before converting a method.
618
619 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
620
621         * mini.c (optimize_branches): added some experimental code (disbaled) 
622
623 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
624
625         * mini.c (optimize_branches): fix branch to branch optimization 
626
627         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
628
629         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
630
631         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
632
633         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
634         if needed.
635
636 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
637
638         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
639         enable use of interface variables again.
640
641         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
642         I1 to registers because there is no simply way to sign extend 8bit
643         quantities in caller saved registers on x86.
644
645         * inssel-float.brg: set costs of some rules to 2 so
646         that monobure always select the arch. specific ones if supplied,
647         regardless of the order we pass the files to monoburg.
648
649 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
650
651         * mini.c, mini-x86.c: since the magic trampoline for jumps
652         can't patch the code directly, we do it as soon as the
653         method gets compiled.
654
655 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
656
657         * mini-x86.c, mini.h: introduce a new patching method
658         to support CEE_JMP and tail calls.
659         * mini.c: obey tail.call. Don't precompile methods target
660         of CEE_JMP.
661         * tramp-x86.c: new trampoline code to handle methods
662         reached through a jump.
663
664 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
665
666         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
667         bit values to registers
668
669 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
670
671         * mini.c (mono_compile_get_interface_var): share interface
672         variables if possible.
673
674 2003-05-16  Martin Baulig  <martin@ximian.com>
675
676         * debug-mini.c (mono_init_debugger): New function to initialize
677         the debugger.  This is not in the debugger since it needs to
678         access some of mini's internals.
679
680 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
681
682         * mini.c (mono_method_to_ir): inlining fixes/cleanups
683
684 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
685
686         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
687         for value type handling.
688
689 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
690
691         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
692         (mono_method_check_inlining): enable inlining of all kinds of wrappers
693
694 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
695
696         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
697           the constructor through a proxy.
698
699 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
700
701         * jit-icalls.c, inssel.brg: fixes to array element address
702         calculations.
703
704 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
705
706         * mini-x86.c (is_regsize_var): allocate pointer to registers
707
708 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
709
710         * driver.c: fixed typo, added intrins to the set of optimizations
711         tested with regressions.
712
713 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
714
715         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
716         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
717         test case.
718
719 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
720
721         * inssel.brg: remove some common pop instructions without side effects
722
723 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
724
725         * inssel-x86.brg: fixed thinko in int to double conversions.
726
727 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
728
729         * mini.c, jit-icalls.c: added runtime thread-static variable support.
730
731 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
732
733         * inssel-long32.brg: two more missing instructions.
734
735 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
736
737         * mini.c (mono_emit_call_args): set the cil_code for all arguments
738         if not already set.
739
740 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
741
742         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
743         correctly.
744
745         * basic-float.cs: Added tests for negative zero.
746
747 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
748
749         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
750         a couple of missing operations for long casts, with test cases.
751
752 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
753
754         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
755
756 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
757
758         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
759         code size estimation.
760
761 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
762
763         * mini.c (mono_jit_create_remoting_trampoline): make it work with
764         abstract methods (fix bug 42542)
765
766         * aot.c: add ability to handle array types
767         
768 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
769
770         * mini.c: Call the _specific versions of the object allocation
771         functions if possible.
772
773 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
774
775         * driver.c: call setlocale ().
776
777 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
778
779         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
780         windows build.
781
782 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
783
784         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
785
786         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
787         wrappers (fix bug 42122)
788
789 2003-05-04  Martin Baulig  <martin@ximian.com>
790
791         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
792
793         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
794         s/mini_set_defaults/mono_set_defaults/g.
795
796 2003-05-04  Martin Baulig  <martin@ximian.com>
797
798         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
799
800 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
801
802         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
803         (reported by Don Roberts).
804
805 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
806
807         * mini.c: temporarily work around two bugs for this release.
808
809 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
810
811         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
812         that contains -export-dynamic and it makes using the ld script
813         useless.
814         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
815
816 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
817
818         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
819         specific cpu.
820
821 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
822
823         * mini.c: make sure leave calls all the needed finally blocks,
824         even when the target jumps out of multiple exception clauses.
825
826 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
827
828         * ldscript, Makefile.am: add linker script to reduce the number of
829         exported symbols (should also fix the issues with libwine defining
830         some of the same symbols in io-layer).
831
832 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
833
834         * driver.c (mini_main): Avoid assertion when no file name is given on 
835         the command line.
836
837 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
838
839         * driver.c: added --version/-V command line option.
840         Added the inline optimization in the regression tests.
841
842 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
843
844         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
845         to the type in the method signature (fixes bug#42134).
846
847 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
848
849         * mini.c: when inlining, check this is not null only when needed (bug #42135).
850
851 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
852
853         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
854
855 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
856
857         * driver.c: fixed bug #42100.
858
859 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
860
861         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
862
863 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
864
865         * mini.c: moved most of the code required to do inlining to its own
866         function so it can be reused. Inline also ctors if appropriate.
867
868 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
869
870         * Makefile.am: Link with -export-dynamic so shared libs loaded by
871         the runtime can call mono API functions.
872
873 2003-04-27  Martin Baulig  <martin@ximian.com>
874
875         * debug-mini.c (mono_debug_init_method): Added
876         `guint32 breakpoint_id' argument; if the method has a breakpoint,
877         send a notification to the debugger.
878
879         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
880         running in the Mono Debugger, just pass the breakpoint number to
881         mono_debug_init_method().
882
883         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
884
885 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
886
887         * mini.c: allow some more unsafe compares.
888
889 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
890
891         * mini-x86.c, Makefile.am: make distcheck works (partially from
892         a patch by Richard Lee <r.h.lee@attbi.com>).
893         * regset.c, regset.h: removed, they are unused.
894
895 2003-04-25  Dick Porter  <dick@ximian.com>
896
897         * driver.c: Usage reports the name as 'mono' not 'mini'
898         * exceptions-x86.c: Build and run on freebsd
899
900 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
901
902         * Makefile.am: install the program with the 'mono' name and
903         the library as libmono instead of mini and libmini.
904
905 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
906
907         * driver.c: provide the APIs for the embedding interface of the old jit.
908
909 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
910
911         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
912
913 2003-04-23  Martin Baulig  <martin@ximian.com>
914
915         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
916
917         * driver.c: Added `--debug' command line argument to enable
918         debugging support.
919
920 2003-04-23  Martin Baulig  <martin@ximian.com>
921
922         * debug.[ch]: Removed.  The code is now in
923         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
924
925         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
926         last six months.
927
928 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
929
930         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
931
932 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
933
934         * mini.c:
935         (mini_cleanup): moved mono_runtime_cleanup call after the call to
936         mono_domain_finalize.
937         (mini_method_compile): use mono_method_profile* if the the option is
938         enabled.
939
940 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
941
942         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
943         methods with their wrapper.
944
945         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
946         methods with their wrapper.
947
948         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
949         their wrapper.
950
951         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
952         wrapper.
953
954         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
955         methods.
956
957 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
958
959         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
960
961 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
962
963         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
964         of the mempool. This is slightly faster and uses less memory
965
966 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
967
968         * mini.c: avoid O(n) allocation for variables.
969
970 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
971
972         * mini.c: handle items on the stack after inlining methods.
973
974 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
975
976         * mini.c: make the method->opcode optimization dependent
977         on MONO_OPT_INSTRINS and do it lazily.
978
979 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
980
981         * driver.c: print overall results at the end of regression run.
982
983 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
984
985         * inssel.brg: don't overwrite symbolic registers.
986
987 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
988
989         * inssel-x86.brg: fix conversion from long to float.
990
991 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
992
993         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
994
995 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
996
997         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
998
999         * driver.c: Added --print-vtable option as in the old JIT.
1000
1001 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
1002
1003         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
1004
1005 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
1006
1007         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
1008
1009 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
1010
1011         * mini.c regalloc.c regalloc.h: Fix memory leak.
1012
1013 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
1014
1015         * aot.c (mono_aot_get_method): register all used strings
1016
1017 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
1018
1019         * mini.c: always intern strings references with ldstr at compile time.
1020
1021 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
1022
1023         * Makefile.am: add BUILT_SOURCES.
1024
1025 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
1026
1027         * driver.c: give a better error message when the assembly to execute
1028         doesn't have an entry point.
1029
1030 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
1031
1032         * Makefile.am: added hack for automake
1033
1034         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
1035         correct sematics.
1036
1037         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
1038
1039 22003-04-07  Martin Baulig  <martin@ximian.com>
1040
1041         * Makefile.am: Added Makefile.am.
1042
1043         * debugger-main.c: Removed, this is now in the debugger where it
1044         belongs.
1045
1046         * mini.pc.in: Call this package `mini' for the moment.
1047
1048
1049