2006-01-05 Neale Ferguson <neale@sinenomine.net>
[mono.git] / mono / mini / ChangeLog
blob15d9a237808f42b5a9a8101b7a2af9bcbead2f66
1 2006-01-05 Neale Ferguson <neale@sinenomine.net>
3         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
5         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
6         architectures.
8 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
11         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
12         (stack walk problem).
14 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
16         * aot.c (mono_aot_load_method): Fix a warning.
18 2006-01-03  Neale Ferguson <neale@sinenomine.net>
20         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
22 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
24         * iltests.il: Add test for #77148.
26         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
27         #77148.
29 2006-01-03  Neale Ferguson <neale@sinenomine.net>
31         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
33 2006-01-03  Neale Ferguson <neale@sinenomine.net>
35         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
36         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
38         * basic-long.cs: Add lconv-to-r4/r8 tests.
40 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
42         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
44         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
45         here as on other archs.
47 2005-12-29 Neale Ferguson <neale@sinenomine.net>
49         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
51 2005-12-29 Neale Ferguson <neale@sinenomine.net>
53         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
54         
55         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
57         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
58         instrument_prolog; Add memory_barrier instruction.
60 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
62         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
64 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
66         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
68         * aliasing.c inssel.brg: Fix warnings.
70         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
71         could skip initialization of some parts of memory.
73         * mini.c mini-ia64.c: Fix warnings.
75         * inssel-sparc.brg: Add an implementation of lneg which actually works.
77 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
79         * aliasing.c (mono_build_aliasing_information): Add a workaround for
80         a crash seen on sparc.
82         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
83         
84         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
86 2005-12-21 Neale Ferguson <neale@sinenomine.net>
88         * mini-ops.h: Add s390_backchain instruction
90         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
92         * cpu-s390.md: Add s390_backchain instruction
94         * mini-s390.c: Significant ABI changes
96         * mini-s390.h: Cater for zero length structures
98 2005-12-20 Neale Ferguson <neale@sinenomine.net>
100         * mini-s390.c: ABI fixes
102         * inssel-s390.brg: Remove debug statements
104         * cpu-s390.md: Fix length of ATOMIC_xx operations
106 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
108         * basic-float.cs: Add float<->long conversion tests.
110 2005-12-16 Neale Ferguson <neale@sinenomine.net>
112         * mini-s390.c: Fix LOCALLOC processing.
114         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
116 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
118         * iltests.il: Add tests for some opcodes not covered by the other
119         tests.
121 2005-12-15 Neale Ferguson <neale@sinenomine.net>
123         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
124         register loading for Tail processing; Correct trace output.
126         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
128         * cpu-s390.md: Correct size of jmp instruction. 
130 2005-12-13 Neale Ferguson <neale@sinenomine.net>
132         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
134 2005-12-13 Neale Ferguson <neale@sinenomine.net>
136         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
137           Bring s390 up to current level.
139 2005-12-12  Zoltan Varga  <vargaz@gmail.com>
141         * generics.2.cs: Disable the newly added tests as they do not work yet.
142         
143         * generics.2.cs: Add valuetype tests.
145 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
147         * basic-long.cs: Add i4->u8 test.
149         * objects.cs: Add tests for JIT intrinsic.
151         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
152         optimizations lost by a mistake.
154 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
156         * basic-long.cs: Remove a test moved to objects.cs.
158         * arrays.cs: Add more array tests.
160 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
162         * arrays.cs: Add new tests for multi-dimensional arrays.
164 2005-12-06  Raja R Harinath  <rharinath@novell.com>
166         * Makefile.am (test_sources2): Add generics.2.cs.
167         (EXTRA_DIST): Add test_sources2.
169 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
171         Support for boxing and unboxing nullable types as well as the
172         isinst operation on nullables, per the CLI ammendment.
174         * inssel.brg (CEE_ISINST): Special case for nullable
176         * mini.c (handle_unbox_nullable): new method
177         (handle_box): Special case for nullable types
178         (mono_method_to_ir): Call handle_unbox_nullable in correct
179         places.
181         * generics.2.cs: New test suite
183         * Makefile.am: Support for regression tests with generics.
185 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
187         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
188         allocated to registers. Fixes #76800.
190 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
192         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
194 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
196         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
197         of platforms.
199 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
201         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
202         objects.cs.
204         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
205         
206         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
207 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
209         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
210         single precision before storing to a single precision location.
212 2005-11-28  Raja R Harinath  <rharinath@novell.com>
214         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
216 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
218         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
219         correct files.
221         * basic.cs: Remove test_0_byte_compares test which was moved to
222         objects.cs a long time ago.
224 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
226         * aliasing.c: Fixed aliasing issue on 64 bit archs.
228 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
230         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
231         handlers are called.
233         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
234         throwing code.
236          * mini-ia64.c: Add support for the throw->branch exception 
237         optimization.   
239         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
241 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
243         * mini.c: Enabled "fastpath" deadce :-)
244         
245 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
247         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
248         alias analysis pass to support it.
249         * mini.h: Likewise.
250         * ssa.c: Likewise.
251         * liveness.c: Likewise (liveness computation can use aliasing
252         information to be more accurate).
253         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
254         moreover made so that "--compile-all" uses the given optimization
255         flags and not the default ones.
256         * aliasing.c: Alias analysis (new file).
257         * aliasing.h: Likewise.
258         * Makefile.am: added "aliasing.c" and "aliasing.h".
259         
260 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
262         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
263         OP_L opcodes.
265 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
267         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
268         fp >= end_of_stack exit condition, as it is not needed, and it might
269         become true for fp eliminated frames.
271 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
273         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
274         coded offsets.
276 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
278         * mini-arm.c: fixed alignment of doubles/longs to match
279         the C ABI (bug #76635).
281 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
283         * aot.c: fix compilation with --enable-minimal=aot.
285 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
287         * mini-arm.c: fixed compatibility with the new
288         floating point emulator package for compares.
290 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
292         * mini.c : reverted sig->pinvoke changes (r51396-51397).
294 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
296         * mini-exceptions.c (print_stack_frame): Output to stderr.
297         (mono_handle_native_sigsegv): Ditto.
299 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
301         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
302         OP_LCONV_TO_OVF_I implementation.
304         * mini-amd64.c: Add support for the throw->branch exception 
305         optimization.
307         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
308         when the catch clause catches a more general exception, i.e. Object.
310 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
312         * cpu-ia64.md: Remove unused opcodes.
314         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
315         specific defines for architectures defining USE_SIGACTION.
317         * mini-ia64.c: Fix some warnings.
319         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
320         version seemed to skip a frame.
322 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
324         * mini.c: Clean up the usage of sig->pinvoke flag. Now
325         only calls which are made to native code use this flag.
327 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
329         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
330         varargs methods as well.
331         
332         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
333         which have save_lmf set. Reorganize methods prologs a bit.
335         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
336         debugger to the proper place.
338 2005-10-29  Martin Baulig  <martin@ximian.com>
340         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
341         when running inside the debugger until the debugger has support
342         for it.
344 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
346         * mini.h: Fix a warning.
348 2005-10-24  Miguel de Icaza  <miguel@novell.com>
350         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
351         we expose publicly, this returns the string.
353 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
355         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
356         with fp elimination.
358 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
360         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
361         native stacktrace using the glibc 'backtrace' function if available.
363 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
365         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
367         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
368         handle SIGSEGVs received while in native code.
370         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
371         code, call mono_handle_native_sigsegv which will abort the runtime
372         after printing some diagnostics, instead of converting it into a
373         confusing NullReferenceException.
375 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
377         * cpu-pentium.md: Remove unused opcodes.
379 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
381         * mini-amd64.h (MonoLMF): Add rsp field.
383         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
384         the lmf too.
386 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
388         * mini-codegen.c (get_register_spilling): Fix some warnings.
390 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
392         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
393         elimination during exception handling. Enable fp elimination by
394         default.
396         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
397         elimination.
399 2005-10-16  Martin Baulig  <martin@ximian.com>
401         * mini-exceptions.c
402         (mono_debugger_run_finally): New public method for the debugger.
404 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
406         * debug-mini.c (mono_debug_init_method): Fix warning.
408         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
409         the 'exname' parameter const to fix some warnings.
411 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
413         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
414         introduced by the previous patch.
416 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
418         * basic-float.cs: Add test for precision of float arithmetic.
420         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
421         when loading/storing single values from/to memory.
423         * mini.c (mono_jit_compile_method_with_opt): Create the function
424         pointers in the correct domain.
426 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
428         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
429         introduced by previous patch.
430         
431         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
432         when out_filter_idx is NULL.
434         * mini-exceptions.c: Don't run filter clauses twice during exception
435         handling. Fixes #75755.
437 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
439         * aot.c: Add support for ldflda wrappers.
441         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
442         #75902.
444 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
446         * mini.c, mini.h: do not consider exception handlers blocks when
447         setting up interface variables.
449 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
451         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
453 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
455         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
456         causes a regression.
458         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
460 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
462         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
463         of the OP_P definitions.
465         * TODO: Add a proposal for dealing with the CEE/OP mess.
467         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
468         optimizations from the x86 port.
470         * cpu-amd64.md: Ditto.
472         * basic.cs basic-long.cs: Add tests.
474 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
476         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
477         Patrik Torstensson's implementation of my exception-handling
478         optimization idea, when the exception object is not used
479         (bug #62150).
481 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
483         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
484         of the mul_imm optimizations from the old jit.
486 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
488         * mini.c, liveness.c: patch by Patrik Torstensson and
489         Zoltan Varga to improve performance in methods with
490         exception clauses.
492 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
494         * driver.c: Remove 'Globalization' entry from --version.
496 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
498         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
499         there is a profiler interested in JIT events.
501         * aot.c: Load profile files produced by the AOT profiling module, and
502         reorder methods based on the profiling info. Add a 'method_order' table
503         to the AOT file to make mono_aot_find_jit_info work with the reordered
504         methods.
506         * mini.h: Bump AOT file version info.
508 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
510         * mini-arm.h: work around what looks like a gcc bug when optimizations
511         are enabled.
513 2005-09-28  Raja R Harinath  <rharinath@novell.com>
515         * Makefile.am (AM_CFLAGS): Don't use += to append inside
516         conditionals.  Use ...
517         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
519 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
521         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
522         to determine the amount of memory to copy when passing valuetypes.
524         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
525         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
527 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
529         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
530         information about aot.
532 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
534         * *.c: Replace the use of {Enter,Leave}CriticalSection with
535         macros. This will allow a deadlock debugger to easily be plugged
536         in.
538 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
540         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
542 2005-09-27  Raja R Harinath  <rharinath@novell.com>
544         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
545         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
546         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
547         ($(arch_built)) [CROSS_COMPILING]: Error out.
549 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
551         * aot.c: Add support for the no_special_static flag for classes.
553 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
555         * Reapply reverted patches.
557         * *: Revert r50174 as well.
559         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
561 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
563         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
565 2005-09-23  Miguel de Icaza  <miguel@novell.com>
567         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
568         part of the SIG_HANDLER_SIGNATURE.  
570 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
572         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
573         statistics.
575         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
576         introduced by previous patch.
578 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
580         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
581         saved registers too.
583         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
584         upon the information returned by get_call_info ().
585         
586         * mini-x86.c (add_float): Fix stack size calculation.
587         (mono_arch_call_opcode): Rewrite this so it works based up the
588         information returned by get_call_info ().
589         (mono_arch_get_this_vret_args): Ditto.
591 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
593         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
594         in cinfo to determine the registers which need to be used.
596 2005-09-20  Miguel de Icaza  <miguel@novell.com>
598         * driver.c (mono_main): Add --server and --desktop flags. 
600 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
602         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
603         registers as global registers.
605         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
606         longer needed with the new register allocator.
608         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
610         * cpu-ia64.md: Remove unused opcodes.
611         
612         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
613         
614 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
616         * cpu-amd64.md: Remove unused opcodes.
618         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
619         needed with the new register allocator.
621         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
622         reg-reg moves.
624 2005-09-16  Raja R Harinath  <rharinath@novell.com>
626         * Makefile.am (check-local): Don't invoke semdel-wrapper.
628 2005-09-16  Martin Baulig  <martin@ximian.com>
630         * exceptions-amd64.c
631         (throw_exception): Don't call mono_debugger_throw_exception() if
632         we're a rethrow - see the FIXME in the code.
634 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
636         * mini.c (mono_init_exceptions): This only works on some architectures.
637         
638 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
640         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
641         on ia64.
643         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
645         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
646         now in mini-exceptions.c.
648 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
650         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
651         now in mini-exceptions.c.
653 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
655         * exceptions-x86.c: Applied patch from Patrik Torstensson 
656         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
658         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
659         code into mini-exceptions.c. Add some assertions to it.
661 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
663         * aot.c (emit_section_change): Applied patch from "The Software Team" 
664         (<software@solmersa.com>). Fix as errors on windows.
666 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
668         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
669         method info into the LMF.
671 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
672         
673         * mini-ia64.c: Add proper unwind info for method epilogs.
675         * exceptions-ia64.c: Add some code to help debugging.
676         
677         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
679         * mini-exceptions.c: Fix warning.
681 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
683         * mini.c: Really fix build.
685         * mini-x86.c mini-amd64.c: Fix build.
687 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
689         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
691         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
692         some Interlocked methods as intrinsics.
694         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
695         for Thread methods as well.
697         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
699         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
701         * mini-ia64.c mini-x86.c mini-amd64.c 
702         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
703         OP_MEMORY_BARRIER.
704         
705         * mini.c (mono_init_exceptions): Fix build breakage.
707 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
709         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
710         of instructions. Use the new ia64_unw_op macros for emitting unwind
711         info.
713         * mini.c (mono_init_exceptions): Initialize exception handling
714         related trampolines at startup.
716 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
718         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
720 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
722         * mini.c: Handle type loading errors gracefully during compilation and
723         throw the appropriate exception.
725 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
727         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
728         for the mono binary.
730 2005-09-09  Martin Baulig  <martin@ximian.com>
732         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
733         the release.
735 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
737         * mini-arm.h: use emulation for conv.r.un for the release.
739 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
741         * mini-arm.c, objects.cs: more fixes and tests for them.
743 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
745         * mini-arm.c: align structures to at least 4 bytes to be able
746         to keep our current optimized memcpy.
748 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
750         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
752 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
754         * mini.c: ignore SIGPIPE.
756 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
758         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
760         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
762 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
764         * mini.h: Add prototype for mono_allocate_stack_slots_full.
766 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
768         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
769         exception handling support.
770         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
771         patch by Brian Koropoff <briank@marakicorp.com>).
773 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
775         * mini.c: revert another 'optimization' which breaks when
776         items on the eval stack need to be saved at a basic block end
777         (bug #75940).
779 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
781         * jit-icalls.c: for arrays, ensure we always provide
782         lower bounds.
784 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
786         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
787         
788         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
790 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
792         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
793         arguments in their original register.
795 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
797         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
798         memset/memcpy.
800         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
801         when ssapre is enabled.
803         * inssel-long.brg: Fix bug in previous patch.
805         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
806         multiplication by a constant.
808 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
810         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
811         icc.
813         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
814         saving registers.
816 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
818         * inssel-arm.brg: apply changes tested by Brian Koropoff
819         <briank@marakicorp.com>.
821 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
823         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
824         
825 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
827         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
828         to the same register if dreg is just a base register.
829         (print_ins): Improve printing of membase opcodes.
831         * inssel-x86.brg: Add optimized ldind(reg) rules.
833         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
835 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
837         * mini.c: when running under valgrind, set the stack bottom for
838         the GC at the actual approximate stack for the app (fixes running
839         mono with valgrind).
841 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
843         * mini.c: do no break at the first valuetype to init found
844         (fixes bug #75791).
846 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
848         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
850 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
852         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
854 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
856         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
858 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
860         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
862         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
863         code.
865         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
866         code.
868         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
869         methods.
871 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
873         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
875 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
877         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
878         in the tail recursion optimization.
880         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
881         debug info into the assembly file.
883         * iltests.il: Add test for filter regions.
885         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
886         initial stack of filter regions. Fixes #75755.
888 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
890         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
891         stack requirements.
893 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
895         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
896         the check for an already compiled method on non-ia64 platforms.
897         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
898         proper domain.
900         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
902         * inssel-x86.brg: Add some optimized call rules.
904 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
906         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
907         method here.
909         * mini.h mini-trampolines.c: Pass the trampoline argument to 
910         mono_arch_patch_delegate_trampoline.
912         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
914         * mini-trampolines.c: Fix build.
916         * mini-amd64.h: Add delegate trampolines.
918         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
920         * inssel-amd64.brg: Add optimized call rules.
921         
922         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
924         * inssel-ia64.brg: Add optimized ldind(reg) rules.
926 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
928         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
929         change.
931         * mini-ia64.c: Remove LMF fixmes.
933         * mini-ia64.h: Remove most fields from LMF.
935         * inssel-ia64.brg (stmt): Fix unaligned access errors.
937         * mini-trampolines.c: Add support for IA64 function descriptors.
939         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
940         for IA64 function descriptors.
942 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
944         * tramp-arm.c: patch the vtable for virtual calls. Added
945         support code to register/unregister the LMF.
946         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
947         more LMF work.
949 2005-08-19  Dick Porter  <dick@ximian.com>
951         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
952         bit value if needed.
954 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
956         * mini.c (mini_get_method): Move handling of wrapper data here.
958         * mini.c (mono_method_to_ir): Add support for dynamic methods.
960         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
961         virtual.
963         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
964         bblock->code does not remain empty.
966 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
968         * arrays.cs: Add regression test for #75832.
970         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
971         rules. Fixes #75832.
973         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
974         instruction scheduling.
976 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
978         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
980 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
982         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
984         * mini-codegen.c: Fix VC build.
986         * cpu-pentium.md: Increase length of atomic_exhange_i4.
988 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
990         * mini.h: fix signature for mono_register_opcode_emulation.
992 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
994         * mini.c: Get rid of most of the helper_sig_... constants using
995         mono_create_icall_signature ().
997 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
999         * jit-icalls.c (helper_ldstr): New helper function.
1001         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
1003         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
1004         throw, load the string using a helper call instead of creating a string object.
1006         * aot.c: Update after LDSTR changes.
1008         * mini.h: Bump AOT file version.
1009         
1010         * aot.c: Save class size info into the AOT file. Print more statistics during
1011         compilation.
1013         * mini.h: Bump AOT file version.
1015         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
1016         ordering of disasm cases. Fixes #74957.
1018 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
1020         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
1021         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
1022         the generic code needed for the ARM port.
1024 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
1026         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
1027         inssel-arm.brg: more ARM features and fixes.
1029 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
1031         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
1032         ARM port work in progress.
1034 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
1036         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
1038         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
1040         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
1042         * inssel.brg (mini_emit_memset): Add support for unaligned access.
1044         * *-ia64.*: Ongoing IA64 work.
1045         
1046         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
1048 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
1050         * TODO: Remove out-of-data todo stuff.
1052         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
1053         dead code.
1055         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
1057         * mini.h: Bump corlib version.
1059 2005-07-27  Martin Baulig  <martin@ximian.com>
1061         * mini-codegen.c
1062         (create_copy_ins): Added `const unsigned char *ip' argument; set
1063         `copy->cil_code' from it.
1065 2005-07-27  Martin Baulig  <martin@ximian.com>
1067         * mini-exceptions.c (mono_handle_exception): Don't call
1068         mono_debugger_handle_exception() for filters.
1070 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
1072         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
1073         as well.
1075 2005-07-26  Martin Baulig  <martin@ximian.com>
1077         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
1079         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
1080         helper_compile_generic_method() if the method is actually virtual
1081         and non-final.
1083 2005-07-26  Martin Baulig  <martin@ximian.com>
1085         * mini.c
1086         (trampoline_code): Renamed to `mono_trampoline_code' and made it
1087         public; this is now accessed directly by the debugger.
1088         (mono_generic_trampoline_code): Removed.
1090         * debug-mini.c
1091         (mono_debug_init_method): Also add interncalls and wrappers.
1093 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
1095         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
1097 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
1099         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
1101 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
1103         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
1105 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
1107         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
1108         getting TLS offsets on AMD64 too.
1110 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
1112         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
1114 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
1116         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
1117         inssel-arm.brg, mini-arm.h: ARM port work in progress.
1119 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
1121         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
1123         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
1124         to mini.c.
1126         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
1127         mono_sparc_is_virtual_call ().
1128         
1129         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
1131         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
1132         trampoline parameters.
1134         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
1135         
1136         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
1137         to mono_arch_get_vcall_slot_addr.
1139         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
1140         trampoline code.
1142         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
1144 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
1146         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
1148 2005-07-19  Martin Baulig  <martin@ximian.com>
1150         * exceptions-amd64.c (throw_exception): Call
1151         mono_debugger_throw_exception() here like we're doing it on i386.
1153 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
1155         * mini-ia64.c: Add optimized TLS access support.
1157 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
1159         * mini-exceptions.c: Ongoing IA64 work.
1161         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
1163         * mini.c: Use the default optimization set when embedding. Fixes
1164         #75194.
1166 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
1168         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
1169         of trampolines to a separate file.
1171         * mini-trampolines.c: New file.
1173         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
1174         separate file.
1175         
1176         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
1177         amd64/ia64 code.
1179         * mini-codegen.c: Fix cygwin build.
1181 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
1183         * mini.c: Add some minor changes needed by the IA64 port.
1185         * *-ia64.*: Ongoing IA64 work.
1187 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
1189         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
1190         trampolines into arch-independent and arch-dependent parts.
1192         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
1194 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
1196         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
1198         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
1199         the xp-regalloc-branch for amd64.
1201         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
1202         xp-regalloc-branch for x86.
1204 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
1206         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
1208 2005-07-06  Martin Baulig  <martin@ximian.com>
1210         * mini.c
1211         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
1212         (mono_jit_runtime_invoke): Likewise.
1214 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
1216         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
1217         on x86 too.
1218         
1219         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
1220         without loading their metadata. Reorganize the file format so exception handling+
1221         debug info is kept separate from normal method info. Create MonoJitInfo 
1222         structures for methods lazily.
1224         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
1225         loading metadata.
1226         (x86_class_init_trampoline): Patch AOT class init trampolines too.
1228         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
1230         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
1231         in AOT code.
1233         * mini.h: Bump AOT file version.
1235 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
1237         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
1239 2005-07-01  Raja R Harinath  <rharinath@novell.com>
1241         * Makefile.am (check-local): Call semdel-wrapper.
1243 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
1245         * mini-x86.c: Revert the last change as it seems to break the build..
1247 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
1249         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
1250         
1251         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
1253 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
1255         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
1256         outside of the macro, so strange stuff doesn't happen with gcc4
1257         (NEW_AOTCONST_TOKEN): Likewise.
1259 2005-06-28  Martin Baulig  <martin@ximian.com>
1261         * mini.c (mini_class_is_system_array): New static method; use this
1262         instead of `klass->parent == mono_defaults.array_class' everywhere
1263         since this also works for the new generic array class.
1265 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
1267         * inssel.brg: Remove warnings.
1269 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
1271         * mini-ia64.c: Ongoing IA64 work.
1273         * basic-float.cs: Add float->i1 conversion test.
1275         * iltests.il: Add conv.u4 test.
1277 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
1279         * inssel-long.brg: Fix bug caused by last change.
1281 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
1283         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
1284         BSDs.  Allows the x86 JIT to work on OSX86
1286 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
1288         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
1289         u4->i8 conversion.
1291         * mini-ia64.c: Ongoing IA64 work.
1293 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
1295         * mini-ia64.c: Ongoing IA64 work.
1297         * driver.c: Clean up jit_code_hash as well when using --regression.
1299         * inssel-long.brg: Fix long->i4/u4 conversion rules.
1301         * basic-long.cs: Add tests for long->u4 conversion.
1303 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
1305         * mini.c: Take mono_get_domainvar out of macros. This makes sure
1306         that we do not depend on undefined C behavior: the order stuff
1307         gets evaluated within an expression. Fixes mono when compiled on
1308         GCC 4.
1310 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
1312         * *-ia64.*: Ongoing IA64 work.
1314         * aot.c: Lower memory usage while loading AOT methods.
1316         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
1318         * mini.h: Bump AOT file format version.
1320 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
1322         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
1324 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
1326         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
1327         not on callee assembly). Fixed some comments.
1329 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
1331         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
1332         it gets proper disassembly.
1333         (emit_method_info): Remove some dead code.
1335         * mini.c (mini_method_compile): Allways allocate the GOT var in
1336         mono_method_to_ir for emulating opcodes.
1338 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
1340         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
1341         before freeing the code memory. Fixes #74990.
1343         * objects.cs: Add regression test for #74992.
1345         * liveness.c: Extend live ranges of arguments to the beginning of the
1346         method. Fixes #74992.
1348         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
1349         so it points into the faulting instruction.
1351 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
1353         * jit-icalls.c (mono_imul_ovf): Add exception handling.
1355         * *-ia64.*: Ongoing IA64 work.
1357         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
1359 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
1361         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
1363         * *-ia64.*: Ongoing IA64 work.
1365 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
1367         * basic-long.cs: Add tests for add/sub.ovf.
1369         * basic.cs: Add tests for sub.ovf.
1371         * *-ia64.*: Ongoing IA64 work.
1373 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
1375         * *-ia64.*: Ongoing IA64 work.
1377         * basic.cs: Add conv.ovf.i4.un test.
1379 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
1381         * mini.c: (remove_block_if_useless) Fixed bug 75061.
1382         
1383 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1385         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
1387 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
1389         * *-ia64.*: Ongoing IA64 work.
1391 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
1393         * trace.[ch]:
1394         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
1396 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
1398         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
1400 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
1402         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
1404         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
1405         of a call is callable by a near call.
1407 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
1409         * mini-ia64.c: Ongoing IA64 work.
1411 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
1413         * genmdesc.c: Make the generated array non-static.
1415         * inssel-long.brg: Fix LSHR_IMM rule.
1417         * *-ia64.*: Ongoing IA64 work.
1419         * *-ia64.*: Ongoing IA64 work.
1421 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
1423         * *-ia64.*: Ongoing IA64 work.
1425         * *-ia64.*: Ongoing IA64 work.
1426         
1427         * mini-ia64.c: Ongoing IA64 work.
1429         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
1431 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
1433         * objects.cs basic-calls.cs: Move some tests to objects.cs.
1434         
1435         * objects.cs basic-long.cs: Move some tests to objects.cs.
1437 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
1439         * *-ia64.*: Ongoing IA64 work.
1441         * iltests.il: Add a new test.
1443         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
1444         newobj. Fixes #75042.
1446 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
1448         * *-ia64.*: Ongoing IA64 work.
1449         
1450         * *-ia64.*: Ongoing IA64 work.
1451         
1452         * *-ia64.*: Ongoing IA64 work.
1454         * basic.cs objects.cs: Move tests accessing static variables as well.
1456         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
1458 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
1460         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
1462         * driver.c: Always print failed tests.
1464         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
1465         frame pointer.
1467         * *ia64*: Ongoing IA64 work.
1469 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
1471         * basic.cs: Add tests for add.ovf. Fix warnings.
1473 2005-05-18  Miguel de Icaza  <miguel@novell.com>
1475         * driver.c (mono_main): Avoid crash if no argument is passed to
1476         --break;  Do not use g_error, but f_printf.   And fix all other
1477         ocurrences of the same crash.
1479 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
1481         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
1482         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
1483         Fixes #74742.
1485 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
1487         * *-ia64.*: Add beginnings of IA64 backend.
1489         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
1491 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
1493         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
1494         Fixes #74925.
1496         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
1498         * mini-amd64.c: Fix a warning.
1500 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
1502         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
1503         in float_neg. Fixes #74897.
1505         * mini-amd64.c (emit_call): Fix another near call bug.
1507 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
1509         * declsec.c: Keep the appdomain information in the structure. Added a 
1510         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
1511         value gets overwritten).
1512         * declsec.h: Set the default MonoArray for the the stack to 6. Added
1513         an MonoAppDomain member to MonoSecurityFrame.
1514         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
1515         used in the stack walk. Now use a MonoArray which grow (double) when
1516         it gets full.
1518 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
1520         * mini.c: Re-enabled runtime cleanup, since running threads should
1521         now properly stop when exiting.
1523 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
1525         * mini-codegen.c: New file contaning the arch-independent local
1526         register allocator. Not used by any architectures yet.
1528         * mini.h linear-scan.c: Merge some changes from the 
1529         mini-xp-local-regalloc branch.
1531 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
1533         * mini-amd64.c (emit_call): Fix calls to native functions when the
1534         runtime is compiled as a shared library. Fixes #74756.
1536         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
1537         on a literal field. Fixes #74751.
1539 2005-04-25  Raja R Harinath  <rharinath@novell.com>
1541         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
1543 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
1545         * objects.cs: Add missing null casting test.
1547 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
1549         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
1550         in wrapper methods. Also rename 'address' variable to 'offset'.
1552 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
1554         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
1555         warnings.
1556         
1557         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
1559         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
1560         work on windows.
1562 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
1564         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
1566 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
1568         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
1569         just the last bytes.
1571 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
1573         * aot.c (mono_compile_assembly): Fix warning.
1575         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
1576         by the _MSC_VER stuff.
1578 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
1580         * inssel-long.brg: Fix #74588.
1582         * cpu-amd64.md: Fix #74591.
1584         * iltests.il: Add new regression tests.
1586 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
1588         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
1589         valuetype.
1591 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
1593         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
1595         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
1596         from Bill Middleton <flashdict@gmail.com>.
1598 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
1600         * arrays.cs: Add new regression test. Fix warnings.
1602 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
1604         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
1605         and leakage in CKFINITE.
1607         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
1608         this to a null op since it is called on amd64 too.
1610         * exceptions-amd64.c (get_throw_trampoline): Align stack.
1612         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
1613         body since this is not used on amd64.
1614         
1615         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
1617         * mini-amd64.c: Remove obsolete fixmes.
1619         * mini.c (print_method_from_ip): Fix debugging support.
1621 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
1623         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
1624         so that expressions that don't give much gain are not reduced.
1625         * ssapre.h: Likewise.
1627 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
1629         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
1631         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
1633         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
1635 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
1637         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
1639         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
1641 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
1643         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
1644         stack touching.
1646         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
1648         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
1650         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
1652         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
1653         MONO_ARCH_USE_SIGACTION. Fixes #74252.
1655         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
1657         * mini-x86.c: Fix up stack overflow handling.   
1659         * exceptions.cs: Add new regression test.
1661 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
1663         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
1664         mono_jit_thread_attach.
1666         * mini.c (mono_method_to_ir): Verify called method is not abstract.
1668 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
1670         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
1671         avoid calling constructors using callvirt.
1673         * inssel.brg: Fix #74073.
1675 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
1677         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
1678         compilation with non-GCC compilers.
1679         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
1680         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
1682 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
1684         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
1685         klass->interface_offsets (will likely fix bug#74073).
1687 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
1689         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
1691 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
1693         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
1694         to amd64_div_reg_size ().
1695         
1696         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
1698 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
1700         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
1702 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
1704         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
1706 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
1708         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
1709         
1710         * mini.c (mono_precompile_assembly): Load and precompile referenced
1711         assemblies as well. Fixes #74015.
1713 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
1715         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
1717 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
1719         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
1720         a lot of checks and (anyway) permissions cannot work until corlib is 
1721         loaded.
1723 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
1725         * mini-ppc.c: fixed ABI issue on sysv/ppc.
1727 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
1729         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
1730         calls (fixes bug#72824).
1732 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
1734         * mini.c: fix tail recursion elimination (see test in bug#73936).
1736 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
1738         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
1739         some fp functions in sse2 mode.
1741 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
1743         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
1745 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
1747         * mini.h mini.c: Add mono_get_jit_tls_key ().
1749         * mini-x86.c: Enable fast TLS support on windows.
1751 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
1753         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
1754         * mini.c: Check for p/invoke method when generating code. If a
1755         p/invoke method, or it's class, isn't decorated with [Suppress
1756         UnmanagedCodeSecurity] then generate code to call System.Security.
1757         UnmanagedDemand (only if the security manager is active).
1759 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
1761         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
1762         last change as it seems to cause strange crashes.
1763         
1764 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
1766         * *.c: handle unsafe function pointers where needed.
1768 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
1770         * mini.c (mono_jit_free_method): Remove the fixme too.
1772 2005-03-15  Miguel de Icaza  <miguel@novell.com>
1774         * mini.c: As discussed, make the code actually free the delegate
1775         thunk now, to enable the debugging of delegate problems, use
1776         MONO_DEBUG=1 when running Mono. 
1778         This takes also care of parts of the leaks as seen by Joe.
1780 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
1782         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
1783         thread_tls_offset calculation.
1785 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
1787         * declsec.c: Reworked linkdemand checks for icall. The previous code
1788         was using the declaration code (untrusted) and didn't work as expected
1789         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
1790         specific case.
1792 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
1794         * iltests.il: Add new localloc test.
1796         * mini-amd64.c: Handle large stack allocations the same way as on
1797         windows if stack overflow handling is working.
1798         
1799         * mini-amd64.c: Allocate the signal stack using mmap.
1801         * mini.c (sigsegv_signal_handler): Fix reading of context.
1803         * mini-exceptions.c: Fix up stack overflow handling.
1805         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
1807         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
1809         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
1811         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
1813         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
1814         tramp_init functions as they are no longer needed.
1816 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
1818         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
1819         
1820         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
1822         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
1823         
1824         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
1825         support that now.
1827         * mini-ops.h: Add OP_LMUL_IMM.
1829         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
1830         long mul/div opcodes as intrinsic.
1832         * mini-amd64.c (emit_call): Handle the case when the callee might be
1833         an AOT method.
1835 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
1837         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
1838         extra safe.
1839         
1840         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
1842         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
1844 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
1846         * mini.c (mono_codegen): Don't leak here, to help people running
1847         monogrind.
1849 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
1851         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
1852         conversions in sse2 mode.
1854         * basic-float.cs: Add regression test.
1855         
1856         * mini-amd64.c: Reenable sse2.
1858 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
1860         * mini-amd64.c: Disable sse2 until some regressions are fixed.
1862 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
1864         * driver.c: Copyright text should include 2005.
1865         
1866 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
1868         * cpu-amd64.md (load_membase): Fix more max lengths.
1870 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
1872         * cpu-amd64.md (load_membase): Fix max length.
1874         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
1876         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
1878         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
1879         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
1881         * basic-float.cs: Add rounding regression test.
1883         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
1885 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
1887         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
1888         structures in registers for pinvoke wrappers.
1890 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
1892         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
1894 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
1896         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
1897         wrapper to mono_jit_thread_attach.
1899         * mini.c (mini_jit_thread_attach): New jit icall.
1901         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
1902         native->managed wrappers.
1904         * exceptions.cs: Add new regression test.
1906         * mini.c (optimize_branches): Check regions in the cbranch to throw
1907         block case as well. Fixes #73242.
1909 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
1911         * mini.c: thread safety fixes.
1913 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
1915         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
1916         patching stuff, since delegates use jump trampolines so there is
1917         no caller.
1919         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
1920         jump trampolines.
1921         
1922         * tramp-amd64.c: Fix build.
1924         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
1925         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
1927         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
1928         Rename this to mono_arch....
1929         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
1931         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
1933         * mini-amd64.c (emit_call): If both the caller and the callee is
1934         guaranteed to have 32 bit addresses, emit a normal call.
1936         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
1938         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
1939         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
1940         method_ptr inside delegates.
1942 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
1944         * mini.c (mono_jit_free_method): Free the method info even if the native code is
1945         invalidated. Fixes #73001.
1947         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
1949         * mini-x86.c: Only use stdcall for pinvokes on windows.
1951 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
1953         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
1954         * mini-x86.c: remove unreliable __thread var offset detection,
1955         use the correct accessors and enable by default.
1957 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
1959         * mini.c (mono_jit_free_method): Fix memory leak.
1961 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
1963         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
1965 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
1967         * cpu-amd64.md: Fix lengths of atomic opcodes.
1969 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
1971         * driver.c: try to not imply using ICU is any good.
1973 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
1975         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
1976         functions as inline ops.
1978         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
1979         some Interlocked functions as inline ops.
1981         * mini.c (move_basic_block_to_end): Fix bug in last patch.
1983         * mini.h (MonoBasicBlock): Reorganize fields a bit.
1985         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
1987         * mini.c: Add support for OP_NOT_TAKEN.
1989         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
1990         structures in registers for pinvoke wrappers.
1992         * mini-amd64.c: Fix warnings.
1994 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
1996         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
1998         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
2000         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
2001         address instead of loading the address from it.
2003         * mini-x86.c: Add support for returning small structs in registers
2004         on Win32. Fixes part of #70864.
2005         
2006 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
2008         * trace.c (get_token): Improve error checking.
2010 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
2012         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
2014 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
2016         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
2017         it can be reused for MonoClass.
2018         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
2019         _LINKDEMAND.
2021 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
2023         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
2024         instead of a MonoReflectionMethod. The method information wasn't used
2025         when displaying SecurityException details (but will be now).
2027 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
2029         * Makefile.am : windows build fix.
2031 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
2033         * iltests.il: Add new regression test.
2035         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
2036         #72522.
2038 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
2040         * mini.c: Moved linkdemand check into helper function check_linkdemand
2041         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
2042         LDFTN, LDVIRTFTN).
2044 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
2046         * declsec.c: Added statistics counter for different kinds of 
2047         LinkDemands.
2048         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
2049         (and commented) declaration.
2050         * mini.c: Added statistics counter for security Demand code 
2051         generation. Added display of security statistics.
2053 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
2055         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
2056         Fix compilation errors under gcc-2.95.
2058 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
2060         * mini.c, driver.c: Use the new jit trampoline hashtable
2062 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
2064         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
2066 2005-02-11  Martin Baulig  <martin@ximian.com>
2068         * debug-mini.c (mono_debug_close_method): Free the line number array.
2070 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
2072         * aot.c: Break up large methods into smaller ones. Share GOT slots for
2073         icalls.
2075         * mini.h: Bump AOT file format version. 
2077 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
2079         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
2080         APTC and P/Invoke.
2081         * declsec.h: Added macros to get/set lazyly initialized security 
2082         informations about assemblies. Added new enum for different type of
2083         possible LinkDemand violation. Added function to check LinkDemands.
2084         * mini.h: Added a field to MonoCompile to hold any security violation
2085         detected when JITting a method (so it can be thrown later).
2086         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
2087         and CEE_CALLVIRT. Added code to throw exception at the end of
2088         mini_method_compile (note: the exception is unhandled right now).
2090 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
2092         * mini.c, jit-icalls.c: use the managed implementation of
2093         memset for initobj and memset, to avoid managed <-> unmanaged
2094         transitions.
2096 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
2098         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
2099         optimization if it would need a GOT var.
2101         * basic.cs: Add tests for constant propagation and switch statements.
2103         * ssa.c: Fix out-of-range constant propagation and switch statements.
2105 2005-02-09    <vargaz@freemail.hu>
2107         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
2109 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
2111         * cpu-amd64.md (load_membase): Fix max length of load_membase.
2113 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
2115         * mini.c: update to new signature of mono_class_get_allocation_ftn().
2117 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
2119         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
2120         arithmetic operations.
2122 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
2124         * mini-ppc.c: add a workaround for broken user code that
2125         DllImports vararg functions with non-vararg signatures.
2127 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
2129         * mini.c (mono_jit_compile_method_inner): Add detection and a 
2130         meaningfull error message for assemblies written in Managed C++.
2132         * tramp-amd64.c mini-amd64.h: Add support for 
2133         create_trampoline_from_token ().
2135         * aot.c mini-x86.c abcremoval.c: Applied patch from
2136         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
2138 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
2140         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
2141         which takes a MonoImage/token as parameter instead of a MonoMethod.
2143         * aot.c: Use the new trampoline for initializing vtables.
2145         * aot.c: Add support for ldfld/stfld_remote wrappers.
2147         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
2148         rules for compare <MEM>, IMM.
2150         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
2152         * aot.c: Handle inherited finalizers correctly.
2154 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
2156         * inssel.brg (stmt): Add a missing _setup_... ().
2158         * aot.c: Save some parts of the class state to the AOT file and use it
2159         to recompute that state when a class is initialized.
2161         * mini.c: Install AOT hooks into the runtime.
2163         * mini.h: Bump AOT file format version.
2164         
2165         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
2166         Fixes #72148.
2168         * iltests.il: Add new test.
2170 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
2172         * mini.c: fix typo.
2174 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
2176         * mini.c: setup the statistical profiler in the thread attach
2177         callback to cope with the new single thread code.
2179 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
2181         * mini-ppc.c: ensure we have enough room for the profiler
2182         calls (fixed bug#72084).
2184 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
2186         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
2187         it.
2189 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
2191         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
2193 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
2195         * ssapre.c: Fixed an issue with down safety (this allows IronPython
2196         to succesfully execute parrotbench).
2197         * ssapre.h: Likewise.
2199 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
2201         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
2202         variable for stores to method arguments (fixes a SSAPRE issue).
2204 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
2206         * mini.c: handle value types in dup, fixes gen-112.cs.
2208 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
2210         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
2211         sequence for calls in dynamic methods to avoid thunks.
2213 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
2215         * mini.c: correctly remove dynamic methods from the hashtable.
2217 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
2219         * driver.c: Disabled SSAPRE until fix the bug that appears
2220         in IronPython's parrotbench.
2222 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
2224         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
2226         * mini.c (mono_method_to_ir): Revert the previous change.
2227         
2228         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
2229         when AOT compiling.
2231         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
2232         mono_jit_info_table_find () etc. when running under valgrind.
2234         * inssel.brg: Fix warnings.
2236         * mini-exceptions.c: Fix warnings.
2238 2005-01-31  Martin Baulig  <martin@ximian.com>
2240         * driver.c (compile_all_methods_thread_main): Don't try to compile
2241         generic methods or anything which has type parameters.
2243 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
2245         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
2247         * TestDriver.cs: Add --verbose flags.
2249         * graph.c ssa.c: Fix 64 bit warnings.
2250         
2251         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
2252         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
2253         Fix 64 bit warnings.
2255         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
2256         variable not spotted by gcc.
2257         
2258         * mini-amd64.c inssel-amd64.brg: Applied patch from  
2259         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
2260         X86_COMPARE_MEMBASE opcodes.
2262         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
2264 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
2266         * *: MonoMethod->signature might be NULL now. You *MUST* use
2267         mono_method_signature.
2269 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
2271         * driver.c (compile_all_methods_thread_main): Compile the methods
2272         without invoking cctors.
2274 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
2276         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
2277         * basic-calls.cs: test for the above.
2279 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
2281         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
2282         MonoJitInfo changes.
2284 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
2286         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
2287         eagerly if it contains dynamic methods.
2288         
2289         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
2291         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
2292         trace, it is now computed by an icall from trace_ips.
2293         
2294         * mini-exceptions.c: Fix a warning.
2296 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
2298         * mini-exceptions.c: don't bother getting stack trace info if
2299         it's not going to be used.
2301 2005-01-27  Raja R Harinath  <rharinath@novell.com>
2303         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
2304         ssapre-mini-ops.h.
2306 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
2308         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
2310         * aot.c: Avoid calling mono_method_get_header () if not needed.
2312         * mini.h: Bump AOT file format version.
2313         
2314         * mini.c (mono_emit_native_call): Allocate a GOT var here.
2316         * mini.c (mono_print_tree): Print more info for calls.
2318 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
2320         * declsec.h: Remove warning by adding missing include for marshal.h
2322 2005-01-26  Martin Baulig  <martin@ximian.com>
2324         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
2325         `ip' twice.
2327 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
2329         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
2330         flags.
2332         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
2334         * aot.c (mono_compile_assembly): Fix a warning.
2336 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
2338         * declsec.c: Look for security attributes on the original MonoMethod 
2339         (and not the wrapped one). This fix permissions on icalls.
2341 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
2343         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
2345         * mini.c (mono_allocate_stack_slots): Add a fixme.
2347         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
2349 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
2351         * inssel.brg: optimize casts of sealed types (more
2352         optimizations waiting for fixes in remoting).
2354 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
2356         * inssel.brg (stmt): Add another dummy rule.
2358         * driver.c: Fix warnings.
2360         * driver.c (mono_main): If running under valgrind, instruct glib to use
2361         the system allocation functions so valgrind can track the memory
2362         allocated by the g_... functions.
2364         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
2366         * mini-ops.h: Add OP_DUMMY_STORE opcode.
2368         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
2370         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
2371         variables in try regions.
2373         * mini.c (mini_method_compile): Don't disable optimizations on large
2374         methods when AOT compiling.
2376         * mini.c (mono_allocate_stack_slots): New arch independent method to 
2377         allocate stack slots. Not yet used.
2379 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
2381         * debug-mini.c (mono_debug_close_method): Plug some leaks.
2383 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
2385         * mini-ppc.c: make the branch info relative as the code
2386         buffer can be reallocated.
2388 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
2390         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
2391         * driver.c: Removed the AOT/security restriction. Now initialize the
2392         security manager (in metadata) if --security is used.
2393         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
2394         rather than the pointer to declarative security, when AOT is used.
2396 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
2398         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
2399         basic blocks, reduced intrinsic exception throwing code size.
2401 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
2403         * driver.c (mini_usage): Reorder the usage screen.
2405 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
2407         * mini.c (mono_resolve_patch_target): Fix warning.
2409 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
2411         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
2412         previous patch.
2414         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
2416         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
2417         breaks the amd64 build.
2419         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
2420         register allocation. Fixes #71454.
2422         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
2424         * arrays.cs: Add new regression test.   
2426 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
2428         * ssapre.c: Turned usage of snprintf to GString.
2429         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
2430         (I left it on by mistake in my previous commit).
2432 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
2434         * mini.c, cfold.c, basic-calls.cs: preserve side effects
2435         on cond branch optimization (fixes bug# 71515).
2437 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
2439         * abcremoval.c: Fixed bug 71062.
2440         * abcremoval.h: Likewise.
2442 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
2444         * mini.c: Added a new functionality to optimize_branches, the removal
2445         of useless basic blocks, and fixed some problem in the removal of
2446         critical edges; some utility functions added for both purposes.
2447         * ssapre.c: Added complex expression support, and fixed bug 70637.
2448         * ssapre.h: Likewise.
2449         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
2450         enabled in SSAPRE.
2451         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
2452         * driver.c: Re-enabled SSAPRE.
2454 2005-01-19  Martin Baulig  <martin@ximian.com>
2456         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
2457         the result of mono_get_method_constrained().
2459 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
2461         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
2462         manager.
2464 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
2466         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
2467         be detected.  Fixes #59296.
2469 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
2471         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
2472         which can happen. Fixes #71361.
2474 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
2476         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
2477         manager.
2479 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
2481         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
2482         appdomain-unload.exe to fail.
2483         
2484         * mini.c: Fix some memory leaks.
2486 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
2488         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
2489         Fixed bug and sped up some codepaths.
2491 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
2493         * mini.c: Fix some memory leaks.
2495         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
2496         conversion.
2498         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
2500         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
2501         #71320.
2503         * iltests.il: Add regression test for #71320.
2505 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
2507         * mini.c (mono_codegen): Fix installation of profiler hooks.
2509         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
2511 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
2513         * mini.h, mini.c, cfold.c: optimize access to enum
2514         readonly fields, too. Eval conditional branches if possible
2515         to perform unreachable code removal in more cases.
2517 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
2519         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
2521         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
2522         code manager.
2524         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
2525         WinXP DEP. Fixes #71244.
2527 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
2529         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
2531 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
2533         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
2535 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
2537         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
2538         changes.
2540         * mini.h: Bump AOT version.
2542         * mini.h (MonoCompile): Change exvar to a hash table.
2544         * mini.c: Allocate a separate exvar for each handler block.
2546         * mini.c: Get rid of the computation of filter_lengths, its not needed.
2548         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
2549         ex var with the pending exception and only throw if the two are equal.
2550         Fixes #68552.
2551         
2552         * exceptions.cs: Add tests for rethrow and nested catch clauses.
2554         * mini-x86.c: Fix warnings.
2556         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
2557         used by all the ports now.
2559         * aot.c: Add write-symbols and save-temps options.
2561 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
2563         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
2565 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
2567         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
2568         operations.
2570         * tramp-s390.c: Check vtable slot belongs to the domain.
2572         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
2573         as per other platforms.
2575         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
2577 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
2579         * driver.c: we don't run the Main() code in a subthread anymore.
2581 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
2583         * mini.c: added experimental rtc support in the statistical
2584         profiler: if the user has the permission, more accurate statistics
2585         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
2586         The MONO_RTC value must be restricted to what the linux rtc allows:
2587         power of two from 64 to 8192 Hz.
2589 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
2591         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
2593 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
2595         * mini-ppc.c: better icache flush for smp.
2597 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
2599         * mini-amd64.c (emit_move_return_value): Fix memory leak.
2601         * mini-x86.c (get_call_info): Add the get_call_info () code from the
2602         amd64 port, not yet used.
2604 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
2606         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
2607         a struct type.
2609 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
2611         * driver.c: Added --security option to activate the security manager.
2612         Right now this will allow code generation for declarative demands and
2613         is disabled when AOT is specified.
2614         * mini.c: Add code generation for declarative security demands.
2615         * mini.h: Add mono_use_security_manager as an extern gboolean.
2617 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
2619         * aot.c (mono_compile_assembly): Speed up compilation a bit by
2620         emitting more dense assembly code.
2622         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
2623         exception throwing stuff.
2625 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
2627         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
2628         dead code.
2630         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
2631         left in by mistake.
2633         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
2634         fixed.
2636         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
2638         * tramp-*.c: Only patch vtable slots if the object is in the current
2639         domain. Fixes appdomain-unload.exe.
2641         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
2642         
2643         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
2644         x86 branch.
2646 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
2648         * mini.c (reverse_branch_op): New helper function.
2650         * mini.c (optimize_branches): Run the new optimization only on 
2651         platforms which support it. Also reverse all kinds of branches.
2653         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
2655         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
2656         a throw statement.
2658         * mini.c (optimize_branches): Reverse not-equals branches if the false
2659         bblock is a throw. This happens a lot of time with argument checking in
2660         corlib.
2662         * mini.c (mono_codegen): Add support for placing basic blocks after
2663         the function epilogue.
2665         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
2666         function epilogue.
2667         
2668 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
2670         * mini.c (setup_stat_profiler): Only set this up if the platform
2671         supports ITIMER_PROF.
2673 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
2675         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
2676         previous patch.
2678         * inssel.brg: Fix a warning.
2680 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
2682         * mini.c: added support for statistical profiler 
2683         (run with: --profile=default:stat).
2685 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
2687         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
2689         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
2691         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
2692         related to global registers from the amd64 port.
2694 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
2696         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
2698         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
2699         with global registers.
2700         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
2702         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
2704 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
2706         * debug-mini.c (encode_value): Fix off-by-one.
2708         * aot.c (encode_value): Likewise.
2710         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
2712 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
2714         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
2715         AOT.
2717         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
2718         
2719         * aot.c (emit_method_info): Increase size of temp buffer.
2721         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
2722         the AOT case.
2724 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
2726         * aot.c (emit_method_info): Fix build.
2727         
2728         * aot.c: Further rework of the AOT file format to reduce the size of
2729         the method info data.
2731         * mini.h: Bump AOT file format version.
2733 2004-12-27  Martin Baulig  <martin@ximian.com>
2735         * mini.c (mini_get_method): New static method; call
2736         mono_get_method_full() and mono_get_inflated_method().
2737         (mono_method_to_ir): Use mini_get_method() instead of
2738         mono_get_method_full(). 
2740 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
2742         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
2744 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
2746         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
2748         * inssel-amd64.brg: Add some optimization rules.
2750 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
2752         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
2753         standard not GC'd stuff is fine.
2755 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
2757         * aot.c: Rework the AOT file format to get rid of most of the global
2758         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
2760         * mini.h: Bump AOT file format version.
2761         
2762 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
2764         * mini.h: Bump AOT file format version.
2766         * aot.c (mono_aot_is_got_entry): New function to determine if an 
2767         address is inside a GOT.
2769         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
2771         * cpu-pentium.md: Increase the maximum size of some instructions which
2772         might involve a got access.
2773         
2774         * mini.c (get_method_from_ip): Another debug helper function.
2776         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
2777         when got var accesses are created during the decompose phase.
2779         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
2781         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
2782         argument mini_compile_method and to MonoCompile, and use this to
2783         determine whenever a given method is compiled for AOT. This allows the
2784         other methods compiled during AOT compilation to be free of AOT stuff,
2785         so the backends does not need to add special support for them by
2786         creating a fake GOT etc.
2788         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
2789         longer needed.
2791 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
2793         * mini.c (mono_method_to_ir): It turns out that some of the
2794         x-appdomain wrappers are lax with types, so just ignore this for
2795         all wrappers.
2797         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
2798         at the vtable->klass. If it is non-shared code we can just use the
2799         vtable.
2801 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
2803         * mini-ppc.c: access MonoDomain from tls, too.
2805 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
2807         * declsec.c: Removed unused variable (and related warning ;-)
2809 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
2811         * iltests.il: New test for LDELEMA on an array of ref types.
2813         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
2814         all ldelema's on reftypes.
2815         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
2816         it was the wrong place to put it.
2818         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
2819         register to pop to make this cleaner, at the request of Paolo.
2821 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
2823         * mini-ops.h (OP_GETHASHCODE): New op.
2825         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
2827         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
2828         operation.
2830         For a microbenchmark, this reduces the cost of Hashtable.get_Item
2831         by 25%.
2832         
2833         * mini-x86.c (mono_arch_output_basic_block): Rather than
2835         add ebp, 4
2837         Emit
2839         pop edx
2841         The first is 3 bytes while the second is 1. This saves 36 kb on
2842         mscorlib, quite a big saving. When bootstraping mcs, I was able to
2843         see a small boost because of icache locality.
2845         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
2847 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
2849         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
2850         started code sharing with the generic code.
2852 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
2854         * mini-ppc.c, cpu-g4.md: added code for direct access to
2855         tls data slots.
2857 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
2859         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
2860          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
2861         to OP_TLS_GET.
2863 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
2865         * declsec.c|h: Added functions to cache the declarative stack modifiers
2866         in MonoJitInfo and to create a security frame from a MonoJitInfo 
2867         structure.
2868         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
2869         created. Register internal calls for System.Security.SecurityFrame::
2870         _GetSecurityFrame and _GetSecurityStack.
2871         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
2872         the definitions for the new stack walk/callback mechanism.
2873         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
2874         first security frame for LinkDemands and InheritanceDemands) and
2875         GetSecurityStack for Demands. Both use the new mono_walk_stack code
2876         from lupus.
2877         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
2878         walk initialization (lupus).
2880 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
2882         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
2883         idiom.
2884         (handle_loaded_temps): Do not create a temporary variable for
2885         things that we know are temps. They will never be modified.
2886         (mono_spill_call): Set MONO_INST_IS_TEMP
2887         (mono_emulate_opcode): ditto
2888         (emit_tree): ditto
2889         (mono_method_to_ir.CEE_DUP): ditto
2891 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
2893         * mini.c (type_to_eval_stack_type): Make this handle the void type
2894         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
2895         (emit_tree): use ip_in_bb to special case some common idioms
2896         Update all callers to pass in the IP.
2897         (mono_method_to_ir): Make CEE_CALL* do the above as well.
2899         This gives us a nice 2% speedup in mcs bootstrap.
2901         * mini-x86.c (peephole_pass): Peephole pass to make
2902         mov  [foo], eax
2903         push [foo]
2905         into
2907         mov [foo], eax
2908         push eax
2910         * mini.c (ip_in_bb): new method.
2911         (mono_method_to_ir): use this method rather than doing the hash
2912         lookup ourselves.
2914         * linear-scan.c (mono_linear_scan): When expiring actives, you
2915         don't need to keep around variables that expire on this
2916         instruction. This makes it so that:
2917              a = b + 1
2918         will turn into:
2919              store (ebx add (ebx, 1))
2920         which will become
2921              add ebx, 1
2923 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
2925         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
2926         combination to avoid doing two copies. Fix up problems with previous
2927         patch.
2929         * mini.c: Fix 64 bit warnings.
2931         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
2933 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
2935         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
2936         changes from the x86 code.
2938         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
2940 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
2942         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
2943         throwing code to reduce its size, unify the AOT and non-aot code and 
2944         get rid of relocations in the AOT case.
2946         * mini-x86.h mini.c exceptions-x86.c 
2947         (mono_arch_get_throw_corlib_exception): New arch specific function to 
2948         raise corlib exceptions which doesn't require relocations in the 
2949         caller.
2951         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
2953 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
2955         * mini.c (mono_emit_method_call): Only allocate the got var when it is
2956         needed.
2958         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
2959         in the AOT case.
2961 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
2963         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
2964         with add function when used from Inc/dec atomic 
2965         functions. Re-enabled optimization on x86.
2966         * mini-ops.h: renamed atomic_add functions to
2967         allow _add to match the Interlocked::Add and
2968         _add_next to match Interlocked::Inc/Dec.
2970 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
2972         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
2973         linking of BBs to the end BB, and enabled SSAPRE also with
2974         consprop and copyprop (which was prevented by that bug).
2976 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
2978         * mini-x86.c: disabling the Interlocked optimizing code. 
2980 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
2982         * aot.c (load_aot_module): Move reading of got_addr after the AOT
2983         file version check.
2984         
2985 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
2987         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
2988         interlocked optimization due lack of support on x86, rewrote 
2989         exchange to take into account that base may be in eax.
2990         
2991         xsp works again; activated Interlocked optimizing code.
2992         
2993 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
2995         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
2997 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
2999         * mini-ops.h: Add new opcodes.
3001         * mini.h: Add new patch types. Add got_var to MonoCompile.
3003         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
3004         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
3005         make it work with all kinds of patchable code.
3007         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
3008         address of the GOT, and referencing entries in the GOT.
3010         * mini.c: Add code to load the GOT address if needed by an opcode.
3012         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
3013         independent AOT code on the x86 using an elf-style Global Offset Table.
3015 2004-12-14  Raja R Harinath  <rharinath@novell.com>
3017         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
3019 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3021         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
3022         when running xsp.
3024 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
3026         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
3027         of Interlocked:Increment/Decrement/Add as inline ops.
3028         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
3030 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
3032         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
3033         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
3035 2004-12-12  Duncan Mak  <duncan@ximian.com>
3037         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
3038         again. `patch_info->table_size' is no longer valid after Zoltan's
3039         commit #37636.
3041 2004-12-12  Martin Baulig  <martin@ximian.com>
3043         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
3044         if we are the "real" method, ie. not an inlined method inside it.
3046 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
3048         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
3049         before we look in the special fields table. This fixes
3050         ../tests/thread-static-init.cs.
3052 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
3054         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
3055         for Array get_Rank and get_Length. Fixes bug #70465.
3057 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
3059         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
3060         separate structure to reduce the size of MonoJumpInfo.
3062 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
3064         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
3066 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
3068         * mini.c (mini_get_inst_for_method): Changed to allow ports
3069         to return a MonoInst instead of opcode 
3070         (renamed mini_get_opcode_for_method to better reflect the new functionality)
3071         
3072         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
3073         Allow ports to return a created MonoInst instead of op-code, will enable
3074         new optimizations.
3075         (renamed mini_get_opcode_for_method to better reflected the functionality)
3077 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
3079         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
3081 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
3083         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
3084         Fixes #69985.
3086 2004-12-08  Martin Baulig  <martin@ximian.com>
3088         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
3089         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
3091 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
3093         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
3094         correctly.
3096         * exceptions.cs: Disable some tests which depend on properties of x86 fp
3097         arithmetic.
3099 2004-12-08  Raja R Harinath  <rharinath@novell.com>
3101         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
3103 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
3105         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
3106         bug introduced by the previous patch.
3108 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
3110         * mini-ppc.c, objectc.cs: handle large structs passed by value
3111         (fixes bug #69972).
3113 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
3115         * mini-ppc.c: OP_ARGLIST implementation from
3116         Geoff Norton  <gnorton@customerdna.com>.
3118 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
3120         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
3121         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
3123 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
3125         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
3127 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3129         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
3130         support.
3132 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
3134         * mini-sparc.c: Zero out localled-ed memory.
3136         * iltests.il: Add tests for zeroing out localloc-ed memory.
3138 2004-12-04  Martin Baulig  <martin@ximian.com>
3140         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
3141         mono_method_get_signature_full().       
3143 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
3145         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
3146         and some utility functions (always for SSAPRE), integrated SSAPRE.
3147         * mini.h: Likewise.
3148         * driver.c: Added ssapre option.
3149         * ssa.c: Small fix on OP_ARG handling.
3150         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
3151         * Makefile.am: Likewise.
3153 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
3155         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
3156         now in the xp code.
3158         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
3159         icall.
3161 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3163         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
3164         
3165         * cpu-s390.md : Increase instruction length of oparglist.
3167         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
3169 2004-11-30  Martin Baulig  <martin@ximian.com>
3171         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
3172         virtual generic methods.  We call a special helper_compile_generic_method()
3173         icall to retrieve the method from the vtable, inflate and compile
3174         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
3176         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
3178 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
3180         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
3182 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
3184         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
3185         Fixes #69929.
3187 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
3189         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
3190         platforms with PIC aot.
3192 2004-11-28  Martin Baulig  <martin@ximian.com>
3194         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
3195         Fixes gen-112.cs.
3197 2004-11-28  Martin Baulig  <martin@ximian.com>
3199         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
3200         the result of mono_type_get_underlying_type() to check whether
3201         we're byref.
3203 2004-11-26  Martin Baulig  <martin@ximian.com>
3205         * mini.c
3206         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
3207         in the g_assert().
3209 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
3211         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
3212         the same way as the other arguments so they won't get clobbered.
3214         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
3215         calls through R11 since it is clobbered by the trampoline code.
3217 2004-11-26  Raja R Harinath  <rharinath@novell.com>
3219         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
3220         pick up in-tree mscorlib.dll.
3222 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
3224         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
3226         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
3227         runtime data/code are now stored in a table similar to the GOT in ELF. 
3228         This allows the code itself to be position independent.
3230         * aot.c: Fix loading of referenced assemblies after the lazy assembly
3231         loading changes.
3233         * aot.c: Attach ELF type (object/function) directives to all global
3234         symbols.
3236         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
3238         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
3240         * mini-amd64.h: Turn on PIC AOT code.
3242         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
3243         returning the offset within an OP_AOTCONST instruction where the GOT
3244         offset needs to be added.
3246         * mini.h: Bump AOT file format version.
3248 2004-11-25  Martin Baulig  <martin@ximian.com>
3250         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
3251         uninflated generic methods.
3253 2004-11-25  Martin Baulig  <martin@ximian.com>
3255         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
3257 2004-11-24  Martin Baulig  <martin@ximian.com>
3259         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
3260         original klass (this only applies for generic instances).
3262 2004-11-24  Martin Baulig  <martin@ximian.com>
3264         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
3265         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
3266         that array).
3268 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
3270         * mini.c (mono_method_to_ir): Disable inlining for methods containing
3271         localloc. Fixes #69678.
3273         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
3274         
3275 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
3277         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
3278         used SSE registers on pinvoke calls. Fixes #69774.
3280 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
3282         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
3283         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
3285 2004-11-23  Raja R Harinath  <rharinath@novell.com>
3287         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
3288         Refer directly to the mcs/ tree.
3290 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3292         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
3293         Check if a trampoline for a synchronized method is required. 
3295 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
3297         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
3298         with localloc if needed. Throe arithmetric exception in
3299         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
3300         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
3302 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
3304         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
3305         types before switching on type.  Fixes #69622.
3307 2004-11-19  Raja R Harinath  <rharinath@novell.com>
3309         * Makefile.am (check-local): New.  Integrate into 'make check'.
3310         (MCS,RUNTIME): Define using in-tree mono and mcs.
3311         (ILASM): New.
3312         (%.exe): Use $(ILASM).
3314 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
3316         * mini-ppc.c: adjust initial prolog size (bug #69691).
3318 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
3320         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
3321         #69664.
3323 2004-11-17  Raja R Harinath  <rharinath@novell.com>
3325         * Makefile.am (clean-local): Rename from 'clean'.
3327 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3329         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
3330         to mono_arch_is_int_overflow. 
3331         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
3332         SIGFPE events.
3334 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
3336         * declsec.c|h: New files to support declarative security attributes.
3337         Added function to check if a method has (applicable) security.
3338         * mini.c|h: Add check for declarative security attributes in
3339         mono_method_check_inlining.
3340         * Makefile.am: Added declsec.c and declsec.h to the build.
3342 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
3344         * mini.c, mini.h: update to keep dynamic code info per-domain.
3346 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
3348         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
3349         (mini_init): Get rid of it from here too.
3351 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
3353         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
3354         implemented OP_RETHROW (patch by Geoff Norton
3355         <gnorton@customerdna.com>).
3357 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
3359         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
3360         between appdomains.  Fixes appdomain-unload on PPC.
3362 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
3364         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
3365         mini-exceptions.c: handle the new wrapper types.
3366         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
3367         token value as a MonoClass* when compiling a wrapper.
3368         mono_jit_create_remoting_trampoline now takes an additional
3369         MonoRemotingTarget parameter.
3370         
3371 2004-11-10  Martin Baulig  <martin@localhost>
3373         * mini.c (mono_method_to_ir): Use `generic_container->context'
3374         rather than creating a new one.
3376 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3378         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
3380         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
3382 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
3384         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
3385         the experimental aot cache stuff.
3387 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
3389         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
3390         mini-exceptions.c: update to exception clause structure changes.
3392 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
3394         * exceptions-x86.c (throw_exception): Fix warnings.
3396         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
3397         for OP_RETHROW.
3399 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
3401         * exceptions-sparc.c (get_throw_exception): Really fix this.
3403 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
3405         * tramp-*.c: we no longer support icalls without wrappers, so
3406         a bit of code can be removed here
3408 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
3410         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
3411         patch.
3413         * cpu-sparc.md: Add op_rethrow.
3415         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
3417         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
3419         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
3420         * mini-ops.h: Add OP_RETHROW.
3422         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
3424         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
3426 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
3427         
3428         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
3429         Makes the output much easier to read
3431 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
3433         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
3434         prevents another huge leak when compiling with ssa. Secondly, the
3435         performance of doing this rather than freeing the lists is much
3436         better. GList does a lock every time you allocate a list link,
3437         so that it can use a memory pool. So, it is better to just use
3438         a memory pool of our own.
3439         
3440         * ssa.c, linear-scan.c: replace g_list_remove_link with
3441         g_list_delete.  The remove one does not free the GList, so we were
3442         leaking memory. On -O=all --compile-all with corlib, this cut down
3443         3 MB of allocations.
3445 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
3447         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
3449         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
3451         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
3452         into a new function mono_create_jit_trampoline ().
3454 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
3456         * trace.c (get_spec): Allow tracing of classes without a namespace.
3458 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
3460         * mini.c: Fix pointer overwrite in mini_method_compile.
3462 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
3464         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
3465         The darwin ABI needs some special handling for 1 and 2 byte structs
3466         Lets use lbz/lhz instead of lwz everywhere.
3467         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
3468         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
3469         Use stb/sth for the former, and put the latter always on stack instead of in
3470         argument registers.
3472 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
3474         * trace.c (is_filenamechar): Add '_'.
3476 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
3478         * mini-s390.c: Fix prolog length to allow for large trace requirements.
3480         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
3482 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
3484         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
3485         depends on libmonogc. Fixes #68805.
3487 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
3489         * mini.c (mono_jit_free_method): Provide extra information for
3490         this error.  Currently this leaks, but will be turned into a
3491         developer option in the future.
3493 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
3495         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
3497 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
3499         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
3500         boundary. Fixes reading of PATCH_INFO_R4 and R8.
3501         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
3503 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
3505         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
3506         trampolines for AOT code.
3508 2004-10-22    <vargaz@freemail.hu>
3510         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
3511         constructed types. Fixes #68136.
3513 2004-10-21  Martin Baulig  <martin@ximian.com>
3515         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
3516         if it returns true, unwind the stack to the call instruction.
3518 2004-10-21    <vargaz@freemail.hu>
3520         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
3522         * mini.h: Bump AOT version number.
3524         * objects.cs: Add another test for unbox trampolines.
3526         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
3527         valuetype methods.
3529 2004-10-20    <vargaz@freemail.hu>
3531         * driver.c: Add SHARED to the set of optimizations tested.
3533         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
3535         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
3536         used by CEE_NEWARR.
3538         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
3540 2004-10-20  Martin Baulig  <martin@ximian.com>
3542         * mini-exceptions.c (mono_handle_exception): Call
3543         mono_debugger_handle_exception() to tell the debugger about
3544         catch/finally clauses.
3546 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
3548         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
3550         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
3551         #68447.
3553 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
3555         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
3556         methods as their native size, fixed bug #57543, #57545.
3557         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
3558         This saves a temporary register and mullw call down into 1 (minor perf
3559         increase for cases like sum = sum * 5;  This use to translate into:
3560             li r11,5
3561             mullw r28,r28,r11
3562         It now translates to
3563             mulli r28,r28,5
3565 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
3567         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
3568         #68388.
3570 2004-10-11  Martin Baulig  <martin@ximian.com>
3572         * mini.c (mono_method_to_ir): If we're a generic method, get the
3573         MonoGenericContainer from our MonoMethodNormal and create a
3574         MonoGenericContext from it.
3576 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
3578         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
3580         * basic-long.cs: Add test for checked i8->i2 cast.
3582 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
3584         * inssel-ppc.brg: added a couple of speedup rules.
3586 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
3588         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
3589         to speed up rebuilds.
3591 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3593         * mini-s390.c: Minor fix to OP_OR_IMM.
3595 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
3597         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
3598         better. Fixes appdomain-unload.exe on sparc.
3600 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
3602         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
3603         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
3604         see bug 67324.
3606 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
3608         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
3610 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
3612         * mini.c: Always generate a field read/write wrapper for members
3613         of the class MarshalByRefObject since the actual instance could
3614         be a CBO.
3616 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
3618         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
3620 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
3622         * driver.c mini.h trace.c: Move the setting of the main assembly into
3623         a separate function called mono_trace_set_assembly () and call it after
3624         actually loading the main assembly. Fixes #66872.
3626 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
3628         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
3629         using the code manager.
3631 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
3633         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
3635 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
3637         * cpu-amd64.md: Fix bug in previous patch.
3638         
3639         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
3640         #66650.
3642 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
3644         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
3645         mini-exceptions.c: updates for changed stack walk interface.
3647 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
3649         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
3651 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
3653         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
3655 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
3657         * driver.c (mini_regression_list): Do not call mono_assembly_close 
3658         since assemblies can't be unloaded.
3659         
3660 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
3662         * cpu-amd64.md: Fix more instruction lengths.
3664         * cpu-amd64.md: Fix lengths of some instructions.
3666 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
3668         * inssel.brg: Make the array ldelema check aot friendly.
3670 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
3672         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
3674         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
3676 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
3678         * mini-x86.c: Fix build.
3680         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
3681         mono_type_get_underlying_type () helper function to simplify code.
3682         
3683 2004-09-09  Martin Baulig  <martin@ximian.com>
3685         * mini-amd64.c: Don't access `type->data.klass' directly, call
3686         mono_class_from_mono_type() instead since the type may be a
3687         generic instance.
3689 2004-09-09  Martin Baulig  <martin@ximian.com>
3691         * mini-amd64.c (get_call_info): Fix support for generic instances.
3692         (add_valuetype): Use mono_class_from_mono_type() to get the class
3693         since we can be a generic instance.
3695 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
3697         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
3699 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
3701         * liveness.c: reset spill costs on each scan: bug 62107
3703 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
3705         * exceptions-sparc.c (mono_arch_find_jit_info): remove
3706         unnecessary line that doesn't compile
3708 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
3710         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
3711         trampolines, make them call an error function so people can fix their
3712         code.
3714 2004-09-06  Martin Baulig  <martin@ximian.com>
3716         * mini.c (mono_method_to_ir): When initializing locals, handle a
3717         generic instances like a valuetype if it's a valuetype and like a
3718         class if it's a class.
3720 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
3722         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
3723         stack. Fixes #64674.
3725         * exceptions.cs: Add test for unwinding of call arguments.
3727 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
3729         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
3730         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
3731         set the carry/borrow flag). The sparc and s390 implementations
3732         can now use optimized versions (and simplify the code). ppc bugfixes.
3734 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
3736         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
3738 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
3740         * inssel-amd64.brg: Remove leftover 32 bit rule.
3742         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
3744 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
3746         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
3747         mono_arch_find_jit_info functions into a new function. Fix a memory
3748         leak.
3750         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
3751         refactored code.
3752         
3753 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
3755         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
3756         as well.
3757         
3758         * exceptions.cs: Add array size tests.
3760         * mini.c: Allocate a separate icall wrapper for each arity of 
3761         mono_array_new_va. Fixes #59509.
3763         * exceptions.cs: Add testcase for 64578.
3765         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
3767         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
3768         
3769 2004-09-02  Martin Baulig  <martin@ximian.com>
3771         * mini.c (mono_method_to_ir): When initializing the locals, call
3772         handle_initobj() on the generic instance itself, not its
3773         underlying type.
3775 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
3777         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
3778         MonoJitInfo for dynamic methods.
3780         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
3782         * mini.c: Add support for freeing JIT data for dynamic methods.
3783         
3784 2004-09-01  Martin Baulig  <martin@ximian.com>
3786         * mini-x86.c (is_regsize_var): Added support for generic
3787         instances.
3788         (mono_arch_emit_prolog): Make this compile again, use
3789         `x86_push_imm_template (code)'.
3791 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
3793         * mini-x86.c: make all push_imm instructions that get
3794         patched always emit the long form
3796 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
3798         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
3799         in a per-domain hash.
3801         * mini-amd64.c (merge_argument_class_from_type): Handle generic
3802         types.
3804 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
3806         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
3807         work.
3808         
3809         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
3810         work.
3812         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
3813         Beginnings of SSE2 support.
3815         * exceptions.cs: Add more tests for checked int<->uint casts.
3817 2004-08-28  Martin Baulig  <martin@ximian.com>
3819         * mini-x86.c (mono_arch_instrument_epilog): Added support for
3820         generic instances.
3822         * mini.c
3823         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
3824         Handle generic instances recursively.
3826 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
3828         * iltests.il: test for conv.u8 on a constant
3830 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
3832         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
3833         LCONV_x4 (shrun_32 (membase)).
3835 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
3837         * inssel-x86.brg: c&p rules for push/setret of long
3839 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
3841         * inssel-x86.brg: c&p rules for compare (base, regvar) and
3842         compare (regvar, base)
3844         * inssel-x86.brg: more burg love
3846         * inssel.brg: more cleanup
3848         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
3850 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
3852         * basic-long.cs, basic-calls.cs: new tests for optimization.
3854 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
3856         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
3857         patch.
3859 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
3861         * mini-amd64.c (read_tls_offset_from_method): Add another case.
3862         
3863 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
3865         * inssel.brg (mini_emit_memcpy): use 
3866         NO_UNALIGNED_ACCESS to disable memcpy optimization
3868 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
3870         * mini-amd64.c: Handle generic types in various places.
3872         * mini.c (mono_method_to_ir): Handle generic types in init locals.
3874 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
3876         * mini.c (handle_box): Fix warning.
3878         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
3880         * mini-amd64.h: Enable the emit_state optimization.
3882         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
3884         * mini-amd64.c: Add some new 64 bit peephole opts.
3886         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
3888         * cpu-amd64.md: sreg1 of div instructions must be %rax.
3890         * mini-amd64.c: Register allocator fixes.
3892         * mini.c: Add an optimization to emit_state to avoid allocation of new
3893         registers on some platforms.
3895 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
3897         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
3899         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
3900         allocation. Fixes #63085.
3902         * basic-long.cs: Add new regression test.
3904         * mini-amd64.c: Register allocator improvements.
3906 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
3908         * mini-amd64.c (read_tls_offset_from_method): Add another code
3909         sequence.
3911         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
3912         instruction sequence for nullifying class init trampolines.
3914         * objects.cs: Add new regalloc test.
3916         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
3918 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
3920         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
3921         
3922         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
3923         arguments.
3925         * driver.c: Fix profiling after TLS changes.
3926         
3927         * driver.c (mono_main): Set mono_stats.enabled if needed.
3929         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
3930         CEE_BOX.
3932 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
3934         * mini-x86.c: use a 1 op rather than a 2 op tls access
3935         instruction -> faster.
3937 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
3939         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
3940         x86 backend.
3942 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
3944         * exceptions-sparc.c (throw_exception): fix typo
3946 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
3948         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
3949         set tree->dreg correctly with tls. Allow any
3950         register to be used.
3952         * mini-x86.c (read_tls_offset_from_method): add new code
3953         generation pattern seen with GCC.
3956 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
3958         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
3959         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
3960         exceptions-sparc.c: fix some performance issues in exception
3961         handling and setting of the stack trace for exceptions that were
3962         already thrown.
3964 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
3966         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
3967         x86 backend.
3968         
3969         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
3970         registers.
3972 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
3974         This patch inlines tls access, when possible.
3975         
3976         * mini.h: new arch functions for TLS intrinsics.
3977         All platforms updated with a stub.
3979         * mini.c: use the new intrinsics
3981         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
3982         arch specific intrinsic for tls variables
3984 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
3986         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
3987         under windows.
3989 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
3991         * mini.c: thread local allocation
3993 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
3995         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
3997         * Makefile.am: Link against the static version of libmonogc.
3998         
3999         * Makefile.am: Link the static versions of the convenience libraries
4000         into the mono executable.
4002         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
4004 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
4006         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
4007         on integer overflow.
4009         * mini-amd64.c: Reorganize function call code.
4011         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
4013 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
4015         * inssel-x86.brg: use xor eax,eax.
4016         
4017         * basic.cs: new tests
4019 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
4021         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
4022         in exception throwing code.
4023         
4024 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
4026         * inssel-x86.brg: use xor esi,esi.
4028 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
4030         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
4031         can trace methods compiled during mini_init () too.
4033         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
4034         CEE_CONV_U4.
4036 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
4038         * Makefile.am: static link on x86 (r=zoltan)
4040 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
4042         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
4043         code since it causes some programs to fail.
4045 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
4047         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
4049 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
4051         * mini.c: ovfops_op_map - add STACK_OBJ case for
4052         CONV_I 
4053         * basic.cs: add test_0_pin_string as test
4054         case for above.
4056 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
4058         * Makefile.am: build C# if srcdir != builddir
4060 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
4062         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
4063         fall-through blocks.
4065 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
4067         * driver.c: enable loop by default again and include abcrem in -O=all.
4069 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
4071         * iltests.il: Add some localloc tests.
4073         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
4075         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
4076         Fixes #62574.
4078         * inssel-amd64.brg: Add some optimizations.
4080         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
4081         for gcc-3.4.
4083         * Makefile.am: Statically link mono against libmono on AMD64.
4084         
4085         * mini-amd64.c inssel-amd64.brg: Optimizations.
4087 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
4089         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
4091         * tramp-amd64.c: Patch calling code in trampolines.
4093 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
4095         * mini-amd64.c: pinvoke struct passing fixes.
4097 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
4099         * mini-sparc.c: redo change, make mono_arch_cpu_init call
4100         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
4102 2004-08-05  Duncan Mak  <duncan@ximian.com>
4104         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
4105         CEE_LDELEM_ANY.
4107 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
4109         * mini-amd64.c (emit_move_return_value): Move return value for normal
4110         calls too.
4112 2004-08-05  Martin Baulig  <martin@ximian.com>
4114         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
4115         `type->type'; just modify `type' itself when dealing with enums
4116         and generic instances.
4117         (check_call_signature): Make `simple_type' a `MonoType *'.
4119 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
4121         * mini.c: Use OP_PADD to add offsets to addresses.
4123         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
4125 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
4127         * mini-sparc.c (mono_arch_emit_epilog): fix check
4128         for folding last op into restore instruction
4130 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
4132         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
4133         helper methods using the code manager.
4134         
4135         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
4137         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
4139 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
4140         
4141         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
4142           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
4144         * mini-s390.c: fix tail processing
4146 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
4148         * mini-ppc.c: mul.ovf.un exception name fix.
4150 2004-08-03  Martin Baulig  <martin@ximian.com>
4152         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
4153         instances; before jumping to `handle_enum', also modify `ptype'.
4155 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
4157         * cpu-sparc.md: fcall maximal length too small.
4159 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
4161         * mini-amd64.c mini.h: Add initial support for passing/returning 
4162         structures to/from pinvoked methods.
4164 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
4166         * mini-ppc.c: reg allocator fix.
4168 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
4170         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
4172         * inssel.brg: Optimize memset on 64 bit machines.
4174         * mini-amd64.c: Fix some vararg cases.
4176 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
4178         * mini-s390.c: Corrected macro in emit_float_to_int
4180         * s390-abi.cs: Tests to exercise the s390 ABI
4182 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
4184         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
4185         caller saved regs.
4187         * basic.cs: Add a test for add.ovf.un.
4189 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
4191         * mini-sparc.c: add case for OP_IDIV_UN
4193 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
4195         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
4196         
4197         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
4199 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
4201         * basic.cs: regression tests.
4203         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
4204         regressions.
4206 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
4208         * basic.cs: Add a new test.
4210         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
4211         and AOT. Various fixes and optimizations.
4213         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
4215 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
4217         * mini-ppc.c: make sure temp regs are not used for global reg
4218         allocation.
4220 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
4222         * cpu-sparc.md: conv_i8 fix for 64bits
4224         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
4226 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
4227         
4228         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
4229         add opcode for cmp BYTE PTR [eax], imm.
4231         * inssel.brg: Make memcpy and memset takes bases.
4233 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
4235         * *-amd64.*: More AMD64 work.
4236         
4237 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
4239         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
4240         add a compare-not-equal opcode.
4241         
4242 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
4244         * mini.c: Use mono_init_from_assembly instead of mono_init.
4245         
4246 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
4248         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
4250         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
4252         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
4254         * inssel.brg: 64 bit fixes.
4256         * mini.h (MonoCallInst): Add some AMD64 specific data.
4258         * mini.h: Add some OP_P opcodes.
4260 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
4262         * basic.cs: tests for 61797 and 61740
4264 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
4266         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
4267         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
4269 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
4271         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
4273         * *-amd64*.*: Ongoing AMD64 work.
4275 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
4277         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
4279         * *-amd64*: Ongoing AMD64 work.
4281         * mini-arch.h: Add AMD64 support.
4283         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
4285         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
4287         * mini-ops.h: Add new opcodes.
4289         * Makefile.am: Add AMD64 support.
4291         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
4292         rules into the inssel-long*.brg files.
4294         * *-amd64.*: Add beginnings of AMD64 backend.
4296 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
4298         * mini.c (print_dfn): commenting out the code that prints
4299         the cil. With -O=deadce, this makes -v -v crash.
4300         
4301         * cpu-pentium.md: make checkthis have a length of 2
4303 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
4305         * mini-sparc.h: fix implementations of __builtin
4306         functions for Sun compiler for V9.
4308 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
4310         * mini.c: use the new stelem.ref wrapper
4311         * exceptions.cs, arrays.cs: new stelem.ref tests
4313 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
4315         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
4316         new XSP should work with these changes).
4318 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
4319         
4320         * inssel-{long32,x86,}.brg: trivial optimizations.
4321         
4322 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
4324         * mini.c: load value when emitting box operation in
4325         constrained calls.
4327 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
4329         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
4330         is one byte shorter than cmp DWORD PTR [eax], 0.
4332 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
4334         * inssel-ppc.brg: arguments on the stack are always
4335         relative to the stack pointer (spotted by Neale Ferguson).
4337 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
4339         * exceptions-x86.c: delay appending the method name to the trace until
4340         after mono_jit_info_table_find is called, as this gets the real
4341         MonoMethod.
4343 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
4345         * aot.c: register roots
4347 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
4349         * aot.c : I could just use PLATFORM_WIN32 flag.
4351 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
4353         * aot.c : Reverting the previous fix. This time it broke linux build.
4355 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
4357         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
4359 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
4361         * mini.c (handle_stack_args): Remove some more debugging code.
4362         
4363         * mini.c (handle_stack_args): Remove debug output left in by mistake.
4365         * driver.c mini.h aot.c: Allow additional options to be specified with
4366         --aot and pass them to mono_compile_assembly.
4368         * aot.c: Add experimental code to AOT compile all loaded assemblies
4369         on demand and save the code into a cache in the filesystem.
4371         * aot.c: Add support for more wrapper methods.
4372         
4373         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
4374         58863.
4376         * cpu-*.md: Remove removed opcodes.
4378         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
4379         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
4380         related icalls to marshal.c.
4382 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
4384         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
4386         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
4388         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
4390 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
4391         * liveness.c: If liveness is recomputated we need to reset the information
4392         for each variable. This way, if the liveness range has been narrowed
4393         by optimizations that happened after the last computation, we can return
4394         a smaller range.
4395         
4396         For example, if you have
4397         
4398         {
4399                 int i = 0;
4400                 
4401                 // Tons of code that does not affect i
4402                 
4403                 i = foo ();
4404                 ...
4405         }
4406         
4407         i = 0 is dead code and will be removed by SSA. However, when
4408         linear scan gets to the code, i will still appear to be live
4409         throughout the entire block. This prevents good register allocation.
4411 2004-07-06  Martin Baulig  <martin@ximian.com>
4413         * debug-mini.c (mono_debug_init_method): Allow
4414         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
4415         (mono_debug_add_icall_wrapper): New method.
4417         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
4419 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
4421         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
4422         optimization.
4424 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
4426         * aot.c (mono_aot_load_method): Fix loading of debug info.
4428 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
4430         * aot.c: Add logging support.
4432 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
4434         * mini.h: Add prototype for mono_print_method_from_ip.
4436         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
4438         * inssel.brg: 64 bit fixes.
4440         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
4441         inssel-long32.brg.
4443         * Makefile.am: Add SPARC64 support.
4445 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
4447         * aot.c: Fix alignment problems on 32 bit platforms.
4449 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
4451         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
4452         SPARC64.
4454         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
4455         problems.
4457         * mini.h: Bump AOT file version. Some 64 bit fixes.
4459 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
4461         * inssel-sparc.brg: Add new rule to avoid register moves.
4463         * inssel.brg: Add ldind_to_load_membase helper function.
4465 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
4467         * mini.c: OffsetToStringData intrinsic.
4468         
4469 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
4471         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
4473         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
4474         regression tests.
4476         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
4477 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
4479         * mini.c: reinstated mono_compile_get_interface_var()
4480         on x86, too, since the change breaks the Gtk# build there as well.
4482 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
4484         * driver.c: remove loop from the default optimizations: it seems to
4485         interact badly with some of the other options (see bug #60613).
4487 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
4489         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
4490         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
4492 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
4494         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
4495         vararg-using methods.
4497 2004-06-21  Martin Baulig  <martin@ximian.com>
4499         * mini/mini-exceptions.c
4500         (mono_handle_exception): Added `gpointer original_ip' argument.
4501         After calling mono_unhandled_exception(), call
4502         mono_debugger_unhandled_exception() and if that returns true,
4503         restore the context and return.
4505 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
4507         * mini-ppc.c: prefer the use of relative branches so
4508         they won't need to be patched in aot code (patch from Patrick Beard).
4510 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
4512         * aot.c: patch from Patrick Beard to make the output assembly
4513         more correct for the MacOSX assembler. Small tweak to
4514         generate sane images on Linux/PPC, too.
4516 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
4518         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
4519         case until bug #59509 is fixed (shows up in #60332).
4521 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
4523         * mini.c: make sure the needed wrappers are compiled, too, with
4524         precomp.
4526 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
4528         * driver.c: remove NPTL reference in --version output.
4530 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
4532         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
4533         generate valid assembly for the Mach-O assembler.
4535 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
4537         * driver.c: don't include abcrem in the all optimization specifier
4538         since it slows down jit compilation too much for now.
4540 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
4542         * mini.c: use BIGMUL only if both operands have the same signage.
4543         * iltests.il: Test for bug 60056. (errors related to signage in
4544         BIGMUL).
4546         r=lupus.
4548 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
4550         * mini.c, aot.c: memory leak fixes.
4552 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
4554         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
4556 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
4558         * Makefile.am: remove the -static hack completely, it links in
4559         statically glib as well.
4561 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
4563         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
4564         * exceptions.cs: make it compile with new mcs/csc.
4566 2004-06-03 Massimiliano Mantione <massi@ximian.com>
4567         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
4568         and added relevant test case.
4570 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
4572         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
4573         regressions in gtk-sharp.
4575 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
4577         * exceptions.cs: New regression tests.
4579         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
4581 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
4583         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
4585 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
4587         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
4589         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
4591 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
4593         * mini.c (mono_jit_runtime_invoke): Init class in this
4594         method instead of trusting mono_jit_compile_method to
4595         do the work (because wrappers can be in object class)
4597 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
4599         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
4601         * basic-long.cs: New regression test.
4603 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
4605         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
4606         and div/rem checks.
4608 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
4610         * Makefile.am: fix miguel's change to build mono statically against
4611         libmono (track build dependencies).
4613 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
4615         * cfold.c: Some glib versions do not have G_MININT32.
4617 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
4619         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
4620         with precision of tan, atan, sin and cos, and implemented related
4621         regressions tests (fixes bug 54467, but one new problem appeared and
4622         is not fixed yet).
4624 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
4626         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
4628         * exceptions.cs: Add test for constant folding && division by zero.
4630         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
4631         since driver.c is in libmono too, so the optimization was useless.
4633         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
4634         variable to driver.c so the compiler can emit more efficient code to
4635         access them.
4637 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4639         * Makefile.am: don't distribute generated inssel.[ch] files.
4641 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
4643         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
4644         into the default appdomain. Fixes #58707.
4646         * jit-icalls.c: Remove the broken approximation for truncl, doing
4647         no conversion is better.
4649         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
4650         Fixes #58863.
4652 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
4654         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
4655         of the mcrxr instruction which is not available on some processors
4656         even if it's documented to be. Implement add and sub overflow correctly
4657         (still not complete for long unsigned). Speed up icalls a bit.
4659 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
4661         * mini.c (mono_jit_compile_method_with_opt): Make sure that
4662         we run .cctor in the current domain instead of target_domain.
4663         
4664         Fixes bug #58558, .cctor not being called in -O=shared.
4666 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
4668         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
4670 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
4672         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
4673         which can be done with an imm8, do it that way.
4674         (mono_arch_output_basic_block): ditto for a jmp
4675         (mono_arch_emit_prolog): Computate maximum offset of a label.
4677 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
4679         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
4680         now tries to allocate prefered physical reg's for virtual
4681         regs. This reduces the number of emited spills/loads with
4682         20-30% on our core assemblies.
4684 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
4686         * jit-icalls.c: truncl() is not needed and trunc() is
4687         the correct thing to do anyway (bug #58287).
4689 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
4691         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
4692         if available.
4694 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
4696         * driver.c: enable loop optimizations by default.
4698 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
4700         * mini-x86.c: fix calc of max loop size when aligning loops start.
4702 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
4704         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
4705         the stack.
4707 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
4709         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
4710         should set carry.
4712         * basic-long.cs: Add tests for add/subtract of immediates with carry.
4714         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
4715         
4716         * mini.c (inline_method): Allways inline some wrappers even if the cost
4717         is too large. Fixes #58785.
4719         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
4720         
4721 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
4723         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
4724         (crichton@gimp.org). Beginning of support for sparc/linux.
4726         * mini-sparc.c: Optimize retrieval of LMF address.
4728 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
4730         * exceptions-ppc.c:  handle alloca in methods with clauses.
4732 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
4734         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
4736 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
4738         * mini.c: Delegate most of the abort signal work to 
4739           mono_thread_request_interruption, which also handles Stop and Suspend
4740           states.
4742 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
4744         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
4745         supports the save/restore lmf opcodes.
4747 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
4749         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
4750         by gcc-3.4 as well.
4752         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
4754 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
4756         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
4757         methods which contain array accesses.
4759         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
4760         boundaries. Fixes #58537.
4762         * iltests.il: Add regression test for #58537.
4764 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
4766         * mini-x86.c (mono_arch_local_regalloc): Last part of
4767         fix for bug #58633 (releasing register to early).
4769 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
4771         * basic-long.cs: Add new regression test.
4773 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
4775         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
4776         register too early on the chain.
4778 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
4780         * mini.c (create_helper_signature): Use a helper function to reduce
4781         the code which needs to be written. Also set the calling convention of
4782         icalls on windows. Fixes #57840.
4784 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
4786         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
4787         exceptions-ppc.c: added helper function to get the instruction address
4788         from a signal handler context.
4790 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
4792         * helpers.c: use g_get_tmp_dir. Invokes happyness 
4793         from gonzalo.
4795 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
4797         * helpers.c: Add new env variable to pass args to objdump.
4798         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
4800 2004-05-17  Radek Doulik  <rodo@ximian.com>
4802         * Makefile.am (common_sources): added abcremoval.h so it get
4803         disted and daily mono packages on go-mono.com will build again
4805 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
4807         * abcremoval.c: Fixed coding style, added copyright header.
4809         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
4811         * mini.h: Added prototype for abc removal main function.
4813         * build_relations_propagation_table.pl: Added copyright header.
4815 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
4817         * basic-long.cs: reg test for complex ceq_long bug.
4819 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
4821         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
4822         reg in long and clob case (bug #58343). Fixed/added comments.
4824 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
4826         * mini.c (mono_jit_runtime_invoke): Follow new convention
4827         of calling the invoke method with an function pointer.
4829 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
4831         * ChangeLog: Fix author of memory leak patch.
4833 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
4835         * Makefile.am: fix make dist as well...
4838 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
4840         * cfold.c: Made so that conversions from pointer to int4 are no-ops
4841         on archs where pointers are 4 bytes long.
4843         * Makefile.am: Added abcremoval.c source file.
4845         * abcremoval.c: Added abcremoval.c.
4847         * abcremoval.h: Added abcremoval.h.
4849         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
4851         * inssel.brg: Enabled bounds check removal.
4853         * mini.c: Added support for abcrem optimization.
4855         * mini.h: Added abcrem optimization label.
4857         * driver.c: Added support for abcrem optimization.
4859         * propagated_relations_table.def: Added propagated_relations_table.def.
4861 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
4863         * mini.c, cfold.c: fix style.
4865 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
4867         * mini.c: handle issue with the low-level implementation of
4868         some long opcodes (bug #54209).
4870 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
4872         * basic.cs: test for my new cmov stuff.
4874 2004-05-13      Patrik Torstensson
4876         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
4877         opt and added peephole documentation.
4879 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
4881         * tramp-ppc.c: rewrote the generic trampoline code.
4883 2004-05-11      Patrik Torstensson
4885         * mini-x86.c: optimize long shl/shr asm code (one less branch)
4887 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
4889         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
4891         * mini.h mini.c dominators.c: Applied patch from Derek Woo
4892         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
4894         * mini.c: Add new icalls for AsAny marshalling.
4896 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
4898         * tramp-ppc.c, mini-ppc.c: more cleanups.
4900 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
4902         * mini.c: no warnings.
4904 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
4906         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
4908 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
4910         * mini.c: In the thread abort signal handler, if the thread is in the
4911         process of being stoped, don't throw the Abort exception, just stop the
4912         thread.
4914 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
4916         * tramp-ppc.c: removed old code.
4918 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
4920         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
4921         do some simple speed optimizations on ppc.
4923 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
4925         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
4926         and large offsets in load/store.
4928 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
4930         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
4931         it causes regressions.
4933 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
4935         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
4936         support.
4938 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
4940         * jit-icalls.c: remove warnings.
4941         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
4942         speedups for unsafe code.
4944 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
4946         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
4948 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
4950         * basic-calls.cs: Add new regression test.
4952         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
4953         more portable.
4955         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
4957         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
4958         is no longer used.
4960 2004-05-06      Patrik Torstensson
4962         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
4963         long reg allocation in any reg (not only eax:edx) and implemented 
4964         long shl/shr ops in asm instead of helpers.
4966 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
4968         * mini-sparc.h: Fix warnings.
4970         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
4971         stack.
4973         * mini-exceptions.c (mono_handle_exception): Call the filter in a
4974         separate statement for clarity.
4976         * mini-sparc.c: Update status.
4978 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
4980         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
4981         here.
4983 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
4985         * inssel-ppc.brg: another small pre-release workaround:
4986         we don't do overflow detection for long_sub_un.
4988 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
4990         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
4991         (also works around a weird ppc bug: 57957).
4993 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
4995         * tramp-ppc.c: trampoline fixes.
4997 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
4999         * mini-ppc.c: fixed typos.
5001 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
5003         * mini-ppc.c, exceptions-ppc.c: more code saves registers
5004         at the top of the stack. Fixed typos. Use a frame registers
5005         for all the methods with exception clauses.
5007 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
5009         * exceptions-ppc.c: restore fp registers.
5011 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
5013         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
5014         order from the stack top (moved the stack room to save the
5015         return value for trace after the param area). Fixed corruption
5016         in restoring registers on unwind.
5018 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
5020         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
5022 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
5024         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
5025         and prolog/epilog for methods that use it. Allow
5026         enough param area room for varargs methods. Fix miguel's
5027         breakage in exception handling.
5029 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
5031         * Makefile.am: run genmdesc only on current arch.
5033 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5035         * exceptions-x86.c:
5036         * mini-x86.h: fix the build on windows.
5038 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
5040         * 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.
5042         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
5044         * mini-exceptions.c: New file.
5045         
5046         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
5047         Move some parts of the x86 exception handling code to an 
5048         arch-independent file so it can be shared with other ports.
5050 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
5052         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
5054 2004-04-26  David Waite  <mass@akuma.org>
5056         * driver.c: remove comma from end of enumeration declaration
5058 2004-04-26  Jackson Harper  <jackson@ximian.com>
5060         * driver.c: parse config file before loading first assembly. This
5061         allows the user gac to be enabled/disabled. 
5062         
5063 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
5065         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
5066         simpler mechanism: we do not care what is encoded initially
5067         (branch absolute or relative), we care about the code and its
5068         target.  I kept the old code for reference for now.
5070         The new code tries first to determine if the jump is anywhere in
5071         the -/+32 absolute meg range, if it succeeds, it encodes using the
5072         absolute branch;  If not, it tried to find something in the
5073         relative range, if not, it uses the handle_thunk code. 
5075 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
5077         * exceptions-ppc.c: use the correct ip register on macosx.
5079 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
5081         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
5083 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
5085         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
5086         Raise exception on integer divide by zero by hand since the hw
5087         doesn't support it. Handle NaNs in FP compares.
5089 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
5091         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
5092         code reducing duplication between the platforms and enabled
5093         signal exception handling (on linux for now).
5095 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
5097         * exceptions-ppc.c: more macosx support.
5099 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
5101         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
5103 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
5105         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
5107 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
5109         * iltests.il: more tests.
5111 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
5113         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
5114         vars as well.
5116 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
5118         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
5120 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
5122         * liveness.c: Mark variables as volatile in all basic blocks reachable
5123         from exception clauses.
5125 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
5127         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
5128         inlining.
5130 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
5132         * iltests.il, basic.cs: more tests for regalloc.
5134 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
5136         * iltests.il: Some tests for register allocation modifications
5137         I have locally.
5139 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
5141         * exceptions.cs: Add regression test for bug #56782.
5143         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
5144         original stack trace if an exception is rethrown. Fixes #56782. Oh,
5145         the beauty of fixing the same thing in 5 different files...
5147 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
5149         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
5150         methods.
5152 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
5154         * mini.c: Add support for STRWLPARRAY marshalling convention.
5156 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
5158         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
5159         to init the context to setup the regs pointer).
5161 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
5163         * exceptions-ppc.c: more exceptions work.
5165 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
5167         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
5168         not allowed.
5170 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
5172         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
5173         can use the memory directly.
5175         * cpu-pentium.md: Update documentation from a post from Zoltan. 
5177         add x86_add_membase, x86_sub_membase, x86_mul_membase
5179 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
5181         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
5182         GENERAL_REGS they were also hardcoded for all PPC ports.
5184         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
5186         Remove hard-coded limit for floating point registers, use
5187         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
5189         Notice that in MacOS X calling conventions you can fit a lot more
5190         floating point values in registers, so I should update the PInvoke
5191         test to excercise the passing of floating point values on the
5192         stack (currently broken).
5193         
5194 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
5196         * tramp-ppc.c (create_trampoline_code): Added
5197         JUMP_TRAMPOLINE_SIZE. 
5198         (ppc_magic_trampoline): Follow the pattern from
5199         x86_magic_trampoline: if code is set to zero, return. 
5200         (create_trampoline_code): Always pass MonoMethod to the jump
5201         trampoline, before it was passing a null.
5202         (mono_arch_create_jump_trampoline): Implement the jump stub, could
5203         share the code with mono_arch_create_jit_trampoline. 
5205         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
5206         implemented.
5207         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
5208         implemented.  
5210         * cpu-g4.md: Added length for jmp instruction, the worst case
5211         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
5212         for save_lmf).
5214 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
5216         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
5218 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
5220         * mini.c: Only set bblock->real_offset when adding a new bblock, and
5221         before each IL instruction.
5223         * mini.c (CEE_BOX): Fix warnings.
5225 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5227         * mini.c: removed a few unused vars and extra whitespace.
5229 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
5231         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
5232         checks.
5233         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
5234         index.
5235         (OP_GETCHR): use the above
5236         (CEE_LDELEMA): use the above.
5238         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
5239         version of the generic impl.
5240         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
5241         (CEE_LDELEMA): use the above.
5243 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
5245         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
5246         Fixes #56317.
5248         * iltests.il: Added new regression test for #56317.
5250 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
5252         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
5253         under NetBSD. Fixes #56450.
5255         * liveness.c (update_gen_kill_set): Fix previous patch.
5257 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5259         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
5261 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
5263         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
5264         ldsfld and ldsflda.
5266         * inssel-sparc.brg: Add more optimizations.
5268         * mini-sparc.c: Replace multiply/divide with shifts if possible.
5270 2004-04-01  Martin Baulig  <martin@ximian.com>
5272         * mini.c (handle_box): New static function; moved the
5273         implementation of CEE_BOX here.
5274         (mono_method_to_ir): Added `constrained_call' variable.
5275         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
5276         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
5277         mono_method_get_constrained() to get the method.
5279 2004-04-01  Martin Baulig  <martin@ximian.com>
5281         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
5282         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
5283         (mono_method_to_ir): We don't need these macros anymore since
5284         mono_class_get_full() already takes care of it. 
5286 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5288         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
5289         use @function (as doesn't accept #function here) and check the return
5290         value of system and stop if fails.
5292 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5294         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
5296 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
5298         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
5300         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
5302         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
5303         #56223.
5305         * basic-long.cs: Add test for negation of Int64.MinValue.
5307 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
5309         * mini-sparc.c: Update status.
5311         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
5313         * exceptions-sparc.c: Fix return value in filters.
5315         * inssel-sparc.brg: Fix register allocation in some rules.
5317 2004-03-28  Martin Baulig  <martin@ximian.com>
5319         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
5320         if neccessary.  
5322 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
5324         * mini-x86.c (mono_arch_patch_code): Fix warnings.
5325         
5326         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
5327         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
5328         remove unused conv_u4 opcode.
5330         * mini-x86.c: Remove valgrind workaround since it slows down things
5331         even when mono is not run under valgrind.
5333 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
5335         * mini-sparc.c: Update status.
5337         * inssel-sparc.brg: Add some optimizations.
5339         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
5340         future delay slot filling. Add support for varargs, tail calls and JMP.
5342         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
5343         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
5345         * inssel.brg: Fix register allocation in OP_ARGLIST.
5347         * inssel.brg: Fix warnings.
5349 2004-03-25  Martin Baulig  <martin@ximian.com>
5351         * mini.c (inflate_generic_field): Removed.
5352         (mini_get_method): Removed, use mono_get_method_full(),
5353         (mini_get_class): Removed, use mono_class_get_full().
5354         (mono_method_to_ir): Pass our generic context to
5355         mono_field_from_token().        
5357 2004-03-25  Martin Baulig  <martin@ximian.com>
5359         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
5360         of a `MonoMethod *'.
5361         (mini_get_method): Take a `MonoGenericContext *' instead
5362         of a `MonoMethod *'.
5363         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
5364         a new local variable called `generic_context' which holds the
5365         current `MonoGenericContext *'; use it to lookup things.
5367 2004-03-24  Martin Baulig  <martin@ximian.com>
5369         * mini.c (mini_get_class): New static method; if we're inside a
5370         generic instance, inflate the class if neccessary.
5371         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
5373 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
5375         * iltests.il: New regression test for #55976.
5377         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
5378         #55976.
5380 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
5382         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
5383         output.
5385 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
5387         * liveness.c: Consider SSA stores as well as loads when making vars
5388         volatile.
5390         * exceptions.cs: New regression tests for register allocation.
5391         
5392 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
5394         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
5395         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
5396           domain lock only to protect puntual access to data structures.
5397           Added access lock for sighash, jit_icall_hash_name, 
5398           jit_icall_hash_addr and domain->code_mp.
5400 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
5402         * driver.c: Print SIGSEGV handling method.
5404         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
5406         * mini.c (setup_jit_tls_data): Handle case when this is called
5407         multiple times for a thread.
5409         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
5410         is different from fbxx_un. Fixes #54303. Also use constants instead of
5411         magic numbers in a lot of places.
5413 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
5415         * exceptions.cs: Fix cctor test when --regression is used.
5417 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
5419         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
5420         for Linux/ppc.
5422 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
5424         * inssel-ppc.brg: fixed register assignments for some rules.
5426 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
5428         * exceptions.cs: Add test for exceptions in static constructors.
5430         * mini.c (mono_jit_compile_method_with_out): Move the calling of
5431         static constructors outside the domain lock. Fixes #55720.
5433 2004-03-17  Martin Baulig  <martin@ximian.com>
5435         * mini.c (get_generic_field_inst): Removed, this'll never happen.
5436         (inflate_generic_field): Take the `MonoMethod *' instead of the
5437         `MonoClass *' and added support for generic method.
5438         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
5439         have a `field->parent->gen_params', only inflate the field if it's
5440         an open constructed type.
5442 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
5444         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
5445         exception object instead of the preconstructed ones.
5447 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5449         * mini.c: reverted changed to sigsegv_signal_handler commited
5450         accidentally in the previous patch.
5452 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
5454         * mini.c:
5455         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
5456         running --aot with an old assembly.
5458 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
5460         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
5461         point values.
5463         * mini-sparc.c: Add support for v9 branches with prediction.
5465 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
5467         * mini.c (mini_init): #warning is GNUC only
5469         * mini-sparc.h: implement __builtin_frame_address
5470         and __builtin_return_address for Sun C compiler
5472 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
5474         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
5476 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
5478         * basic-calls.cs: Add test for unaligned byref long argument passing.
5480         * mini-ops.h: Add sparcv9 compare and branch instructions.
5482         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
5483         v9 instructions if we have a v9 cpu.
5485         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
5486         registers for global allocation.
5488         * exceptions-sparc.c: Fixes.
5489         
5490 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
5492         * liveness.c (mono_analyze_liveness): Optimized version.
5494         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
5496         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
5497         sparc work.
5499         * basic-float.cs basic-calls.cs: New regression tests.
5501 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
5503         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
5504         sigaltstack implementation.
5506         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
5507         
5508         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
5509         stuff if SIGSEGV_ON_ALTSTACK is not defined.
5511 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
5513         * mini.c: Fix warnings.
5514         
5515         * mini.c (mono_resolve_patch_target): New function which contains the
5516         arch independent part of the patching process.
5518         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
5519         patching code to a separate function.
5521 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
5523         * mini.c (add_signal_handler): ifdef out on Windows
5525 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
5527         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
5528         cpu-sparc.md: Add exception handling support + other fixes.
5530         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
5531         typed GC detection in --version.
5533         * basic.cs exceptions.cs: New regression tests.
5535         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
5536         the arch specific code can store data during a compilation.
5538         * mini-ops.h: Add OP_SETFRET.
5540         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
5541         function, register a separate icall for each arity, so the icalls can
5542         get a wrapper.
5543         
5544         * mini.c (mono_print_tree): Print negative offsets in a more readable
5545         form.
5546         
5547         * mini.c: Make signal handling work on sparc.
5548         
5549         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
5551         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
5553         * jit-icalls.c: Emulate truncl by aintl on solaris.
5555         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
5557 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
5559         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
5561 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
5563         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
5564         a MarshalByRef type, inline a method that performs the check, taking into
5565         account that the object can be a proxy. Also implemented tow new opcodes:
5566         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
5567         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
5568         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
5570 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
5572         * mini-ppc.c: if a relative branch displacement is too big
5573         but it points to and area reachable with an absolute branch, 
5574         avoid the thunks.
5576 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
5578         * mini.c: optimize small copies in cpblk.
5580 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
5582         * basic-calls.cs basic-float.cs: New regression tests.
5584         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
5585         negative offsets from %fp. Implement localloc. Fix local register 
5586         allocation. Fix the case when the this argument needs to be saved to
5587         the stack. Implement some missing opcodes.
5589 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
5591         * mini.c (mini_method_compile): Reenable global regalloc in methods
5592         with exception handlers.
5594         * linear-scan.c (mono_varlist_sort): Fix warning.
5596         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
5598         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
5599         regalloc costs.
5601         * liveness.c: Make all variables uses in exception clauses volatile, to
5602         prevent them from being allocated to registers. Fixes #42136.
5604 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
5606         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
5607         causes regressions.
5609         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
5610         argument to mono_arch_regalloc_cost.
5612         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
5613         precisely.
5615 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
5617         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
5618         Make the cost of allocating a variable to a register arch dependent.
5620         * basic-calls.cs: Fix compilation of tests.
5621         
5622         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
5623         helper function to cut back on the number of #ifdefs needed.
5625         * mini-ppc.c: Fix compilation.
5627         * basic-calls.cs: New regression tests.
5629         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
5631         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
5632         of l0 since that is callee saved.
5634         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
5635         to virtual calls.
5637         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
5638         of delay instruction.
5640         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
5642         * mini.h (MonoCallInst): Add 'virtual' flag.
5644         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
5646 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
5648         * *.cs: New regression tests.
5650         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
5651         work.
5653         * mini.c (mono_runtime_install_handlers): Fix build.
5655         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
5656         'signal_stack_size' members.
5658         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
5659         alternate signal stack.
5661         * exceptions-x86.c: Add stack overflow handling.
5663         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
5664         functions to arch independent code.
5666         * mini.c (mono_print_tree): Print more detailed info for load_membase
5667         opcodes.
5668         
5669 2004-02-23  Martin Baulig  <martin@ximian.com>
5671         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
5673 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
5675         * mini-x86.c: fixed reg allocation for div/rem.
5677 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
5679         * driver.c (mono_main): Report some configuratio options on --version.
5681 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
5683         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
5684         low in the address space. Correctly flush memory in thunks where we
5685         output native code.
5687 2004-02-20  Martin Baulig  <martin@ximian.com>
5689         * mini.c (mini_get_method): New static method; inflate all generic
5690         methods and methods in open generic instances.
5691         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
5692         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
5694 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
5696         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
5698         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
5700 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
5702         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
5704         * mini-sparc.c (flushi mono_arch_output_basic_block): make
5705         it compile using Sun's compiler.
5707 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
5709         * 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.
5711         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
5713 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
5715         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
5716         code.
5717         * mini-ppc.c: handle calls outside of the allowed range with thunks
5718         allocated using the code manager.
5719         * tramp-ppc.c: use the code manager to hold generated native code.
5720         Fixed the magic trampoline to just patch vtable entries.
5722 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
5724         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
5725         independent file.
5727 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
5729         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
5730         PPC.
5732         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
5733         if we have a working __thread implementation.
5735         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
5736         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
5738 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
5740         * mini-x86.c: Fix compilation under gcc 2.
5741         
5742 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
5744         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
5745         contains a call to the wrapped function.
5747         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
5748         OP_<CALL>_IMM opcodes, and use them under X86.
5749         
5750         * mini.c (mono_jit_find_compiled_method): Fix warning.
5752         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
5754         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
5756         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
5757         functionality to mini.c.
5759         * mini.c (mono_create_jump_trampoline): New function to create a jump
5760         trampoline. Return a compiled method instead of a trampoline if it
5761         exists. Add a cache for jump trampolines.
5763         * mini.c (mono_jit_find_compiled_method): New function to return a
5764         compiled method if it exists.
5766         * mini-x86.c: Call mono_create_jump_trampoline instead of 
5767         mono_arch_create_jit_trampoline.
5769         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
5770         a jump trampoline. Fixes #52092.
5771         
5772 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
5774         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
5775         which is not up-to-date. Add check_corlib_version () instead.
5777         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
5778         have to call it.
5779         
5780         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
5781         since newer valgrind versions do not need it.
5783         * mini.c (mono_jit_compile_method_with_opt): New helper function to
5784         compile a method with a given set of optimizations.
5786         * mini.c: Compile icall wrappers on-demand instead of at startup.
5788         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
5789         wrapper for an icall.
5791 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
5793         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
5794         #54063.
5796         * iltests.il: Add test for non-empty stack before switch instruction.
5798 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
5800         * mini.c: Add support for new stringbuilder marshalling conventions.
5802         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
5804 2004-02-01  Martin Baulig  <martin@ximian.com>
5806         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
5807         in `ginst->mtype_argv'.
5809 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
5811         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
5812         facilitate grepping.
5814 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
5816         * mini.c: fixed buglet in initobj generic implementation for references.
5818 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
5820         * Makefile.am: make the version script conditional.
5821         * jit-icalls.c: handle missing truncl().
5823 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
5825         * exceptions.cs: Add more tests for double->int conversion.
5827         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
5828         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
5830 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
5832         * driver.c: make --verbose --version emit an error
5833         if the loaded corlib doesn't match the runtime version.
5835 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
5837         * mini-ppc.h: export ppc_patch().
5838         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
5839         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
5840         on par or better than on MacOSX.
5842 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
5844         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
5845         mono_lookup_pinvoke_call.
5847         * mini-x86.c: Under windows, the default pinvoke calling convention is
5848         stdcall. Fixes #52834.
5850         * mini.c (optimize_branches): Add an upper bound to the number of
5851         iterations to prevent infinite loops on strange loops. Fixes #53003.
5853 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
5855         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
5856         and ISINST. Fixes #52093.
5858         * objects.cs (test_0_vector_array_cast): New tests.
5859         
5860 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
5862         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
5863         checking in Array.Set ().
5865         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
5866         #52590.
5868         * object.cs (test_0_multi_array_cast): New regression test.
5870 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
5872         * exceptions-ppc.c: fix build on Linux/PPC.
5874 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
5876         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
5877         running under valgrind.
5878         (x86_magic_trampoline): Fix build bustage.
5880         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
5881         negative values as well. This is needed for the encoding of the line number
5882         info, since sometimes the line numbers are not in increasing order.
5884 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
5886         * cpu-pentium.md (localloc): Increase the size of the localloc 
5887         instruction since it is a loop under Win32.
5889         * debug-mini.c (record_line_number): Get rid of unneccesary memory
5890         allocation.
5892 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
5894         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
5895         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
5896         Max Horn (max@quendi.de). Fix file names in comments.
5898 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
5900         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
5901         avoid stack overflow.
5902         (replace_usage): Avoid uninitialized variable warnings.
5904         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
5905         and taking the address of valuetype variables.
5907 2004-01-03  Patrik Torstensson
5909         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
5910         for other purposes than FP later on.
5912 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
5914         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
5915         of tail calls.
5917 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
5919         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
5921 2003-12-30  Patrik Torstensson <p@rxc.se>
5923         * mini-x86.h: Decreased number of availiable fp regs.
5924         Solves corner cases with FP spilling.
5926 2003-12-23  Patrik Torstensson <p@rxc.se>
5928         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
5929         for floating point stack tracking / spilling on x86. 
5930         Fixes bug #49012.
5931         
5932         * basic-float.cs: added float mul overflow test.
5934 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
5936         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
5938 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
5940         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
5941         supports for cond branches that overflow the immediate
5942         overflow offset. mcs can compile simple programs.
5944 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
5946         * exceptions-ppc.c: exception handling support wip:
5947         finally handlers get run on exception.
5949 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
5951         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
5952         profiling.
5954 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
5956         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
5957         initial support for stack walking and unwinding.
5959 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
5961         * driver.c (mono_main): Make corlib-out-of-sync message more 
5962         descriptive. Also remove verify_corlib call.
5964 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
5966         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
5967         not overlap with other call's arguments, too.
5969 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
5971         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
5972         move to arch-specific code the choice of arch-specific
5973         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
5974         * mini.c: ensure emulation calls will not interleave
5975         with other calls.
5977 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
5979         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
5980         the magic trampoline stack frame is dropped before executing
5981         the new method.
5983 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
5985         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
5986         and integer to fp conversions. Added support for overflowing
5987         arguments on the stack. Reserve a couple more registers as temps.
5988         Added support for aot compilation (as output still needs to be
5989         tweaked, though).
5991 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
5993         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
5994         Don't overwrite return register in some corner cases.
5996 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
5998         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
5999         static constructors when AOT compiling.
6001         * driver.c (mono_main): Call mono_check_corlib_version.
6003 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
6005         * cpu-g4.md, basic.cs: fixed div target register.
6007 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
6009         * mini-ppc.c, basic.cs: shl_imm fix with test.
6011 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
6013         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
6014         structures by value. Misc fixes.
6015         * objects.cs: more tests.
6017 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
6019         * mini-ppc.c: lconv.ovf.i implemented.
6021 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6023         * mini.c:
6024         (mini_init): don't error out if someone already called g_thread_init.
6026 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
6028         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
6029         to be any type per the spec. Fix abnormal memory usage when
6030         the same object is repeatedly thrown.
6032 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
6034         * mini.c: check for overruns in IL code.
6036 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
6038         * TODO: Add/remove some todo entries.
6040 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
6042         * driver.c (mono_main): Call mono_verify_corlib.
6044 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
6046         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
6047         This has been moved to mini.c
6048         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
6049         type being casted is marshalbyref it could be a proxy, so instead of
6050         emitting the type check code, emit a call to a runtime method that will
6051         perform the check by calling CanCastTo if needed.
6053 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
6055         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
6056         methods with large stack frames under Win32.
6058 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
6060         * Makefile.am: Distribute regression tests.
6062         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
6063         at the end instead of inserting each variable into the sorted list.
6065         * linear-scan.c (mono_varlist_sort): New helper function.
6066         
6067 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
6069         * mini.c: ensure arguments and locals are within bounds.
6071 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
6073         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
6074         related fixes.
6076 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
6078         * mini.c (mono_cprop_copy_values): Fix crash.
6080         * aot.c: Set verbosity back to 0.
6081         
6082 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
6084         * regalloc.c: complete memory leak fix by Laurent Morichetti
6085         (l_m@pacbell.net).
6087 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
6089         * driver.c (main_thread_handler): Revert the previous patch.
6091         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
6092         under valgrind.
6094         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
6095         memory from the memory pool.
6097         * driver.c (main_thread_handler): Turn on all optimizations when
6098         --aot is used.
6100         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
6101         an array for better performance.
6103         * regalloc.c (mono_regstate_assign): Fix memory leak.
6105         * debug-mini.c (mono_debug_serialize_debug_info): New function to
6106         serialize the debug info.
6108         * debug-mini.c (mono_debug_add_aot_method): New function to load the
6109         debug info from the serialized representation.
6111         * aot.c: Save debug info into the generated file and load it when 
6112         loading a method.
6114         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
6116 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
6118         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
6119         More FP-related fixes.
6121 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
6123         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
6124         and register allocation buglet. Hello world now runs.
6126 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
6128         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
6129         * tramp-ppc.c: fixed class init trampoline.
6130         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
6132 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
6134         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
6135         mini.c: more ppc changes/fixes.
6137 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
6139         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
6140         Also optimize the case when the arguments are the same in the caller 
6141         and in the callee.
6143         * iltests.il: Add tests for tail calls with valuetype arguments.
6145 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
6147         * mini-ppc.c: fixes for struct return type.
6149 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
6151         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
6152         mono_spillvar_offset() to arch-specific code.
6154 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
6156         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
6158 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
6160         * exceptions-x86.c: Fix stack space leaks.
6161         
6162         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
6163         registers from the lmf if the method has save_lmf set.
6165 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
6167         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
6168         of icall wrappers into InvokeInDomain, since these are now per-domain.
6170 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
6172         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
6173         make some opcode emulation and intrinsic ops enabled/disabled 
6174         according to the architecture. More fixes.
6176 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
6178         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
6180 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
6182         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
6183         arch-specific handling for 'this' and struct return type to
6184         arch-specific code.
6186 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6188         * aot.c: prevent divide by zero error when reporting (it happened with
6189         Accessibility.dll).
6191 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
6193         * mini.h (inst_switch): Remove unused macro.
6195 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6197         * aot.c:
6198         (load_aot_module): free 'info->methods' and 'info' properly. No more
6199         "free(): invalid pointer blah" messages when you have an old aot
6200         compiled assembly.
6202 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
6204         * jit-icalls.c, mini.c: Added support for context static fields.
6206 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
6208         * mini.c (mono_method_blittable): Methods which set LastError are not 
6209         blittable either. Fixes #51108.
6210         
6211 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
6213         * mini.c: flush icache.
6214         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
6216 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
6218         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
6220 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
6222         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
6223         safe on IA32.
6225         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
6226         vararg calls.
6228         * inssel.brg (CEE_MKREFANY): Fix AOT case.
6230 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
6232         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
6233         instruction when the result is discarded.
6235         * iltests.il (test_0_div_regalloc): New regression test.
6237         * arrays.cs: Fix compilation error.
6239 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
6241         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
6242         float rules to inssel-x86.brg: sane architectures with FP registers
6243         don't need to implement these rules.
6245 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
6247         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
6249 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
6251         * mini.h, inssel-long32.brg: fixed endianess issues in int64
6252         implementation of 32 bit systems.
6254 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
6256         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
6257         (Jeroen Zwartepoorte).
6259 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
6261         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
6262         the caller and the callee matches.
6263         
6264         * mini.c (mono_method_to_ir): Add comment.
6266         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
6267         signbit is missing on some platforms.
6269 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
6271         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
6273         * mini.c (setup_jit_tls_data): Call the new function.
6274         
6275         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
6277         * mini-x86.c: Add experimental support for fast access to the lmf
6278         structure under NPTL/Linux 2.6.x.
6280 2003-11-06  Martin Baulig  <martin@ximian.com>
6282         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
6283         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
6284         the debugger.
6286 2003-11-02  Martin Baulig  <martin@ximian.com>
6288         * mini.c (inflate_generic_field): New static method.
6289         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
6290         generic instance and the field is declared in a generic type, call
6291         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
6293 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
6295         * mini.h mini.c (mono_method_same_domain): New function to return
6296         whenever the caller and the callee are in the same domain.
6298         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
6300 2003-10-30  Martin Baulig  <martin@ximian.com>
6302         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
6303         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
6304         method parameters.
6305         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
6306         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
6308 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
6310         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
6311         propagation.
6313         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
6314         object here, so it is in the correct appdomain etc.
6316 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
6318         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
6319         already done.
6320         (mono_method_to_ir): Avoid freeing the type created returned from
6321         mono_type_create_from_typespec, since it is put into an internal cache
6322         by the function. Fixes pointer.exe.
6324         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
6325         trampolines for icalls and pinvokes as well. Fixes #33569.
6327 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
6329         * mini.c: Update after appdomain changes.
6331         * mini.c (mono_jit_compile_method_inner): Allways compile native
6332         method wrappers in the root domain, since there can only be one
6333         instance of them, whose address is stored in method->info.
6335 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
6337         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
6338         environment variable. Instead detect automatically whenever running
6339         under valgrind using the magic macro RUNNING_ON_VALGRIND from
6340         valgrind.h.
6342 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
6344         * trace.c, trace.h: New files that implement the new trace option
6345         parsing. 
6347         * driver.c: Document new --trace options.
6349         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
6350         mini-x86.c: Apply:
6352         -       if (mono_jit_trace_calls)
6353         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
6355         * mini.h: prototypes.
6356         
6357 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
6359         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
6361         * mini.c inssel.brg: Implement typedefbyref opcodes.
6363         * mini.c (mono_jit_compile_method): Remove unused local variable.
6365         * mini.c (mono_jit_compile_method_inner): Ditto.
6366         
6367 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
6369         * tramp-x86.c (x86_class_init_trampoline): Fix build.
6370         
6371         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
6373 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
6375         * mini.c (mono_no_aot): Remove unused global variable.
6377         * mini.c: Thread safety fixes.
6379 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
6381         * mini.c (mono_create_class_init_trampoline): Add a lock around
6382         class_init_hash_addr.
6384         * arrays.cs (test_0_newarr_emulation): Add new regression test for
6385         #30073.
6387         * mini.c: Decompose the NEWARR instruction before decomposing its
6388         arguments. Fixes #30073.
6390 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
6392         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
6393         convention.
6395 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
6397         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
6399         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
6401         * driver.c: Add support for compiling icall wrappers to --compile.
6403 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
6405         * inssel.brg: The empty value in class->interface_offsets is -1, not
6406         0. Fixes #49287.
6408 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
6410         * objects.cs: New test for 'is' operator on an array of interfaces.
6412 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
6414         * tramp-ppc.c: update trampoline code to support jumps
6415         and class initialization.
6417 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
6419         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
6421         * inssel.brg (OP_UNBOXCAST): Fix #46027.
6423         * inssel.brg (OP_UNBOX): Remove unused rule.
6425         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
6426         region instead of one for each method. Fixes #47813.
6428 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
6430         * exceptions.cs (test_0_nested_finally): New regression test for
6431         nested exception handlers.
6433         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
6435         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
6437         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
6438         inlining.
6440         * mini.c (mono_method_check_inlining): Make the inlining limit 
6441         configurable by an environment variable.
6442         
6443         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
6445         * mini.h: Bump AOT file version.
6447         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
6448         token, store the image along with the token, since the token might not 
6449         refer to the same image as the method containing the relocation, 
6450         because of inlining.
6452 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
6454         * mini.c (mono_precompile_assemblies): New function to compile
6455         all methods in all loaded assemblies.
6457         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
6459         * regalloc.h regalloc.c (MonoRegState): Change the type of 
6460         iassign and fassign to int*, since they can contain large negative
6461         values if the register is spilled. Also added some comments. Fixes
6462         #45817.
6464         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
6465         under Win32. Fixes #42964.
6467 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
6469         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
6471         * aot.c: Added support for AOT compiling methods which contain calls
6472         to wrappers. Currently, only remoting-invoke-with-check wrappers are
6473         handled.
6474         
6475         * driver.c (compile_all_methods): Run the compilation in a thread
6476         managed by mono. Fixes #44023.
6478         * mini.c (mono_codegen): Print full method name in verbose output.
6480         * mini-x86.c (mono_arch_patch_code): Fix warning.
6481         
6482         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
6483         jumps, since the method we are jumping to might be domain-specific.
6485         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
6487 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
6489         * inssel.brg: string chars are unsigned.
6491 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
6493         * TODO: New todo item.
6495         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
6496         which calls mono_runtime_class_init and patches the call site to
6497         avoid further calls.
6498         (mono_arch_create_class_init_trampoline): New arch specific function 
6499         to create a class init trampoline.
6500         (create_trampoline_code): Generalized so it can create
6501         class init trampolines as well.
6503         * mini.c (helper_sig_class_init_trampoline): New helper variable.
6504         (mono_create_class_init_trampoline): New function to create and cache
6505         class init trampolines.
6506         (mono_find_class_init_trampoline_by_addr): New function to lookup the
6507         vtable given the address of a class init trampoline. Used by the
6508         patching process.
6509         (mono_codegen): Generate a call to a trampoline instead of
6510         mono_runtime_class_init in LDSFLD[A].
6511         (mono_codegen): Add relocations for the new trampoline.
6512         
6513         * mini.h mini-x86.c aot.c: Added a new relocation type: 
6514         MONO_PATCH_INFO_CLASS_INIT.
6516         * mini.h: Bump AOT version number.
6518         * aot.c: Create a copy of the loaded code instead of using the original
6519         so methods which call each other will be close in memory, improving
6520         cache behaviour.
6521         
6522         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
6523         patch since it breaks the regression tests.
6524         
6525         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
6526         for the register saving instruction sequence since the 
6527         frame_state_for function in glibc 2.3.2 don't seem to detect it.
6529 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
6531         * TODO: Fix todo item && remove another.
6533 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
6535         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
6536         previous checkin.
6538         * aot.c: Moved the check for MONO_LASTAOT into the initialization
6539         function of the module.
6541         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
6542         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
6543         --no-aot command line option.
6545 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
6547         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
6548         by Bernie Solomon (bernard@ugsolutions.com).
6550         * inssel.brg: Refactor the interface offset table related code into
6551         its separate functions and add support for the AOT case.
6553 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
6555         * aot.c (mono_aot_get_method_inner): Fix memory leak.
6556         
6557         * aot.c: Added mono_aot_verbose variable and made all debugging
6558         output depend on the value of this variable.
6560         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
6561         method_label and info_label.
6563         * mini.h mini-x86.c aot.c: Added a new relocation type 
6564         MONO_PATCH_INFO_IID for klass->interface_id.
6566         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
6567         the MonoJitInfo structure.
6569         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
6570         a non-root appdomain in shared mode.
6572 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
6574         * aot.c: make aot loader less verbose. Remove free of unused variable.
6576 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
6578         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
6580         * .cvsignore: Added *.dll.
6582         * mini.c (mono_print_tree_nl): New function callable while debugging.
6584         * mini.c (mono_print_code): Export this.
6586         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
6587         patched code.
6589 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
6591         * mini.h (MonoCompile): Added 'jit_info' field.
6593         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
6594         the cfg structure, since it is needed by the AOT compiler.
6596         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
6598         * aot.c: A major rewrite. Changes include:
6599         - save exception tables for methods which have them.
6600         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
6601         to g_module_symbol.
6602         - reworked the file format so it is now much smaller and needs
6603         fewer relocation entries.
6604         
6605 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
6607         * aot.c (load_aot_module): Fix build bustage on platforms without
6608         Boehm GC.
6610 2003-09-04  Martin Baulig  <martin@ximian.com>
6612         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
6614 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
6616         * TODO: Some new optimization ideas.
6618         * aot.c: Move AOT module loading logic here from mono_assembly_open.
6620         * aot.c: Save the optimization flags used to compile the code into
6621         the AOT module.
6623         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
6624         support emitting domain specific code.
6625         
6626         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
6627         no longer domain neutral. It can be made domain neutral by compiling 
6628         with --optimize=shared.
6630         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
6631         between appdomains.
6633         * driver.c mini.h mini.c: New --no-aot debugging option which disables
6634         loading of AOT code.
6636         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
6637         
6638         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
6639         if there is no domain neutrality information.
6641 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
6643         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
6644         format version into the generated library.
6646         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
6647         callee method into the caller since one of them could be shared.
6649         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
6650         system exceptions from AOT code now works.
6652         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
6653         method if it is domain neutral and the callee is not.
6655         * graph.c (cfg_emit_one_loop_level): Fix warning.
6657 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
6659         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
6660         last checkin.
6662 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
6664         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
6665         is needed  by code which is executed before mono_runtime_init ().
6666         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
6667         
6668         * mini.c (mono_thread_abort): Fix warning.
6669         (mono_jit_compile_method): Call static constructor in the AOT case too.
6671         * aot.c (mono_compile_assembly): Fix warning.
6673 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6675         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
6677 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
6679         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
6681         * cpu-pentium.md: Fix the length of call opcodes so they include the
6682         ESP restoring instruction. Fixes #47968.
6684 2003-08-28  Martin Baulig  <martin@ximian.com>
6686         * mini-x86.c (mono_arch_call_opcode): Added support for
6687         MONO_TYPE_GENERICINST.
6689         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
6691 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
6693         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
6694         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
6696         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
6697         metadata_section.
6699 2003-08-26  Martin Baulig  <martin@ximian.com>
6701         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
6702         when reporting an error, set this to the actual error location.
6703         (mono_method_to_ir): Report the correct error location if
6704         get_basic_blocks() returned an error.
6706 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
6708         * mini.c (mono_type_blittable): OBJECT is not blittable.
6709         (mono_method_blittable): Methods which have marshalling descriptors
6710         are not blittable either. Fixes #47842.
6712 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
6714         * driver.c mini.c: Use an environment variable instead of a global 
6715         variable. Also fix the build.
6717         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
6718         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
6719         reporting this. 
6721         * driver.c mini.c: Added --with-valgrind option to turn off some
6722         code which prevents mono from running under valgrind.
6724         * mini.c (mono_emit_call_args): Fixed warning.
6726         * mini.c (mono_emulate_opcode): Fixed warning.
6728 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
6730         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
6731         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
6732         regalloc.c, regalloc.h: specify available registers in arch-specific
6733         code and support floats in the regallocator (patch by Laurent Morichetti 
6734         <l_m@pacbell.net>)
6736 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
6738         * mini.c: mono_thread_current() can be called only after
6739         mono_runtime_init(): rearrange code to not call it early on.
6741 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
6743         * mini.c: allocate jump tables in the code mempools.
6745 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
6747         * mini.c, mini.h: make sure per-thread data allocated by the jit is
6748         freed.
6750 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
6752         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
6753         12 to 16.  This fixes bug #47453.
6756 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
6758         * mini-ppc.c: fixed indexed load and unsigned compares.
6760 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
6762         * mini.c: reenabled installation of handler for
6763           thread abort signal.
6765 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
6767         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
6768         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
6769         until it's fixed and actually useful.
6771 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
6773         * inssel-long32.brg: couple more opcodes implemented.
6775 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
6776         
6777         * mini-sparc.c: Even more opcodes implemeted.
6779 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
6781         * mini-sparc.c: More opcodes implemented.
6783 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
6785         * mini-sparc.c: More opcodes implemented.
6787 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
6789         * inssel-sparc.brg: Add some needed rules.  Direct
6790         copy from PPC.
6791         * Makefile.am: Use inssel-sparc.brg
6792         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
6793         an assert happy for now.
6795 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
6797         * mini-sparc.c: Fixed compile errors.
6798         * exceptions-sparc.c: Same.  We now produce a mono binary 
6799         on sparc-linux.  Yea.
6801 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
6803         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
6804         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
6805         They compile, but do not work.
6807 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
6809         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
6810         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
6811         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
6812         (ct@gentoo.org).
6814 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
6816         * mini.c: more opcodes implemented and better support for generics.
6818 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
6820         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
6821         * mini.c, mini.h: first cut at generics support: some new instructions 
6822         added and changed the behaviour of some of the existing ones.
6824 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
6826         * mini.c: Removed definition of metadata_shared mutex here.
6828 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
6830         * mini-x86.c: make vararg calls work for instance methods.
6832 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
6834         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
6835         returns the arguments in a separte list, now.
6837 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
6839         * aot.c, mini.c: updates for array type representation changes.
6841 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
6843         * mini.c: register function to perform jit shutdown.
6845 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
6847         * mini.c: use a faster allocator if possible.
6849 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
6851         * aot.c: some cleanups and portability changes.
6853 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
6855         * mini.c: use faster allocation for CEE_BOX if possible.
6857 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
6859         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
6860         Moved inlined mempcy code to its own function so that is can be
6861         reused. Added an inline memset function as well (optimized initobj).
6862         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
6864 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
6866         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
6868 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
6870         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
6871         arch code can setup the cpu for CLR execution, if needed.
6872         We use it on x86 to set the precision of FP operations.
6874 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
6876         * mini.c: disable some optimizations if we can guess they'll cost too
6877         much for a given method.
6879 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
6881         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
6882         
6883 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
6884         * mini.h mini.c mini-x86.c: Added instruction level coverage 
6885         info collection support.
6887 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
6889         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
6890         is now implemented in the profiling API. Get rid of a couple of
6891         unnecessary global variables.
6893 2003-06-15  Nick Drochak <ndrochak@gol.com>
6895         * basic-long.cs: tests for negative values for bigmul, and unsigned.
6896         * cpu-g4.md: add op_bigmul and op_bigmul_un
6897         * cpu_pentium.md: add op_bigmul_un
6898         * inssel-long32.brg: add rule for unsigned bigmul
6899         * mini-ops.h: define OP_BIGMUL_UN
6900         * mini-x86.c: THE BUG: handle (un)signed properly
6901         * mini.c: choose unsigned opcode if needed.
6902         This set of patches fixes bug #44291
6904 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
6906         * mini.c (optimize_branches): improved to handle all kinds of
6907         conditional branches.
6909 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
6911         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
6912         don't raise exceptions.
6914 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
6916         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
6917         to arch-specific files.
6919 2003-06-09  Martin Baulig  <martin@ximian.com>
6921         * Makefile.am (libs): Added $(LIBGC_LIBS).
6923 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
6925         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
6926         and OP_ATAN (fixes bug#44293).
6928 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
6930         * Makefile.am, mini-x86.c: rename cpu description array to
6931         pentium_desc, since some compilers define the 'pentium' preprocessor
6932         symbol.
6934 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
6936         * mini.c (mini_select_instructions): add explicit branch if the
6937         following block is not the false target of a conditional branch -
6938         we need this with any optimization that reorder or remove bblocks
6940         * mini.c (optimize_branches): bug fixes
6942 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
6944         * mini.c (mono_method_to_ir): inline static readonly fields
6946         * ssa.c (fold_tree): start cfold support for long (very simple
6947         cases only)
6949         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
6951 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
6953         * inssel.brg: fixed memcpy (bug #44219).
6955 2003-06-05  Dick Porter  <dick@ximian.com>
6957         * driver.c: Set the glib log levels to not abort if g_message
6958         recurses.
6960         g_set_prgname() has to happen before mini_init() so that the
6961         process handle gets the info.
6962         
6963 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
6965         * driver.c: add intrins to the default optimizations to get wider
6966         exposure.
6968 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
6970         * mini.h: some large basic blocks will overflow a 16-bit
6971         integers for symbolic registers.
6973 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
6975         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
6976         (mono_arch_output_basic_block): fix bug 43499 
6978 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
6980         * mini.c: kill duplicated definition of mono_debug_format.
6982 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
6984         * mini-x86.c, arrays.cs: fixed register allocation bug.
6986 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
6988         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
6990         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
6992 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
6994         * mini.c:
6995         (print_method_from_ip): also print source location information if
6996         available.
6998 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
7000         * mini.c (mono_find_block_region): bug fix in region code
7001         (mini_method_compile): enable removing unreachable code again, but
7002         only in methods without exception clauses.
7004 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
7006         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
7007         Implemented arglist opcode and handling of TypedReference type.
7008         Fixed x86 call convention when a structure is returned.
7009         Minimal support for calling static vararg methods.
7011 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
7013         * mini.c (mini_method_compile):  always remove unreachable code,
7014         because the code in them may be inconsistent  (access to dead
7015         variables for example).
7017 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
7019         * driver.c, debug-mini.c: warning fixes.
7021 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
7023         * Makefile.am, jit.h, mini.h: install header for embedding mono.
7025 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
7027         * mini.c: thread-static fields are registered in mono_class_vtable(),
7028         so ensure the function is called before checking for them.
7030 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
7032         * mini.c (optimize_branches): fix for bug 43586
7034         * jit-icalls.c (mono_llmult_ovf): added an additional check for
7035         overflow (fixes Bug #43639)
7037 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
7039         * mini.c, objects.cs: allow the use of stobj for primitive types.
7041 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
7043         * mini.c: be less strict about argument checking until we support
7044         running the verifier.
7046 2003-05-27  Nick Drochak <ndrochak@gol.com>
7048         * basic-long.cs: tests for (ulong)int * (ulong)int also
7049         * mini.c: use the same trick for (ulong)int * (ulong)int
7051 2003-05-27  Nick Drochak <ndrochak@gol.com>
7053         * basic-long.cs: add regression test for (long)int * (long)int
7054         * cpu-pentium.md: add op_bigmul specification
7055         * inssel-long32.brg: add OP_BIGMUL rule
7056         * mini-ops.h: add OP_BIGMUL
7057         * mini-x86.c: register allocator: handle case where src1 needs to be
7058         in EAX.
7059         * mini.c: substitute special BIGMUL opcode in the tree for 
7060         (long)int * (long)int
7062 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
7064         * jit-icalls.c: call the type ctor on field access if needed.
7066 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
7068         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
7069         to a method (including results of ldelema, bug#43207).
7071 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
7073         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
7074         colors to show exception handler blocks.
7076         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
7077         (fix for pinvoke7.cs).
7079 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
7081         * mini.h, mini.c: ensure correct initialization order for types that
7082         require it. Prepare for lazy compilation of jit icall wrappers.
7083         Provide a name for opcode emulation to reduce unneeded mallocing.
7085 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
7087         * mini-x86.c: better register restoring code and profiling
7088         support for tail calls.
7090 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
7092         * mini.h, driver.c: prepare for leaf methods optimization.
7094 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
7096         * mini.c: get targets of branches before converting a method.
7098 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
7100         * mini.c (optimize_branches): added some experimental code (disbaled) 
7102 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
7104         * mini.c (optimize_branches): fix branch to branch optimization 
7106         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
7108         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
7110         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
7112         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
7113         if needed.
7115 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
7117         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
7118         enable use of interface variables again.
7120         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
7121         I1 to registers because there is no simply way to sign extend 8bit
7122         quantities in caller saved registers on x86.
7124         * inssel-float.brg: set costs of some rules to 2 so
7125         that monobure always select the arch. specific ones if supplied,
7126         regardless of the order we pass the files to monoburg.
7128 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
7130         * mini.c, mini-x86.c: since the magic trampoline for jumps
7131         can't patch the code directly, we do it as soon as the
7132         method gets compiled.
7134 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
7136         * mini-x86.c, mini.h: introduce a new patching method
7137         to support CEE_JMP and tail calls.
7138         * mini.c: obey tail.call. Don't precompile methods target
7139         of CEE_JMP.
7140         * tramp-x86.c: new trampoline code to handle methods
7141         reached through a jump.
7143 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
7145         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
7146         bit values to registers
7148 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
7150         * mini.c (mono_compile_get_interface_var): share interface
7151         variables if possible.
7153 2003-05-16  Martin Baulig  <martin@ximian.com>
7155         * debug-mini.c (mono_init_debugger): New function to initialize
7156         the debugger.  This is not in the debugger since it needs to
7157         access some of mini's internals.
7159 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
7161         * mini.c (mono_method_to_ir): inlining fixes/cleanups
7163 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
7165         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
7166         for value type handling.
7168 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
7170         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
7171         (mono_method_check_inlining): enable inlining of all kinds of wrappers
7173 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
7175         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
7176           the constructor through a proxy.
7178 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
7180         * jit-icalls.c, inssel.brg: fixes to array element address
7181         calculations.
7183 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
7185         * mini-x86.c (is_regsize_var): allocate pointer to registers
7187 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
7189         * driver.c: fixed typo, added intrins to the set of optimizations
7190         tested with regressions.
7192 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
7194         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
7195         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
7196         test case.
7198 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
7200         * inssel.brg: remove some common pop instructions without side effects
7202 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
7204         * inssel-x86.brg: fixed thinko in int to double conversions.
7206 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
7208         * mini.c, jit-icalls.c: added runtime thread-static variable support.
7210 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
7212         * inssel-long32.brg: two more missing instructions.
7214 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
7216         * mini.c (mono_emit_call_args): set the cil_code for all arguments
7217         if not already set.
7219 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
7221         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
7222         correctly.
7224         * basic-float.cs: Added tests for negative zero.
7226 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
7228         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
7229         a couple of missing operations for long casts, with test cases.
7231 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7233         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
7235 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
7237         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
7238         code size estimation.
7240 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
7242         * mini.c (mono_jit_create_remoting_trampoline): make it work with
7243         abstract methods (fix bug 42542)
7245         * aot.c: add ability to handle array types
7246         
7247 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
7249         * mini.c: Call the _specific versions of the object allocation
7250         functions if possible.
7252 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
7254         * driver.c: call setlocale ().
7256 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
7258         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
7259         windows build.
7261 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
7263         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
7265         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
7266         wrappers (fix bug 42122)
7268 2003-05-04  Martin Baulig  <martin@ximian.com>
7270         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
7272         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
7273         s/mini_set_defaults/mono_set_defaults/g.
7275 2003-05-04  Martin Baulig  <martin@ximian.com>
7277         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
7279 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
7281         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
7282         (reported by Don Roberts).
7284 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
7286         * mini.c: temporarily work around two bugs for this release.
7288 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
7290         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
7291         that contains -export-dynamic and it makes using the ld script
7292         useless.
7293         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
7295 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
7297         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
7298         specific cpu.
7300 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
7302         * mini.c: make sure leave calls all the needed finally blocks,
7303         even when the target jumps out of multiple exception clauses.
7305 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
7307         * ldscript, Makefile.am: add linker script to reduce the number of
7308         exported symbols (should also fix the issues with libwine defining
7309         some of the same symbols in io-layer).
7311 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
7313         * driver.c (mini_main): Avoid assertion when no file name is given on 
7314         the command line.
7316 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
7318         * driver.c: added --version/-V command line option.
7319         Added the inline optimization in the regression tests.
7321 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
7323         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
7324         to the type in the method signature (fixes bug#42134).
7326 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
7328         * mini.c: when inlining, check this is not null only when needed (bug #42135).
7330 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
7332         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
7334 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7336         * driver.c: fixed bug #42100.
7338 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
7340         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
7342 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
7344         * mini.c: moved most of the code required to do inlining to its own
7345         function so it can be reused. Inline also ctors if appropriate.
7347 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
7349         * Makefile.am: Link with -export-dynamic so shared libs loaded by
7350         the runtime can call mono API functions.
7352 2003-04-27  Martin Baulig  <martin@ximian.com>
7354         * debug-mini.c (mono_debug_init_method): Added
7355         `guint32 breakpoint_id' argument; if the method has a breakpoint,
7356         send a notification to the debugger.
7358         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
7359         running in the Mono Debugger, just pass the breakpoint number to
7360         mono_debug_init_method().
7362         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
7364 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
7366         * mini.c: allow some more unsafe compares.
7368 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
7370         * mini-x86.c, Makefile.am: make distcheck works (partially from
7371         a patch by Richard Lee <r.h.lee@attbi.com>).
7372         * regset.c, regset.h: removed, they are unused.
7374 2003-04-25  Dick Porter  <dick@ximian.com>
7376         * driver.c: Usage reports the name as 'mono' not 'mini'
7377         * exceptions-x86.c: Build and run on freebsd
7379 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
7381         * Makefile.am: install the program with the 'mono' name and
7382         the library as libmono instead of mini and libmini.
7384 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
7386         * driver.c: provide the APIs for the embedding interface of the old jit.
7388 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
7390         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
7392 2003-04-23  Martin Baulig  <martin@ximian.com>
7394         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
7396         * driver.c: Added `--debug' command line argument to enable
7397         debugging support.
7399 2003-04-23  Martin Baulig  <martin@ximian.com>
7401         * debug.[ch]: Removed.  The code is now in
7402         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
7404         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
7405         last six months.
7407 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
7409         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
7411 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
7413         * mini.c:
7414         (mini_cleanup): moved mono_runtime_cleanup call after the call to
7415         mono_domain_finalize.
7416         (mini_method_compile): use mono_method_profile* if the the option is
7417         enabled.
7419 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
7421         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
7422         methods with their wrapper.
7424         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
7425         methods with their wrapper.
7427         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
7428         their wrapper.
7430         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
7431         wrapper.
7433         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
7434         methods.
7436 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
7438         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
7440 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
7442         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
7443         of the mempool. This is slightly faster and uses less memory
7445 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
7447         * mini.c: avoid O(n) allocation for variables.
7449 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
7451         * mini.c: handle items on the stack after inlining methods.
7453 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
7455         * mini.c: make the method->opcode optimization dependent
7456         on MONO_OPT_INSTRINS and do it lazily.
7458 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
7460         * driver.c: print overall results at the end of regression run.
7462 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
7464         * inssel.brg: don't overwrite symbolic registers.
7466 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
7468         * inssel-x86.brg: fix conversion from long to float.
7470 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
7472         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
7474 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
7476         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
7478         * driver.c: Added --print-vtable option as in the old JIT.
7480 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
7482         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
7484 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
7486         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
7488 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
7490         * mini.c regalloc.c regalloc.h: Fix memory leak.
7492 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
7494         * aot.c (mono_aot_get_method): register all used strings
7496 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
7498         * mini.c: always intern strings references with ldstr at compile time.
7500 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
7502         * Makefile.am: add BUILT_SOURCES.
7504 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
7506         * driver.c: give a better error message when the assembly to execute
7507         doesn't have an entry point.
7509 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
7511         * Makefile.am: added hack for automake
7513         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
7514         correct sematics.
7516         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
7518 22003-04-07  Martin Baulig  <martin@ximian.com>
7520         * Makefile.am: Added Makefile.am.
7522         * debugger-main.c: Removed, this is now in the debugger where it
7523         belongs.
7525         * mini.pc.in: Call this package `mini' for the moment.