2007-04-06 Andreas Faerber <andreas.faerber@web.de>
[mono.git] / mono / mini / ChangeLog
blob5a17ef2d3838d81508541fcbd11e059aead73428
1 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
3         * mini-amd64.h: fix for assertion failure on Solaris/amd64
5 2007-04-11  Martin Baulig  <martin@ximian.com>
7         * mini.c (can_access_member): Fix handling of generic classes;
8         fixes #81259.
10 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
12         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
14 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
16         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
18 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
20         * mini-codegen.c: make sure the right spill amount is
21         used for fp or integer registers (fixes the float_sub_spill() on ppc).
23 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
25         * mini-ppc.c: fixes for the fp_branch_nan test.
27 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
29         * basic.cs: Comment out new test which still fails on ia64.
31 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
33         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
35 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
37         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
39 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
41         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
42         on 64 bit machines. Fixes part of #80738.
44         * basic.cs: Add regression test.
46 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
48         * inssel.brg basic.cs: Revert previous change to fix build.
50         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
51         platforms.
52         
53         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
55         * basic.cs: Add new regression test.
57 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
59         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
60         many arguments.
62 2007-03-16  Neale Ferguson <neale@sinenomine.net>
64         * cpu-s390x.md: Correct length of break instruction.
66 2007-03-16  Neale Ferguson <neale@sinenomine.net>
68         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
69         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
71 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
73         * *.c: Begin WIN64 port.
74         * mini.c:  Use correct register in profiler.
75         * mini-amd64.c: No inline assembly on Win64.
76         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
77         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
78         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
79         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
80         mono_arch_ip_from_context for Win64.
81         
82         Contributed under MIT/X11 license.
84 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
86         * exceptions-amd64.c (seh_handler): Ditto.
88         * exceptions-x86.c (seh_handler): Fix a memory leak.
90 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
92         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
93         mini-s390x.c: fixed peephole optimizations to deal
94         correctly with 1 and 2 byte reload avoidance.
96 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
98         * cpu-s390.md, cpu-s390x.md: update localloc length.
100 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
102         * cpu-g4.md: added missing descriptions.
104 2007-03-14  Miguel de Icaza  <miguel@novell.com>
106         *  Makefile.am: Add support so the tail tests are not executed on
107         PowerPC as that is a known limitation of the PowerPC port.
109 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
111         * runmdesc.bat:  Move to msvc directory.
112         
113 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
115         * runmdesc.bat:  Run executable that was produced by the current
116         target and sent via an argument.
117         
118 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
120         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
121         #81102.
123         * generics.2.cs: Add regression test.
125 2007-03-09  Wade berrier  <wberrier@novell.com>
127         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
129 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
131         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
132         AOT code depends on this.
134 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
136         * mini.c: more precise tracking of types in the eval stack
137         (part of fix for bug #81044).
139 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
141         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
143         * aot-compiler.c (encode_patch): Remove an obsolete comment.
145 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
147         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
149         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
151 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
153         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
154         a pointer on 64 bit systems. Fixes #80190.
156         * iltests.il: Add new regression test.
158 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
160         * mini.c: inline a constant for Environment.IsRunningOnWindows.
162 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
164         * trace.c: Remove an erroneous alignemnt check when tracing.
165           Fixes --trace on OSX86.
167 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
169         * mini-$(arch).h: initialize SP in context for all the archs.
171 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
173         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
174         regressions in the thread tests.
176 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
178         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
179         - fixed implementation of LOCALLOC opcode
180         - implemented non-un compare for floats
181         - code cleanup
182         - implementation of FDIV and CKFINITE opcodes
183         - fixes for latest mono updates
184         - additional arch opcodes
186 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
188         * Makefile.am: simplify and merge rules for cross-compilation.
190 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
192         * local-propagation.c: Actually *apply* the fix for bug 80591...
194 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
196         * mini-exceptions.c: backuot part of the last change
197         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
199 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
200         * inssel.brg: Fix bug 59286.
203 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
205         * mini-exceptions.c: patch from Zoltan to correctly check for
206         stack boundaries (using the stack register, not the frame register),
207         fixes bugs #80724, #79717.
209 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
211         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
212         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
214         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
215         presence of frame pointer elimination.
217 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
218         
219         * mini-x86.h: NetBSD UCONTEX_REG defines.
221 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
223         * inssel-amd64.brg: Fix amd64 build.
225 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
227         * mini.h: remove extern to workaround what looks likes gcc bug 26905
228         on amd64.
230 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
232         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
233         ends.
235         * mini-<ARCH>.c: Use mono_is_regsize_var ().
237 2007-01-30 Mark Mason <mason@broadcom.com>
239            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
240            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
241            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
242            beginning support for CEE_JMP [not quite working yet]
243            * tramp-mips.c: LMF handling now works
244         
245 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
247         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
249         * mini.h (NULLIFY_INS): New macro.
251 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
253         * mini.c: statistical profiler fix for windows, patch
254         from Tor Lillqvist (tml@novell.com).
256 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
257         * local-propagation.c: Fix bug 80591.
259 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
261         * Makefile.am: put back the --export-dynamic option as with
262         the previous gmodule flags (thanks to Robert Jordan).
264 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
266         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
268         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
269         simplify and speed up the local register allocator. Also rename some fields
270         like iassign->vassign.
271         
272         * regalloc.c: Remove some functions which are no longer used since their
273         inlined version is in mini-codegen.c.
274         
275         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
277         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
279 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
281         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
282         narrowing. Fixes #80622.
284         * iltests.il: Add new regresssion test. 
286 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
288         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
289         debug-debugger.c, debug-debugger.h: warning fixes.
290         * driver.c: updated copyright year and made it fit in one line.
292 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
294         * aot-runtime.c: updated to use mono-dl instead of gmodule.
296 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
298         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
300         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
302         * iltests.il: Add new test for bug #80507.
304 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
306         * mini-arm.h: use soft-float also on vfp for now.
308 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
310         * mini.c: fix some more soft-float issues.
312 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
314         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
316 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
317         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
318         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
319         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
321 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
323         * mini-arm.c: typo fix.
325 2007-01-23  Neale Ferguson <neale@sinenomine.net>
327         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
329 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
331         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
332         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
334         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
336         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
338         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
339         
340         * inssel.brg: Fix a warning.
342         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
344         * abcremoval.c ssa.c ssapre.c: Update after this change.
345         
346         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
348         * dominators.c (df_set): Use mono_bitset_union_fast.    
350 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
352         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
353         mini-codegen.c: reduce relocations and memory usage for the cpu
354         description.
356 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
358         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
360         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
361         to reduce their size.
363 2007-01-19 Mark Mason <mason@broadcom.com>
365         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
366         * mini-mips.c: more configuration macros, support long conditional branches, additional
367         asserts, fix epilog instrumentation.
368         * mini-mips.h: use standard stack walk
369         * cpu-mips.md: increase size of div, rem and conditional branches
370         
371 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
373         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
374         to cpu spec data.
376 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
378         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
379         (compile_method): Ditto.
381         * aot-runtime.c (decode_klass_info): Ditto.
383         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
384         needed by the code generated by inssel.brg. Also fix a warning.
386 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
388         * mini.c: deal with enums that become genericinsts by
389         being nested in a generic class (bug #79956).
391 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
393         * mini.c: match the generic definition to check for
394         private access with generic types (bug #78431).
396 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
398         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
399         to make life easier for people cross-compiling that insist on not
400         using scratchbox.
402 2007-01-17 Mark Mason <mason@broadcom.com>
404         * inssel-long.brg: patch to deal with mips missing flags
405         * inssel-long32-mips.brg: implement overflow checks
406         * insset-mips.brg: implement overflow checks
407         * mini-mips.h: implement conditional exception handling
408         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
409           Remove unused code, minor cleanups.
410         * exceptions-mips.c: minor cleanups
411         * mini-ops.h: add mips conditional exception ops
412         * cpu-mips.md: add mips conditional exception ops
414         
415 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
417         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
418         to deal with mips missing of flags.
420 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
422         * exceptions-ppc.c: execute fault handlers.
424 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
426         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
428 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
430         * mini.c: handle also floating point values in initialize_array.
432 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
434         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
435         array initialization and make it conditional on the intrins option.
437 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
439         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
440         relocations and put the patch info names close to the enum definition.
442 2007-01-15 Mark Mason <mason@broadcom.com>
444         * basic.cs, exceptions.cs: break up large tests to increase debugability.
446 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
448         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
450 2007-01-12  Raja R Harinath  <rharinath@novell.com>
452         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
454 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
456         * Makefile.am: distribute the mips sources.
458 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
460         * mini-codegen.h: handle bug #80489 here, by excluding ecx
461         directly.
463 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
465         * cpu-x86.md: back out for now as this triggers other regressions.
467 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
469         * cpu-x86.md: force src1 and dest regpair for long shift instructions
470         to eax:edx, so ecx can't get allocated to them (bug #80489).
472 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
474         * mini.c, mini-exceptions.c: enabled running fault handlers
475         (bug #80469).
477 2007-01-03  Miguel de Icaza  <miguel@novell.com>
479         * driver.c: If nothing fail, do not use the string "failed",
480         because it makes it very annoying to view test result logs on the
481         web. 
483 2006-12-30  Miguel de Icaza  <miguel@novell.com>
485         * debug-debugger.c (mono_debugger_main): Rename "main" to
486         "main_method" to prevent a warning.
488         Remove a warning for unused field.
490 2006-12-28  Martin Baulig  <martin@ximian.com>
492         * debug-debugger.c
493         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
495 2006-12-22  Martin Baulig  <martin@ximian.com>
497         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
498         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
499         seperate `.mdb_debug_info' section, so we can access it from the
500         debugger even if the binary is stripped.
502         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
503         from the `.mdb_debug_info' here to prevent the linker from
504         removing that section.
506         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
507         mdb-debug-info64.s.
509 2006-12-19  Robert Jordan  <robertj@gmx.net>
511         * mini-x86: enable the code to return small structures in
512         registers for FreeBSD as well. Fixes bug #80278.
513         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
515 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
517         * mini-x86.c: align the stack when calling the profiler
518         function instrumenting the prolog (on OSX).
520 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
522         * mini.c: emit a break opcode where Debugger.Break () is called.
524 2006-12-13  Miguel de Icaza  <miguel@novell.com>
526         * mini.c (mono_method_to_ir): Provide useful information on this
527         assert, to prevent others from debugging like I did.
529 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
531         * mini.c: enable code which was incorrectly commented
532         (bug #80235).
534 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
536         * mini-x86.c: enable on OSX, too, the code to return small
537         structures in registers.
539 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
541         * mini-x86.c: remove the use of the dynamic code manager here, too.
543 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
545         * mini.h, debug-debugger.c, tramp-*.c: fixed 
546         mono_debugger_create_notification_function() to use
547         mono_global_codeman_reserve () instead of a dynamic code manager.
549 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
551         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
552         ves_array_element_address() jit icall and use a generated
553         managed method instead (which is about 4 times faster for a rank 3
554         array access).
556 2006-11-29  Mark Mason  <mason@broadcom.com>
558         * basic-calls.cs: additional tests for passing
559         structures as function arguments.
561 2006-11-29  Mark Mason  <mason@broadcom.com>
563         * mini-mips.h: disable custom exception handling
564         * mini-mips.c: throw/rethrow should use jalr to call
565         exception stubs.  Fixed bug with passing structures
566         by value. More support for tracing floating point
567         functions.
569 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
571         * mini.c: fixed typo in the soft-float ldind.r4 handling
572         (bug #80086).
574 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
576         * mini.c, mini.h, driver.c: added --runtime command line
577         option to select a different runtime than the autodetected one.
578         * jit.h: added API for embedders to initialize with a specific
579         runtime version.
581 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
583         * mini.c: handle also boxing of r4 values (bug #80024).
585 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
587         * mini-ppc.c: force indirect calls until we reserve
588         enough address space for all the generated code.
590 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
592         * exceptions-arm.c: workaround bugs in the libc definition
593         of struct ucontext.
595 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
597         * inssel.brg: fixes from me and Mark Mason.
599 2006-11-23  Dick Porter  <dick@ximian.com>
601         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
602         semaphore display now we've fixed the initial value
604 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
606         * inssel.brg: partially revert the last change to fix the build.
608 2006-11-21  Mark Mason  <mason@broadcom.com>
610         * inssel.brg: Add and use compare-and-branch macros to support
611         architectures that do not have condition code registers (ie. MIPS).
612         * *-mips.{c,brg,md}: Fix copyright statements
614 2006-11-20  Mark Mason  <mason@broadcom.com>
616         * Makefile.am: remove mini-codegen.c from list of MIPS sources
617         * mini.c: Allow GET_CONTEXT to be specified by the arch port
618         * mini.h: Added declaration for mono_print_ins()
619         * mini-codegen.c: added ins_spec initializer for MIPS
620         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
621         vreg to be virtual and hreg to be non-virtual.
622         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
623         is not yet working/implemented correctly.
624         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
625         non-static, fixup calls to print_ins() from other parts in the file.
627 2006-11-20  Mark Mason  <mason@broadcom.com>
629         * basic-calls.cs: added tests for passing structures as arguments
630         to calls.
632 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
634         * inssel-long32.brg: optimize signed division by power of two.
636 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
638         * mini-arm.c: added support for interworking with thumb code
639         (mono must be still be built using the ARM instruction encoding).
641 2006-11-19  Miguel de Icaza  <miguel@novell.com>
643         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
644         verifier has different rules for it.   Fixes a few verifier issues
645         in the test suite.
647         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
648         at the end, so people know what happened.
650 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
652         * brach-opts.c: in optimize_exception_target() make sure we
653         are in a catch clause (fixes bug #79871).
655 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
657         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
658         more soft-float support fixes.
660 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
662         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
663         that are passed half on the stack and half in registers.
665 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
667         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
668         more mips integration work from Mark E Mason 
669         <mark.e.mason@broadcom.com>.
671 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
673         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
674         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
675         tramp-mips.c: added sources for the mips port, not
676         integrated in the build yet. Contributed by
677         Mark E Mason <mark.e.mason@broadcom.com>.
679 2006-11-14  Neale Ferguson <neale@sinenomine.net>
681         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
683 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
685         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
686         put the soft-float rules in its own file since it seems to
687         break s390 compilation.
689 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
691         * mini-arm.c: fixed wrnings.
693 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
695         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
696         inssel-arm.brg: ARM support for soft-float.
698 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
700         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
701         loads and stores of 32 bit fp values.
703 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
705         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
707         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
708         works. Fixes #79852 and #79463.
710 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
712         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
713         more soft-float support WIP and fixes.
715 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
717         * mini-arm.c: some VFP updates.
719 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
721         * mini-exceptions.c: 0 is a valid local var offset in some
722         architectures, don't assert (bug #78508).
724 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
726         * exceptions-arm.c: fixed off by one error in stack walk code.
728 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
730         * mini.h, mini.c: more precise tracking of type load exceptions.
732 2006-11-03  Robert Jordan  <robertj@gmx.net>
734         * Makefile.am: [WIN32] Add monow.exe target.
735         * driver.c: [WIN32] Don't detach the console when debugging.
736         Fixes bug #79797.
737         
738 2006-10-30  Miguel de Icaza  <miguel@novell.com>
740         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
742 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
744         * aot-compiler.c (emit_method_info): Add a case missed earlier.
746         * driver.c (mini_regression): Fix --regression with AOT.
748         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
750 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
752         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
754         * mini-sparc.h: Don't use sigaction on sparc/linux.
756         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
758         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
760         * mini-exceptions.c: Add proper include files for getpid ().
762 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
764         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
765         address instead of a MonoJitInfo* to avoid decoding the exception info for the
766         method.
768         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
769         name cache to reduce its size.
771         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
773 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
775         * mini-x86.c: Save/restore the current LMF structure more efficiently using
776         the mono_lmf TLS variable.
778         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
779         trampoline lmf frames.  
781         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
783 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
785         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
786         the mono_lmf TLS variable.
788         * mini-exceptions.c: Access the LMF structure through accessors.
790         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
791         variable instead of in jit_tls->lmf.
793         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
794         
795         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
796         trampoline lmf frames.
798         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
800 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
802        * mini.c trace.c mini-x86.c: Revert these too.
803         
804        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
805        signature change.
807 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
809         * genmdesc.c: removed now dead code.
811 2006-10-09  Robert Jordan <robertj@gmx.net>
813         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
815 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
817         * mini.h: do not leave gaps in the opcode values.
819 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
821         * jit-icalls.h: flag functions as internal here, too.
823 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
825         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
826         functions with the internal attribute.
828 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
830         * aot-compiler.c: fclose the file descriptor in the profile read loop.
832 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
834         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
835         for soft-float.
837 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
839         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
840         tail calls as on other platforms.
842         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
844         * iltests.il: Add a few tailcall tests.
846 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
848         * driver.c: fix loop for old compilers (bug #79521).
850 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
852         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
854         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
856         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
857         metadata without any code.
859         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
860         more precise debugging information using gdb.
862 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
864         * inssel-ia64.brg: Make the helper methods static.
866 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
868         * inssel-x86.brg: make the helper methods static.
870 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
872         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
874 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
876         * mini.c: updates for monoburg changes.
877         * inssel.brg: make a few helper functions static as they should.
879 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
881         * Makefile.am: Move mini-codegen.c to common_sources.
883 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
885         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
886         instructions.
887         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
888         mini-ppc.h: port to use the common local register allocator.
890 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
892         * mini.h: Remove the comment too then.
894 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
896         * mini.h: put back backend.data which is to be used shortly and
897         doesn't increase the size of MonoInst. If any 64 bit arch aligned
898         pointers on 4 byte boundaries it'd have much bigger issues running
899         and you can ifdef it out anyway.
901 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
903         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
904         MonoInst size by 4 bytes on 64 bit machines.
906 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
908         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
909         replacement with more meaningful field names. Arch maintainers, please
910         check the assigned names are good enough for your arch.
912 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
914         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
915         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
917 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
919         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
920         relocations and memory requirements, put the optimization flags
921         definitions in their own file.
923 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
925         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
927         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
929 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
931         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
933 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
935         * inssel.brg: use the correct function to get the size of an item
936         in an array, given an element class.
937         * aot-compiler.c: do not access class->class_size directly.
939 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
941         * mini.h, debug-mini.c: added a debugging function to print
942         info about local variables and arguments in a jitted method.
944 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
946         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
948         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
950 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
952         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
953         inner and outer loops when passing vtypes.
955 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
957         * mini-ppc.c: take into account the cpu errata for cache flushing
958         which caused some random errors (bug #79381).
960 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
962         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
963         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
965 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
967         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
968         loaded.
970         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
971         freebsd ports tree.
973         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
974         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
976         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
977         displacement.
979 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
981         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
983 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
985         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
986         macro does not have to be changed during debugging.
988         * cpu-alpha.md inssel-alpha.brg mini-alpha.h mini-alpha.c exceptions-alpha.c tramp-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
990         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
992         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
993         
994         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
995         MONO_ARCH_NO_EMULATE_MUL is defined.
997         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
999         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
1001         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
1003         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
1004         
1005 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
1007         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
1008         stuff to mini-exceptions.c where it is used.
1010         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
1011         setup code, the real one is in mini-exceptions.c.
1013         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
1014         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
1015         some changes from the freebsd ports tree.
1017         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
1018         constants.
1019         
1020         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
1022 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
1024         * mini.c: on Linux, check for /proc to be mounted
1025         (bug# 79351, novell bug#201204).
1027 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
1029         * mini.c: handle cases where pthread_attr_getstack() behaves
1030         incorrectly (bug #78096).
1032 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
1034         * mini-arm.c: support larger stack frames (bug #79272).
1036 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
1038         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
1040         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
1041         tokens.
1043         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
1044         mono_class_from_name () to find a class from its name.
1046         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
1048 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
1050         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
1052 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
1054         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
1056 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
1058         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
1059         callinfo->trampoline.
1061         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
1062         fixes #79271.
1063         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
1064         future.
1066 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
1068         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
1070 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
1072         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
1073         stats.method_trampolines, it is already done by the generic trampoline code.
1075         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
1076         
1077 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
1079         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
1081         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
1083         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
1085         * mini.c (print_jit_stats): Print mscorlib mempool size too.
1086         
1087         * mini.c (print_jit_stats): Print new stats.
1089         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
1091 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
1093         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
1094         Address on two dimensional arrays. Fixes #78729.
1096         * mini.h (MonoCompile): Add a 'skip_visibility' field.
1098         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
1099         a method.
1101         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
1103         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
1104         #79130.
1105         
1106         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
1107         a race condition.
1108         (mini_get_ldelema_ins): Ditto.
1110 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
1112         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
1113         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
1114         Fixes #79213.
1116 2006-08-29 Neale Ferguson <neale@sinenomine.net>
1118         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
1119         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
1121         * exceptions-s390x.c: Cosmetic change.
1123         * tramp-s390.c: Fix warning.
1125         * cpu-s390.md: Correct length of mul_imm.
1127 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
1129         * aot-compiler.c: added binary writer with ELF backend
1130         implementation (only on Linux/x86 for now).
1132 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
1134         * Makefile.am: Don't run net 2.0 AOT tests.
1136         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
1137         (mono_compile_assembly): Skip net 2.0 assemblies as well.
1139         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
1141 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
1143         * aot-compiler.c: simplified and refactored the asm-writing code
1144         to allow different backends.
1146 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
1148         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1150         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
1151         little. Share patches of type TYPE_FROM_HANDLE as well.
1153         * mini.c (mono_patch_info_equal): New helper function.
1154         (mono_patch_info_hash): Ditto.
1156         * aot-compiler.c (emit_method_code): Fix s390 build.
1158         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
1159         is not handled because it is stored as a flag and not as a type ctor. Fixes
1160         #79016.
1162 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
1164         * aot-compiler.c: Fix computation of GOT slot statistics.
1165         
1166         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
1167         Also remove support for not PIC AOT.
1169         * mini.h: Bump AOT file format version.
1171         * objects.cs: Add a test for #78990.
1173         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
1174         (peter.dettman@iinet.net.au). Fixes #79087.
1176         * basic-long.cs: Add a test for the above.
1178 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
1180         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
1181         
1182         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
1183         code somewhat.
1185 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
1187         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
1188         exceptions.
1190 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
1192         * mini.c: Don't verify COM proxy invoke calls
1193         
1195 2006-08-10  Dick Porter  <dick@ximian.com>
1197         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
1198         which process is holding semaphores locked.
1200 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
1202         * mini-ia64.c mini-amd64.c: Fix #79027.
1204         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
1206         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
1208         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
1209         implicit arguments in a vararg call. Fixes #79027.
1211 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
1213         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
1214         (mono_get_array_new_va_signature): Ditto.
1216 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
1218         * aot-runtime.c: Call init_plt lazily.
1220         * inssel-long.brg: Fix unsigned long->int conversion.
1222         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
1224         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
1225         that most data is now in the .rss/.data section.
1227 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
1229         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
1231         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
1233         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
1235         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
1237         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
1238         virtual call. Fixes #79010.
1240         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
1241         and use the result as the this argument in the real call.
1243         * generics.2.cs: Add a new test for #79010.
1244         
1245 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
1247         * mini-x86.c: Fix a warning.
1249         * aot-compiler.c: Add a bunch of statistics.
1251         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
1253 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
1255         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
1257 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
1259         * cpu-alpha.md inssel-alpha.brg mini-alpha.h mini-alpha.c exceptions-alpha.c tramp-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
1261 2006-07-13  Miguel de Icaza  <miguel@novell.com>
1263         * mini.c (mono_method_to_ir): Obtain the original method in the
1264         CIL stream and use this to perform validation.
1266         Fixed: #78816
1268 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
1270         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
1271         (mono_arch_call_opcode): Ditto.
1273         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
1274         #78826.
1276         * mini.c (mono_patch_info_dup_mp): New helper function.
1277         
1278         * aot-compiler.c (compile_method): Fix some of the memory allocated during
1279         compilation. Fixes #78827.
1281 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
1283         * declsec.c: Use original security informations for
1284           MONO_WRAPPER_MANAGED_TO_MANAGED.
1286 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
1288         * mini.c: Allow Com Interop methods/classes and
1289         don't verify COM wrapper calls
1290         
1292 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
1294         * inssel-long32.brg: Fix long->i4 checked conversion.
1296         * exceptions.cs: Add a test for the above.
1298 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
1300         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
1302         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
1303         leaks.
1305         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
1306         #78775.
1308 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
1310         * mini.c: Fix solaris/x86 exception handling.
1312         * Makefile.am: Get rid of $(ICU_LIBS).
1314 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
1316         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
1317         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
1318         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
1320         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
1322         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
1323         this function causes a SIGSEGV.
1325 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
1327         * mini.c: Remove unused solaris/x86 includes.
1329 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
1331         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
1333 2006-06-20  Jb Evain  <jbevain@gmail.com>
1335         * cpu-g4.md: fix max length of start_handler instruction.
1337 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
1338         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
1340 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
1341         * ssa.c: Fixed bug 78653 for SSA based deadce.
1342         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
1343         MonoInst.flags, used in SSA based deadce.
1344         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
1345         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
1347 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
1349         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
1350         it can end up using non executable memory on ppc64 systems
1351         running ppc32 userspace (fix from Johannes Berg).
1353 2006-06-14  Dick Porter  <dick@ximian.com>
1355         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
1356         4.1.1
1358 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
1359         * mini.c: Made so that inline is locally disabled if it would
1360         trigger a .cctor, because too many apps depend on this behavior
1361         (which seems to be also the one of the MS CLR).
1363 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
1365         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
1366         No idea why this worked before.
1368         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
1369         which branch to outer exception clauses since they could skip the
1370         inner finally clauses. Fixes #78633.
1372         * exceptions.cs: Add a test for the above.
1374         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
1375         Fixes #78629.
1377         * iltests.il: Add a test for the above.
1379 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
1381         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
1382         after the end of a try bblock, to prevent asserts in mini_method_compile ().
1384         * iltests.il: Add a test for the above.
1386 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
1388         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
1389         
1390         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
1391         methods as instrinsics.
1393 2006-06-09  Wade Berrier <wberrier@novell.com>
1395         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
1396         (simple-cee-ops.h ssapre-mini-ops.h)
1398 2006-06-09  Neale Ferguson <neale@sinenomine.net>
1400         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
1401         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
1402         instruction).
1403         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
1404         * cpu-s390x.md: Fix max. length values for a couple of instructions.
1406 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
1408         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
1410 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
1412         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
1413         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
1414         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
1415         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
1416         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
1417         of opcodes, so that bug 78549 should not happen again.
1418         * ssapre.c: Updated to use the renamed files.
1420 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
1422         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
1423         in OP_ATOMIC_EXCHANGE_I4.
1425 2006-06-07  Wade Berrier <wberrier@novell.com>
1427         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
1428         in mono_debugger_create_notification_function)
1430 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
1432         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
1433         
1434         * mini.c (type_from_stack_type): Disable some changes which do not
1435         seem to work.
1437         * driver.c: Reenable opts.
1439         * mini.h (MonoStackSlot): New structure to keep track of the verification state
1440         of the evaluation stack.
1441         
1442         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
1443         evaluation stack trace at entry to the bblock.
1445         * mini.c (merge_stacks): New function to perform verification of stack merges.
1446         Turned off by default.
1448         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
1449         STACK_MP.
1450         
1451 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
1453         * local-propagation.c: Fixed bug 78549.
1455 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
1457         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
1459 2006-06-02  Miguel de Icaza  <miguel@novell.com>
1461         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
1462         tramp-arm.c, tramp-ia64.c
1463         (mono_debugger_create_notification_function): Update signature to
1464         new signature and use new protocol for creating the notification
1465         function.  
1467         Should fix the build.
1469 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
1471         * exceptions-ppc.c (mono_jit_walk_stack)
1472         (ves_icall_get_frame_info): Fix the build
1474 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
1476         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
1478 2006-05-31  Raja R Harinath  <rharinath@novell.com>
1480         * il2tests.2.il: New file for generics CIL tests.  Add test for
1481         #78019.
1482         * Makefile.am: Update.
1484         Fix #78019
1485         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
1486         to nullable types.
1488 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
1490         * aliasing.c: Fixed bug 78311.
1492 2006-05-29  Martin Baulig  <martin@ximian.com>
1494         * mini-exceptions.c (mono_find_jit_info): When computing the
1495         native offset, check whether we're actually inside the method's
1496         code; call mono_debug_print_stack_frame() to format the frame.
1497         (ves_icall_System_Exception_get_trace): Call
1498         mono_debug_print_stack_frame() to format the stack frame.
1499         (ves_icall_get_trace): Update to the new debugging API.
1500         (mono_jit_walk_stack_from_ctx): Likewise.
1501         (ves_icall_get_frame_info): Likewise.
1503         * mini.c (get_method_from_ip): Use the new debugging API.
1504         (mono_print_method_from_ip): Likewise.
1506         * exceptions-ppc.c
1507         (mono_jit_walk_stack): Use the new debugging API.
1508         (ves_icall_get_frame_info): Likewise.   
1510 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
1512         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
1514 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
1516         * mini.c: Added "limitator" to inline for debugging.
1518 2006-05-24  Martin Baulig  <martin@ximian.com>
1520         * debug-debugger.c (mono_debugger_init): Create a private,
1521         malloc()-based code manager for the notification function and
1522         intentionally leak it on exit.  This fixes the crash-on-exit race
1523         condition.
1525         * tramp-amd64.c
1526         (mono_debugger_create_notification_function): Added
1527         `MonoCodeManager *' argument.
1529         * tramp-x86.c
1530         (mono_debugger_create_notification_function): Added
1531         `MonoCodeManager *' argument.
1533 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
1535         * aliasing.c: Fixed 64 bit issue.
1536         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
1537         default since all known bugs are fixed (one more time!).
1539 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
1541         * mini.c: write barrier support.
1543 2006-05-23  Martin Baulig  <martin@ximian.com>
1545         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
1546         check at the top of the file.
1548 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
1550         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
1551         reverting changes without reason and without changelog entries.
1553 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
1555         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
1556         to a few opcodes. Fixes #78439.
1558         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
1559         consistency with other archs.
1561         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
1563 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
1565         * debug-debugger.c: fix the build.
1567 2006-05-17  Martin Baulig  <martin@ximian.com>
1569         * debug-debugger.c
1570         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
1571         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
1572         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
1573         (debugger_attach): Call GC_mono_debugger_add_all_threads().
1575 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
1577         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
1579 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
1581         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
1582         MONO_TYPE_GENERICINST.
1583         
1584         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
1585         MONO_TYPE_GENERICINST.
1587 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
1589         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
1590         #78325.
1592 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
1594         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
1595         mempool.
1596         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
1598 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
1600         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
1601         mono_trace_cleanup ().
1603         * iltests.il: Fix problem with the newly added test.
1605         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
1606         due to register constraints, free up the previous hreg. Fixes #78314.
1608         * iltests.il: Add new test for #78314.  
1610         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
1611         Interlocked.Add. Fixes #78312.
1613         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
1614         
1615 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
1617         * inssel.brg (mini_emit_virtual_call): Fix a warning.
1619 2006-05-05  Martin Baulig  <martin@ximian.com>
1621         * debug-mini.c (mono_debug_open_block): New method.
1623         * mini-amd64.c
1624         (mono_arch_output_basic_block): Call mono_debug_open_block() at
1625         the beginning of each basic block.
1627         * mini-x86.c
1628         (mono_arch_output_basic_block): Call mono_debug_open_block() at
1629         the beginning of each basic block.
1631 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
1633         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
1634         default until I understand why they break the build on amd64.
1636 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
1638         * mini.c (mini_cleanup): Call mono_cleanup ().
1640         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
1641         errors.
1643 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
1645         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
1646         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
1647         default since all known bugs are fixed, and I cannot reproduce bug
1648         77944... I'm asking Matt Hargett to test again after this commit.
1650 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
1652         * mini-codegen.c: Fixed typo that thrashed inline.
1654 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
1656         * dominators.c (compute_dominators): Avoid using a worklist since
1657         it is not correct in some cases. Instead, iterate over all bblocks as
1658         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
1660 2006-04-28  Miguel de Icaza  <miguel@novell.com>
1662         * mini.c (mono_jit_compile_method_inner): Use
1663         mono_prepare_exception_from_error that resets the value
1664         internally.
1666 2006-04-27  Miguel de Icaza  <miguel@novell.com>
1668         * mini.c: Move the mini_loader_error_to_exception to metadata. 
1669         
1670 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
1672         * aliasing.c: Fixed bug 78210.
1674 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
1676         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
1677         default until all their problems (or the ones they trigger) are fixed.
1679 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
1681         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
1682         
1683         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
1684         as loaded only after resolving patches since that could invoke the same method.
1686         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
1688         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
1689         functions.
1691         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
1692         AOT loader.
1694         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
1695         stack.
1697         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
1698         made from AOT code through the PLT table.
1700         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
1701         holding the plt offset when a call is made to the aot plt trampoline.
1702         
1703 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
1705         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
1706         amd64 AOT support.
1708         * Makefile.am (common_sources): Fix build breakage.
1710         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
1711         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
1712         intra-assembly calls if possible.
1713         
1714         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
1716         * mini-trampolines.c: Handle PLT entries.
1718         * mini.c: Avoid creating a GOT var for calls.
1720         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
1721         from mscorlib code.
1723         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
1724         from mscorlib code.
1726         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
1727         AOT code.       
1729         * mini.h: Bump AOT file format version.
1730         
1731         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
1732         covers more cases.
1734 2006-04-25  Martin Baulig  <martin@ximian.com>
1736         * driver.c: Disable copyprop, consprop and inline when running
1737         inside the debugger.
1739 2006-04-25  Martin Baulig  <martin@ximian.com>
1741         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
1742         with `get_current_thread' and added `detach'.
1743         (MonoDebuggerMetadataInfo): Added `thread_size',
1744         `thread_tid_offset', `thread_stack_ptr_offset' and
1745         `thread_end_stack_offset'.
1747 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
1749         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
1750         aot-runtime.c.
1752         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
1753         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
1755         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
1757         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
1759         * aot.c: Add support for ADJUSTED_IID.  
1761 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
1763         * aot.c (emit_method_order): Don't align method_order_end.
1765         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
1766         the interface ID changes.
1768 2006-04-21  Dick Porter  <dick@ximian.com>
1770         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
1771         cleaning up a thread.  Fixes the new part of bug 77470.
1773 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
1775         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
1776         to managed wrapper.
1777                      
1778 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
1780         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
1781         
1782         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
1783         SIGSEGV. Fixes #78072.
1785         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
1786         unregister our SIGABRT handler.
1788 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
1790         * mini.c: Disabled inline where it can alter the call stack in a
1791         way visible from managed code.
1792         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
1793         default.
1795 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
1797         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
1798         on other platforms. Fixes #78089.
1800 2006-04-13  Martin Baulig  <martin@ximian.com>
1802         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
1803         determine whether we're inside the debugger.
1805         * debug-debugger.h
1806         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
1808 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
1810         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
1811         handler clauses. Fixes #78024.
1813         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
1814         in the CALL_MEMBASE opcodes. Fixes #78088.
1815         (mono_arch_get_vcall_slot_addr): Ditto.
1817 2006-04-10  Martin Baulig  <martin@ximian.com>
1819         * debug-debugger.c: The thread handling code has now been moved
1820         into ../metadata/threads.c.
1822 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
1824         * driver.c (mono_main): Fix --with-gc=none build.
1826         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
1827         (mono_spillvar_offset_float): Ditto.
1828         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
1829         hreg, not when its !global, since on ia64, there is a third category: stacked
1830         registers.      
1832 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
1834         * mini.c: set MonoInst->klass for load field address and a few other
1835         places.
1837 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
1839         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
1841 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
1843         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
1844         the branch opt changes.
1846 2006-04-06  Dick Porter  <dick@ximian.com>
1848         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
1849         
1850         * wapihandles.c (mini_wapi_seminfo): 
1851         * driver.c (mono_main): Add semaphore info option
1853 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
1855         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
1856         branch optimization changes. Fixes #78009.
1858 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
1860         * mini.c: ignore accessibility of methods in managed->native wrappers.
1862 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
1864         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
1865         
1866         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
1868 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
1870         * mini.c: Modify the branch optimizations to preserve the invariant that
1871         the entries inside the in_bb and out_bb arrays are unique.
1872         (mono_unlink_bblock): Avoid creation of new arrays.
1874 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
1876         * mini.c (mono_unlink_bblock): Fix regression caused by previous
1877         change (#77992).
1879 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
1881         * mini.c (optimize_branches): Remove the "optimizations" in
1882         the cbranch1/cbranch2 -> branch cases which were causing several
1883         problems in the past. Fixes #77986.
1885 2006-03-31  Chris Toshok  <toshok@ximian.com>
1887         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
1888         default optimizations :(
1890 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
1892         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
1893         branch.
1895 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
1897         * local-propagation.c: Added comments to structs and removed
1898         "Mono" prefixes from local tree mover types.
1900 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
1902         * Makefile.am (arch_sources): Define this for each architecture so 
1903         libmono_la_SOURCES is defined in one place.
1905 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
1907         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
1908         from handles/.
1910 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
1912         * driver.c: print the GC name supplied by configure.
1914 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
1916         * local-propagation.c: Added tree mover, and moved here all the
1917         local propagation code from mini.c
1918         * mini.c: Added support for treeprop, and moved all the local
1919         propagation code to local-propagation.c
1920         * mini.h: Added support for treeprop
1921         * driver.c: Added support for treeprop, enabled consprop, copyprop,
1922         treeprop, inline and deadce by default
1923         * Makefile.am: Added local-propagation.c
1925 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
1927         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
1929 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
1931         * debug-debugger.c: make it compile without the Boehm GC.
1933 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
1935         * mini.c: fixed issue with mismatch when an icall is registered
1936         with multiple names but same address.
1938 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
1940         * declsec.c, mini-exceptions.c: use write barrier to set reference
1941         fields of managed objects.
1943 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
1945         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
1946         (can_access_internals): Fix a warning.
1948         * mini.c (print_method_from_ip): Rename this to 
1949         mono_print_method_from_ip so it gets exported.
1951         * trace.c: Deal with strings inside StringBuilder's containing garbage
1952         and fix memory leaks. Fixes #77848.
1954 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
1956         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
1957         fixes #77787.
1959 2006-03-16 Neale Ferguson <neale@sinenomine.net>
1960         
1961         * mini-s390.c: Remove OP_X86_TEST_NULL.
1963 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
1965         * mini.c: use the correct GetHashCode() for the moving collector.
1967 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
1969         * liveness.c: Regalloc spill cost tuning.
1971 2006-03-15 Neale Ferguson <neale@sinenomine.net>
1972         
1973         * mini-s390x.h: Correct S390_LONG macro.
1975         * mini-s390x.c: Cleanup unused code.
1977 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
1979         * jit-icalls.h: New file.
1981         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
1982         icalls and include that instead of including jit-icalls.c.
1984         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
1985         OP_X86 opcodes.
1987 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
1989         * mini.c: when checking for member accessibility, also check for
1990         friend assemblies and for explicit interface implementations.
1992 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
1994         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
1996         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
1998         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
1999         common cases are done first.    
2001         * mini-ops.h: Only define platform specific opcodes on the given platform.
2003         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
2004         branch.
2005         
2006 2006-03-14  Martin Baulig  <martin@ximian.com>
2008         Revert Paolo's change from r57348:
2010         * mini.h: don't use gboolean for bitfields.
2011         * mini.c: verifier changes for fields and methods accessibility.
2013 2006-03-13  Neale Ferguson <neale@sinenomine.net>
2015         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
2017         * mini-s390x.c: Fix conv_r_un.
2019         * cpu-s390, cpu-s390x.md: Fix lengths.
2021 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
2023         * mini.c: nested types have access to all the nesting
2024         levels, not just the enclosing types.
2026 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
2028         * mini.c: added a few more verification checks.
2030 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
2032         * liveness.c: Merge optimizations from the linear-il branch.
2034 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
2036         * mini-ia64.c (emit_call): Add a comment.
2038         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
2040         * tramp-ia64.c: Fix some warnings.
2042 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
2044         * mini.h: don't use gboolean for bitfields.
2045         * mini.c: verifier changes for fields and methods accessibility.
2047 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
2049         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
2050         lazy icall wrapper changes.
2052         * dominators.c: Replace all the dominator algorithms with faster
2053         ones from the linear-il branch.
2055         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
2056         the mempool.
2058         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
2059         common cases are done first.
2061         * mini-amd64.c: Fix some warnings.
2063         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
2064         from the mempool.
2066         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
2067         added code.
2069         * mini.h: Add a missing prototype.
2071 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
2073         * mini.c: Compile icall wrappers lazily.
2075         * mini-codegen.c: Use printf instead of g_print since its much faster.
2077         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
2078         function.
2080         * mini.c (optimize_branches): Cache the negative result from 
2081         remove_block_if_useless ().
2083         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
2084         Also fix some bblock linking issues.
2086         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
2087         assembly files.
2089         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
2091         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
2092         accessed fields first, for better cache behavior.
2093         
2094 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
2096         * mini.c: speedup IList<T> array accesses.
2098 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
2100         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
2101         inline_costs counter. Fixes #77190.
2103 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
2105         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
2106         trace messages. Fixes #77706.
2108 2006-03-04  Martin Baulig  <martin@ximian.com>
2110         * tramp-amd64.c, tramp-x86.c
2111         (mono_debugger_create_notification_function): Use
2112         mono_global_codeman_reserve() to allocate a buffer at runtime and
2113         return it.
2115         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
2117         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
2118         notification function at runtime and then call `initialize' in the
2119         `MONO_DEBUGGER__debugger_info' vtable.
2121 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
2123         * iltests.il: Fix a visibility problem.
2125 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
2127         * driver.c, mini.c: add hooks for the counters API.
2129 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
2131         * driver.c: show disabled options.
2133 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
2135         * linear-scan.c: always use cost-driven selection.
2137 2006-02-28  Raja R Harinath  <rharinath@novell.com>
2139         * jit-icalls.c (helper_compile_generic_method): Revert change from
2140         2006-02-24.
2142 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
2144         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
2146 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
2148         * inssel.brg: style fixes, mostly to force the updated monoburg
2149         to run for people using svn.
2151 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
2153         * mini.c: match monoburg changes.
2155 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
2157         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
2158         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
2159         declaration in the header file.
2161 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
2163         * helpers.c: reduce relocations and mem usage.
2165 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
2167         * mini.h, mini-codegen.c: disable logging features if
2168         requested by configure.
2170 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
2172         * mini.c: tiny verifier changes.
2174 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
2176         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
2177         cpu-pentium.md: stack alignment changes for osx/x86,
2178         partially from Geoff Norton <gnorton@customerdna.com>.
2180 2006-02-24  Raja R Harinath  <harinath@gmail.com>
2182         * jit-icalls.c (helper_compile_generic_method): Update to changes
2183         in metadata/class.c.
2185 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
2186         
2187         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
2188         
2189         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
2190         interface calls with large offsets.
2192 2006-02-23  Raja R Harinath  <rharinath@novell.com>
2194         * jit-icalls.c (helper_compile_generic_method): Document the
2195         special-case we depend on so that we can inflate the method twice
2196         with the same context with no bad side-effects.
2198 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
2200         * mini-x86.c, mini-amd64.c: fix for case when xen support
2201         is disabled.
2203 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
2205         * mini-x86.c, mini-amd64.c: generate code to access tls items
2206         in a faster way for Xen systems.
2208 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
2210         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
2211         updates and compilation fixes for the OSX/x86 port, mostly from
2212         Geoff Norton <gnorton@customerdna.com>.
2214 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
2216         * inssel.brg: faster interface call implementation
2217         to sync with the interface_offsets MonoVTable changes.
2219 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
2221         * mini.c: more verification checks.
2223 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
2225         * mini.c: added a few more verification checks.
2227 2006-02-17      Neale Ferguson <neale@sinenomine.net>
2229         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
2230         facility on the processor and use it if available.
2232 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
2234         * driver.c, aot.c, mini.c: throw exception if the IL code is
2235         invalid or unverifiable.
2237 2006-02-17  Raja R Harinath  <rharinath@novell.com>
2239         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
2240         m.StructField.
2242 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
2244         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
2246 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
2248         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
2249         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
2250         handling of instantiated generic valuetypes.
2252 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
2254         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
2255         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
2256         instead.
2258         * generics.2.cs: Revert the nullable reftypes tests.
2260 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
2262         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
2263         using __builtin_frame_address (1) as it doesn't work in the presence
2264         of optimizations. Hopefully fixes #77273.
2266         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
2267         -> generics.cs change as it doesn't work with some automake versions.
2269 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
2271         * mini.c: handle systems that sue a different way to
2272         retrieve the stack address of the current thread.
2274 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
2276         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
2277         it specially in the makefile.
2279         * generics.2.cs: Add tests for nullable reference types.
2281 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
2283         * mini.c: always handle the case when mono_jit_init()
2284         is called in a thread different from the main thread,
2285         confusing libgc (bug #77309).
2287 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
2289         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
2291 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
2293         * mini.c: change optimize_branches () to use a single loop
2294         and introduce a new optimization to simplify some range checks.
2296 2006-02-03  Martin Baulig  <martin@ximian.com>
2298         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
2299         and merged with debugger_thread_manager_add_thread().
2300         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
2301         inform the debugger about the main thread.
2303 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
2305         * basic.cs: Add test for div.un/rem.un constant folding.
2307 2006-02-03  Neale Ferguson <neale@sinenomine.net>
2309         * cpu-s390x.md: correct int_xor_imm length
2311 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
2313         * generics.2.cs: New test for #77442.
2315         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
2316         #77442.
2318 2006-02-02  Martin Baulig  <martin@ximian.com>
2320         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
2321         <mono/metadata/mono-debug-debugger.h>   
2323         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
2325 2006-02-02  Martin Baulig  <martin@ximian.com>
2327         * debug-debugger.h: New header file for debug-debugger.c.
2329         * debug-debugger.c: Big API cleanup; don't run the managed Main()
2330         function is a separate thread anymore; add support for attaching.
2332 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
2334         * tramp-x86.c: Fix a warning.
2336 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
2338         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
2339         on very large methods.
2341         * aot.c (load_patch_info): Fix a warning.
2343 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
2345         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
2346         mini-ops.h: alu membase optimizations.
2348 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
2350         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
2351         to speedup StringBuilder.
2353 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
2355         * dominators.c (mono_compute_natural_loops): Fix detection of
2356         loop body start blocks.
2358         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
2360 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
2362         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
2363         #75145.
2365 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
2367         * aliasing.c: Fixed aliasing issue on 64 bit archs.
2369 2006-01-25  Martin Baulig  <martin@ximian.com>
2371         * debug-debugger.c: Moved the `MonoDebuggerManager' and
2372         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
2373         started to cleanup this file a little bit.
2375 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
2377         * mini.c: optimize a codepath frequently happening in generics code.
2379 2006-01-23  Martin Baulig  <martin@ximian.com>
2381         * Makefile.am: Only compile debug-debugger.c on supported platforms.
2383         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
2384         functions directly.
2386         * driver.c: debug-debugger.c is only available if
2387         `MONO_DEBUGGER_SUPPORTED' is defined.   
2389 2006-01-23  Martin Baulig  <martin@ximian.com>
2391         * debug-debugger.c: Only enable this on platforms where the Mono
2392         Debugger is working (x86 and x86_64).
2394 2006-01-21  Martin Baulig  <martin@ximian.com>
2396         The Mono Debugger is now using the normal `mono' instead of the
2397         `mono-debugger-mini-wrapper' when executing managed code.
2399         * debug-debugger.c: New file; previously known as
2400         debugger/wrapper/wrapper.c.
2402         * debug-mini.c (mono_init_debugger): Removed.
2404         * driver.c (mono_main): Added new `--inside-mdb' command line
2405         argument which is used when running inside the debugger.
2407 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
2409         * liveness.c (mono_analyze_liveness): Remove some unused data
2410         structures.
2412 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
2414         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
2416 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
2418         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
2419         depends on implementation details of monobitset.
2421         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
2422         Fixes #77271.
2424 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
2426         * liveness.c: Update after monobitset changes.
2428 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
2430         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
2432 2006-01-11 Neale Ferguson <neale@sinenomine.net>
2434         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
2436         * mini-s390x.c: Remove warning messages.
2438 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
2440         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
2442 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
2444         * generics.2.cs: Add ldelem/stelem_any test.
2446 2006-01-10 Neale Ferguson <neale@sinenomine.net>
2448         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
2450 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
2452         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
2453         
2454 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
2456         * generics.2.cs: Reenable vtype tests.
2458         * inssel-x86.brg: Remove an icorrect valuetype rule.
2460 2006-01-06 Neale Ferguson <neale@sinenomine.net>
2462         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
2463         initial support for OP_ABS.
2465 2006-01-05 Neale Ferguson <neale@sinenomine.net>
2467         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
2469 2006-01-05 Neale Ferguson <neale@sinenomine.net>
2471         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
2472         conversion and implement LADD/LSUB.
2474         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
2475         architectures.
2477 2006-01-05 Neale Ferguson <neale@sinenomine.net>
2479         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
2481         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
2482         architectures.
2484 2006-01-05 Neale Ferguson <neale@sinenomine.net>
2486         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
2487         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
2488         (stack walk problem).
2490 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
2492         * aot.c (mono_aot_load_method): Fix a warning.
2494 2006-01-03  Neale Ferguson <neale@sinenomine.net>
2496         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
2498 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2500         * iltests.il: Add test for #77148.
2502         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
2503         #77148.
2505 2006-01-03  Neale Ferguson <neale@sinenomine.net>
2507         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
2509 2006-01-03  Neale Ferguson <neale@sinenomine.net>
2511         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
2512         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
2514         * basic-long.cs: Add lconv-to-r4/r8 tests.
2516 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
2518         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
2520         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
2521         here as on other archs.
2523 2005-12-29 Neale Ferguson <neale@sinenomine.net>
2525         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
2527 2005-12-29 Neale Ferguson <neale@sinenomine.net>
2529         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
2530         
2531         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
2533         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
2534         instrument_prolog; Add memory_barrier instruction.
2536 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
2538         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
2540 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
2542         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
2544         * aliasing.c inssel.brg: Fix warnings.
2546         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
2547         could skip initialization of some parts of memory.
2549         * mini.c mini-ia64.c: Fix warnings.
2551         * inssel-sparc.brg: Add an implementation of lneg which actually works.
2553 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
2555         * aliasing.c (mono_build_aliasing_information): Add a workaround for
2556         a crash seen on sparc.
2558         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
2559         
2560         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
2562 2005-12-21 Neale Ferguson <neale@sinenomine.net>
2564         * mini-ops.h: Add s390_backchain instruction
2566         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
2568         * cpu-s390.md: Add s390_backchain instruction
2570         * mini-s390.c: Significant ABI changes
2572         * mini-s390.h: Cater for zero length structures
2574 2005-12-20 Neale Ferguson <neale@sinenomine.net>
2576         * mini-s390.c: ABI fixes
2578         * inssel-s390.brg: Remove debug statements
2580         * cpu-s390.md: Fix length of ATOMIC_xx operations
2582 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
2584         * basic-float.cs: Add float<->long conversion tests.
2586 2005-12-16 Neale Ferguson <neale@sinenomine.net>
2588         * mini-s390.c: Fix LOCALLOC processing.
2590         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
2592 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
2594         * iltests.il: Add tests for some opcodes not covered by the other
2595         tests.
2597 2005-12-15 Neale Ferguson <neale@sinenomine.net>
2599         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
2600         register loading for Tail processing; Correct trace output.
2602         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
2604         * cpu-s390.md: Correct size of jmp instruction. 
2606 2005-12-13 Neale Ferguson <neale@sinenomine.net>
2608         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
2610 2005-12-13 Neale Ferguson <neale@sinenomine.net>
2612         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
2613           Bring s390 up to current level.
2615 2005-12-12  Zltan Varga  <vargaz@gmail.com>
2617         * generics.2.cs: Disable the newly added tests as they do not work yet.
2618         
2619         * generics.2.cs: Add valuetype tests.
2621 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
2623         * basic-long.cs: Add i4->u8 test.
2625         * objects.cs: Add tests for JIT intrinsic.
2627         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
2628         optimizations lost by a mistake.
2630 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
2632         * basic-long.cs: Remove a test moved to objects.cs.
2634         * arrays.cs: Add more array tests.
2636 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
2638         * arrays.cs: Add new tests for multi-dimensional arrays.
2640 2005-12-06  Raja R Harinath  <rharinath@novell.com>
2642         * Makefile.am (test_sources2): Add generics.2.cs.
2643         (EXTRA_DIST): Add test_sources2.
2645 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
2647         Support for boxing and unboxing nullable types as well as the
2648         isinst operation on nullables, per the CLI ammendment.
2650         * inssel.brg (CEE_ISINST): Special case for nullable
2652         * mini.c (handle_unbox_nullable): new method
2653         (handle_box): Special case for nullable types
2654         (mono_method_to_ir): Call handle_unbox_nullable in correct
2655         places.
2657         * generics.2.cs: New test suite
2659         * Makefile.am: Support for regression tests with generics.
2661 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
2663         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
2664         allocated to registers. Fixes #76800.
2666 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
2668         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
2670 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
2672         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
2673         of platforms.
2675 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
2677         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
2678         objects.cs.
2680         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
2681         
2682         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
2683 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
2685         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
2686         single precision before storing to a single precision location.
2688 2005-11-28  Raja R Harinath  <rharinath@novell.com>
2690         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
2692 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
2694         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
2695         correct files.
2697         * basic.cs: Remove test_0_byte_compares test which was moved to
2698         objects.cs a long time ago.
2700 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
2702         * aliasing.c: Fixed aliasing issue on 64 bit archs.
2704 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
2706         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
2707         handlers are called.
2709         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
2710         throwing code.
2712          * mini-ia64.c: Add support for the throw->branch exception 
2713         optimization.   
2715         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
2717 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
2719         * mini.c: Enabled "fastpath" deadce :-)
2720         
2721 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
2723         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
2724         alias analysis pass to support it.
2725         * mini.h: Likewise.
2726         * ssa.c: Likewise.
2727         * liveness.c: Likewise (liveness computation can use aliasing
2728         information to be more accurate).
2729         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
2730         moreover made so that "--compile-all" uses the given optimization
2731         flags and not the default ones.
2732         * aliasing.c: Alias analysis (new file).
2733         * aliasing.h: Likewise.
2734         * Makefile.am: added "aliasing.c" and "aliasing.h".
2735         
2736 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
2738         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
2739         OP_L opcodes.
2741 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
2743         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
2744         fp >= end_of_stack exit condition, as it is not needed, and it might
2745         become true for fp eliminated frames.
2747 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
2749         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
2750         coded offsets.
2752 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
2754         * mini-arm.c: fixed alignment of doubles/longs to match
2755         the C ABI (bug #76635).
2757 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
2759         * aot.c: fix compilation with --enable-minimal=aot.
2761 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
2763         * mini-arm.c: fixed compatibility with the new
2764         floating point emulator package for compares.
2766 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
2768         * mini.c : reverted sig->pinvoke changes (r51396-51397).
2770 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
2772         * mini-exceptions.c (print_stack_frame): Output to stderr.
2773         (mono_handle_native_sigsegv): Ditto.
2775 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
2777         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
2778         OP_LCONV_TO_OVF_I implementation.
2780         * mini-amd64.c: Add support for the throw->branch exception 
2781         optimization.
2783         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
2784         when the catch clause catches a more general exception, i.e. Object.
2786 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
2788         * cpu-ia64.md: Remove unused opcodes.
2790         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
2791         specific defines for architectures defining USE_SIGACTION.
2793         * mini-ia64.c: Fix some warnings.
2795         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
2796         version seemed to skip a frame.
2798 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
2800         * mini.c: Clean up the usage of sig->pinvoke flag. Now
2801         only calls which are made to native code use this flag.
2803 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
2805         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
2806         varargs methods as well.
2807         
2808         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
2809         which have save_lmf set. Reorganize methods prologs a bit.
2811         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
2812         debugger to the proper place.
2814 2005-10-29  Martin Baulig  <martin@ximian.com>
2816         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
2817         when running inside the debugger until the debugger has support
2818         for it.
2820 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
2822         * mini.h: Fix a warning.
2824 2005-10-24  Miguel de Icaza  <miguel@novell.com>
2826         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
2827         we expose publicly, this returns the string.
2829 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
2831         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
2832         with fp elimination.
2834 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
2836         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
2837         native stacktrace using the glibc 'backtrace' function if available.
2839 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
2841         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
2843         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
2844         handle SIGSEGVs received while in native code.
2846         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
2847         code, call mono_handle_native_sigsegv which will abort the runtime
2848         after printing some diagnostics, instead of converting it into a
2849         confusing NullReferenceException.
2851 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
2853         * cpu-pentium.md: Remove unused opcodes.
2855 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
2857         * mini-amd64.h (MonoLMF): Add rsp field.
2859         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
2860         the lmf too.
2862 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
2864         * mini-codegen.c (get_register_spilling): Fix some warnings.
2866 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
2868         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
2869         elimination during exception handling. Enable fp elimination by
2870         default.
2872         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
2873         elimination.
2875 2005-10-16  Martin Baulig  <martin@ximian.com>
2877         * mini-exceptions.c
2878         (mono_debugger_run_finally): New public method for the debugger.
2880 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
2882         * debug-mini.c (mono_debug_init_method): Fix warning.
2884         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
2885         the 'exname' parameter const to fix some warnings.
2887 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
2889         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
2890         introduced by the previous patch.
2892 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
2894         * basic-float.cs: Add test for precision of float arithmetic.
2896         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
2897         when loading/storing single values from/to memory.
2899         * mini.c (mono_jit_compile_method_with_opt): Create the function
2900         pointers in the correct domain.
2902 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
2904         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
2905         introduced by previous patch.
2906         
2907         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
2908         when out_filter_idx is NULL.
2910         * mini-exceptions.c: Don't run filter clauses twice during exception
2911         handling. Fixes #75755.
2913 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
2915         * aot.c: Add support for ldflda wrappers.
2917         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
2918         #75902.
2920 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
2922         * mini.c, mini.h: do not consider exception handlers blocks when
2923         setting up interface variables.
2925 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
2927         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
2929 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
2931         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
2932         causes a regression.
2934         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
2936 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
2938         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
2939         of the OP_P definitions.
2941         * TODO: Add a proposal for dealing with the CEE/OP mess.
2943         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
2944         optimizations from the x86 port.
2946         * cpu-amd64.md: Ditto.
2948         * basic.cs basic-long.cs: Add tests.
2950 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
2952         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
2953         Patrik Torstensson's implementation of my exception-handling
2954         optimization idea, when the exception object is not used
2955         (bug #62150).
2957 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
2959         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
2960         of the mul_imm optimizations from the old jit.
2962 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
2964         * mini.c, liveness.c: patch by Patrik Torstensson and
2965         Zoltan Varga to improve performance in methods with
2966         exception clauses.
2968 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
2970         * driver.c: Remove 'Globalization' entry from --version.
2972 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
2974         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
2975         there is a profiler interested in JIT events.
2977         * aot.c: Load profile files produced by the AOT profiling module, and
2978         reorder methods based on the profiling info. Add a 'method_order' table
2979         to the AOT file to make mono_aot_find_jit_info work with the reordered
2980         methods.
2982         * mini.h: Bump AOT file version info.
2984 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
2986         * mini-arm.h: work around what looks like a gcc bug when optimizations
2987         are enabled.
2989 2005-09-28  Raja R Harinath  <rharinath@novell.com>
2991         * Makefile.am (AM_CFLAGS): Don't use += to append inside
2992         conditionals.  Use ...
2993         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
2995 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
2997         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
2998         to determine the amount of memory to copy when passing valuetypes.
3000         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
3001         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
3003 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
3005         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
3006         information about aot.
3008 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
3010         * *.c: Replace the use of {Enter,Leave}CriticalSection with
3011         macros. This will allow a deadlock debugger to easily be plugged
3012         in.
3014 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
3016         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
3018 2005-09-27  Raja R Harinath  <rharinath@novell.com>
3020         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
3021         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
3022         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
3023         ($(arch_built)) [CROSS_COMPILING]: Error out.
3025 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
3027         * aot.c: Add support for the no_special_static flag for classes.
3029 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
3031         * Reapply reverted patches.
3033         * *: Revert r50174 as well.
3035         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
3037 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
3039         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
3041 2005-09-23  Miguel de Icaza  <miguel@novell.com>
3043         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
3044         part of the SIG_HANDLER_SIGNATURE.  
3046 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
3048         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
3049         statistics.
3051         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
3052         introduced by previous patch.
3054 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
3056         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
3057         saved registers too.
3059         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
3060         upon the information returned by get_call_info ().
3061         
3062         * mini-x86.c (add_float): Fix stack size calculation.
3063         (mono_arch_call_opcode): Rewrite this so it works based up the
3064         information returned by get_call_info ().
3065         (mono_arch_get_this_vret_args): Ditto.
3067 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
3069         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
3070         in cinfo to determine the registers which need to be used.
3072 2005-09-20  Miguel de Icaza  <miguel@novell.com>
3074         * driver.c (mono_main): Add --server and --desktop flags. 
3076 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
3078         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
3079         registers as global registers.
3081         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
3082         longer needed with the new register allocator.
3084         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
3086         * cpu-ia64.md: Remove unused opcodes.
3087         
3088         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
3089         
3090 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
3092         * cpu-amd64.md: Remove unused opcodes.
3094         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
3095         needed with the new register allocator.
3097         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
3098         reg-reg moves.
3100 2005-09-16  Raja R Harinath  <rharinath@novell.com>
3102         * Makefile.am (check-local): Don't invoke semdel-wrapper.
3104 2005-09-16  Martin Baulig  <martin@ximian.com>
3106         * exceptions-amd64.c
3107         (throw_exception): Don't call mono_debugger_throw_exception() if
3108         we're a rethrow - see the FIXME in the code.
3110 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
3112         * mini.c (mono_init_exceptions): This only works on some architectures.
3113         
3114 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
3116         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
3117         on ia64.
3119         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
3121         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
3122         now in mini-exceptions.c.
3124 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
3126         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
3127         now in mini-exceptions.c.
3129 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
3131         * exceptions-x86.c: Applied patch from Patrik Torstensson 
3132         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
3134         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
3135         code into mini-exceptions.c. Add some assertions to it.
3137 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
3139         * aot.c (emit_section_change): Applied patch from "The Software Team" 
3140         (<software@solmersa.com>). Fix as errors on windows.
3142 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
3144         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
3145         method info into the LMF.
3147 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
3148         
3149         * mini-ia64.c: Add proper unwind info for method epilogs.
3151         * exceptions-ia64.c: Add some code to help debugging.
3152         
3153         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
3155         * mini-exceptions.c: Fix warning.
3157 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
3159         * mini.c: Really fix build.
3161         * mini-x86.c mini-amd64.c: Fix build.
3163 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
3165         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
3167         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
3168         some Interlocked methods as intrinsics.
3170         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
3171         for Thread methods as well.
3173         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
3175         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
3177         * mini-ia64.c mini-x86.c mini-amd64.c 
3178         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
3179         OP_MEMORY_BARRIER.
3180         
3181         * mini.c (mono_init_exceptions): Fix build breakage.
3183 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
3185         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
3186         of instructions. Use the new ia64_unw_op macros for emitting unwind
3187         info.
3189         * mini.c (mono_init_exceptions): Initialize exception handling
3190         related trampolines at startup.
3192 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
3194         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
3196 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
3198         * mini.c: Handle type loading errors gracefully during compilation and
3199         throw the appropriate exception.
3201 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
3203         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
3204         for the mono binary.
3206 2005-09-09  Martin Baulig  <martin@ximian.com>
3208         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
3209         the release.
3211 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
3213         * mini-arm.h: use emulation for conv.r.un for the release.
3215 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
3217         * mini-arm.c, objects.cs: more fixes and tests for them.
3219 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
3221         * mini-arm.c: align structures to at least 4 bytes to be able
3222         to keep our current optimized memcpy.
3224 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
3226         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
3228 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3230         * mini.c: ignore SIGPIPE.
3232 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
3234         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
3236         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
3238 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
3240         * mini.h: Add prototype for mono_allocate_stack_slots_full.
3242 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
3244         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
3245         exception handling support.
3246         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
3247         patch by Brian Koropoff <briank@marakicorp.com>).
3249 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
3251         * mini.c: revert another 'optimization' which breaks when
3252         items on the eval stack need to be saved at a basic block end
3253         (bug #75940).
3255 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
3257         * jit-icalls.c: for arrays, ensure we always provide
3258         lower bounds.
3260 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
3262         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
3263         
3264         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
3266 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
3268         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
3269         arguments in their original register.
3271 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
3273         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
3274         memset/memcpy.
3276         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
3277         when ssapre is enabled.
3279         * inssel-long.brg: Fix bug in previous patch.
3281         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
3282         multiplication by a constant.
3284 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
3286         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
3287         icc.
3289         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
3290         saving registers.
3292 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
3294         * inssel-arm.brg: apply changes tested by Brian Koropoff
3295         <briank@marakicorp.com>.
3297 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
3299         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
3300         
3301 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
3303         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
3304         to the same register if dreg is just a base register.
3305         (print_ins): Improve printing of membase opcodes.
3307         * inssel-x86.brg: Add optimized ldind(reg) rules.
3309         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
3311 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
3313         * mini.c: when running under valgrind, set the stack bottom for
3314         the GC at the actual approximate stack for the app (fixes running
3315         mono with valgrind).
3317 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
3319         * mini.c: do no break at the first valuetype to init found
3320         (fixes bug #75791).
3322 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
3324         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
3326 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
3328         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
3330 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
3332         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
3334 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
3336         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
3338         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
3339         code.
3341         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
3342         code.
3344         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
3345         methods.
3347 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
3349         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
3351 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
3353         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
3354         in the tail recursion optimization.
3356         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
3357         debug info into the assembly file.
3359         * iltests.il: Add test for filter regions.
3361         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
3362         initial stack of filter regions. Fixes #75755.
3364 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
3366         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
3367         stack requirements.
3369 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
3371         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
3372         the check for an already compiled method on non-ia64 platforms.
3373         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
3374         proper domain.
3376         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
3378         * inssel-x86.brg: Add some optimized call rules.
3380 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
3382         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
3383         method here.
3385         * mini.h mini-trampolines.c: Pass the trampoline argument to 
3386         mono_arch_patch_delegate_trampoline.
3388         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
3390         * mini-trampolines.c: Fix build.
3392         * mini-amd64.h: Add delegate trampolines.
3394         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
3396         * inssel-amd64.brg: Add optimized call rules.
3397         
3398         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
3400         * inssel-ia64.brg: Add optimized ldind(reg) rules.
3402 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
3404         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
3405         change.
3407         * mini-ia64.c: Remove LMF fixmes.
3409         * mini-ia64.h: Remove most fields from LMF.
3411         * inssel-ia64.brg (stmt): Fix unaligned access errors.
3413         * mini-trampolines.c: Add support for IA64 function descriptors.
3415         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
3416         for IA64 function descriptors.
3418 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
3420         * tramp-arm.c: patch the vtable for virtual calls. Added
3421         support code to register/unregister the LMF.
3422         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
3423         more LMF work.
3425 2005-08-19  Dick Porter  <dick@ximian.com>
3427         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
3428         bit value if needed.
3430 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
3432         * mini.c (mini_get_method): Move handling of wrapper data here.
3434         * mini.c (mono_method_to_ir): Add support for dynamic methods.
3436         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
3437         virtual.
3439         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
3440         bblock->code does not remain empty.
3442 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
3444         * arrays.cs: Add regression test for #75832.
3446         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
3447         rules. Fixes #75832.
3449         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
3450         instruction scheduling.
3452 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
3454         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
3456 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
3458         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
3460         * mini-codegen.c: Fix VC build.
3462         * cpu-pentium.md: Increase length of atomic_exhange_i4.
3464 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3466         * mini.h: fix signature for mono_register_opcode_emulation.
3468 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
3470         * mini.c: Get rid of most of the helper_sig_... constants using
3471         mono_create_icall_signature ().
3473 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
3475         * jit-icalls.c (helper_ldstr): New helper function.
3477         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
3479         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
3480         throw, load the string using a helper call instead of creating a string object.
3482         * aot.c: Update after LDSTR changes.
3484         * mini.h: Bump AOT file version.
3485         
3486         * aot.c: Save class size info into the AOT file. Print more statistics during
3487         compilation.
3489         * mini.h: Bump AOT file version.
3491         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
3492         ordering of disasm cases. Fixes #74957.
3494 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
3496         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
3497         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
3498         the generic code needed for the ARM port.
3500 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
3502         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
3503         inssel-arm.brg: more ARM features and fixes.
3505 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
3507         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
3508         ARM port work in progress.
3510 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
3512         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
3514         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
3516         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
3518         * inssel.brg (mini_emit_memset): Add support for unaligned access.
3520         * *-ia64.*: Ongoing IA64 work.
3521         
3522         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
3524 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
3526         * TODO: Remove out-of-data todo stuff.
3528         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
3529         dead code.
3531         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
3533         * mini.h: Bump corlib version.
3535 2005-07-27  Martin Baulig  <martin@ximian.com>
3537         * mini-codegen.c
3538         (create_copy_ins): Added `const unsigned char *ip' argument; set
3539         `copy->cil_code' from it.
3541 2005-07-27  Martin Baulig  <martin@ximian.com>
3543         * mini-exceptions.c (mono_handle_exception): Don't call
3544         mono_debugger_handle_exception() for filters.
3546 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
3548         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
3549         as well.
3551 2005-07-26  Martin Baulig  <martin@ximian.com>
3553         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
3555         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
3556         helper_compile_generic_method() if the method is actually virtual
3557         and non-final.
3559 2005-07-26  Martin Baulig  <martin@ximian.com>
3561         * mini.c
3562         (trampoline_code): Renamed to `mono_trampoline_code' and made it
3563         public; this is now accessed directly by the debugger.
3564         (mono_generic_trampoline_code): Removed.
3566         * debug-mini.c
3567         (mono_debug_init_method): Also add interncalls and wrappers.
3569 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
3571         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
3573 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
3575         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
3577 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
3579         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
3581 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
3583         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
3584         getting TLS offsets on AMD64 too.
3586 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
3588         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
3590 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
3592         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
3593         inssel-arm.brg, mini-arm.h: ARM port work in progress.
3595 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
3597         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
3599         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
3600         to mini.c.
3602         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
3603         mono_sparc_is_virtual_call ().
3604         
3605         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
3607         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
3608         trampoline parameters.
3610         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
3611         
3612         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
3613         to mono_arch_get_vcall_slot_addr.
3615         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
3616         trampoline code.
3618         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
3620 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
3622         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
3624 2005-07-19  Martin Baulig  <martin@ximian.com>
3626         * exceptions-amd64.c (throw_exception): Call
3627         mono_debugger_throw_exception() here like we're doing it on i386.
3629 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
3631         * mini-ia64.c: Add optimized TLS access support.
3633 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
3635         * mini-exceptions.c: Ongoing IA64 work.
3637         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
3639         * mini.c: Use the default optimization set when embedding. Fixes
3640         #75194.
3642 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
3644         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
3645         of trampolines to a separate file.
3647         * mini-trampolines.c: New file.
3649         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
3650         separate file.
3651         
3652         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
3653         amd64/ia64 code.
3655         * mini-codegen.c: Fix cygwin build.
3657 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
3659         * mini.c: Add some minor changes needed by the IA64 port.
3661         * *-ia64.*: Ongoing IA64 work.
3663 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
3665         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
3666         trampolines into arch-independent and arch-dependent parts.
3668         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
3670 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
3672         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
3674         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
3675         the xp-regalloc-branch for amd64.
3677         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
3678         xp-regalloc-branch for x86.
3680 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
3682         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
3684 2005-07-06  Martin Baulig  <martin@ximian.com>
3686         * mini.c
3687         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
3688         (mono_jit_runtime_invoke): Likewise.
3690 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
3692         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
3693         on x86 too.
3694         
3695         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
3696         without loading their metadata. Reorganize the file format so exception handling+
3697         debug info is kept separate from normal method info. Create MonoJitInfo 
3698         structures for methods lazily.
3700         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
3701         loading metadata.
3702         (x86_class_init_trampoline): Patch AOT class init trampolines too.
3704         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
3706         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
3707         in AOT code.
3709         * mini.h: Bump AOT file version.
3711 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
3713         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
3715 2005-07-01  Raja R Harinath  <rharinath@novell.com>
3717         * Makefile.am (check-local): Call semdel-wrapper.
3719 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
3721         * mini-x86.c: Revert the last change as it seems to break the build..
3723 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
3725         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
3726         
3727         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
3729 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
3731         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
3732         outside of the macro, so strange stuff doesn't happen with gcc4
3733         (NEW_AOTCONST_TOKEN): Likewise.
3735 2005-06-28  Martin Baulig  <martin@ximian.com>
3737         * mini.c (mini_class_is_system_array): New static method; use this
3738         instead of `klass->parent == mono_defaults.array_class' everywhere
3739         since this also works for the new generic array class.
3741 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
3743         * inssel.brg: Remove warnings.
3745 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
3747         * mini-ia64.c: Ongoing IA64 work.
3749         * basic-float.cs: Add float->i1 conversion test.
3751         * iltests.il: Add conv.u4 test.
3753 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
3755         * inssel-long.brg: Fix bug caused by last change.
3757 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
3759         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
3760         BSDs.  Allows the x86 JIT to work on OSX86
3762 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
3764         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
3765         u4->i8 conversion.
3767         * mini-ia64.c: Ongoing IA64 work.
3769 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
3771         * mini-ia64.c: Ongoing IA64 work.
3773         * driver.c: Clean up jit_code_hash as well when using --regression.
3775         * inssel-long.brg: Fix long->i4/u4 conversion rules.
3777         * basic-long.cs: Add tests for long->u4 conversion.
3779 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
3781         * mini.c: Take mono_get_domainvar out of macros. This makes sure
3782         that we do not depend on undefined C behavior: the order stuff
3783         gets evaluated within an expression. Fixes mono when compiled on
3784         GCC 4.
3786 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
3788         * *-ia64.*: Ongoing IA64 work.
3790         * aot.c: Lower memory usage while loading AOT methods.
3792         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
3794         * mini.h: Bump AOT file format version.
3796 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
3798         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
3800 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
3802         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
3803         not on callee assembly). Fixed some comments.
3805 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
3807         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
3808         it gets proper disassembly.
3809         (emit_method_info): Remove some dead code.
3811         * mini.c (mini_method_compile): Allways allocate the GOT var in
3812         mono_method_to_ir for emulating opcodes.
3814 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
3816         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
3817         before freeing the code memory. Fixes #74990.
3819         * objects.cs: Add regression test for #74992.
3821         * liveness.c: Extend live ranges of arguments to the beginning of the
3822         method. Fixes #74992.
3824         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
3825         so it points into the faulting instruction.
3827 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
3829         * jit-icalls.c (mono_imul_ovf): Add exception handling.
3831         * *-ia64.*: Ongoing IA64 work.
3833         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
3835 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
3837         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
3839         * *-ia64.*: Ongoing IA64 work.
3841 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
3843         * basic-long.cs: Add tests for add/sub.ovf.
3845         * basic.cs: Add tests for sub.ovf.
3847         * *-ia64.*: Ongoing IA64 work.
3849 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
3851         * *-ia64.*: Ongoing IA64 work.
3853         * basic.cs: Add conv.ovf.i4.un test.
3855 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
3857         * mini.c: (remove_block_if_useless) Fixed bug 75061.
3858         
3859 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3861         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
3863 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
3865         * *-ia64.*: Ongoing IA64 work.
3867 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3869         * trace.[ch]:
3870         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
3872 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
3874         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
3876 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
3878         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
3880         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
3881         of a call is callable by a near call.
3883 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
3885         * mini-ia64.c: Ongoing IA64 work.
3887 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
3889         * genmdesc.c: Make the generated array non-static.
3891         * inssel-long.brg: Fix LSHR_IMM rule.
3893         * *-ia64.*: Ongoing IA64 work.
3895         * *-ia64.*: Ongoing IA64 work.
3897 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
3899         * *-ia64.*: Ongoing IA64 work.
3901         * *-ia64.*: Ongoing IA64 work.
3902         
3903         * mini-ia64.c: Ongoing IA64 work.
3905         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
3907 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
3909         * objects.cs basic-calls.cs: Move some tests to objects.cs.
3910         
3911         * objects.cs basic-long.cs: Move some tests to objects.cs.
3913 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
3915         * *-ia64.*: Ongoing IA64 work.
3917         * iltests.il: Add a new test.
3919         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
3920         newobj. Fixes #75042.
3922 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
3924         * *-ia64.*: Ongoing IA64 work.
3925         
3926         * *-ia64.*: Ongoing IA64 work.
3927         
3928         * *-ia64.*: Ongoing IA64 work.
3930         * basic.cs objects.cs: Move tests accessing static variables as well.
3932         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
3934 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
3936         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
3938         * driver.c: Always print failed tests.
3940         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
3941         frame pointer.
3943         * *ia64*: Ongoing IA64 work.
3945 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
3947         * basic.cs: Add tests for add.ovf. Fix warnings.
3949 2005-05-18  Miguel de Icaza  <miguel@novell.com>
3951         * driver.c (mono_main): Avoid crash if no argument is passed to
3952         --break;  Do not use g_error, but f_printf.   And fix all other
3953         ocurrences of the same crash.
3955 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
3957         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
3958         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
3959         Fixes #74742.
3961 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
3963         * *-ia64.*: Add beginnings of IA64 backend.
3965         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
3967 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
3969         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
3970         Fixes #74925.
3972         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
3974         * mini-amd64.c: Fix a warning.
3976 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
3978         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
3979         in float_neg. Fixes #74897.
3981         * mini-amd64.c (emit_call): Fix another near call bug.
3983 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
3985         * declsec.c: Keep the appdomain information in the structure. Added a 
3986         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
3987         value gets overwritten).
3988         * declsec.h: Set the default MonoArray for the the stack to 6. Added
3989         an MonoAppDomain member to MonoSecurityFrame.
3990         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
3991         used in the stack walk. Now use a MonoArray which grow (double) when
3992         it gets full.
3994 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
3996         * mini.c: Re-enabled runtime cleanup, since running threads should
3997         now properly stop when exiting.
3999 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
4001         * mini-codegen.c: New file contaning the arch-independent local
4002         register allocator. Not used by any architectures yet.
4004         * mini.h linear-scan.c: Merge some changes from the 
4005         mini-xp-local-regalloc branch.
4007 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
4009         * mini-amd64.c (emit_call): Fix calls to native functions when the
4010         runtime is compiled as a shared library. Fixes #74756.
4012         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
4013         on a literal field. Fixes #74751.
4015 2005-04-25  Raja R Harinath  <rharinath@novell.com>
4017         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
4019 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
4021         * objects.cs: Add missing null casting test.
4023 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
4025         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
4026         in wrapper methods. Also rename 'address' variable to 'offset'.
4028 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
4030         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
4031         warnings.
4032         
4033         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
4035         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
4036         work on windows.
4038 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
4040         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
4042 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
4044         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
4045         just the last bytes.
4047 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
4049         * aot.c (mono_compile_assembly): Fix warning.
4051         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
4052         by the _MSC_VER stuff.
4054 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
4056         * inssel-long.brg: Fix #74588.
4058         * cpu-amd64.md: Fix #74591.
4060         * iltests.il: Add new regression tests.
4062 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
4064         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
4065         valuetype.
4067 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
4069         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
4071         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
4072         from Bill Middleton <flashdict@gmail.com>.
4074 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
4076         * arrays.cs: Add new regression test. Fix warnings.
4078 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
4080         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
4081         and leakage in CKFINITE.
4083         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
4084         this to a null op since it is called on amd64 too.
4086         * exceptions-amd64.c (get_throw_trampoline): Align stack.
4088         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
4089         body since this is not used on amd64.
4090         
4091         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
4093         * mini-amd64.c: Remove obsolete fixmes.
4095         * mini.c (print_method_from_ip): Fix debugging support.
4097 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
4099         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
4100         so that expressions that don't give much gain are not reduced.
4101         * ssapre.h: Likewise.
4103 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
4105         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
4107         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
4109         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
4111 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
4113         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
4115         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
4117 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
4119         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
4120         stack touching.
4122         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
4124         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
4126         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
4128         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
4129         MONO_ARCH_USE_SIGACTION. Fixes #74252.
4131         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
4133         * mini-x86.c: Fix up stack overflow handling.   
4135         * exceptions.cs: Add new regression test.
4137 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
4139         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
4140         mono_jit_thread_attach.
4142         * mini.c (mono_method_to_ir): Verify called method is not abstract.
4144 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
4146         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
4147         avoid calling constructors using callvirt.
4149         * inssel.brg: Fix #74073.
4151 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
4153         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
4154         compilation with non-GCC compilers.
4155         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
4156         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
4158 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
4160         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
4161         klass->interface_offsets (will likely fix bug#74073).
4163 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
4165         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
4167 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
4169         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
4170         to amd64_div_reg_size ().
4171         
4172         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
4174 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
4176         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
4178 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
4180         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
4182 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
4184         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
4185         
4186         * mini.c (mono_precompile_assembly): Load and precompile referenced
4187         assemblies as well. Fixes #74015.
4189 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
4191         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
4193 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
4195         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
4196         a lot of checks and (anyway) permissions cannot work until corlib is 
4197         loaded.
4199 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
4201         * mini-ppc.c: fixed ABI issue on sysv/ppc.
4203 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
4205         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
4206         calls (fixes bug#72824).
4208 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
4210         * mini.c: fix tail recursion elimination (see test in bug#73936).
4212 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
4214         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
4215         some fp functions in sse2 mode.
4217 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
4219         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
4221 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
4223         * mini.h mini.c: Add mono_get_jit_tls_key ().
4225         * mini-x86.c: Enable fast TLS support on windows.
4227 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
4229         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
4230         * mini.c: Check for p/invoke method when generating code. If a
4231         p/invoke method, or it's class, isn't decorated with [Suppress
4232         UnmanagedCodeSecurity] then generate code to call System.Security.
4233         UnmanagedDemand (only if the security manager is active).
4235 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
4237         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
4238         last change as it seems to cause strange crashes.
4239         
4240 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
4242         * *.c: handle unsafe function pointers where needed.
4244 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
4246         * mini.c (mono_jit_free_method): Remove the fixme too.
4248 2005-03-15  Miguel de Icaza  <miguel@novell.com>
4250         * mini.c: As discussed, make the code actually free the delegate
4251         thunk now, to enable the debugging of delegate problems, use
4252         MONO_DEBUG=1 when running Mono. 
4254         This takes also care of parts of the leaks as seen by Joe.
4256 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
4258         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
4259         thread_tls_offset calculation.
4261 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
4263         * declsec.c: Reworked linkdemand checks for icall. The previous code
4264         was using the declaration code (untrusted) and didn't work as expected
4265         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
4266         specific case.
4268 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
4270         * iltests.il: Add new localloc test.
4272         * mini-amd64.c: Handle large stack allocations the same way as on
4273         windows if stack overflow handling is working.
4274         
4275         * mini-amd64.c: Allocate the signal stack using mmap.
4277         * mini.c (sigsegv_signal_handler): Fix reading of context.
4279         * mini-exceptions.c: Fix up stack overflow handling.
4281         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
4283         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
4285         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
4287         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
4289         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
4290         tramp_init functions as they are no longer needed.
4292 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
4294         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
4295         
4296         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
4298         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
4299         
4300         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
4301         support that now.
4303         * mini-ops.h: Add OP_LMUL_IMM.
4305         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
4306         long mul/div opcodes as intrinsic.
4308         * mini-amd64.c (emit_call): Handle the case when the callee might be
4309         an AOT method.
4311 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
4313         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
4314         extra safe.
4315         
4316         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
4318         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
4320 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
4322         * mini.c (mono_codegen): Don't leak here, to help people running
4323         monogrind.
4325 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
4327         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
4328         conversions in sse2 mode.
4330         * basic-float.cs: Add regression test.
4331         
4332         * mini-amd64.c: Reenable sse2.
4334 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
4336         * mini-amd64.c: Disable sse2 until some regressions are fixed.
4338 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
4340         * driver.c: Copyright text should include 2005.
4341         
4342 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
4344         * cpu-amd64.md (load_membase): Fix more max lengths.
4346 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
4348         * cpu-amd64.md (load_membase): Fix max length.
4350         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
4352         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
4354         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
4355         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
4357         * basic-float.cs: Add rounding regression test.
4359         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
4361 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
4363         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
4364         structures in registers for pinvoke wrappers.
4366 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
4368         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
4370 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
4372         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
4373         wrapper to mono_jit_thread_attach.
4375         * mini.c (mini_jit_thread_attach): New jit icall.
4377         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
4378         native->managed wrappers.
4380         * exceptions.cs: Add new regression test.
4382         * mini.c (optimize_branches): Check regions in the cbranch to throw
4383         block case as well. Fixes #73242.
4385 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
4387         * mini.c: thread safety fixes.
4389 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
4391         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
4392         patching stuff, since delegates use jump trampolines so there is
4393         no caller.
4395         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
4396         jump trampolines.
4397         
4398         * tramp-amd64.c: Fix build.
4400         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
4401         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
4403         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
4404         Rename this to mono_arch....
4405         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
4407         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
4409         * mini-amd64.c (emit_call): If both the caller and the callee is
4410         guaranteed to have 32 bit addresses, emit a normal call.
4412         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
4414         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
4415         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
4416         method_ptr inside delegates.
4418 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
4420         * mini.c (mono_jit_free_method): Free the method info even if the native code is
4421         invalidated. Fixes #73001.
4423         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
4425         * mini-x86.c: Only use stdcall for pinvokes on windows.
4427 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
4429         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
4430         * mini-x86.c: remove unreliable __thread var offset detection,
4431         use the correct accessors and enable by default.
4433 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
4435         * mini.c (mono_jit_free_method): Fix memory leak.
4437 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
4439         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
4441 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
4443         * cpu-amd64.md: Fix lengths of atomic opcodes.
4445 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
4447         * driver.c: try to not imply using ICU is any good.
4449 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
4451         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
4452         functions as inline ops.
4454         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
4455         some Interlocked functions as inline ops.
4457         * mini.c (move_basic_block_to_end): Fix bug in last patch.
4459         * mini.h (MonoBasicBlock): Reorganize fields a bit.
4461         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
4463         * mini.c: Add support for OP_NOT_TAKEN.
4465         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
4466         structures in registers for pinvoke wrappers.
4468         * mini-amd64.c: Fix warnings.
4470 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
4472         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
4474         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
4476         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
4477         address instead of loading the address from it.
4479         * mini-x86.c: Add support for returning small structs in registers
4480         on Win32. Fixes part of #70864.
4481         
4482 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
4484         * trace.c (get_token): Improve error checking.
4486 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
4488         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
4490 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
4492         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
4493         it can be reused for MonoClass.
4494         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
4495         _LINKDEMAND.
4497 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
4499         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
4500         instead of a MonoReflectionMethod. The method information wasn't used
4501         when displaying SecurityException details (but will be now).
4503 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
4505         * Makefile.am : windows build fix.
4507 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
4509         * iltests.il: Add new regression test.
4511         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
4512         #72522.
4514 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
4516         * mini.c: Moved linkdemand check into helper function check_linkdemand
4517         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
4518         LDFTN, LDVIRTFTN).
4520 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
4522         * declsec.c: Added statistics counter for different kinds of 
4523         LinkDemands.
4524         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
4525         (and commented) declaration.
4526         * mini.c: Added statistics counter for security Demand code 
4527         generation. Added display of security statistics.
4529 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
4531         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
4532         Fix compilation errors under gcc-2.95.
4534 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
4536         * mini.c, driver.c: Use the new jit trampoline hashtable
4538 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
4540         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
4542 2005-02-11  Martin Baulig  <martin@ximian.com>
4544         * debug-mini.c (mono_debug_close_method): Free the line number array.
4546 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
4548         * aot.c: Break up large methods into smaller ones. Share GOT slots for
4549         icalls.
4551         * mini.h: Bump AOT file format version. 
4553 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
4555         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
4556         APTC and P/Invoke.
4557         * declsec.h: Added macros to get/set lazyly initialized security 
4558         informations about assemblies. Added new enum for different type of
4559         possible LinkDemand violation. Added function to check LinkDemands.
4560         * mini.h: Added a field to MonoCompile to hold any security violation
4561         detected when JITting a method (so it can be thrown later).
4562         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
4563         and CEE_CALLVIRT. Added code to throw exception at the end of
4564         mini_method_compile (note: the exception is unhandled right now).
4566 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
4568         * mini.c, jit-icalls.c: use the managed implementation of
4569         memset for initobj and memset, to avoid managed <-> unmanaged
4570         transitions.
4572 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
4574         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
4575         optimization if it would need a GOT var.
4577         * basic.cs: Add tests for constant propagation and switch statements.
4579         * ssa.c: Fix out-of-range constant propagation and switch statements.
4581 2005-02-09    <vargaz@freemail.hu>
4583         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
4585 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
4587         * cpu-amd64.md (load_membase): Fix max length of load_membase.
4589 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
4591         * mini.c: update to new signature of mono_class_get_allocation_ftn().
4593 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
4595         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
4596         arithmetic operations.
4598 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
4600         * mini-ppc.c: add a workaround for broken user code that
4601         DllImports vararg functions with non-vararg signatures.
4603 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
4605         * mini.c (mono_jit_compile_method_inner): Add detection and a 
4606         meaningfull error message for assemblies written in Managed C++.
4608         * tramp-amd64.c mini-amd64.h: Add support for 
4609         create_trampoline_from_token ().
4611         * aot.c mini-x86.c abcremoval.c: Applied patch from
4612         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
4614 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
4616         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
4617         which takes a MonoImage/token as parameter instead of a MonoMethod.
4619         * aot.c: Use the new trampoline for initializing vtables.
4621         * aot.c: Add support for ldfld/stfld_remote wrappers.
4623         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
4624         rules for compare <MEM>, IMM.
4626         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
4628         * aot.c: Handle inherited finalizers correctly.
4630 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
4632         * inssel.brg (stmt): Add a missing _setup_... ().
4634         * aot.c: Save some parts of the class state to the AOT file and use it
4635         to recompute that state when a class is initialized.
4637         * mini.c: Install AOT hooks into the runtime.
4639         * mini.h: Bump AOT file format version.
4640         
4641         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
4642         Fixes #72148.
4644         * iltests.il: Add new test.
4646 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
4648         * mini.c: fix typo.
4650 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
4652         * mini.c: setup the statistical profiler in the thread attach
4653         callback to cope with the new single thread code.
4655 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
4657         * mini-ppc.c: ensure we have enough room for the profiler
4658         calls (fixed bug#72084).
4660 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
4662         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
4663         it.
4665 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
4667         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
4669 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
4671         * ssapre.c: Fixed an issue with down safety (this allows IronPython
4672         to succesfully execute parrotbench).
4673         * ssapre.h: Likewise.
4675 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
4677         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
4678         variable for stores to method arguments (fixes a SSAPRE issue).
4680 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4682         * mini.c: handle value types in dup, fixes gen-112.cs.
4684 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
4686         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
4687         sequence for calls in dynamic methods to avoid thunks.
4689 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
4691         * mini.c: correctly remove dynamic methods from the hashtable.
4693 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
4695         * driver.c: Disabled SSAPRE until fix the bug that appears
4696         in IronPython's parrotbench.
4698 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
4700         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
4702         * mini.c (mono_method_to_ir): Revert the previous change.
4703         
4704         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
4705         when AOT compiling.
4707         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
4708         mono_jit_info_table_find () etc. when running under valgrind.
4710         * inssel.brg: Fix warnings.
4712         * mini-exceptions.c: Fix warnings.
4714 2005-01-31  Martin Baulig  <martin@ximian.com>
4716         * driver.c (compile_all_methods_thread_main): Don't try to compile
4717         generic methods or anything which has type parameters.
4719 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
4721         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
4723         * TestDriver.cs: Add --verbose flags.
4725         * graph.c ssa.c: Fix 64 bit warnings.
4726         
4727         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
4728         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
4729         Fix 64 bit warnings.
4731         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
4732         variable not spotted by gcc.
4733         
4734         * mini-amd64.c inssel-amd64.brg: Applied patch from  
4735         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
4736         X86_COMPARE_MEMBASE opcodes.
4738         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
4740 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
4742         * *: MonoMethod->signature might be NULL now. You *MUST* use
4743         mono_method_signature.
4745 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
4747         * driver.c (compile_all_methods_thread_main): Compile the methods
4748         without invoking cctors.
4750 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
4752         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
4753         * basic-calls.cs: test for the above.
4755 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
4757         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
4758         MonoJitInfo changes.
4760 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
4762         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
4763         eagerly if it contains dynamic methods.
4764         
4765         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
4767         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
4768         trace, it is now computed by an icall from trace_ips.
4769         
4770         * mini-exceptions.c: Fix a warning.
4772 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
4774         * mini-exceptions.c: don't bother getting stack trace info if
4775         it's not going to be used.
4777 2005-01-27  Raja R Harinath  <rharinath@novell.com>
4779         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
4780         ssapre-mini-ops.h.
4782 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
4784         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
4786         * aot.c: Avoid calling mono_method_get_header () if not needed.
4788         * mini.h: Bump AOT file format version.
4789         
4790         * mini.c (mono_emit_native_call): Allocate a GOT var here.
4792         * mini.c (mono_print_tree): Print more info for calls.
4794 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
4796         * declsec.h: Remove warning by adding missing include for marshal.h
4798 2005-01-26  Martin Baulig  <martin@ximian.com>
4800         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
4801         `ip' twice.
4803 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
4805         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
4806         flags.
4808         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
4810         * aot.c (mono_compile_assembly): Fix a warning.
4812 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
4814         * declsec.c: Look for security attributes on the original MonoMethod 
4815         (and not the wrapped one). This fix permissions on icalls.
4817 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
4819         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
4821         * mini.c (mono_allocate_stack_slots): Add a fixme.
4823         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
4825 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
4827         * inssel.brg: optimize casts of sealed types (more
4828         optimizations waiting for fixes in remoting).
4830 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
4832         * inssel.brg (stmt): Add another dummy rule.
4834         * driver.c: Fix warnings.
4836         * driver.c (mono_main): If running under valgrind, instruct glib to use
4837         the system allocation functions so valgrind can track the memory
4838         allocated by the g_... functions.
4840         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
4842         * mini-ops.h: Add OP_DUMMY_STORE opcode.
4844         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
4846         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
4847         variables in try regions.
4849         * mini.c (mini_method_compile): Don't disable optimizations on large
4850         methods when AOT compiling.
4852         * mini.c (mono_allocate_stack_slots): New arch independent method to 
4853         allocate stack slots. Not yet used.
4855 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
4857         * debug-mini.c (mono_debug_close_method): Plug some leaks.
4859 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
4861         * mini-ppc.c: make the branch info relative as the code
4862         buffer can be reallocated.
4864 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
4866         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
4867         * driver.c: Removed the AOT/security restriction. Now initialize the
4868         security manager (in metadata) if --security is used.
4869         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
4870         rather than the pointer to declarative security, when AOT is used.
4872 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
4874         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
4875         basic blocks, reduced intrinsic exception throwing code size.
4877 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
4879         * driver.c (mini_usage): Reorder the usage screen.
4881 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
4883         * mini.c (mono_resolve_patch_target): Fix warning.
4885 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
4887         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
4888         previous patch.
4890         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
4892         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
4893         breaks the amd64 build.
4895         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
4896         register allocation. Fixes #71454.
4898         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
4900         * arrays.cs: Add new regression test.   
4902 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
4904         * ssapre.c: Turned usage of snprintf to GString.
4905         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
4906         (I left it on by mistake in my previous commit).
4908 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
4910         * mini.c, cfold.c, basic-calls.cs: preserve side effects
4911         on cond branch optimization (fixes bug# 71515).
4913 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
4915         * abcremoval.c: Fixed bug 71062.
4916         * abcremoval.h: Likewise.
4918 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
4920         * mini.c: Added a new functionality to optimize_branches, the removal
4921         of useless basic blocks, and fixed some problem in the removal of
4922         critical edges; some utility functions added for both purposes.
4923         * ssapre.c: Added complex expression support, and fixed bug 70637.
4924         * ssapre.h: Likewise.
4925         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
4926         enabled in SSAPRE.
4927         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
4928         * driver.c: Re-enabled SSAPRE.
4930 2005-01-19  Martin Baulig  <martin@ximian.com>
4932         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
4933         the result of mono_get_method_constrained().
4935 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
4937         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
4938         manager.
4940 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
4942         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
4943         be detected.  Fixes #59296.
4945 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
4947         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
4948         which can happen. Fixes #71361.
4950 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
4952         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
4953         manager.
4955 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
4957         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
4958         appdomain-unload.exe to fail.
4959         
4960         * mini.c: Fix some memory leaks.
4962 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
4964         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
4965         Fixed bug and sped up some codepaths.
4967 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
4969         * mini.c: Fix some memory leaks.
4971         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
4972         conversion.
4974         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
4976         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
4977         #71320.
4979         * iltests.il: Add regression test for #71320.
4981 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
4983         * mini.c (mono_codegen): Fix installation of profiler hooks.
4985         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
4987 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
4989         * mini.h, mini.c, cfold.c: optimize access to enum
4990         readonly fields, too. Eval conditional branches if possible
4991         to perform unreachable code removal in more cases.
4993 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
4995         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
4997         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
4998         code manager.
5000         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
5001         WinXP DEP. Fixes #71244.
5003 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
5005         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
5007 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
5009         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
5011 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
5013         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
5014         changes.
5016         * mini.h: Bump AOT version.
5018         * mini.h (MonoCompile): Change exvar to a hash table.
5020         * mini.c: Allocate a separate exvar for each handler block.
5022         * mini.c: Get rid of the computation of filter_lengths, its not needed.
5024         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
5025         ex var with the pending exception and only throw if the two are equal.
5026         Fixes #68552.
5027         
5028         * exceptions.cs: Add tests for rethrow and nested catch clauses.
5030         * mini-x86.c: Fix warnings.
5032         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
5033         used by all the ports now.
5035         * aot.c: Add write-symbols and save-temps options.
5037 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
5039         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
5041 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
5043         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
5044         operations.
5046         * tramp-s390.c: Check vtable slot belongs to the domain.
5048         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
5049         as per other platforms.
5051         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
5053 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
5055         * driver.c: we don't run the Main() code in a subthread anymore.
5057 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
5059         * mini.c: added experimental rtc support in the statistical
5060         profiler: if the user has the permission, more accurate statistics
5061         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
5062         The MONO_RTC value must be restricted to what the linux rtc allows:
5063         power of two from 64 to 8192 Hz.
5065 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
5067         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
5069 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
5071         * mini-ppc.c: better icache flush for smp.
5073 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
5075         * mini-amd64.c (emit_move_return_value): Fix memory leak.
5077         * mini-x86.c (get_call_info): Add the get_call_info () code from the
5078         amd64 port, not yet used.
5080 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
5082         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
5083         a struct type.
5085 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
5087         * driver.c: Added --security option to activate the security manager.
5088         Right now this will allow code generation for declarative demands and
5089         is disabled when AOT is specified.
5090         * mini.c: Add code generation for declarative security demands.
5091         * mini.h: Add mono_use_security_manager as an extern gboolean.
5093 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
5095         * aot.c (mono_compile_assembly): Speed up compilation a bit by
5096         emitting more dense assembly code.
5098         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
5099         exception throwing stuff.
5101 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
5103         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
5104         dead code.
5106         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
5107         left in by mistake.
5109         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
5110         fixed.
5112         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
5114         * tramp-*.c: Only patch vtable slots if the object is in the current
5115         domain. Fixes appdomain-unload.exe.
5117         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
5118         
5119         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
5120         x86 branch.
5122 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
5124         * mini.c (reverse_branch_op): New helper function.
5126         * mini.c (optimize_branches): Run the new optimization only on 
5127         platforms which support it. Also reverse all kinds of branches.
5129         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
5131         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
5132         a throw statement.
5134         * mini.c (optimize_branches): Reverse not-equals branches if the false
5135         bblock is a throw. This happens a lot of time with argument checking in
5136         corlib.
5138         * mini.c (mono_codegen): Add support for placing basic blocks after
5139         the function epilogue.
5141         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
5142         function epilogue.
5143         
5144 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
5146         * mini.c (setup_stat_profiler): Only set this up if the platform
5147         supports ITIMER_PROF.
5149 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
5151         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
5152         previous patch.
5154         * inssel.brg: Fix a warning.
5156 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
5158         * mini.c: added support for statistical profiler 
5159         (run with: --profile=default:stat).
5161 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
5163         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
5165         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
5167         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
5168         related to global registers from the amd64 port.
5170 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
5172         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
5174         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
5175         with global registers.
5176         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
5178         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
5180 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
5182         * debug-mini.c (encode_value): Fix off-by-one.
5184         * aot.c (encode_value): Likewise.
5186         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
5188 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
5190         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
5191         AOT.
5193         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
5194         
5195         * aot.c (emit_method_info): Increase size of temp buffer.
5197         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
5198         the AOT case.
5200 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
5202         * aot.c (emit_method_info): Fix build.
5203         
5204         * aot.c: Further rework of the AOT file format to reduce the size of
5205         the method info data.
5207         * mini.h: Bump AOT file format version.
5209 2004-12-27  Martin Baulig  <martin@ximian.com>
5211         * mini.c (mini_get_method): New static method; call
5212         mono_get_method_full() and mono_get_inflated_method().
5213         (mono_method_to_ir): Use mini_get_method() instead of
5214         mono_get_method_full(). 
5216 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
5218         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
5220 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
5222         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
5224         * inssel-amd64.brg: Add some optimization rules.
5226 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
5228         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
5229         standard not GC'd stuff is fine.
5231 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
5233         * aot.c: Rework the AOT file format to get rid of most of the global
5234         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
5236         * mini.h: Bump AOT file format version.
5237         
5238 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
5240         * mini.h: Bump AOT file format version.
5242         * aot.c (mono_aot_is_got_entry): New function to determine if an 
5243         address is inside a GOT.
5245         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
5247         * cpu-pentium.md: Increase the maximum size of some instructions which
5248         might involve a got access.
5249         
5250         * mini.c (get_method_from_ip): Another debug helper function.
5252         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
5253         when got var accesses are created during the decompose phase.
5255         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
5257         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
5258         argument mini_compile_method and to MonoCompile, and use this to
5259         determine whenever a given method is compiled for AOT. This allows the
5260         other methods compiled during AOT compilation to be free of AOT stuff,
5261         so the backends does not need to add special support for them by
5262         creating a fake GOT etc.
5264         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
5265         longer needed.
5267 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
5269         * mini.c (mono_method_to_ir): It turns out that some of the
5270         x-appdomain wrappers are lax with types, so just ignore this for
5271         all wrappers.
5273         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
5274         at the vtable->klass. If it is non-shared code we can just use the
5275         vtable.
5277 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
5279         * mini-ppc.c: access MonoDomain from tls, too.
5281 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
5283         * declsec.c: Removed unused variable (and related warning ;-)
5285 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
5287         * iltests.il: New test for LDELEMA on an array of ref types.
5289         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
5290         all ldelema's on reftypes.
5291         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
5292         it was the wrong place to put it.
5294         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
5295         register to pop to make this cleaner, at the request of Paolo.
5297 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
5299         * mini-ops.h (OP_GETHASHCODE): New op.
5301         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
5303         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
5304         operation.
5306         For a microbenchmark, this reduces the cost of Hashtable.get_Item
5307         by 25%.
5308         
5309         * mini-x86.c (mono_arch_output_basic_block): Rather than
5311         add ebp, 4
5313         Emit
5315         pop edx
5317         The first is 3 bytes while the second is 1. This saves 36 kb on
5318         mscorlib, quite a big saving. When bootstraping mcs, I was able to
5319         see a small boost because of icache locality.
5321         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
5323 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
5325         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
5326         started code sharing with the generic code.
5328 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
5330         * mini-ppc.c, cpu-g4.md: added code for direct access to
5331         tls data slots.
5333 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
5335         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
5336          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
5337         to OP_TLS_GET.
5339 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
5341         * declsec.c|h: Added functions to cache the declarative stack modifiers
5342         in MonoJitInfo and to create a security frame from a MonoJitInfo 
5343         structure.
5344         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
5345         created. Register internal calls for System.Security.SecurityFrame::
5346         _GetSecurityFrame and _GetSecurityStack.
5347         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
5348         the definitions for the new stack walk/callback mechanism.
5349         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
5350         first security frame for LinkDemands and InheritanceDemands) and
5351         GetSecurityStack for Demands. Both use the new mono_walk_stack code
5352         from lupus.
5353         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
5354         walk initialization (lupus).
5356 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
5358         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
5359         idiom.
5360         (handle_loaded_temps): Do not create a temporary variable for
5361         things that we know are temps. They will never be modified.
5362         (mono_spill_call): Set MONO_INST_IS_TEMP
5363         (mono_emulate_opcode): ditto
5364         (emit_tree): ditto
5365         (mono_method_to_ir.CEE_DUP): ditto
5367 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
5369         * mini.c (type_to_eval_stack_type): Make this handle the void type
5370         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
5371         (emit_tree): use ip_in_bb to special case some common idioms
5372         Update all callers to pass in the IP.
5373         (mono_method_to_ir): Make CEE_CALL* do the above as well.
5375         This gives us a nice 2% speedup in mcs bootstrap.
5377         * mini-x86.c (peephole_pass): Peephole pass to make
5378         mov  [foo], eax
5379         push [foo]
5381         into
5383         mov [foo], eax
5384         push eax
5386         * mini.c (ip_in_bb): new method.
5387         (mono_method_to_ir): use this method rather than doing the hash
5388         lookup ourselves.
5390         * linear-scan.c (mono_linear_scan): When expiring actives, you
5391         don't need to keep around variables that expire on this
5392         instruction. This makes it so that:
5393              a = b + 1
5394         will turn into:
5395              store (ebx add (ebx, 1))
5396         which will become
5397              add ebx, 1
5399 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
5401         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
5402         combination to avoid doing two copies. Fix up problems with previous
5403         patch.
5405         * mini.c: Fix 64 bit warnings.
5407         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
5409 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
5411         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
5412         changes from the x86 code.
5414         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
5416 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
5418         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
5419         throwing code to reduce its size, unify the AOT and non-aot code and 
5420         get rid of relocations in the AOT case.
5422         * mini-x86.h mini.c exceptions-x86.c 
5423         (mono_arch_get_throw_corlib_exception): New arch specific function to 
5424         raise corlib exceptions which doesn't require relocations in the 
5425         caller.
5427         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
5429 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
5431         * mini.c (mono_emit_method_call): Only allocate the got var when it is
5432         needed.
5434         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
5435         in the AOT case.
5437 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
5439         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
5440         with add function when used from Inc/dec atomic 
5441         functions. Re-enabled optimization on x86.
5442         * mini-ops.h: renamed atomic_add functions to
5443         allow _add to match the Interlocked::Add and
5444         _add_next to match Interlocked::Inc/Dec.
5446 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
5448         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
5449         linking of BBs to the end BB, and enabled SSAPRE also with
5450         consprop and copyprop (which was prevented by that bug).
5452 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
5454         * mini-x86.c: disabling the Interlocked optimizing code. 
5456 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
5458         * aot.c (load_aot_module): Move reading of got_addr after the AOT
5459         file version check.
5460         
5461 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
5463         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
5464         interlocked optimization due lack of support on x86, rewrote 
5465         exchange to take into account that base may be in eax.
5466         
5467         xsp works again; activated Interlocked optimizing code.
5468         
5469 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
5471         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
5473 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
5475         * mini-ops.h: Add new opcodes.
5477         * mini.h: Add new patch types. Add got_var to MonoCompile.
5479         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
5480         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
5481         make it work with all kinds of patchable code.
5483         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
5484         address of the GOT, and referencing entries in the GOT.
5486         * mini.c: Add code to load the GOT address if needed by an opcode.
5488         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
5489         independent AOT code on the x86 using an elf-style Global Offset Table.
5491 2004-12-14  Raja R Harinath  <rharinath@novell.com>
5493         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
5495 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5497         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
5498         when running xsp.
5500 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
5502         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
5503         of Interlocked:Increment/Decrement/Add as inline ops.
5504         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
5506 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
5508         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
5509         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
5511 2004-12-12  Duncan Mak  <duncan@ximian.com>
5513         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
5514         again. `patch_info->table_size' is no longer valid after Zoltan's
5515         commit #37636.
5517 2004-12-12  Martin Baulig  <martin@ximian.com>
5519         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
5520         if we are the "real" method, ie. not an inlined method inside it.
5522 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
5524         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
5525         before we look in the special fields table. This fixes
5526         ../tests/thread-static-init.cs.
5528 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
5530         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
5531         for Array get_Rank and get_Length. Fixes bug #70465.
5533 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
5535         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
5536         separate structure to reduce the size of MonoJumpInfo.
5538 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
5540         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
5542 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
5544         * mini.c (mini_get_inst_for_method): Changed to allow ports
5545         to return a MonoInst instead of opcode 
5546         (renamed mini_get_opcode_for_method to better reflect the new functionality)
5547         
5548         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
5549         Allow ports to return a created MonoInst instead of op-code, will enable
5550         new optimizations.
5551         (renamed mini_get_opcode_for_method to better reflected the functionality)
5553 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
5555         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
5557 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
5559         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
5560         Fixes #69985.
5562 2004-12-08  Martin Baulig  <martin@ximian.com>
5564         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
5565         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
5567 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
5569         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
5570         correctly.
5572         * exceptions.cs: Disable some tests which depend on properties of x86 fp
5573         arithmetic.
5575 2004-12-08  Raja R Harinath  <rharinath@novell.com>
5577         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
5579 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
5581         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
5582         bug introduced by the previous patch.
5584 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
5586         * mini-ppc.c, objectc.cs: handle large structs passed by value
5587         (fixes bug #69972).
5589 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
5591         * mini-ppc.c: OP_ARGLIST implementation from
5592         Geoff Norton  <gnorton@customerdna.com>.
5594 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
5596         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
5597         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
5599 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
5601         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
5603 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
5605         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
5606         support.
5608 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
5610         * mini-sparc.c: Zero out localled-ed memory.
5612         * iltests.il: Add tests for zeroing out localloc-ed memory.
5614 2004-12-04  Martin Baulig  <martin@ximian.com>
5616         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
5617         mono_method_get_signature_full().       
5619 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
5621         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
5622         and some utility functions (always for SSAPRE), integrated SSAPRE.
5623         * mini.h: Likewise.
5624         * driver.c: Added ssapre option.
5625         * ssa.c: Small fix on OP_ARG handling.
5626         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
5627         * Makefile.am: Likewise.
5629 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
5631         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
5632         now in the xp code.
5634         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
5635         icall.
5637 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
5639         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
5640         
5641         * cpu-s390.md : Increase instruction length of oparglist.
5643         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
5645 2004-11-30  Martin Baulig  <martin@ximian.com>
5647         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
5648         virtual generic methods.  We call a special helper_compile_generic_method()
5649         icall to retrieve the method from the vtable, inflate and compile
5650         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
5652         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
5654 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
5656         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
5658 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
5660         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
5661         Fixes #69929.
5663 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
5665         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
5666         platforms with PIC aot.
5668 2004-11-28  Martin Baulig  <martin@ximian.com>
5670         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
5671         Fixes gen-112.cs.
5673 2004-11-28  Martin Baulig  <martin@ximian.com>
5675         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
5676         the result of mono_type_get_underlying_type() to check whether
5677         we're byref.
5679 2004-11-26  Martin Baulig  <martin@ximian.com>
5681         * mini.c
5682         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
5683         in the g_assert().
5685 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
5687         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
5688         the same way as the other arguments so they won't get clobbered.
5690         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
5691         calls through R11 since it is clobbered by the trampoline code.
5693 2004-11-26  Raja R Harinath  <rharinath@novell.com>
5695         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
5696         pick up in-tree mscorlib.dll.
5698 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
5700         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
5702         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
5703         runtime data/code are now stored in a table similar to the GOT in ELF. 
5704         This allows the code itself to be position independent.
5706         * aot.c: Fix loading of referenced assemblies after the lazy assembly
5707         loading changes.
5709         * aot.c: Attach ELF type (object/function) directives to all global
5710         symbols.
5712         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
5714         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
5716         * mini-amd64.h: Turn on PIC AOT code.
5718         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
5719         returning the offset within an OP_AOTCONST instruction where the GOT
5720         offset needs to be added.
5722         * mini.h: Bump AOT file format version.
5724 2004-11-25  Martin Baulig  <martin@ximian.com>
5726         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
5727         uninflated generic methods.
5729 2004-11-25  Martin Baulig  <martin@ximian.com>
5731         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
5733 2004-11-24  Martin Baulig  <martin@ximian.com>
5735         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
5736         original klass (this only applies for generic instances).
5738 2004-11-24  Martin Baulig  <martin@ximian.com>
5740         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
5741         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
5742         that array).
5744 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
5746         * mini.c (mono_method_to_ir): Disable inlining for methods containing
5747         localloc. Fixes #69678.
5749         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
5750         
5751 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
5753         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
5754         used SSE registers on pinvoke calls. Fixes #69774.
5756 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
5758         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
5759         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
5761 2004-11-23  Raja R Harinath  <rharinath@novell.com>
5763         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
5764         Refer directly to the mcs/ tree.
5766 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
5768         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
5769         Check if a trampoline for a synchronized method is required. 
5771 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
5773         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
5774         with localloc if needed. Throe arithmetric exception in
5775         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
5776         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
5778 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
5780         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
5781         types before switching on type.  Fixes #69622.
5783 2004-11-19  Raja R Harinath  <rharinath@novell.com>
5785         * Makefile.am (check-local): New.  Integrate into 'make check'.
5786         (MCS,RUNTIME): Define using in-tree mono and mcs.
5787         (ILASM): New.
5788         (%.exe): Use $(ILASM).
5790 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
5792         * mini-ppc.c: adjust initial prolog size (bug #69691).
5794 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
5796         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
5797         #69664.
5799 2004-11-17  Raja R Harinath  <rharinath@novell.com>
5801         * Makefile.am (clean-local): Rename from 'clean'.
5803 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
5805         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
5806         to mono_arch_is_int_overflow. 
5807         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
5808         SIGFPE events.
5810 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
5812         * declsec.c|h: New files to support declarative security attributes.
5813         Added function to check if a method has (applicable) security.
5814         * mini.c|h: Add check for declarative security attributes in
5815         mono_method_check_inlining.
5816         * Makefile.am: Added declsec.c and declsec.h to the build.
5818 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
5820         * mini.c, mini.h: update to keep dynamic code info per-domain.
5822 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
5824         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
5825         (mini_init): Get rid of it from here too.
5827 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
5829         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
5830         implemented OP_RETHROW (patch by Geoff Norton
5831         <gnorton@customerdna.com>).
5833 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
5835         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
5836         between appdomains.  Fixes appdomain-unload on PPC.
5838 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
5840         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
5841         mini-exceptions.c: handle the new wrapper types.
5842         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
5843         token value as a MonoClass* when compiling a wrapper.
5844         mono_jit_create_remoting_trampoline now takes an additional
5845         MonoRemotingTarget parameter.
5846         
5847 2004-11-10  Martin Baulig  <martin@localhost>
5849         * mini.c (mono_method_to_ir): Use `generic_container->context'
5850         rather than creating a new one.
5852 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
5854         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
5856         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
5858 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
5860         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
5861         the experimental aot cache stuff.
5863 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
5865         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
5866         mini-exceptions.c: update to exception clause structure changes.
5868 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
5870         * exceptions-x86.c (throw_exception): Fix warnings.
5872         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
5873         for OP_RETHROW.
5875 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
5877         * exceptions-sparc.c (get_throw_exception): Really fix this.
5879 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
5881         * tramp-*.c: we no longer support icalls without wrappers, so
5882         a bit of code can be removed here
5884 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
5886         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
5887         patch.
5889         * cpu-sparc.md: Add op_rethrow.
5891         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
5893         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
5895         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
5896         * mini-ops.h: Add OP_RETHROW.
5898         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
5900         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
5902 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
5903         
5904         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
5905         Makes the output much easier to read
5907 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
5909         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
5910         prevents another huge leak when compiling with ssa. Secondly, the
5911         performance of doing this rather than freeing the lists is much
5912         better. GList does a lock every time you allocate a list link,
5913         so that it can use a memory pool. So, it is better to just use
5914         a memory pool of our own.
5915         
5916         * ssa.c, linear-scan.c: replace g_list_remove_link with
5917         g_list_delete.  The remove one does not free the GList, so we were
5918         leaking memory. On -O=all --compile-all with corlib, this cut down
5919         3 MB of allocations.
5921 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
5923         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
5925         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
5927         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
5928         into a new function mono_create_jit_trampoline ().
5930 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
5932         * trace.c (get_spec): Allow tracing of classes without a namespace.
5934 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
5936         * mini.c: Fix pointer overwrite in mini_method_compile.
5938 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
5940         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
5941         The darwin ABI needs some special handling for 1 and 2 byte structs
5942         Lets use lbz/lhz instead of lwz everywhere.
5943         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
5944         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
5945         Use stb/sth for the former, and put the latter always on stack instead of in
5946         argument registers.
5948 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
5950         * trace.c (is_filenamechar): Add '_'.
5952 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
5954         * mini-s390.c: Fix prolog length to allow for large trace requirements.
5956         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
5958 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
5960         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
5961         depends on libmonogc. Fixes #68805.
5963 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
5965         * mini.c (mono_jit_free_method): Provide extra information for
5966         this error.  Currently this leaks, but will be turned into a
5967         developer option in the future.
5969 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
5971         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
5973 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
5975         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
5976         boundary. Fixes reading of PATCH_INFO_R4 and R8.
5977         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
5979 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
5981         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
5982         trampolines for AOT code.
5984 2004-10-22    <vargaz@freemail.hu>
5986         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
5987         constructed types. Fixes #68136.
5989 2004-10-21  Martin Baulig  <martin@ximian.com>
5991         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
5992         if it returns true, unwind the stack to the call instruction.
5994 2004-10-21    <vargaz@freemail.hu>
5996         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
5998         * mini.h: Bump AOT version number.
6000         * objects.cs: Add another test for unbox trampolines.
6002         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
6003         valuetype methods.
6005 2004-10-20    <vargaz@freemail.hu>
6007         * driver.c: Add SHARED to the set of optimizations tested.
6009         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
6011         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
6012         used by CEE_NEWARR.
6014         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
6016 2004-10-20  Martin Baulig  <martin@ximian.com>
6018         * mini-exceptions.c (mono_handle_exception): Call
6019         mono_debugger_handle_exception() to tell the debugger about
6020         catch/finally clauses.
6022 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
6024         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
6026         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
6027         #68447.
6029 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
6031         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
6032         methods as their native size, fixed bug #57543, #57545.
6033         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
6034         This saves a temporary register and mullw call down into 1 (minor perf
6035         increase for cases like sum = sum * 5;  This use to translate into:
6036             li r11,5
6037             mullw r28,r28,r11
6038         It now translates to
6039             mulli r28,r28,5
6041 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
6043         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
6044         #68388.
6046 2004-10-11  Martin Baulig  <martin@ximian.com>
6048         * mini.c (mono_method_to_ir): If we're a generic method, get the
6049         MonoGenericContainer from our MonoMethodNormal and create a
6050         MonoGenericContext from it.
6052 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
6054         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
6056         * basic-long.cs: Add test for checked i8->i2 cast.
6058 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
6060         * inssel-ppc.brg: added a couple of speedup rules.
6062 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
6064         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
6065         to speed up rebuilds.
6067 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6069         * mini-s390.c: Minor fix to OP_OR_IMM.
6071 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
6073         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
6074         better. Fixes appdomain-unload.exe on sparc.
6076 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
6078         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
6079         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
6080         see bug 67324.
6082 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
6084         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
6086 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
6088         * mini.c: Always generate a field read/write wrapper for members
6089         of the class MarshalByRefObject since the actual instance could
6090         be a CBO.
6092 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
6094         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
6096 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
6098         * driver.c mini.h trace.c: Move the setting of the main assembly into
6099         a separate function called mono_trace_set_assembly () and call it after
6100         actually loading the main assembly. Fixes #66872.
6102 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
6104         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
6105         using the code manager.
6107 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
6109         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
6111 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
6113         * cpu-amd64.md: Fix bug in previous patch.
6114         
6115         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
6116         #66650.
6118 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
6120         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
6121         mini-exceptions.c: updates for changed stack walk interface.
6123 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6125         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
6127 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
6129         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
6131 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
6133         * driver.c (mini_regression_list): Do not call mono_assembly_close 
6134         since assemblies can't be unloaded.
6135         
6136 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
6138         * cpu-amd64.md: Fix more instruction lengths.
6140         * cpu-amd64.md: Fix lengths of some instructions.
6142 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
6144         * inssel.brg: Make the array ldelema check aot friendly.
6146 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
6148         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
6150         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
6152 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
6154         * mini-x86.c: Fix build.
6156         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
6157         mono_type_get_underlying_type () helper function to simplify code.
6158         
6159 2004-09-09  Martin Baulig  <martin@ximian.com>
6161         * mini-amd64.c: Don't access `type->data.klass' directly, call
6162         mono_class_from_mono_type() instead since the type may be a
6163         generic instance.
6165 2004-09-09  Martin Baulig  <martin@ximian.com>
6167         * mini-amd64.c (get_call_info): Fix support for generic instances.
6168         (add_valuetype): Use mono_class_from_mono_type() to get the class
6169         since we can be a generic instance.
6171 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
6173         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
6175 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
6177         * liveness.c: reset spill costs on each scan: bug 62107
6179 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
6181         * exceptions-sparc.c (mono_arch_find_jit_info): remove
6182         unnecessary line that doesn't compile
6184 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
6186         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
6187         trampolines, make them call an error function so people can fix their
6188         code.
6190 2004-09-06  Martin Baulig  <martin@ximian.com>
6192         * mini.c (mono_method_to_ir): When initializing locals, handle a
6193         generic instances like a valuetype if it's a valuetype and like a
6194         class if it's a class.
6196 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
6198         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
6199         stack. Fixes #64674.
6201         * exceptions.cs: Add test for unwinding of call arguments.
6203 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
6205         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
6206         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
6207         set the carry/borrow flag). The sparc and s390 implementations
6208         can now use optimized versions (and simplify the code). ppc bugfixes.
6210 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
6212         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
6214 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
6216         * inssel-amd64.brg: Remove leftover 32 bit rule.
6218         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
6220 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
6222         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
6223         mono_arch_find_jit_info functions into a new function. Fix a memory
6224         leak.
6226         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
6227         refactored code.
6228         
6229 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
6231         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
6232         as well.
6233         
6234         * exceptions.cs: Add array size tests.
6236         * mini.c: Allocate a separate icall wrapper for each arity of 
6237         mono_array_new_va. Fixes #59509.
6239         * exceptions.cs: Add testcase for 64578.
6241         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
6243         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
6244         
6245 2004-09-02  Martin Baulig  <martin@ximian.com>
6247         * mini.c (mono_method_to_ir): When initializing the locals, call
6248         handle_initobj() on the generic instance itself, not its
6249         underlying type.
6251 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
6253         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
6254         MonoJitInfo for dynamic methods.
6256         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
6258         * mini.c: Add support for freeing JIT data for dynamic methods.
6259         
6260 2004-09-01  Martin Baulig  <martin@ximian.com>
6262         * mini-x86.c (is_regsize_var): Added support for generic
6263         instances.
6264         (mono_arch_emit_prolog): Make this compile again, use
6265         `x86_push_imm_template (code)'.
6267 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
6269         * mini-x86.c: make all push_imm instructions that get
6270         patched always emit the long form
6272 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
6274         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
6275         in a per-domain hash.
6277         * mini-amd64.c (merge_argument_class_from_type): Handle generic
6278         types.
6280 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
6282         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
6283         work.
6284         
6285         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
6286         work.
6288         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
6289         Beginnings of SSE2 support.
6291         * exceptions.cs: Add more tests for checked int<->uint casts.
6293 2004-08-28  Martin Baulig  <martin@ximian.com>
6295         * mini-x86.c (mono_arch_instrument_epilog): Added support for
6296         generic instances.
6298         * mini.c
6299         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
6300         Handle generic instances recursively.
6302 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
6304         * iltests.il: test for conv.u8 on a constant
6306 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
6308         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
6309         LCONV_x4 (shrun_32 (membase)).
6311 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
6313         * inssel-x86.brg: c&p rules for push/setret of long
6315 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
6317         * inssel-x86.brg: c&p rules for compare (base, regvar) and
6318         compare (regvar, base)
6320         * inssel-x86.brg: more burg love
6322         * inssel.brg: more cleanup
6324         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
6326 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
6328         * basic-long.cs, basic-calls.cs: new tests for optimization.
6330 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
6332         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
6333         patch.
6335 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
6337         * mini-amd64.c (read_tls_offset_from_method): Add another case.
6338         
6339 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
6341         * inssel.brg (mini_emit_memcpy): use 
6342         NO_UNALIGNED_ACCESS to disable memcpy optimization
6344 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
6346         * mini-amd64.c: Handle generic types in various places.
6348         * mini.c (mono_method_to_ir): Handle generic types in init locals.
6350 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
6352         * mini.c (handle_box): Fix warning.
6354         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
6356         * mini-amd64.h: Enable the emit_state optimization.
6358         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
6360         * mini-amd64.c: Add some new 64 bit peephole opts.
6362         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
6364         * cpu-amd64.md: sreg1 of div instructions must be %rax.
6366         * mini-amd64.c: Register allocator fixes.
6368         * mini.c: Add an optimization to emit_state to avoid allocation of new
6369         registers on some platforms.
6371 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
6373         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
6375         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
6376         allocation. Fixes #63085.
6378         * basic-long.cs: Add new regression test.
6380         * mini-amd64.c: Register allocator improvements.
6382 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
6384         * mini-amd64.c (read_tls_offset_from_method): Add another code
6385         sequence.
6387         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
6388         instruction sequence for nullifying class init trampolines.
6390         * objects.cs: Add new regalloc test.
6392         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
6394 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
6396         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
6397         
6398         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
6399         arguments.
6401         * driver.c: Fix profiling after TLS changes.
6402         
6403         * driver.c (mono_main): Set mono_stats.enabled if needed.
6405         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
6406         CEE_BOX.
6408 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
6410         * mini-x86.c: use a 1 op rather than a 2 op tls access
6411         instruction -> faster.
6413 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
6415         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
6416         x86 backend.
6418 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
6420         * exceptions-sparc.c (throw_exception): fix typo
6422 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
6424         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
6425         set tree->dreg correctly with tls. Allow any
6426         register to be used.
6428         * mini-x86.c (read_tls_offset_from_method): add new code
6429         generation pattern seen with GCC.
6432 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
6434         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
6435         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
6436         exceptions-sparc.c: fix some performance issues in exception
6437         handling and setting of the stack trace for exceptions that were
6438         already thrown.
6440 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
6442         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
6443         x86 backend.
6444         
6445         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
6446         registers.
6448 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
6450         This patch inlines tls access, when possible.
6451         
6452         * mini.h: new arch functions for TLS intrinsics.
6453         All platforms updated with a stub.
6455         * mini.c: use the new intrinsics
6457         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
6458         arch specific intrinsic for tls variables
6460 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
6462         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
6463         under windows.
6465 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
6467         * mini.c: thread local allocation
6469 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
6471         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
6473         * Makefile.am: Link against the static version of libmonogc.
6474         
6475         * Makefile.am: Link the static versions of the convenience libraries
6476         into the mono executable.
6478         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
6480 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
6482         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
6483         on integer overflow.
6485         * mini-amd64.c: Reorganize function call code.
6487         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
6489 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
6491         * inssel-x86.brg: use xor eax,eax.
6492         
6493         * basic.cs: new tests
6495 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
6497         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
6498         in exception throwing code.
6499         
6500 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
6502         * inssel-x86.brg: use xor esi,esi.
6504 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
6506         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
6507         can trace methods compiled during mini_init () too.
6509         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
6510         CEE_CONV_U4.
6512 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
6514         * Makefile.am: static link on x86 (r=zoltan)
6516 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
6518         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
6519         code since it causes some programs to fail.
6521 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
6523         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
6525 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
6527         * mini.c: ovfops_op_map - add STACK_OBJ case for
6528         CONV_I 
6529         * basic.cs: add test_0_pin_string as test
6530         case for above.
6532 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
6534         * Makefile.am: build C# if srcdir != builddir
6536 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
6538         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
6539         fall-through blocks.
6541 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
6543         * driver.c: enable loop by default again and include abcrem in -O=all.
6545 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
6547         * iltests.il: Add some localloc tests.
6549         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
6551         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
6552         Fixes #62574.
6554         * inssel-amd64.brg: Add some optimizations.
6556         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
6557         for gcc-3.4.
6559         * Makefile.am: Statically link mono against libmono on AMD64.
6560         
6561         * mini-amd64.c inssel-amd64.brg: Optimizations.
6563 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
6565         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
6567         * tramp-amd64.c: Patch calling code in trampolines.
6569 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
6571         * mini-amd64.c: pinvoke struct passing fixes.
6573 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
6575         * mini-sparc.c: redo change, make mono_arch_cpu_init call
6576         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
6578 2004-08-05  Duncan Mak  <duncan@ximian.com>
6580         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
6581         CEE_LDELEM_ANY.
6583 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
6585         * mini-amd64.c (emit_move_return_value): Move return value for normal
6586         calls too.
6588 2004-08-05  Martin Baulig  <martin@ximian.com>
6590         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
6591         `type->type'; just modify `type' itself when dealing with enums
6592         and generic instances.
6593         (check_call_signature): Make `simple_type' a `MonoType *'.
6595 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
6597         * mini.c: Use OP_PADD to add offsets to addresses.
6599         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
6601 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
6603         * mini-sparc.c (mono_arch_emit_epilog): fix check
6604         for folding last op into restore instruction
6606 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
6608         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
6609         helper methods using the code manager.
6610         
6611         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
6613         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
6615 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6616         
6617         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
6618           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
6620         * mini-s390.c: fix tail processing
6622 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
6624         * mini-ppc.c: mul.ovf.un exception name fix.
6626 2004-08-03  Martin Baulig  <martin@ximian.com>
6628         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
6629         instances; before jumping to `handle_enum', also modify `ptype'.
6631 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
6633         * cpu-sparc.md: fcall maximal length too small.
6635 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
6637         * mini-amd64.c mini.h: Add initial support for passing/returning 
6638         structures to/from pinvoked methods.
6640 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
6642         * mini-ppc.c: reg allocator fix.
6644 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
6646         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
6648         * inssel.brg: Optimize memset on 64 bit machines.
6650         * mini-amd64.c: Fix some vararg cases.
6652 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
6654         * mini-s390.c: Corrected macro in emit_float_to_int
6656         * s390-abi.cs: Tests to exercise the s390 ABI
6658 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
6660         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
6661         caller saved regs.
6663         * basic.cs: Add a test for add.ovf.un.
6665 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
6667         * mini-sparc.c: add case for OP_IDIV_UN
6669 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
6671         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
6672         
6673         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
6675 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
6677         * basic.cs: regression tests.
6679         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
6680         regressions.
6682 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
6684         * basic.cs: Add a new test.
6686         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
6687         and AOT. Various fixes and optimizations.
6689         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
6691 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
6693         * mini-ppc.c: make sure temp regs are not used for global reg
6694         allocation.
6696 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
6698         * cpu-sparc.md: conv_i8 fix for 64bits
6700         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
6702 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
6703         
6704         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
6705         add opcode for cmp BYTE PTR [eax], imm.
6707         * inssel.brg: Make memcpy and memset takes bases.
6709 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
6711         * *-amd64.*: More AMD64 work.
6712         
6713 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
6715         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
6716         add a compare-not-equal opcode.
6717         
6718 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
6720         * mini.c: Use mono_init_from_assembly instead of mono_init.
6721         
6722 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
6724         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
6726         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
6728         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
6730         * inssel.brg: 64 bit fixes.
6732         * mini.h (MonoCallInst): Add some AMD64 specific data.
6734         * mini.h: Add some OP_P opcodes.
6736 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
6738         * basic.cs: tests for 61797 and 61740
6740 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
6742         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
6743         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
6745 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
6747         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
6749         * *-amd64*.*: Ongoing AMD64 work.
6751 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
6753         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
6755         * *-amd64*: Ongoing AMD64 work.
6757         * mini-arch.h: Add AMD64 support.
6759         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
6761         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
6763         * mini-ops.h: Add new opcodes.
6765         * Makefile.am: Add AMD64 support.
6767         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
6768         rules into the inssel-long*.brg files.
6770         * *-amd64.*: Add beginnings of AMD64 backend.
6772 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
6774         * mini.c (print_dfn): commenting out the code that prints
6775         the cil. With -O=deadce, this makes -v -v crash.
6776         
6777         * cpu-pentium.md: make checkthis have a length of 2
6779 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
6781         * mini-sparc.h: fix implementations of __builtin
6782         functions for Sun compiler for V9.
6784 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
6786         * mini.c: use the new stelem.ref wrapper
6787         * exceptions.cs, arrays.cs: new stelem.ref tests
6789 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
6791         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
6792         new XSP should work with these changes).
6794 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
6795         
6796         * inssel-{long32,x86,}.brg: trivial optimizations.
6797         
6798 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
6800         * mini.c: load value when emitting box operation in
6801         constrained calls.
6803 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
6805         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
6806         is one byte shorter than cmp DWORD PTR [eax], 0.
6808 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
6810         * inssel-ppc.brg: arguments on the stack are always
6811         relative to the stack pointer (spotted by Neale Ferguson).
6813 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
6815         * exceptions-x86.c: delay appending the method name to the trace until
6816         after mono_jit_info_table_find is called, as this gets the real
6817         MonoMethod.
6819 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
6821         * aot.c: register roots
6823 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
6825         * aot.c : I could just use PLATFORM_WIN32 flag.
6827 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
6829         * aot.c : Reverting the previous fix. This time it broke linux build.
6831 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
6833         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
6835 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
6837         * mini.c (handle_stack_args): Remove some more debugging code.
6838         
6839         * mini.c (handle_stack_args): Remove debug output left in by mistake.
6841         * driver.c mini.h aot.c: Allow additional options to be specified with
6842         --aot and pass them to mono_compile_assembly.
6844         * aot.c: Add experimental code to AOT compile all loaded assemblies
6845         on demand and save the code into a cache in the filesystem.
6847         * aot.c: Add support for more wrapper methods.
6848         
6849         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
6850         58863.
6852         * cpu-*.md: Remove removed opcodes.
6854         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
6855         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
6856         related icalls to marshal.c.
6858 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
6860         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
6862         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
6864         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
6866 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
6867         * liveness.c: If liveness is recomputated we need to reset the information
6868         for each variable. This way, if the liveness range has been narrowed
6869         by optimizations that happened after the last computation, we can return
6870         a smaller range.
6871         
6872         For example, if you have
6873         
6874         {
6875                 int i = 0;
6876                 
6877                 // Tons of code that does not affect i
6878                 
6879                 i = foo ();
6880                 ...
6881         }
6882         
6883         i = 0 is dead code and will be removed by SSA. However, when
6884         linear scan gets to the code, i will still appear to be live
6885         throughout the entire block. This prevents good register allocation.
6887 2004-07-06  Martin Baulig  <martin@ximian.com>
6889         * debug-mini.c (mono_debug_init_method): Allow
6890         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
6891         (mono_debug_add_icall_wrapper): New method.
6893         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
6895 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
6897         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
6898         optimization.
6900 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
6902         * aot.c (mono_aot_load_method): Fix loading of debug info.
6904 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
6906         * aot.c: Add logging support.
6908 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
6910         * mini.h: Add prototype for mono_print_method_from_ip.
6912         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
6914         * inssel.brg: 64 bit fixes.
6916         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
6917         inssel-long32.brg.
6919         * Makefile.am: Add SPARC64 support.
6921 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
6923         * aot.c: Fix alignment problems on 32 bit platforms.
6925 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
6927         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
6928         SPARC64.
6930         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
6931         problems.
6933         * mini.h: Bump AOT file version. Some 64 bit fixes.
6935 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
6937         * inssel-sparc.brg: Add new rule to avoid register moves.
6939         * inssel.brg: Add ldind_to_load_membase helper function.
6941 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
6943         * mini.c: OffsetToStringData intrinsic.
6944         
6945 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
6947         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
6949         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
6950         regression tests.
6952         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
6953 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
6955         * mini.c: reinstated mono_compile_get_interface_var()
6956         on x86, too, since the change breaks the Gtk# build there as well.
6958 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
6960         * driver.c: remove loop from the default optimizations: it seems to
6961         interact badly with some of the other options (see bug #60613).
6963 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
6965         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
6966         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
6968 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
6970         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
6971         vararg-using methods.
6973 2004-06-21  Martin Baulig  <martin@ximian.com>
6975         * mini/mini-exceptions.c
6976         (mono_handle_exception): Added `gpointer original_ip' argument.
6977         After calling mono_unhandled_exception(), call
6978         mono_debugger_unhandled_exception() and if that returns true,
6979         restore the context and return.
6981 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
6983         * mini-ppc.c: prefer the use of relative branches so
6984         they won't need to be patched in aot code (patch from Patrick Beard).
6986 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
6988         * aot.c: patch from Patrick Beard to make the output assembly
6989         more correct for the MacOSX assembler. Small tweak to
6990         generate sane images on Linux/PPC, too.
6992 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
6994         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
6995         case until bug #59509 is fixed (shows up in #60332).
6997 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
6999         * mini.c: make sure the needed wrappers are compiled, too, with
7000         precomp.
7002 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
7004         * driver.c: remove NPTL reference in --version output.
7006 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
7008         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
7009         generate valid assembly for the Mach-O assembler.
7011 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
7013         * driver.c: don't include abcrem in the all optimization specifier
7014         since it slows down jit compilation too much for now.
7016 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
7018         * mini.c: use BIGMUL only if both operands have the same signage.
7019         * iltests.il: Test for bug 60056. (errors related to signage in
7020         BIGMUL).
7022         r=lupus.
7024 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
7026         * mini.c, aot.c: memory leak fixes.
7028 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7030         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
7032 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
7034         * Makefile.am: remove the -static hack completely, it links in
7035         statically glib as well.
7037 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
7039         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
7040         * exceptions.cs: make it compile with new mcs/csc.
7042 2004-06-03 Massimiliano Mantione <massi@ximian.com>
7043         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
7044         and added relevant test case.
7046 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
7048         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
7049         regressions in gtk-sharp.
7051 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
7053         * exceptions.cs: New regression tests.
7055         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
7057 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
7059         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
7061 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
7063         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
7065         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
7067 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
7069         * mini.c (mono_jit_runtime_invoke): Init class in this
7070         method instead of trusting mono_jit_compile_method to
7071         do the work (because wrappers can be in object class)
7073 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
7075         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
7077         * basic-long.cs: New regression test.
7079 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
7081         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
7082         and div/rem checks.
7084 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
7086         * Makefile.am: fix miguel's change to build mono statically against
7087         libmono (track build dependencies).
7089 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
7091         * cfold.c: Some glib versions do not have G_MININT32.
7093 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
7095         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
7096         with precision of tan, atan, sin and cos, and implemented related
7097         regressions tests (fixes bug 54467, but one new problem appeared and
7098         is not fixed yet).
7100 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
7102         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
7104         * exceptions.cs: Add test for constant folding && division by zero.
7106         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
7107         since driver.c is in libmono too, so the optimization was useless.
7109         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
7110         variable to driver.c so the compiler can emit more efficient code to
7111         access them.
7113 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7115         * Makefile.am: don't distribute generated inssel.[ch] files.
7117 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
7119         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
7120         into the default appdomain. Fixes #58707.
7122         * jit-icalls.c: Remove the broken approximation for truncl, doing
7123         no conversion is better.
7125         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
7126         Fixes #58863.
7128 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
7130         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
7131         of the mcrxr instruction which is not available on some processors
7132         even if it's documented to be. Implement add and sub overflow correctly
7133         (still not complete for long unsigned). Speed up icalls a bit.
7135 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
7137         * mini.c (mono_jit_compile_method_with_opt): Make sure that
7138         we run .cctor in the current domain instead of target_domain.
7139         
7140         Fixes bug #58558, .cctor not being called in -O=shared.
7142 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
7144         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
7146 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
7148         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
7149         which can be done with an imm8, do it that way.
7150         (mono_arch_output_basic_block): ditto for a jmp
7151         (mono_arch_emit_prolog): Computate maximum offset of a label.
7153 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
7155         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
7156         now tries to allocate prefered physical reg's for virtual
7157         regs. This reduces the number of emited spills/loads with
7158         20-30% on our core assemblies.
7160 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
7162         * jit-icalls.c: truncl() is not needed and trunc() is
7163         the correct thing to do anyway (bug #58287).
7165 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
7167         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
7168         if available.
7170 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
7172         * driver.c: enable loop optimizations by default.
7174 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
7176         * mini-x86.c: fix calc of max loop size when aligning loops start.
7178 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
7180         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
7181         the stack.
7183 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
7185         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
7186         should set carry.
7188         * basic-long.cs: Add tests for add/subtract of immediates with carry.
7190         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
7191         
7192         * mini.c (inline_method): Allways inline some wrappers even if the cost
7193         is too large. Fixes #58785.
7195         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
7196         
7197 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
7199         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
7200         (crichton@gimp.org). Beginning of support for sparc/linux.
7202         * mini-sparc.c: Optimize retrieval of LMF address.
7204 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
7206         * exceptions-ppc.c:  handle alloca in methods with clauses.
7208 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
7210         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
7212 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
7214         * mini.c: Delegate most of the abort signal work to 
7215           mono_thread_request_interruption, which also handles Stop and Suspend
7216           states.
7218 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
7220         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
7221         supports the save/restore lmf opcodes.
7223 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
7225         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
7226         by gcc-3.4 as well.
7228         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
7230 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
7232         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
7233         methods which contain array accesses.
7235         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
7236         boundaries. Fixes #58537.
7238         * iltests.il: Add regression test for #58537.
7240 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
7242         * mini-x86.c (mono_arch_local_regalloc): Last part of
7243         fix for bug #58633 (releasing register to early).
7245 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
7247         * basic-long.cs: Add new regression test.
7249 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
7251         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
7252         register too early on the chain.
7254 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
7256         * mini.c (create_helper_signature): Use a helper function to reduce
7257         the code which needs to be written. Also set the calling convention of
7258         icalls on windows. Fixes #57840.
7260 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
7262         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
7263         exceptions-ppc.c: added helper function to get the instruction address
7264         from a signal handler context.
7266 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
7268         * helpers.c: use g_get_tmp_dir. Invokes happyness 
7269         from gonzalo.
7271 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
7273         * helpers.c: Add new env variable to pass args to objdump.
7274         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
7276 2004-05-17  Radek Doulik  <rodo@ximian.com>
7278         * Makefile.am (common_sources): added abcremoval.h so it get
7279         disted and daily mono packages on go-mono.com will build again
7281 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
7283         * abcremoval.c: Fixed coding style, added copyright header.
7285         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
7287         * mini.h: Added prototype for abc removal main function.
7289         * build_relations_propagation_table.pl: Added copyright header.
7291 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
7293         * basic-long.cs: reg test for complex ceq_long bug.
7295 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
7297         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
7298         reg in long and clob case (bug #58343). Fixed/added comments.
7300 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
7302         * mini.c (mono_jit_runtime_invoke): Follow new convention
7303         of calling the invoke method with an function pointer.
7305 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
7307         * ChangeLog: Fix author of memory leak patch.
7309 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
7311         * Makefile.am: fix make dist as well...
7314 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
7316         * cfold.c: Made so that conversions from pointer to int4 are no-ops
7317         on archs where pointers are 4 bytes long.
7319         * Makefile.am: Added abcremoval.c source file.
7321         * abcremoval.c: Added abcremoval.c.
7323         * abcremoval.h: Added abcremoval.h.
7325         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
7327         * inssel.brg: Enabled bounds check removal.
7329         * mini.c: Added support for abcrem optimization.
7331         * mini.h: Added abcrem optimization label.
7333         * driver.c: Added support for abcrem optimization.
7335         * propagated_relations_table.def: Added propagated_relations_table.def.
7337 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
7339         * mini.c, cfold.c: fix style.
7341 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
7343         * mini.c: handle issue with the low-level implementation of
7344         some long opcodes (bug #54209).
7346 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
7348         * basic.cs: test for my new cmov stuff.
7350 2004-05-13      Patrik Torstensson
7352         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
7353         opt and added peephole documentation.
7355 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
7357         * tramp-ppc.c: rewrote the generic trampoline code.
7359 2004-05-11      Patrik Torstensson
7361         * mini-x86.c: optimize long shl/shr asm code (one less branch)
7363 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
7365         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
7367         * mini.h mini.c dominators.c: Applied patch from Derek Woo
7368         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
7370         * mini.c: Add new icalls for AsAny marshalling.
7372 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
7374         * tramp-ppc.c, mini-ppc.c: more cleanups.
7376 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7378         * mini.c: no warnings.
7380 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
7382         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
7384 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
7386         * mini.c: In the thread abort signal handler, if the thread is in the
7387         process of being stoped, don't throw the Abort exception, just stop the
7388         thread.
7390 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
7392         * tramp-ppc.c: removed old code.
7394 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
7396         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
7397         do some simple speed optimizations on ppc.
7399 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
7401         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
7402         and large offsets in load/store.
7404 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
7406         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
7407         it causes regressions.
7409 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
7411         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
7412         support.
7414 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
7416         * jit-icalls.c: remove warnings.
7417         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
7418         speedups for unsafe code.
7420 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
7422         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
7424 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
7426         * basic-calls.cs: Add new regression test.
7428         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
7429         more portable.
7431         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
7433         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
7434         is no longer used.
7436 2004-05-06      Patrik Torstensson
7438         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
7439         long reg allocation in any reg (not only eax:edx) and implemented 
7440         long shl/shr ops in asm instead of helpers.
7442 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
7444         * mini-sparc.h: Fix warnings.
7446         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
7447         stack.
7449         * mini-exceptions.c (mono_handle_exception): Call the filter in a
7450         separate statement for clarity.
7452         * mini-sparc.c: Update status.
7454 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
7456         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
7457         here.
7459 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
7461         * inssel-ppc.brg: another small pre-release workaround:
7462         we don't do overflow detection for long_sub_un.
7464 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
7466         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
7467         (also works around a weird ppc bug: 57957).
7469 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
7471         * tramp-ppc.c: trampoline fixes.
7473 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
7475         * mini-ppc.c: fixed typos.
7477 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
7479         * mini-ppc.c, exceptions-ppc.c: more code saves registers
7480         at the top of the stack. Fixed typos. Use a frame registers
7481         for all the methods with exception clauses.
7483 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
7485         * exceptions-ppc.c: restore fp registers.
7487 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
7489         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
7490         order from the stack top (moved the stack room to save the
7491         return value for trace after the param area). Fixed corruption
7492         in restoring registers on unwind.
7494 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
7496         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
7498 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
7500         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
7501         and prolog/epilog for methods that use it. Allow
7502         enough param area room for varargs methods. Fix miguel's
7503         breakage in exception handling.
7505 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
7507         * Makefile.am: run genmdesc only on current arch.
7509 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7511         * exceptions-x86.c:
7512         * mini-x86.h: fix the build on windows.
7514 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
7516         * Makefile.am mini.h mini-exceptions.c mini-x86.h mini-sparc.h exceptions-sparc.c: Move parts of the sparc exception handling code to XP code.
7518         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
7520         * mini-exceptions.c: New file.
7521         
7522         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
7523         Move some parts of the x86 exception handling code to an 
7524         arch-independent file so it can be shared with other ports.
7526 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
7528         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
7530 2004-04-26  David Waite  <mass@akuma.org>
7532         * driver.c: remove comma from end of enumeration declaration
7534 2004-04-26  Jackson Harper  <jackson@ximian.com>
7536         * driver.c: parse config file before loading first assembly. This
7537         allows the user gac to be enabled/disabled. 
7538         
7539 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
7541         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
7542         simpler mechanism: we do not care what is encoded initially
7543         (branch absolute or relative), we care about the code and its
7544         target.  I kept the old code for reference for now.
7546         The new code tries first to determine if the jump is anywhere in
7547         the -/+32 absolute meg range, if it succeeds, it encodes using the
7548         absolute branch;  If not, it tried to find something in the
7549         relative range, if not, it uses the handle_thunk code. 
7551 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
7553         * exceptions-ppc.c: use the correct ip register on macosx.
7555 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
7557         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
7559 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
7561         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
7562         Raise exception on integer divide by zero by hand since the hw
7563         doesn't support it. Handle NaNs in FP compares.
7565 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
7567         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
7568         code reducing duplication between the platforms and enabled
7569         signal exception handling (on linux for now).
7571 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
7573         * exceptions-ppc.c: more macosx support.
7575 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
7577         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
7579 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
7581         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
7583 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
7585         * iltests.il: more tests.
7587 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
7589         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
7590         vars as well.
7592 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
7594         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
7596 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
7598         * liveness.c: Mark variables as volatile in all basic blocks reachable
7599         from exception clauses.
7601 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
7603         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
7604         inlining.
7606 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
7608         * iltests.il, basic.cs: more tests for regalloc.
7610 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
7612         * iltests.il: Some tests for register allocation modifications
7613         I have locally.
7615 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
7617         * exceptions.cs: Add regression test for bug #56782.
7619         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
7620         original stack trace if an exception is rethrown. Fixes #56782. Oh,
7621         the beauty of fixing the same thing in 5 different files...
7623 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
7625         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
7626         methods.
7628 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
7630         * mini.c: Add support for STRWLPARRAY marshalling convention.
7632 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
7634         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
7635         to init the context to setup the regs pointer).
7637 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
7639         * exceptions-ppc.c: more exceptions work.
7641 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
7643         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
7644         not allowed.
7646 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
7648         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
7649         can use the memory directly.
7651         * cpu-pentium.md: Update documentation from a post from Zoltan. 
7653         add x86_add_membase, x86_sub_membase, x86_mul_membase
7655 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
7657         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
7658         GENERAL_REGS they were also hardcoded for all PPC ports.
7660         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
7662         Remove hard-coded limit for floating point registers, use
7663         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
7665         Notice that in MacOS X calling conventions you can fit a lot more
7666         floating point values in registers, so I should update the PInvoke
7667         test to excercise the passing of floating point values on the
7668         stack (currently broken).
7669         
7670 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
7672         * tramp-ppc.c (create_trampoline_code): Added
7673         JUMP_TRAMPOLINE_SIZE. 
7674         (ppc_magic_trampoline): Follow the pattern from
7675         x86_magic_trampoline: if code is set to zero, return. 
7676         (create_trampoline_code): Always pass MonoMethod to the jump
7677         trampoline, before it was passing a null.
7678         (mono_arch_create_jump_trampoline): Implement the jump stub, could
7679         share the code with mono_arch_create_jit_trampoline. 
7681         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
7682         implemented.
7683         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
7684         implemented.  
7686         * cpu-g4.md: Added length for jmp instruction, the worst case
7687         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
7688         for save_lmf).
7690 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
7692         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
7694 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
7696         * mini.c: Only set bblock->real_offset when adding a new bblock, and
7697         before each IL instruction.
7699         * mini.c (CEE_BOX): Fix warnings.
7701 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7703         * mini.c: removed a few unused vars and extra whitespace.
7705 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
7707         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
7708         checks.
7709         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
7710         index.
7711         (OP_GETCHR): use the above
7712         (CEE_LDELEMA): use the above.
7714         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
7715         version of the generic impl.
7716         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
7717         (CEE_LDELEMA): use the above.
7719 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
7721         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
7722         Fixes #56317.
7724         * iltests.il: Added new regression test for #56317.
7726 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
7728         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
7729         under NetBSD. Fixes #56450.
7731         * liveness.c (update_gen_kill_set): Fix previous patch.
7733 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7735         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
7737 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
7739         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
7740         ldsfld and ldsflda.
7742         * inssel-sparc.brg: Add more optimizations.
7744         * mini-sparc.c: Replace multiply/divide with shifts if possible.
7746 2004-04-01  Martin Baulig  <martin@ximian.com>
7748         * mini.c (handle_box): New static function; moved the
7749         implementation of CEE_BOX here.
7750         (mono_method_to_ir): Added `constrained_call' variable.
7751         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
7752         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
7753         mono_method_get_constrained() to get the method.
7755 2004-04-01  Martin Baulig  <martin@ximian.com>
7757         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
7758         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
7759         (mono_method_to_ir): We don't need these macros anymore since
7760         mono_class_get_full() already takes care of it. 
7762 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7764         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
7765         use @function (as doesn't accept #function here) and check the return
7766         value of system and stop if fails.
7768 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7770         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
7772 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
7774         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
7776         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
7778         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
7779         #56223.
7781         * basic-long.cs: Add test for negation of Int64.MinValue.
7783 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
7785         * mini-sparc.c: Update status.
7787         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
7789         * exceptions-sparc.c: Fix return value in filters.
7791         * inssel-sparc.brg: Fix register allocation in some rules.
7793 2004-03-28  Martin Baulig  <martin@ximian.com>
7795         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
7796         if neccessary.  
7798 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
7800         * mini-x86.c (mono_arch_patch_code): Fix warnings.
7801         
7802         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
7803         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
7804         remove unused conv_u4 opcode.
7806         * mini-x86.c: Remove valgrind workaround since it slows down things
7807         even when mono is not run under valgrind.
7809 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
7811         * mini-sparc.c: Update status.
7813         * inssel-sparc.brg: Add some optimizations.
7815         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
7816         future delay slot filling. Add support for varargs, tail calls and JMP.
7818         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
7819         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
7821         * inssel.brg: Fix register allocation in OP_ARGLIST.
7823         * inssel.brg: Fix warnings.
7825 2004-03-25  Martin Baulig  <martin@ximian.com>
7827         * mini.c (inflate_generic_field): Removed.
7828         (mini_get_method): Removed, use mono_get_method_full(),
7829         (mini_get_class): Removed, use mono_class_get_full().
7830         (mono_method_to_ir): Pass our generic context to
7831         mono_field_from_token().        
7833 2004-03-25  Martin Baulig  <martin@ximian.com>
7835         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
7836         of a `MonoMethod *'.
7837         (mini_get_method): Take a `MonoGenericContext *' instead
7838         of a `MonoMethod *'.
7839         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
7840         a new local variable called `generic_context' which holds the
7841         current `MonoGenericContext *'; use it to lookup things.
7843 2004-03-24  Martin Baulig  <martin@ximian.com>
7845         * mini.c (mini_get_class): New static method; if we're inside a
7846         generic instance, inflate the class if neccessary.
7847         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
7849 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
7851         * iltests.il: New regression test for #55976.
7853         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
7854         #55976.
7856 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
7858         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
7859         output.
7861 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
7863         * liveness.c: Consider SSA stores as well as loads when making vars
7864         volatile.
7866         * exceptions.cs: New regression tests for register allocation.
7867         
7868 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
7870         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
7871         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
7872           domain lock only to protect puntual access to data structures.
7873           Added access lock for sighash, jit_icall_hash_name, 
7874           jit_icall_hash_addr and domain->code_mp.
7876 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
7878         * driver.c: Print SIGSEGV handling method.
7880         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
7882         * mini.c (setup_jit_tls_data): Handle case when this is called
7883         multiple times for a thread.
7885         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
7886         is different from fbxx_un. Fixes #54303. Also use constants instead of
7887         magic numbers in a lot of places.
7889 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
7891         * exceptions.cs: Fix cctor test when --regression is used.
7893 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
7895         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
7896         for Linux/ppc.
7898 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
7900         * inssel-ppc.brg: fixed register assignments for some rules.
7902 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
7904         * exceptions.cs: Add test for exceptions in static constructors.
7906         * mini.c (mono_jit_compile_method_with_out): Move the calling of
7907         static constructors outside the domain lock. Fixes #55720.
7909 2004-03-17  Martin Baulig  <martin@ximian.com>
7911         * mini.c (get_generic_field_inst): Removed, this'll never happen.
7912         (inflate_generic_field): Take the `MonoMethod *' instead of the
7913         `MonoClass *' and added support for generic method.
7914         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
7915         have a `field->parent->gen_params', only inflate the field if it's
7916         an open constructed type.
7918 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
7920         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
7921         exception object instead of the preconstructed ones.
7923 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7925         * mini.c: reverted changed to sigsegv_signal_handler commited
7926         accidentally in the previous patch.
7928 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7930         * mini.c:
7931         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
7932         running --aot with an old assembly.
7934 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
7936         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
7937         point values.
7939         * mini-sparc.c: Add support for v9 branches with prediction.
7941 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
7943         * mini.c (mini_init): #warning is GNUC only
7945         * mini-sparc.h: implement __builtin_frame_address
7946         and __builtin_return_address for Sun C compiler
7948 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
7950         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
7952 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
7954         * basic-calls.cs: Add test for unaligned byref long argument passing.
7956         * mini-ops.h: Add sparcv9 compare and branch instructions.
7958         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
7959         v9 instructions if we have a v9 cpu.
7961         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
7962         registers for global allocation.
7964         * exceptions-sparc.c: Fixes.
7965         
7966 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
7968         * liveness.c (mono_analyze_liveness): Optimized version.
7970         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
7972         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
7973         sparc work.
7975         * basic-float.cs basic-calls.cs: New regression tests.
7977 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
7979         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
7980         sigaltstack implementation.
7982         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
7983         
7984         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
7985         stuff if SIGSEGV_ON_ALTSTACK is not defined.
7987 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
7989         * mini.c: Fix warnings.
7990         
7991         * mini.c (mono_resolve_patch_target): New function which contains the
7992         arch independent part of the patching process.
7994         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
7995         patching code to a separate function.
7997 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
7999         * mini.c (add_signal_handler): ifdef out on Windows
8001 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
8003         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
8004         cpu-sparc.md: Add exception handling support + other fixes.
8006         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
8007         typed GC detection in --version.
8009         * basic.cs exceptions.cs: New regression tests.
8011         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
8012         the arch specific code can store data during a compilation.
8014         * mini-ops.h: Add OP_SETFRET.
8016         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
8017         function, register a separate icall for each arity, so the icalls can
8018         get a wrapper.
8019         
8020         * mini.c (mono_print_tree): Print negative offsets in a more readable
8021         form.
8022         
8023         * mini.c: Make signal handling work on sparc.
8024         
8025         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
8027         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
8029         * jit-icalls.c: Emulate truncl by aintl on solaris.
8031         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
8033 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
8035         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
8037 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
8039         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
8040         a MarshalByRef type, inline a method that performs the check, taking into
8041         account that the object can be a proxy. Also implemented tow new opcodes:
8042         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
8043         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
8044         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
8046 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
8048         * mini-ppc.c: if a relative branch displacement is too big
8049         but it points to and area reachable with an absolute branch, 
8050         avoid the thunks.
8052 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
8054         * mini.c: optimize small copies in cpblk.
8056 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
8058         * basic-calls.cs basic-float.cs: New regression tests.
8060         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
8061         negative offsets from %fp. Implement localloc. Fix local register 
8062         allocation. Fix the case when the this argument needs to be saved to
8063         the stack. Implement some missing opcodes.
8065 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
8067         * mini.c (mini_method_compile): Reenable global regalloc in methods
8068         with exception handlers.
8070         * linear-scan.c (mono_varlist_sort): Fix warning.
8072         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
8074         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
8075         regalloc costs.
8077         * liveness.c: Make all variables uses in exception clauses volatile, to
8078         prevent them from being allocated to registers. Fixes #42136.
8080 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
8082         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
8083         causes regressions.
8085         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
8086         argument to mono_arch_regalloc_cost.
8088         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
8089         precisely.
8091 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
8093         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
8094         Make the cost of allocating a variable to a register arch dependent.
8096         * basic-calls.cs: Fix compilation of tests.
8097         
8098         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
8099         helper function to cut back on the number of #ifdefs needed.
8101         * mini-ppc.c: Fix compilation.
8103         * basic-calls.cs: New regression tests.
8105         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
8107         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
8108         of l0 since that is callee saved.
8110         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
8111         to virtual calls.
8113         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
8114         of delay instruction.
8116         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
8118         * mini.h (MonoCallInst): Add 'virtual' flag.
8120         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
8122 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
8124         * *.cs: New regression tests.
8126         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
8127         work.
8129         * mini.c (mono_runtime_install_handlers): Fix build.
8131         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
8132         'signal_stack_size' members.
8134         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
8135         alternate signal stack.
8137         * exceptions-x86.c: Add stack overflow handling.
8139         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
8140         functions to arch independent code.
8142         * mini.c (mono_print_tree): Print more detailed info for load_membase
8143         opcodes.
8144         
8145 2004-02-23  Martin Baulig  <martin@ximian.com>
8147         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
8149 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
8151         * mini-x86.c: fixed reg allocation for div/rem.
8153 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
8155         * driver.c (mono_main): Report some configuratio options on --version.
8157 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
8159         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
8160         low in the address space. Correctly flush memory in thunks where we
8161         output native code.
8163 2004-02-20  Martin Baulig  <martin@ximian.com>
8165         * mini.c (mini_get_method): New static method; inflate all generic
8166         methods and methods in open generic instances.
8167         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
8168         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
8170 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
8172         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
8174         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
8176 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
8178         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
8180         * mini-sparc.c (flushi mono_arch_output_basic_block): make
8181         it compile using Sun's compiler.
8183 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
8185         * mini-ops.h inssel-sparc.brg cpu-sparc.md mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Sparc port, part I.
8187         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
8189 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
8191         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
8192         code.
8193         * mini-ppc.c: handle calls outside of the allowed range with thunks
8194         allocated using the code manager.
8195         * tramp-ppc.c: use the code manager to hold generated native code.
8196         Fixed the magic trampoline to just patch vtable entries.
8198 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
8200         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
8201         independent file.
8203 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
8205         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
8206         PPC.
8208         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
8209         if we have a working __thread implementation.
8211         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
8212         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
8214 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
8216         * mini-x86.c: Fix compilation under gcc 2.
8217         
8218 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
8220         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
8221         contains a call to the wrapped function.
8223         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
8224         OP_<CALL>_IMM opcodes, and use them under X86.
8225         
8226         * mini.c (mono_jit_find_compiled_method): Fix warning.
8228         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
8230         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
8232         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
8233         functionality to mini.c.
8235         * mini.c (mono_create_jump_trampoline): New function to create a jump
8236         trampoline. Return a compiled method instead of a trampoline if it
8237         exists. Add a cache for jump trampolines.
8239         * mini.c (mono_jit_find_compiled_method): New function to return a
8240         compiled method if it exists.
8242         * mini-x86.c: Call mono_create_jump_trampoline instead of 
8243         mono_arch_create_jit_trampoline.
8245         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
8246         a jump trampoline. Fixes #52092.
8247         
8248 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
8250         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
8251         which is not up-to-date. Add check_corlib_version () instead.
8253         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
8254         have to call it.
8255         
8256         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
8257         since newer valgrind versions do not need it.
8259         * mini.c (mono_jit_compile_method_with_opt): New helper function to
8260         compile a method with a given set of optimizations.
8262         * mini.c: Compile icall wrappers on-demand instead of at startup.
8264         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
8265         wrapper for an icall.
8267 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
8269         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
8270         #54063.
8272         * iltests.il: Add test for non-empty stack before switch instruction.
8274 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
8276         * mini.c: Add support for new stringbuilder marshalling conventions.
8278         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
8280 2004-02-01  Martin Baulig  <martin@ximian.com>
8282         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
8283         in `ginst->mtype_argv'.
8285 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
8287         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
8288         facilitate grepping.
8290 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
8292         * mini.c: fixed buglet in initobj generic implementation for references.
8294 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
8296         * Makefile.am: make the version script conditional.
8297         * jit-icalls.c: handle missing truncl().
8299 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
8301         * exceptions.cs: Add more tests for double->int conversion.
8303         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
8304         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
8306 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
8308         * driver.c: make --verbose --version emit an error
8309         if the loaded corlib doesn't match the runtime version.
8311 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
8313         * mini-ppc.h: export ppc_patch().
8314         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
8315         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
8316         on par or better than on MacOSX.
8318 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
8320         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
8321         mono_lookup_pinvoke_call.
8323         * mini-x86.c: Under windows, the default pinvoke calling convention is
8324         stdcall. Fixes #52834.
8326         * mini.c (optimize_branches): Add an upper bound to the number of
8327         iterations to prevent infinite loops on strange loops. Fixes #53003.
8329 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
8331         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
8332         and ISINST. Fixes #52093.
8334         * objects.cs (test_0_vector_array_cast): New tests.
8335         
8336 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
8338         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
8339         checking in Array.Set ().
8341         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
8342         #52590.
8344         * object.cs (test_0_multi_array_cast): New regression test.
8346 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
8348         * exceptions-ppc.c: fix build on Linux/PPC.
8350 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
8352         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
8353         running under valgrind.
8354         (x86_magic_trampoline): Fix build bustage.
8356         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
8357         negative values as well. This is needed for the encoding of the line number
8358         info, since sometimes the line numbers are not in increasing order.
8360 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
8362         * cpu-pentium.md (localloc): Increase the size of the localloc 
8363         instruction since it is a loop under Win32.
8365         * debug-mini.c (record_line_number): Get rid of unneccesary memory
8366         allocation.
8368 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
8370         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
8371         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
8372         Max Horn (max@quendi.de). Fix file names in comments.
8374 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
8376         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
8377         avoid stack overflow.
8378         (replace_usage): Avoid uninitialized variable warnings.
8380         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
8381         and taking the address of valuetype variables.
8383 2004-01-03  Patrik Torstensson
8385         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
8386         for other purposes than FP later on.
8388 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
8390         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
8391         of tail calls.
8393 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
8395         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
8397 2003-12-30  Patrik Torstensson <p@rxc.se>
8399         * mini-x86.h: Decreased number of availiable fp regs.
8400         Solves corner cases with FP spilling.
8402 2003-12-23  Patrik Torstensson <p@rxc.se>
8404         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
8405         for floating point stack tracking / spilling on x86. 
8406         Fixes bug #49012.
8407         
8408         * basic-float.cs: added float mul overflow test.
8410 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
8412         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
8414 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
8416         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
8417         supports for cond branches that overflow the immediate
8418         overflow offset. mcs can compile simple programs.
8420 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
8422         * exceptions-ppc.c: exception handling support wip:
8423         finally handlers get run on exception.
8425 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
8427         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
8428         profiling.
8430 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
8432         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
8433         initial support for stack walking and unwinding.
8435 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
8437         * driver.c (mono_main): Make corlib-out-of-sync message more 
8438         descriptive. Also remove verify_corlib call.
8440 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
8442         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
8443         not overlap with other call's arguments, too.
8445 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
8447         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
8448         move to arch-specific code the choice of arch-specific
8449         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
8450         * mini.c: ensure emulation calls will not interleave
8451         with other calls.
8453 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
8455         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
8456         the magic trampoline stack frame is dropped before executing
8457         the new method.
8459 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
8461         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
8462         and integer to fp conversions. Added support for overflowing
8463         arguments on the stack. Reserve a couple more registers as temps.
8464         Added support for aot compilation (as output still needs to be
8465         tweaked, though).
8467 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
8469         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
8470         Don't overwrite return register in some corner cases.
8472 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
8474         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
8475         static constructors when AOT compiling.
8477         * driver.c (mono_main): Call mono_check_corlib_version.
8479 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
8481         * cpu-g4.md, basic.cs: fixed div target register.
8483 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
8485         * mini-ppc.c, basic.cs: shl_imm fix with test.
8487 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
8489         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
8490         structures by value. Misc fixes.
8491         * objects.cs: more tests.
8493 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
8495         * mini-ppc.c: lconv.ovf.i implemented.
8497 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8499         * mini.c:
8500         (mini_init): don't error out if someone already called g_thread_init.
8502 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
8504         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
8505         to be any type per the spec. Fix abnormal memory usage when
8506         the same object is repeatedly thrown.
8508 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
8510         * mini.c: check for overruns in IL code.
8512 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
8514         * TODO: Add/remove some todo entries.
8516 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
8518         * driver.c (mono_main): Call mono_verify_corlib.
8520 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
8522         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
8523         This has been moved to mini.c
8524         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
8525         type being casted is marshalbyref it could be a proxy, so instead of
8526         emitting the type check code, emit a call to a runtime method that will
8527         perform the check by calling CanCastTo if needed.
8529 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
8531         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
8532         methods with large stack frames under Win32.
8534 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
8536         * Makefile.am: Distribute regression tests.
8538         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
8539         at the end instead of inserting each variable into the sorted list.
8541         * linear-scan.c (mono_varlist_sort): New helper function.
8542         
8543 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
8545         * mini.c: ensure arguments and locals are within bounds.
8547 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
8549         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
8550         related fixes.
8552 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
8554         * mini.c (mono_cprop_copy_values): Fix crash.
8556         * aot.c: Set verbosity back to 0.
8557         
8558 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
8560         * regalloc.c: complete memory leak fix by Laurent Morichetti
8561         (l_m@pacbell.net).
8563 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
8565         * driver.c (main_thread_handler): Revert the previous patch.
8567         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
8568         under valgrind.
8570         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
8571         memory from the memory pool.
8573         * driver.c (main_thread_handler): Turn on all optimizations when
8574         --aot is used.
8576         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
8577         an array for better performance.
8579         * regalloc.c (mono_regstate_assign): Fix memory leak.
8581         * debug-mini.c (mono_debug_serialize_debug_info): New function to
8582         serialize the debug info.
8584         * debug-mini.c (mono_debug_add_aot_method): New function to load the
8585         debug info from the serialized representation.
8587         * aot.c: Save debug info into the generated file and load it when 
8588         loading a method.
8590         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
8592 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
8594         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
8595         More FP-related fixes.
8597 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
8599         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
8600         and register allocation buglet. Hello world now runs.
8602 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
8604         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
8605         * tramp-ppc.c: fixed class init trampoline.
8606         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
8608 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
8610         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
8611         mini.c: more ppc changes/fixes.
8613 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
8615         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
8616         Also optimize the case when the arguments are the same in the caller 
8617         and in the callee.
8619         * iltests.il: Add tests for tail calls with valuetype arguments.
8621 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
8623         * mini-ppc.c: fixes for struct return type.
8625 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
8627         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
8628         mono_spillvar_offset() to arch-specific code.
8630 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
8632         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
8634 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
8636         * exceptions-x86.c: Fix stack space leaks.
8637         
8638         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
8639         registers from the lmf if the method has save_lmf set.
8641 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
8643         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
8644         of icall wrappers into InvokeInDomain, since these are now per-domain.
8646 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
8648         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
8649         make some opcode emulation and intrinsic ops enabled/disabled 
8650         according to the architecture. More fixes.
8652 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
8654         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
8656 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
8658         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
8659         arch-specific handling for 'this' and struct return type to
8660         arch-specific code.
8662 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8664         * aot.c: prevent divide by zero error when reporting (it happened with
8665         Accessibility.dll).
8667 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
8669         * mini.h (inst_switch): Remove unused macro.
8671 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
8673         * aot.c:
8674         (load_aot_module): free 'info->methods' and 'info' properly. No more
8675         "free(): invalid pointer blah" messages when you have an old aot
8676         compiled assembly.
8678 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
8680         * jit-icalls.c, mini.c: Added support for context static fields.
8682 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
8684         * mini.c (mono_method_blittable): Methods which set LastError are not 
8685         blittable either. Fixes #51108.
8686         
8687 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
8689         * mini.c: flush icache.
8690         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
8692 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
8694         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
8696 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
8698         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
8699         safe on IA32.
8701         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
8702         vararg calls.
8704         * inssel.brg (CEE_MKREFANY): Fix AOT case.
8706 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
8708         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
8709         instruction when the result is discarded.
8711         * iltests.il (test_0_div_regalloc): New regression test.
8713         * arrays.cs: Fix compilation error.
8715 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
8717         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
8718         float rules to inssel-x86.brg: sane architectures with FP registers
8719         don't need to implement these rules.
8721 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
8723         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
8725 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
8727         * mini.h, inssel-long32.brg: fixed endianess issues in int64
8728         implementation of 32 bit systems.
8730 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
8732         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
8733         (Jeroen Zwartepoorte).
8735 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
8737         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
8738         the caller and the callee matches.
8739         
8740         * mini.c (mono_method_to_ir): Add comment.
8742         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
8743         signbit is missing on some platforms.
8745 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
8747         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
8749         * mini.c (setup_jit_tls_data): Call the new function.
8750         
8751         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
8753         * mini-x86.c: Add experimental support for fast access to the lmf
8754         structure under NPTL/Linux 2.6.x.
8756 2003-11-06  Martin Baulig  <martin@ximian.com>
8758         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
8759         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
8760         the debugger.
8762 2003-11-02  Martin Baulig  <martin@ximian.com>
8764         * mini.c (inflate_generic_field): New static method.
8765         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
8766         generic instance and the field is declared in a generic type, call
8767         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
8769 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
8771         * mini.h mini.c (mono_method_same_domain): New function to return
8772         whenever the caller and the callee are in the same domain.
8774         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
8776 2003-10-30  Martin Baulig  <martin@ximian.com>
8778         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
8779         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
8780         method parameters.
8781         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
8782         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
8784 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
8786         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
8787         propagation.
8789         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
8790         object here, so it is in the correct appdomain etc.
8792 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
8794         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
8795         already done.
8796         (mono_method_to_ir): Avoid freeing the type created returned from
8797         mono_type_create_from_typespec, since it is put into an internal cache
8798         by the function. Fixes pointer.exe.
8800         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
8801         trampolines for icalls and pinvokes as well. Fixes #33569.
8803 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
8805         * mini.c: Update after appdomain changes.
8807         * mini.c (mono_jit_compile_method_inner): Allways compile native
8808         method wrappers in the root domain, since there can only be one
8809         instance of them, whose address is stored in method->info.
8811 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
8813         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
8814         environment variable. Instead detect automatically whenever running
8815         under valgrind using the magic macro RUNNING_ON_VALGRIND from
8816         valgrind.h.
8818 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
8820         * trace.c, trace.h: New files that implement the new trace option
8821         parsing. 
8823         * driver.c: Document new --trace options.
8825         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
8826         mini-x86.c: Apply:
8828         -       if (mono_jit_trace_calls)
8829         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
8831         * mini.h: prototypes.
8832         
8833 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
8835         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
8837         * mini.c inssel.brg: Implement typedefbyref opcodes.
8839         * mini.c (mono_jit_compile_method): Remove unused local variable.
8841         * mini.c (mono_jit_compile_method_inner): Ditto.
8842         
8843 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
8845         * tramp-x86.c (x86_class_init_trampoline): Fix build.
8846         
8847         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
8849 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
8851         * mini.c (mono_no_aot): Remove unused global variable.
8853         * mini.c: Thread safety fixes.
8855 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
8857         * mini.c (mono_create_class_init_trampoline): Add a lock around
8858         class_init_hash_addr.
8860         * arrays.cs (test_0_newarr_emulation): Add new regression test for
8861         #30073.
8863         * mini.c: Decompose the NEWARR instruction before decomposing its
8864         arguments. Fixes #30073.
8866 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
8868         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
8869         convention.
8871 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
8873         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
8875         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
8877         * driver.c: Add support for compiling icall wrappers to --compile.
8879 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
8881         * inssel.brg: The empty value in class->interface_offsets is -1, not
8882         0. Fixes #49287.
8884 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
8886         * objects.cs: New test for 'is' operator on an array of interfaces.
8888 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
8890         * tramp-ppc.c: update trampoline code to support jumps
8891         and class initialization.
8893 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
8895         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
8897         * inssel.brg (OP_UNBOXCAST): Fix #46027.
8899         * inssel.brg (OP_UNBOX): Remove unused rule.
8901         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
8902         region instead of one for each method. Fixes #47813.
8904 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
8906         * exceptions.cs (test_0_nested_finally): New regression test for
8907         nested exception handlers.
8909         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
8911         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
8913         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
8914         inlining.
8916         * mini.c (mono_method_check_inlining): Make the inlining limit 
8917         configurable by an environment variable.
8918         
8919         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
8921         * mini.h: Bump AOT file version.
8923         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
8924         token, store the image along with the token, since the token might not 
8925         refer to the same image as the method containing the relocation, 
8926         because of inlining.
8928 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
8930         * mini.c (mono_precompile_assemblies): New function to compile
8931         all methods in all loaded assemblies.
8933         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
8935         * regalloc.h regalloc.c (MonoRegState): Change the type of 
8936         iassign and fassign to int*, since they can contain large negative
8937         values if the register is spilled. Also added some comments. Fixes
8938         #45817.
8940         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
8941         under Win32. Fixes #42964.
8943 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
8945         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
8947         * aot.c: Added support for AOT compiling methods which contain calls
8948         to wrappers. Currently, only remoting-invoke-with-check wrappers are
8949         handled.
8950         
8951         * driver.c (compile_all_methods): Run the compilation in a thread
8952         managed by mono. Fixes #44023.
8954         * mini.c (mono_codegen): Print full method name in verbose output.
8956         * mini-x86.c (mono_arch_patch_code): Fix warning.
8957         
8958         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
8959         jumps, since the method we are jumping to might be domain-specific.
8961         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
8963 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
8965         * inssel.brg: string chars are unsigned.
8967 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
8969         * TODO: New todo item.
8971         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
8972         which calls mono_runtime_class_init and patches the call site to
8973         avoid further calls.
8974         (mono_arch_create_class_init_trampoline): New arch specific function 
8975         to create a class init trampoline.
8976         (create_trampoline_code): Generalized so it can create
8977         class init trampolines as well.
8979         * mini.c (helper_sig_class_init_trampoline): New helper variable.
8980         (mono_create_class_init_trampoline): New function to create and cache
8981         class init trampolines.
8982         (mono_find_class_init_trampoline_by_addr): New function to lookup the
8983         vtable given the address of a class init trampoline. Used by the
8984         patching process.
8985         (mono_codegen): Generate a call to a trampoline instead of
8986         mono_runtime_class_init in LDSFLD[A].
8987         (mono_codegen): Add relocations for the new trampoline.
8988         
8989         * mini.h mini-x86.c aot.c: Added a new relocation type: 
8990         MONO_PATCH_INFO_CLASS_INIT.
8992         * mini.h: Bump AOT version number.
8994         * aot.c: Create a copy of the loaded code instead of using the original
8995         so methods which call each other will be close in memory, improving
8996         cache behaviour.
8997         
8998         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
8999         patch since it breaks the regression tests.
9000         
9001         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
9002         for the register saving instruction sequence since the 
9003         frame_state_for function in glibc 2.3.2 don't seem to detect it.
9005 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
9007         * TODO: Fix todo item && remove another.
9009 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
9011         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
9012         previous checkin.
9014         * aot.c: Moved the check for MONO_LASTAOT into the initialization
9015         function of the module.
9017         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
9018         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
9019         --no-aot command line option.
9021 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
9023         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
9024         by Bernie Solomon (bernard@ugsolutions.com).
9026         * inssel.brg: Refactor the interface offset table related code into
9027         its separate functions and add support for the AOT case.
9029 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
9031         * aot.c (mono_aot_get_method_inner): Fix memory leak.
9032         
9033         * aot.c: Added mono_aot_verbose variable and made all debugging
9034         output depend on the value of this variable.
9036         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
9037         method_label and info_label.
9039         * mini.h mini-x86.c aot.c: Added a new relocation type 
9040         MONO_PATCH_INFO_IID for klass->interface_id.
9042         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
9043         the MonoJitInfo structure.
9045         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
9046         a non-root appdomain in shared mode.
9048 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
9050         * aot.c: make aot loader less verbose. Remove free of unused variable.
9052 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
9054         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
9056         * .cvsignore: Added *.dll.
9058         * mini.c (mono_print_tree_nl): New function callable while debugging.
9060         * mini.c (mono_print_code): Export this.
9062         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
9063         patched code.
9065 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
9067         * mini.h (MonoCompile): Added 'jit_info' field.
9069         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
9070         the cfg structure, since it is needed by the AOT compiler.
9072         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
9074         * aot.c: A major rewrite. Changes include:
9075         - save exception tables for methods which have them.
9076         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
9077         to g_module_symbol.
9078         - reworked the file format so it is now much smaller and needs
9079         fewer relocation entries.
9080         
9081 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
9083         * aot.c (load_aot_module): Fix build bustage on platforms without
9084         Boehm GC.
9086 2003-09-04  Martin Baulig  <martin@ximian.com>
9088         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
9090 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
9092         * TODO: Some new optimization ideas.
9094         * aot.c: Move AOT module loading logic here from mono_assembly_open.
9096         * aot.c: Save the optimization flags used to compile the code into
9097         the AOT module.
9099         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
9100         support emitting domain specific code.
9101         
9102         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
9103         no longer domain neutral. It can be made domain neutral by compiling 
9104         with --optimize=shared.
9106         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
9107         between appdomains.
9109         * driver.c mini.h mini.c: New --no-aot debugging option which disables
9110         loading of AOT code.
9112         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
9113         
9114         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
9115         if there is no domain neutrality information.
9117 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
9119         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
9120         format version into the generated library.
9122         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
9123         callee method into the caller since one of them could be shared.
9125         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
9126         system exceptions from AOT code now works.
9128         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
9129         method if it is domain neutral and the callee is not.
9131         * graph.c (cfg_emit_one_loop_level): Fix warning.
9133 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
9135         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
9136         last checkin.
9138 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
9140         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
9141         is needed  by code which is executed before mono_runtime_init ().
9142         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
9143         
9144         * mini.c (mono_thread_abort): Fix warning.
9145         (mono_jit_compile_method): Call static constructor in the AOT case too.
9147         * aot.c (mono_compile_assembly): Fix warning.
9149 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9151         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
9153 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
9155         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
9157         * cpu-pentium.md: Fix the length of call opcodes so they include the
9158         ESP restoring instruction. Fixes #47968.
9160 2003-08-28  Martin Baulig  <martin@ximian.com>
9162         * mini-x86.c (mono_arch_call_opcode): Added support for
9163         MONO_TYPE_GENERICINST.
9165         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
9167 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
9169         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
9170         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
9172         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
9173         metadata_section.
9175 2003-08-26  Martin Baulig  <martin@ximian.com>
9177         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
9178         when reporting an error, set this to the actual error location.
9179         (mono_method_to_ir): Report the correct error location if
9180         get_basic_blocks() returned an error.
9182 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
9184         * mini.c (mono_type_blittable): OBJECT is not blittable.
9185         (mono_method_blittable): Methods which have marshalling descriptors
9186         are not blittable either. Fixes #47842.
9188 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
9190         * driver.c mini.c: Use an environment variable instead of a global 
9191         variable. Also fix the build.
9193         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
9194         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
9195         reporting this. 
9197         * driver.c mini.c: Added --with-valgrind option to turn off some
9198         code which prevents mono from running under valgrind.
9200         * mini.c (mono_emit_call_args): Fixed warning.
9202         * mini.c (mono_emulate_opcode): Fixed warning.
9204 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
9206         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
9207         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
9208         regalloc.c, regalloc.h: specify available registers in arch-specific
9209         code and support floats in the regallocator (patch by Laurent Morichetti 
9210         <l_m@pacbell.net>)
9212 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
9214         * mini.c: mono_thread_current() can be called only after
9215         mono_runtime_init(): rearrange code to not call it early on.
9217 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
9219         * mini.c: allocate jump tables in the code mempools.
9221 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
9223         * mini.c, mini.h: make sure per-thread data allocated by the jit is
9224         freed.
9226 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
9228         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
9229         12 to 16.  This fixes bug #47453.
9232 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
9234         * mini-ppc.c: fixed indexed load and unsigned compares.
9236 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
9238         * mini.c: reenabled installation of handler for
9239           thread abort signal.
9241 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
9243         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
9244         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
9245         until it's fixed and actually useful.
9247 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
9249         * inssel-long32.brg: couple more opcodes implemented.
9251 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
9252         
9253         * mini-sparc.c: Even more opcodes implemeted.
9255 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
9257         * mini-sparc.c: More opcodes implemented.
9259 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
9261         * mini-sparc.c: More opcodes implemented.
9263 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
9265         * inssel-sparc.brg: Add some needed rules.  Direct
9266         copy from PPC.
9267         * Makefile.am: Use inssel-sparc.brg
9268         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
9269         an assert happy for now.
9271 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
9273         * mini-sparc.c: Fixed compile errors.
9274         * exceptions-sparc.c: Same.  We now produce a mono binary 
9275         on sparc-linux.  Yea.
9277 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
9279         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
9280         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
9281         They compile, but do not work.
9283 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
9285         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
9286         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
9287         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
9288         (ct@gentoo.org).
9290 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
9292         * mini.c: more opcodes implemented and better support for generics.
9294 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
9296         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
9297         * mini.c, mini.h: first cut at generics support: some new instructions 
9298         added and changed the behaviour of some of the existing ones.
9300 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
9302         * mini.c: Removed definition of metadata_shared mutex here.
9304 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
9306         * mini-x86.c: make vararg calls work for instance methods.
9308 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
9310         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
9311         returns the arguments in a separte list, now.
9313 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
9315         * aot.c, mini.c: updates for array type representation changes.
9317 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
9319         * mini.c: register function to perform jit shutdown.
9321 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
9323         * mini.c: use a faster allocator if possible.
9325 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
9327         * aot.c: some cleanups and portability changes.
9329 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
9331         * mini.c: use faster allocation for CEE_BOX if possible.
9333 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
9335         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
9336         Moved inlined mempcy code to its own function so that is can be
9337         reused. Added an inline memset function as well (optimized initobj).
9338         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
9340 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
9342         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
9344 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
9346         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
9347         arch code can setup the cpu for CLR execution, if needed.
9348         We use it on x86 to set the precision of FP operations.
9350 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
9352         * mini.c: disable some optimizations if we can guess they'll cost too
9353         much for a given method.
9355 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
9357         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
9358         
9359 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
9360         * mini.h mini.c mini-x86.c: Added instruction level coverage 
9361         info collection support.
9363 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
9365         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
9366         is now implemented in the profiling API. Get rid of a couple of
9367         unnecessary global variables.
9369 2003-06-15  Nick Drochak <ndrochak@gol.com>
9371         * basic-long.cs: tests for negative values for bigmul, and unsigned.
9372         * cpu-g4.md: add op_bigmul and op_bigmul_un
9373         * cpu_pentium.md: add op_bigmul_un
9374         * inssel-long32.brg: add rule for unsigned bigmul
9375         * mini-ops.h: define OP_BIGMUL_UN
9376         * mini-x86.c: THE BUG: handle (un)signed properly
9377         * mini.c: choose unsigned opcode if needed.
9378         This set of patches fixes bug #44291
9380 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
9382         * mini.c (optimize_branches): improved to handle all kinds of
9383         conditional branches.
9385 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
9387         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
9388         don't raise exceptions.
9390 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
9392         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
9393         to arch-specific files.
9395 2003-06-09  Martin Baulig  <martin@ximian.com>
9397         * Makefile.am (libs): Added $(LIBGC_LIBS).
9399 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
9401         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
9402         and OP_ATAN (fixes bug#44293).
9404 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
9406         * Makefile.am, mini-x86.c: rename cpu description array to
9407         pentium_desc, since some compilers define the 'pentium' preprocessor
9408         symbol.
9410 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
9412         * mini.c (mini_select_instructions): add explicit branch if the
9413         following block is not the false target of a conditional branch -
9414         we need this with any optimization that reorder or remove bblocks
9416         * mini.c (optimize_branches): bug fixes
9418 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
9420         * mini.c (mono_method_to_ir): inline static readonly fields
9422         * ssa.c (fold_tree): start cfold support for long (very simple
9423         cases only)
9425         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
9427 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
9429         * inssel.brg: fixed memcpy (bug #44219).
9431 2003-06-05  Dick Porter  <dick@ximian.com>
9433         * driver.c: Set the glib log levels to not abort if g_message
9434         recurses.
9436         g_set_prgname() has to happen before mini_init() so that the
9437         process handle gets the info.
9438         
9439 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
9441         * driver.c: add intrins to the default optimizations to get wider
9442         exposure.
9444 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
9446         * mini.h: some large basic blocks will overflow a 16-bit
9447         integers for symbolic registers.
9449 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
9451         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
9452         (mono_arch_output_basic_block): fix bug 43499 
9454 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
9456         * mini.c: kill duplicated definition of mono_debug_format.
9458 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
9460         * mini-x86.c, arrays.cs: fixed register allocation bug.
9462 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
9464         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
9466         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
9468 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9470         * mini.c:
9471         (print_method_from_ip): also print source location information if
9472         available.
9474 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
9476         * mini.c (mono_find_block_region): bug fix in region code
9477         (mini_method_compile): enable removing unreachable code again, but
9478         only in methods without exception clauses.
9480 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
9482         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
9483         Implemented arglist opcode and handling of TypedReference type.
9484         Fixed x86 call convention when a structure is returned.
9485         Minimal support for calling static vararg methods.
9487 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
9489         * mini.c (mini_method_compile):  always remove unreachable code,
9490         because the code in them may be inconsistent  (access to dead
9491         variables for example).
9493 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
9495         * driver.c, debug-mini.c: warning fixes.
9497 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
9499         * Makefile.am, jit.h, mini.h: install header for embedding mono.
9501 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
9503         * mini.c: thread-static fields are registered in mono_class_vtable(),
9504         so ensure the function is called before checking for them.
9506 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
9508         * mini.c (optimize_branches): fix for bug 43586
9510         * jit-icalls.c (mono_llmult_ovf): added an additional check for
9511         overflow (fixes Bug #43639)
9513 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
9515         * mini.c, objects.cs: allow the use of stobj for primitive types.
9517 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
9519         * mini.c: be less strict about argument checking until we support
9520         running the verifier.
9522 2003-05-27  Nick Drochak <ndrochak@gol.com>
9524         * basic-long.cs: tests for (ulong)int * (ulong)int also
9525         * mini.c: use the same trick for (ulong)int * (ulong)int
9527 2003-05-27  Nick Drochak <ndrochak@gol.com>
9529         * basic-long.cs: add regression test for (long)int * (long)int
9530         * cpu-pentium.md: add op_bigmul specification
9531         * inssel-long32.brg: add OP_BIGMUL rule
9532         * mini-ops.h: add OP_BIGMUL
9533         * mini-x86.c: register allocator: handle case where src1 needs to be
9534         in EAX.
9535         * mini.c: substitute special BIGMUL opcode in the tree for 
9536         (long)int * (long)int
9538 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
9540         * jit-icalls.c: call the type ctor on field access if needed.
9542 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
9544         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
9545         to a method (including results of ldelema, bug#43207).
9547 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
9549         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
9550         colors to show exception handler blocks.
9552         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
9553         (fix for pinvoke7.cs).
9555 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
9557         * mini.h, mini.c: ensure correct initialization order for types that
9558         require it. Prepare for lazy compilation of jit icall wrappers.
9559         Provide a name for opcode emulation to reduce unneeded mallocing.
9561 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
9563         * mini-x86.c: better register restoring code and profiling
9564         support for tail calls.
9566 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
9568         * mini.h, driver.c: prepare for leaf methods optimization.
9570 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
9572         * mini.c: get targets of branches before converting a method.
9574 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
9576         * mini.c (optimize_branches): added some experimental code (disbaled) 
9578 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
9580         * mini.c (optimize_branches): fix branch to branch optimization 
9582         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
9584         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
9586         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
9588         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
9589         if needed.
9591 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
9593         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
9594         enable use of interface variables again.
9596         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
9597         I1 to registers because there is no simply way to sign extend 8bit
9598         quantities in caller saved registers on x86.
9600         * inssel-float.brg: set costs of some rules to 2 so
9601         that monobure always select the arch. specific ones if supplied,
9602         regardless of the order we pass the files to monoburg.
9604 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
9606         * mini.c, mini-x86.c: since the magic trampoline for jumps
9607         can't patch the code directly, we do it as soon as the
9608         method gets compiled.
9610 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
9612         * mini-x86.c, mini.h: introduce a new patching method
9613         to support CEE_JMP and tail calls.
9614         * mini.c: obey tail.call. Don't precompile methods target
9615         of CEE_JMP.
9616         * tramp-x86.c: new trampoline code to handle methods
9617         reached through a jump.
9619 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
9621         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
9622         bit values to registers
9624 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
9626         * mini.c (mono_compile_get_interface_var): share interface
9627         variables if possible.
9629 2003-05-16  Martin Baulig  <martin@ximian.com>
9631         * debug-mini.c (mono_init_debugger): New function to initialize
9632         the debugger.  This is not in the debugger since it needs to
9633         access some of mini's internals.
9635 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
9637         * mini.c (mono_method_to_ir): inlining fixes/cleanups
9639 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
9641         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
9642         for value type handling.
9644 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
9646         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
9647         (mono_method_check_inlining): enable inlining of all kinds of wrappers
9649 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
9651         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
9652           the constructor through a proxy.
9654 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
9656         * jit-icalls.c, inssel.brg: fixes to array element address
9657         calculations.
9659 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
9661         * mini-x86.c (is_regsize_var): allocate pointer to registers
9663 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
9665         * driver.c: fixed typo, added intrins to the set of optimizations
9666         tested with regressions.
9668 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
9670         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
9671         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
9672         test case.
9674 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
9676         * inssel.brg: remove some common pop instructions without side effects
9678 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
9680         * inssel-x86.brg: fixed thinko in int to double conversions.
9682 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
9684         * mini.c, jit-icalls.c: added runtime thread-static variable support.
9686 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
9688         * inssel-long32.brg: two more missing instructions.
9690 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
9692         * mini.c (mono_emit_call_args): set the cil_code for all arguments
9693         if not already set.
9695 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
9697         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
9698         correctly.
9700         * basic-float.cs: Added tests for negative zero.
9702 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
9704         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
9705         a couple of missing operations for long casts, with test cases.
9707 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9709         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
9711 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
9713         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
9714         code size estimation.
9716 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
9718         * mini.c (mono_jit_create_remoting_trampoline): make it work with
9719         abstract methods (fix bug 42542)
9721         * aot.c: add ability to handle array types
9722         
9723 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
9725         * mini.c: Call the _specific versions of the object allocation
9726         functions if possible.
9728 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
9730         * driver.c: call setlocale ().
9732 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
9734         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
9735         windows build.
9737 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
9739         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
9741         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
9742         wrappers (fix bug 42122)
9744 2003-05-04  Martin Baulig  <martin@ximian.com>
9746         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
9748         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
9749         s/mini_set_defaults/mono_set_defaults/g.
9751 2003-05-04  Martin Baulig  <martin@ximian.com>
9753         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
9755 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
9757         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
9758         (reported by Don Roberts).
9760 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
9762         * mini.c: temporarily work around two bugs for this release.
9764 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
9766         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
9767         that contains -export-dynamic and it makes using the ld script
9768         useless.
9769         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
9771 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
9773         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
9774         specific cpu.
9776 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
9778         * mini.c: make sure leave calls all the needed finally blocks,
9779         even when the target jumps out of multiple exception clauses.
9781 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
9783         * ldscript, Makefile.am: add linker script to reduce the number of
9784         exported symbols (should also fix the issues with libwine defining
9785         some of the same symbols in io-layer).
9787 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
9789         * driver.c (mini_main): Avoid assertion when no file name is given on 
9790         the command line.
9792 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
9794         * driver.c: added --version/-V command line option.
9795         Added the inline optimization in the regression tests.
9797 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
9799         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
9800         to the type in the method signature (fixes bug#42134).
9802 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
9804         * mini.c: when inlining, check this is not null only when needed (bug #42135).
9806 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
9808         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
9810 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9812         * driver.c: fixed bug #42100.
9814 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
9816         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
9818 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
9820         * mini.c: moved most of the code required to do inlining to its own
9821         function so it can be reused. Inline also ctors if appropriate.
9823 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
9825         * Makefile.am: Link with -export-dynamic so shared libs loaded by
9826         the runtime can call mono API functions.
9828 2003-04-27  Martin Baulig  <martin@ximian.com>
9830         * debug-mini.c (mono_debug_init_method): Added
9831         `guint32 breakpoint_id' argument; if the method has a breakpoint,
9832         send a notification to the debugger.
9834         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
9835         running in the Mono Debugger, just pass the breakpoint number to
9836         mono_debug_init_method().
9838         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
9840 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
9842         * mini.c: allow some more unsafe compares.
9844 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
9846         * mini-x86.c, Makefile.am: make distcheck works (partially from
9847         a patch by Richard Lee <r.h.lee@attbi.com>).
9848         * regset.c, regset.h: removed, they are unused.
9850 2003-04-25  Dick Porter  <dick@ximian.com>
9852         * driver.c: Usage reports the name as 'mono' not 'mini'
9853         * exceptions-x86.c: Build and run on freebsd
9855 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
9857         * Makefile.am: install the program with the 'mono' name and
9858         the library as libmono instead of mini and libmini.
9860 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
9862         * driver.c: provide the APIs for the embedding interface of the old jit.
9864 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
9866         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
9868 2003-04-23  Martin Baulig  <martin@ximian.com>
9870         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
9872         * driver.c: Added `--debug' command line argument to enable
9873         debugging support.
9875 2003-04-23  Martin Baulig  <martin@ximian.com>
9877         * debug.[ch]: Removed.  The code is now in
9878         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
9880         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
9881         last six months.
9883 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
9885         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
9887 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
9889         * mini.c:
9890         (mini_cleanup): moved mono_runtime_cleanup call after the call to
9891         mono_domain_finalize.
9892         (mini_method_compile): use mono_method_profile* if the the option is
9893         enabled.
9895 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
9897         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
9898         methods with their wrapper.
9900         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
9901         methods with their wrapper.
9903         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
9904         their wrapper.
9906         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
9907         wrapper.
9909         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
9910         methods.
9912 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
9914         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
9916 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
9918         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
9919         of the mempool. This is slightly faster and uses less memory
9921 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
9923         * mini.c: avoid O(n) allocation for variables.
9925 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
9927         * mini.c: handle items on the stack after inlining methods.
9929 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
9931         * mini.c: make the method->opcode optimization dependent
9932         on MONO_OPT_INSTRINS and do it lazily.
9934 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
9936         * driver.c: print overall results at the end of regression run.
9938 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
9940         * inssel.brg: don't overwrite symbolic registers.
9942 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
9944         * inssel-x86.brg: fix conversion from long to float.
9946 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
9948         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
9950 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
9952         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
9954         * driver.c: Added --print-vtable option as in the old JIT.
9956 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
9958         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
9960 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
9962         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
9964 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
9966         * mini.c regalloc.c regalloc.h: Fix memory leak.
9968 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
9970         * aot.c (mono_aot_get_method): register all used strings
9972 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
9974         * mini.c: always intern strings references with ldstr at compile time.
9976 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
9978         * Makefile.am: add BUILT_SOURCES.
9980 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
9982         * driver.c: give a better error message when the assembly to execute
9983         doesn't have an entry point.
9985 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
9987         * Makefile.am: added hack for automake
9989         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
9990         correct sematics.
9992         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
9994 22003-04-07  Martin Baulig  <martin@ximian.com>
9996         * Makefile.am: Added Makefile.am.
9998         * debugger-main.c: Removed, this is now in the debugger where it
9999         belongs.
10001         * mini.pc.in: Call this package `mini' for the moment.