2009-03-02 Geoff Norton <gnorton@novell.com>
[mono-project.git] / mono / mini / ChangeLog
blob00ec1d1f20d99b33c92ab7fd8cd5ec40419fc739
1 2009-03-02  Geoff Norton  <gnorton@novell.com>
3         * mini.c:
4         * driver.c: Allow signal chaining of SIGFPE as well.
6 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
8         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
9         this since it now receives the method not its generic context in the
10         IMT reg.
12         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
13         generic/imt thunks where some entries branch through the vtable, while
14         other entries branch directly.
16         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
18         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
19         support for interface methods as well.
21         * mini-trampolines.c: Add support for virtual generic methods in interfaces
22         using the normal IMT thunks.
24         generics.cs: Add new tests.
25         
26         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
27         the generic inst to the generic imt thunks. This fixes AOT support, 
28         improves consistency with the normal IMT thunks, and makes it easier to
29         add support for interface generic virtual methods later.
31         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
32         
33 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
35         * driver.c (mono_set_signal_chaining): New public API function to enable
36         signal chaining on POSIX platforms.
38         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
39         (si@lindenlab.com) to implement signal chaining. The original patch was
40         contributed under the MIT X/11 license:
41         https://bugzilla.novell.com/show_bug.cgi?id=318894
43 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
45         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
46         too until it can be made to run on amd64.
48 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
50         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
51         to  get_generic_context_from_code () + get_call_info () if possible.
53 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
55         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
56         suspend-on-sigsegv functionality.
58         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
59         to suspend when a native SIGSEGV is received. This is useful for debugging
60         crashes which don't happen under gdb, since a live process contains more
61         information than a core file.
63         * mini-exceptions.c (mono_print_thread_dump): Use 
64         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
66         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
68         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
69         
70         * basic-float.cs: Disable the tests which currently fail on amd64.
72         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
73         value to mono_arch_patch_callsite () to fix crashes.
74         
75         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
77 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
79         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
80         nop code by patching the call address to point to the nullified class init
81         trampoline, as the former does not seem to be safe on SMP machines.
83 2009-02-23  Mark Probst  <mark.probst@gmail.com>
85         * mini-ops.h: Fix the argument types for a few x86 opcodes where
86         they were wrong.
88 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
90         * basic-float.cs basic-calls.cs: Fix warnings.
92 2009-02-22  Mark Probst  <mark.probst@gmail.com>
94         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
95         correct frame pointer in the LMF.  Should fix #478394.
97 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
99         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
101         * image-writer.c: Make the binary writer less verbose.
103 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
105         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
106         are called from runtime invoke wrappers.
108 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
110         * cpu-ppc.md (store_memindex): Increase the size of this.
112 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
114         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
116         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
118         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
119         OP_LCONV_TO_R_UN.
121         Last fix for of #467201.
124 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
126         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
128         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
129         and long_conv_to_r8_2:
131         Fixed part of #467201.
133 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
135         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
137         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
138         conversion to 32 bits.
140         * cpu-x86.md: Increase the size of int_conv_to_r4.
142         * basic-float.cs: Add a test for this.
144         Fixed part of #467201.
146 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
148         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
150         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
151         conversion to 64 bits.
153         * basic-float.cs: Add a test for this.
155         Fixed part of #467201.
157 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
159         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
161         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
162         This behavior is compatible with MS.
164         * iltest.il.in: Add a test for this.
166         Fixed part of #467201.
168 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
170         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
172         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
173         change the precision of the value.
175         * cpu-x86.md: Define len for float_conv_to_r4.
177         * basic-float.cs: Add a test for this.
179         Fixed part of #467201.
181 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
183         * mini.c: Adjust locking order to the new semantics where the loader lock
184         comes first.
186 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
188         * aot-runtime.c:
189         * mini-amd64.c:
190         * mini-arm.c:
191         * mini-ia64.c:
192         * mini-mips.c:
193         * mini-ppc.c:
194         * mini-sparc.c:
195         * mini-trampolines.c:
196         * mini-x86.c:
197         * mini.c:
198         * tramp-alpha.c:
199         * tramp-amd64.c:
200         * tramp-arm.c:
201         * tramp-hppa.c:
202         * tramp-ia64.c:
203         * tramp-mips.c:
204         * tramp-ppc.c:
205         * tramp-s390.c:
206         * tramp-s390x.c:
207         * tramp-sparc.c:
208         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
210 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
212         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
213         as it is incorrect.
215 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
217         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
218         for cctors if needed.
220 2009-02-17  Mark Probst  <mark.probst@gmail.com>
222         * mini-ppc.c: Fix build on Darwin.
224 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
226         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
227         version instead of 3 as valgrind doesn't like version 3.
229         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
231         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
232         usable for hashing methods.
233         (emit_extra_methods): Use the new hash to avoid putting every method in the
234         same hash bucket.
236         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
238         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
239         whenever a method ref could match a method.
240         
241         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
242         test to fail.
243         
244         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
245         methods refs.
247         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
249         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
250         the encoding buffer.
252         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
253         mono_method_get_header () on inflated methods as an optimization.
255 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
257         * ssa.c (fold_ins): Fix another crash if the instruction following the
258         switch was optimized away.
260 2009-02-16  Mark Probst  <mark.probst@gmail.com>
262         Contributed under the terms of the MIT/X11 license by Steven
263         Munroe <munroesj@us.ibm.com>.
265         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
267 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
269         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
270         around the mono_domain_alloc calls, it is now done by the functions
271         themselves.
273         * aot-compiler.c (compile_method): Only add wrappers referenced by
274         the method if compiling with full AOT.
275         (mono_compile_assembly): Error out if --aot=full is specified on
276         a platform where it is not supported.
278         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
279         on ARM too.
281         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
282         AOT support.
284         * aot-runtime.c (load_named_code): Handle 
285         mono_arm_throw_exception_by_token.
287         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
289         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
290         unaligned.
292         * Makefile.am (fullaotcheck): Exit if a test fails.
294         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
295         on ARM.
296         (mono_compile_assembly): Handle the assembler failing.
298         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
299         accepting subsections of .bss.
301         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
302         was optimized away.
304         * aot-compiler.c: Remove some unused includes.
305         
306         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
307         now in MonoImageWriter.
309         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
310         code sequence which matches a non-virtual call. Fixes #472654.
312 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
314         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
315         xdebug code.
316         
317         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
318         use the image/dwarf writers directly.
320         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
321         field.
323         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
324         MonoDwarfWriter.
326         * image-writer.h: Fix some typos.
328         * dwarfwriter.h dwarfwriter.c: New files.
329         
330         * aot-compiler.c: Extract the DWARF info writing functionality into a 
331         separate module.
333         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
334         argument to return unwind info.
336         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
338         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
339         
340         * aot-runtime.c (decode_method_ref): Add a case for 
341         MONO_AOT_METHODREF_WRAPPER_NAME.
343         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
344         for AOT.
346         * aot-compiler.c (encode_method_ref): Use the new constants.
348         * aot-runtime.c (decode_method_ref): Ditto.
350         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
351         be compiled, not the icall itself.
353 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
355         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
356         using decode_method_ref ().
358         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
359         convert it to an in32. Fixes #475859.
361         * arrays.cs: Add a test.
363 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
365         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
366         OP_LCONV_TO_U2.
368         * basic-long.cs: Add a test.
370 2009-02-12  Mark Probst  <mark.probst@gmail.com>
372         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
373         remove the frame pointer in leaf methods which don't receive any
374         arguments, don't throw exceptions and don't do dynamic stack
375         allocations.
377 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
379         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
380         the fail_tramp changes. Hopefully fixes #475132.
382 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
384         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
385         instead of mono_metadata_signature_dup_full.
387 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
389         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
390         for processing jump tables. Fixes #473787.
392 2009-02-11  Mark Probst  <mark.probst@gmail.com>
394         * mini-generic-sharing.c: mini_method_get_context() just calls
395         mono_method_get_context_general() now.
397         * mini.c, mini.h: Moved get_object_generic_inst(),
398         construct_object_context_for_method() and
399         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
401 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
403         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
404         basic block fell through to its successor bblock without a branch. Fixes
405         #474718.
407         * iltests.il.in: Add a test.
408         
409         * aot-compiler.c (encode_method_ref): Encode methods of array types.
410         (can_encode_patch): We can now handle arrays of generic parameters and
411         array methods.
413         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
415         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
416         the AOT file to avoid some #ifdefs in aot-runtime.c
418         * mini.h: Bump AOT file format version.
420 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
422         * Makefile.am (fullaotcheck): Make this run the tests.
424         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
426 2009-02-10  Mark Probst  <mark.probst@gmail.com>
428         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
429         individually.  Fixes #473482.
431 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
433         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
435 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
437         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
438         (mono_compile_assembly): Hush compile warnings about
439         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
440         code path.
442 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
444         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
446         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
448         * aot-compiler.c: Fix arm support.
450         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
451         img_writer_emit_unset_mode () function.
453         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
454         (mono_unwind_get_dwarf_pc_reg): Ditto.
456         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
457         Move almost all platform specific code to a set of arch_ functions, 
458         and document them to ease porting.
459         
460         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
462         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
464         * aot-compiler.c: Extract the image writing functionality into a separate
465         module to reduce the size of this file.
467 2009-02-09  Geoff Norton  <gnorton@novell.com>
469         * mini-s390.c: Fix the signature of emit_sig_cookie.
471 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
473         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
475         * aot-runtime.c (is_shared_got_patch): Ditto.
477         * aot-runtime.c (load_named_code): Cope with the fact that 
478         decode_got_entry () won't decode the patch fully if its corresponding got
479         entry is already filled.
480         
481         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
482         Initialize *ji.
483         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
485         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
486         as the moving pointer instead of 'buf' for consistency with the rest of the
487         codebase.
488         (mono_arch_create_monitor_exit_trampoline): Ditto.
490         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
491         generic_class_init trampolines.
492         (add_generic_class): Extract some code from add_generic_instances () into a
493         separate function so it can be called from other places too.
494         (compile_method): Call add_generic_class () for the classes of inflated methods
495         referenced by the method.
496         (can_encode_patch): Allow references to generic parameters.
498         * aot-runtime.c: Add support the patches required by the new trampolines.
499         
500         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
501         support.
503         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
504         full-aot support.
506         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
507         this from get_throw_pending_exception, make the signature full aot compatible.
509         * Makefile.am (fullaotcheck): New target to run full-aot tests.
511         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
513         * exceptions.cs: Add a test.
515 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
517         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
518         use the DWARF_DATA_ALIGN constant instead.
520         * exception-<ARCH>.c: Update after the above change.
522         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
523         dwarf unwinder.
525         * mini-arm.c: Enable the dwarf unwinder.
527         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
528         instead of mono_class_setup_vtable ().
530 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
532         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
533         dwarf unwinder.
535         * mini-x86.h: Enable the dwarf unwinder.
537 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
539         Fix mcs/tests/test-7.cs
540         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
541         2009-02-03.
543 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
545         * mini.c (print_jit_stats): Remove some unused statistics.
547 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
549         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
551 2009-02-05  Mark Probst  <mark.probst@gmail.com>
553         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
554         the method we get from mono_object_get_virtual_method() because
555         that function does it properly, now.
557 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
559         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
560         opcodes. Fixes #472775.
562 2009-02-05  Mark Probst  <mark.probst@gmail.com>
564         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
565         fact that mono_find_jit_info() sometimes returns the context
566         corresponding to the jit info in new_ctx.  Fixes #472600.
568 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
570         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
571         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
572         klass->enum_basetype directly.
574         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
575         enum subtypes.
577         * unwind.c: Avoid 0 sized arrays.
579 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
581         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
582         size on systems with 64k pages. Fixes #471389.
584 2009-02-04  Mark Probst  <mark.probst@gmail.com>
586         Contributed under the terms of the MIT/X11 license by Steven
587         Munroe <munroesj@us.ibm.com>.
589         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
590         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
591         necessary.
593 2009-02-04  Mark Probst  <mark.probst@gmail.com>
595         Contributed under the terms of the MIT/X11 license by Steven
596         Munroe <munroesj@us.ibm.com>.
598         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
599         comparison fix.
601         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
602         The trampoline can be longer on PPC64.
604 2009-02-04  Mark Probst  <mark.probst@gmail.com>
606         Contributed under the terms of the MIT/X11 license by Steven
607         Munroe <munroesj@us.ibm.com>.
609         * mini-ppc.c: Compiler warning fixes and trivial code
610         simplifications.
612 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
614         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
615         ins->dreg which could be a hardware register, not a vreg.
617         * aot-compiler.c (emit_method_dwarf_info): Ditto.
618         
619         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
620         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
622         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
623         
624         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
625         ->dreg, that is not the vreg we are looking for.
627         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
629         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
630         LIVERANGE_END.
632         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
633         strange crashes.
635 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
637         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
639         * aot-compiler.c (emit_line_number_info): Fix line number emission when
640         the line diff is 0.
642         * aot-compiler.c: Add xdebug support on x86.
644         * unwind.c: Add x86 support.
645         
646         * aot-compiler.c (emit_exception_debug_info): Control the emission of
647         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
649         * mini.c (mini_method_compile): Ditto.
650         
651         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
652         the variable index.
654         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
655         which mimic .push_section/.pop_section in GAS.
656         
657         * aot-compiler.c: Emit precise live range information for variables.
659         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
661         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
662         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
663         them.
665         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
666         the live ranges of variables.
668         * mini.h (struct MonoMethodVar): Add two fields containing the live range
669         of the variable in terms of native offsets.
671 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
673         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
674         
675 2009-02-02  Mark Probst  <mark.probst@gmail.com>
677         Contributed under the terms of the MIT/X11 license by Steven
678         Munroe <munroesj@us.ibm.com>.
680         * exceptions-ppc.c (restore_regs_from_context): Correct operand
681         order (offset then base reg) for ppc_load_multiple_regs.
682         (emit_save_saved_regs) Correct operand order for
683         ppc_store_multiple_regs.
684         (mono_arch_get_call_filter): Correct operand order for
685         ppc_load_multiple_regs.
687         * mini-ppc.c (emit_memcpy): Fix operand order for
688         ppc_load_reg_update and ppc_store_reg_update.
689         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
690         (mono_arch_emit_epilog): Correct operand order for
691         ppc_load_multiple_regs.
693         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
694         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
696 2009-02-02  Mark Probst  <mark.probst@gmail.com>
698         * cpu-ppc64.md: Fixed storer4_memindex length.
700 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
702         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
703         line number info.
704         
705         * aot-compiler.c (emit_line_number_info): Optimize this.
707 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
709         * aot-compiler.c: Disassemble tokens in the IL disassembly.
710         
711         * aot-compiler.c: Add debug info for methods without debug info by
712         emitting an IL file and having the line number info referencing that file.
714         * aot-compiler.c: Optimize the size of the generated line number info.
716         * aot-compiler.c: Emit line number info in xdebug mode.
718         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
719         million arguments.
721 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
723         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
725         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
726         is used.
728 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
730         * basic-calls.cs: Test for the weird crash found on arm.
731         
732 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
734         * cpu-arm.md: Increase the size of storer8_membase_reg and
735         loadr8_membase_reg to 24 bytes to accomodate the extra add.
737         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
738         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
739         reg to LR otherwise we'll be loading/storing from just the offset.
741 2009-01-30  Miguel de Icaza  <miguel@novell.com>
743         Question: if we are storing gint32's inside the "*native_offset",
744         should we change the signature to "gint32 *native_offset" to
745         ensure that we do not have type definition problems?
746         
747         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
748         an int * as this is what the other function expects, causes
749         problems with Freescale's compiler that defined int32_t to be a
750         long and makes int incompatible 
752 2009-01-30  Miguel de Icaza  <miguel@novell.com>
754         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
755         filename conflict with bjam.
757 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
759         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
760         as it might use decomposed ops.
762 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
764         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
766         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
767         is defined.
769         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
771         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
772         offsets.
774         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
775         way registers are stored in MonoContext on arm.
777         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
778         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
780         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
782         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
784         * mini.c (mini_init): Register mono_isfinite.
786         * jit-icalls.c (mono_isfinite): New jit icall.
788         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
789         
790         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
791         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
792         the parent frame.
794 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
796         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
797         separate frame and stack pointers, so we must use FP to find the register
798         spill area.
799         The FP reg is retrieved from the MonoContext::regs array.
801 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
803         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
804         as FPA requires it.
806 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
808         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
809         return R4 and R8 when not running under softfloat.
811         Fixes basic-calls.exe
813 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
815         * mini-arm.c: Implement some overflow opcodes.
817 2009-01-29  Miguel de Icaza  <miguel@novell.com>
819         * ssa.c: handle another alloca.h
821         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
822         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
823         MONO_ARCH_USE_SIGACTION. 
825         * aot-runtime.c, mini-exceptions.c: Replace platform define with
826         capability defines.
828         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
830         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
831         PPC targets as sigaction does not exist on all platforms, define
832         this on a per-platform basis.
834         Instead of erroring out if the platform is not defined, include
835         mini-ppc-os.h, and expect that the OS specific setting provides
836         the required information.   
838 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
840         * aot-compiler.c: Fix --enable-minimal=aot.
842 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
844         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
845         previous change.
847 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
849         * exceptions-arm.c: Fix warnings.
851         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
852         ARM.
854         * mini-x86.c: Fix --enable-minimal=jit build.
856         * mini.c: Really fix --enable-minimal=jit build.
857         
858         * mini.c (construct_object_context_for_method): Move this outside
859         the DISABLE_JIT block to fix the --enable-minimal=jit build.
861         "Backported" of r124984 from 2.0 branch.
862         
863         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
865         "Backport" of r124977 + r124978 from 2.0 branch.
866         
867         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
868         to avoid calling mono_exception_from_token () from the throw trampoline.
869         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
870         for throwing corlib exceptions, this fixes full-aot support for corlib
871         exceptions.
873         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
875 2009-01-29  Miguel de Icaza  <miguel@novell.com>
877         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
878         part of the changes to split the code in mini into operating
879         system specific files.
881         This patch was done by copying mini.c to the respective files to
882         preserve SVN history.
884 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
886         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
888 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
890         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
891         remoting-invoke-with-check wrappers of shared methods.
893         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
895 2009-01-27  Mark Probst  <mark.probst@gmail.com>
897         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
898         optimization if the top of stack is the last instruction in the
899         bblock.  Otherwise it might have been used after its definition.
900         Fixes #469742.
902 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
904         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
905         method as well when get_vcall_slot () fails to match a code sequence.
907         * mini-arm.c: Fix the android build, which doesn't have
908         __aeabi_read_tp.
910 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
912         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
913         the s390x build.
915 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
917         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
919 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
921         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
922         and put its id into jinfo->used_regs. This is only used on amd64,
923         which is currently the only platform generating unwind info.
925         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
926         the dwarf unwinder. This is required to correctly handle async exceptions
927         like thread abort and stack overflows, which can happen while a method
928         is in the middle of its prolog or epilog.
929         
930         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
931         the unwind info belonging to an AOTed method.
933         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
934         into cfg->unwind_ops.
935         
936         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
938         * mini.c (mini_init): Call mono_unwind_init ().
939         (mini_cleanup): Call mono_unwind_cleanup ().
941         * unwind.c: Add functions for managing a set of unwind info entries, allowing
942         unwind info to be shared between methods.
944         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
945         saved in the LMF.
947         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
948         get_throw_pending_exception () to avoid initialization races.
950         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
951         mono_arch_exceptions_init () function.
953         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
955 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
957         * mini.c (mono_get_domain_intrinsic): New helper function.
958         (mono_get_thread_intrinsic): Ditto.
960         * mini-arm.c mini-ia64.c: Use the new helper functions.
961         
962         * method-to-ir.c (mono_method_to_ir): Fix the comment for
963         the last constrained_call change, since it is needed in the non-AOT
964         case as well.
966         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
967         
968         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
969         mono_get_lmf_addr () on arm eabi linux.
971 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
973         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
974         code sequence which matches a non-virtual call.
976 2009-01-23  Mark Probst  <mark.probst@gmail.com>
978         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
979         stack pointer (r1).
981 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
983         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
984         runtime-invoke wrappers, since they are also shared based on signature.
986 2009-01-22  Mark Probst  <mark.probst@gmail.com>
988         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
989         info from the (correct) context.
991 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
993         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
994         
995         * unwind.c (mono_unwind_frame): New function to unwind through a frame
996         using dwarf unwinding info. Not yet used.
998         * mini.c (mini_init): When using xdebug, disable freeing of domains.
1000 2009-01-21  Mark Probst  <mark.probst@gmail.com>
1002         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
1003         descriptors.
1005         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
1006         special case and handle mono_arch_delegate_invoke_impl() returning
1007         function descriptors.
1009         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
1010         trampolines return function descriptors, too.
1012 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
1014         * method-to-ir.c (handle_alloc): Avoid generic instances in the
1015         out_of_line optimization.
1017 2009-01-21  Martin Baulig  <martin@ximian.com>
1019         * mini.h
1020         (MonoCompile): Added `disable_deadce_vars' to disable removing
1021         unused variables.
1023         * mini.c
1024         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
1025         inside the debugger.
1027         * liveness.c (mono_analyze_liveness): Don't remove any unused
1028         variables if `cfg->disable_deadce_vars' is set.
1030 2009-01-21  Mark Probst  <mark.probst@gmail.com>
1032         * method-to-ir.c: Only apply exception constructor optimization if
1033         the the method actually belongs to an exception class.  Fixes
1034         #467456.
1036 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
1038         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
1039         change inside a #ifdef __mono_ppc64__.
1041         * aot-compiler.c (compile_method): Remove the previous limitation.
1043         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
1044         on type variables in AOTed code.
1045         
1046         * aot-compiler.c (compile_method): Skip generic methods having type 
1047         constraints on their generic parameters.
1049         * aot-compiler.c (compile_method): Check for methods which cannot be
1050         encoded inside RGCTX_FETCH patches as well.
1052         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
1053         build.
1055 2009-01-20  Mark Probst  <mark.probst@gmail.com>
1057         * method-to-ir.c: Force the vtable variable in shared generic code
1058         for the case that they might show up on a stack trace where they
1059         are needed.
1061         * mini-exceptions.c: Save and use generic sharing info as well as
1062         IP in stack traces to resolve shared generic instantiations.
1064 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
1066         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
1067         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
1069 2009-01-20  Mark Probst  <mark.probst@gmail.com>
1071         * method-to-ir.c: Do generic sharing for array constructors.
1073 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
1075         * mini-exceptions.c (mono_print_thread_dump): Add information
1076         about the thread state using wapi_current_thread_desc.
1078 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
1080         * basic-simd.cs: Tests for the new constructors. 
1082 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
1084         * mini-ops.h: Added OP_EXPAND_*
1086         * cpu-x86.md: Same.
1088         * mini-x86.c (mono_arch_output_basic_block): Same.
1089         
1090         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
1092 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
1094         * iltests.il.in: Add a test for #467385.
1096 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
1098         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
1099         thread been cleaned up is not the same currently in execution.
1101         Fixes appdomain-unload crashes on windows, osx and linux variants
1102         without the __thread keyword.
1104 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
1106         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
1107         (koush@koushikdutta.com). Implement this for android.
1109         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
1110         begins with a digit.
1112         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
1113         mono_marshal_get_write_barrier ().
1115 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
1117         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
1118         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
1119         that pass them on a register pair.
1121         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
1122         test was crashing due to that.
1124 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
1126         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
1127         trampoline code. Include ucontext.h only if available.
1129 2009-01-15  Mark Probst  <mark.probst@gmail.com>
1131         * mini.c: mono_domain_lookup_shared_generic() takes an open method
1132         and doesn't check whether it's sharable, like it was before
1133         removing the shared generics hash.  This brings IronPython
1134         performance back to what it was before that change.
1136 2009-01-14  Mark Probst  <mark.probst@gmail.com>
1138         * method-to-ir.c: Handle delegate invocation optimization earlier,
1139         otherwise it would be handled (much more slowly) by the
1140         final/sealed optimization.
1142 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
1144         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
1145         domain is not set. Fixes #465864.
1147 2009-01-12  Mark Probst  <mark.probst@gmail.com>
1149         * method-to-ir.c: Don't stop sharing of generic methods with catch
1150         clauses - we already handle those.
1152 2009-01-12  Mark Probst  <mark.probst@gmail.com>
1154         * mini.c, mini.h: lookup_generic_method() is now
1155         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
1156         making the shared_generics_hash obsolete.
1158 2009-01-12  Mark Probst  <mark.probst@gmail.com>
1160         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
1161         use the red zone.  Make room on the stack first and then use it,
1162         not the other way around.
1164 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
1166         * mini.c (mini_init): Call mono_xdebug_init ().
1168         * aot-compiler.c (mono_xdebug_init): Make this non-static.
1170 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
1172         * TestDriver.cs: Add an --iter argument to run tests multiple times.
1174         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
1175         trampolines.
1177         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
1178         debug+unwind info for trampolines.
1180         * mini.c (mono_create_unwind_op): New helper function.
1182         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
1184 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
1186         * aot-compiler.c: Fix the build.
1188 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
1190         * Makefile.am: Update dtrace-prelink.sh location.
1192 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
1194         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
1195         optimization. Fixes #464520.
1197 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
1199         * mini-amd64.c : Adding code to save/restore non-volatile registers
1200            on Winx64.
1202         * exceptions-amd64.c : Adding code to save/restore non-volatile 
1203           registers on Winx64.
1205         Contributed under MIT/X11 license.
1207 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
1209         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
1210         __GNUC_MINOR__ which can break when the major version changes.
1212 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1214         * basic-simd.cs: Add tests for usage of the sizeof opcode.
1216 2009-01-07  Geoff Norton  <gnorton@novell.com>
1218         * helpers.c:  Allow mono -v -v -v to work on darwin.
1220 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
1222         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
1223           pattern. 
1225         Contributed under MIT/X11 license.
1227 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
1229         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
1230         instead of directly accessing type->data.klass. Fixes #462016.
1231         (mono_allocate_stack_slots_full): Ditto.
1233         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
1234         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
1236         * aot-compiler.c (emit_plt): Fix ARM build.
1238 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
1240         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
1241         
1242         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
1243         change.
1245         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
1246         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
1247         #463357.
1249         * iltests.il.in: Add a regression test.
1251 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1253         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
1255 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1257         * basic-simd.cs: Add a regression test for #462457.
1259 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1261         * mini-ops.h: Add a definition of XPHI.
1263         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
1265         * ssa.c (op_phi_to_move): Handle XPHI.
1267         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
1269         Fixes #462457
1271 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1273         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
1275 2008-12-31  Geoff Norton  <gnorton@novell.com>
1277         * mini-ppc.c: The prolog size allocated can be too small for darwin
1278         ppc32 under certain circumstances.  Also fix a small logic bug.
1280 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
1282         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
1283         while loading AOT methods.
1285         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
1286         since only the former is nulled out after a successful cast. This prevents
1287         crashes with rethrown exceptions when using --debug=casts.
1289 2008-12-24  Mark Probst  <mark.probst@gmail.com>
1291         * mini.h: New macro for checking whether a method is final,
1292         i.e. whether the method or its class is marked final.
1294         * method-to-ir.c: Use the new macro for all final-checks
1295         consistently.  Fixes the crash in the System.ServiceModel tests.
1297 2008-12-23  Mark Probst  <mark.probst@gmail.com>
1299         * mini-exceptions.c (get_exception_catch_class): Corrected another
1300         overly strict assertion.
1302 2008-12-23  Mark Probst  <mark.probst@gmail.com>
1304         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
1305         Clobbering it is not allowed because the caller might use it as
1306         the vtable register in the interface call.
1308 2008-12-19  Mark Probst  <mark.probst@gmail.com>
1310         * mini-exceptions.c (get_exception_catch_class): Corrected an
1311         overly strict assertion.
1313 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
1314         
1315         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
1317         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
1319         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
1321         * cpu-mips.md: correct lengths for certain long_ opcodes.
1323         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
1325         * mini-mips.c: Add support for more long operations. Fix issues with stack frame layout for n32 (still not perfect yet). Add mips_emit_load_const().
1326         
1327 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
1329         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
1330         
1331 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
1332         
1333         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
1334         
1335 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
1337         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
1338         next basic block.
1339         
1340 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
1342         * mini.h: Allow MonoInst 'p' field to alias with the low-order bits of the 'const_val' fields correctly on big-endian systems when SIZEOF_VOID_P < SIZEOF_REGISTER
1344         * ir-emit.h: Change SIZEOF_VOID_P to SIZEOF_REGISTER, init instruction through inst_c* fields instead of inst_p* fields in case sizeof(inst_p) < sizeof(inst_c)
1345         
1346 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
1347         
1348         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
1349         
1350 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
1352         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
1353         gshared code. Fixes #458947.
1355         * generics.cs: Add a test.
1357 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
1358         
1359         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1360         
1361         * mini-mips.c: first pass n32 code generation.
1363         * mini-mips.h: datatypes and defines for n32 support.
1365         * exceptions-mips.c: first pass n32 code generation.
1366         
1367         * tramp-mips.c: first pass n32 code generation.
1368         
1369         * cpu-mips.md: add long_ opcodes.
1370         
1371 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
1373         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1375         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1376         
1377         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1378         
1379         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1381         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1383         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1385         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1387         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1389         * helpers.c: for mips/n32, don't pass -mips32 to objdump
1391 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
1393         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
1395 2008-12-12  Andrés G. Aragoneses  <aaragoneses@novell.com>
1397         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
1399 2008-12-12  Mark Probst  <mark.probst@gmail.com>
1401         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
1402         descriptors for helper functions directly in front of the code.
1404 2008-12-11  Mark Probst  <mark.probst@gmail.com>
1406         * method-to-ir.c: Removed an unnecessary assertion.
1408 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
1410         * method-to-ir.c: Merge SGEN changes from the old JIT.
1412 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
1414         * driver.c (compile_all_methods_thread_main): Handle failure of
1415         mono_get_method ().
1417 2008-12-10  Mark Probst  <mark.probst@gmail.com>
1419         * mini-ppc.c: Merged with mini-ppc64.c.
1421         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
1423         * Makefile.am: Use the same sources for PPC and PPC64.
1425         * mini-ppc64.c: Removed.
1427 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
1429         * branch-opts.c (remove_block_if_useless): Extract fall through detection
1430         code to mono_bb_is_fall_through.
1431         
1432         * branch-opts.c (mono_remove_critical_edges): Same.
1434 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
1436         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
1437         expect that an OP_BR_REG will be there.
1439 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
1441         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
1442         for the many branch ops. The original check miss OP_BR_REG.
1444         Fixes #457574.
1445         
1446 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
1448         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
1450 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
1452         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
1453         while holding the aot lock.
1455 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
1457         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
1458         
1459 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
1461         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
1462           to release all runtime callable wrappers held by the runtime.
1464         Contributed under MIT/X11 license.
1466 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
1468         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
1469           for Winx64.
1471         Contributed under MIT/X11 license.
1473 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
1475         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
1476         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
1478 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
1480         * cpu-mips.md: fix ckfinite length
1482         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
1483         (mono_arch_lowering_pass): cleanup, rearrange for clarity
1484         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
1485         
1486 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
1488         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
1489         
1490 2008-12-08  Geoff Norton  <gnorton@novell.com>
1492         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
1493         size by 8 bytes as well.
1495 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1497         * basic-simd.cs: Fix method names for Vector16b.
1498         
1499 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1501         * basic-simd.cs: Fix method names for Vector16sb.
1503 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1505         * basic-simd.cs: Fix method names for Vector8us.
1506         
1507 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1509         * basic-simd.cs: Fix method names for Vector8s.
1510         
1511 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1513         * basic-simd.cs: Fix method names for Vector4ui.
1515 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1517         * basic-simd.cs: Fix method names for Vector2l.
1519 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1521         * basic-simd.cs: Fix method names for Vector2d.
1523 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1525         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
1526         that are extension methods.
1528 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1530         * basic-simd.cs: Fix method names for Vector4f.
1532 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
1534         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
1535         as such. Fixes #456669.
1537 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
1539         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
1540         
1541 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
1543         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
1544         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
1545         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
1546         (mips_adjust_stackframe): handle FP spills
1547                 
1548         * mini-ops.h: add mips_mtc1_s2
1549         
1550         * cpu-mips.md: add mips_mtc1_s2
1551         
1552 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
1554         * unwind.c: New file, move the unwind info encoding functions here from
1555         aot-compiler.c, so they could be used at runtime too.
1557 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
1559         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
1560         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
1561         
1562 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
1564         * mini-mips.c: cleanup warnings
1565         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
1566         (mips_adjust_stackframe): handle case of taking the address of stack locals
1567         
1568 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
1570         * aot-compiler.c: Implement a few functions missing from the asm writer.
1571         (emit_method_code): Only write symbols for methods when using the bin
1572         writer, since the assembler can't deal with the characters in our method
1573         names.
1575         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
1577         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
1578         call.
1580         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
1581         a bit to also restore %rax.
1583 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1585         * mini-ppc.c: Some simple merges from mini-ppc64.c.
1587 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
1589         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
1590         arguments.
1592 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1594         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
1596         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
1597         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
1599         * exceptions-ppc64.c: Removed.
1601         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
1603 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1605         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
1606         tramp-ppc64.c.
1608         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
1610         * tramp-ppc64.c: Removed.
1612 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
1614         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
1615         the TYPESPEC table.
1617 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1619         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
1621         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
1622         mini-ppc.h instead of mini-ppc64.h.
1624         * mini-ppc64.h: Removed.
1626 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1628         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
1629         
1630         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
1631         
1632 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1634         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
1635         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
1636         code easier.
1638 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1640         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
1642 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1644         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
1646 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1648         * basic-simd.cs: Tests for operator == and != on Vector4f.
1650 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1652         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
1654         * simd-intrinsics.c: Kill useless enum.
1656 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1658         * cpu-mips.md: add long_conv_to_ovf_i4_2
1659         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
1661 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1663         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
1664         
1665         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
1667 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1669         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
1670         
1671 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1673         * basic-simd.cs: Add tests for new methods.
1675 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1677         * simd-intrinsics.c: Add support for operator == and !=
1678         on Vector4(u)i.
1680         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
1682 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1684         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
1686 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
1688         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
1690         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
1691         MONO_PATCH_INFO_ICALL_ADDR.
1693         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
1695         * aot-compiler.c: Resurrect full-aot support.
1697 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1699         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
1700         
1701 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1703         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
1704         
1705 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
1707         * basic-simd.cs: Fix tests to work under ppc.
1708         Remove tests for methods that will be removed.
1710 2008-12-03  Mark Probst  <mark.probst@gmail.com>
1712         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
1713         generic type (via a typedef or typeref) correctly.
1715 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
1717         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
1718         diagnose an assertion failure.
1720 2008-12-02  Mark Probst  <mark.probst@gmail.com>
1722         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
1723         Fix trampoline size.
1725         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
1726         conversion opcodes are implemented natively instead via emulation.
1728 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1730         * cpu-mips.md: remove mips_xori
1732         * mini-ops.h:  remove mips_xori
1734         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
1736         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
1737         
1738         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
1739         
1740 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1742         * cpu-mips.md: fix instruction lengths.
1744         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
1746         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
1748         * mini-ops.h: fix slti / sltiu op profiles.
1749         
1750 2008-12-02  Martin Baulig  <martin@ximian.com>
1752         * method-to-ir.c (mono_method_to_ir): Disable debugging
1753         information for the init locals block to make the debugger stop
1754         after all locals have been initalized.
1756 2008-12-02  Martin Baulig  <martin@ximian.com>
1758         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
1759         running inside the debugger.
1761 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
1763         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
1764         is enabled.
1766         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
1767         alu->alu imm optimization which only shows if deadce is disabled.
1769         * aot-compiler.c: Rename the function names for the binary and asm writers
1770         so they can coexist in the same process. Rework the xdebug code to use the
1771         asm writer. This avoids the need to call into the runtime to dump the
1772         debugging info. Add more debugging info for types.
1774         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
1776         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
1777         cpu description tables, they can't occur in cpu-<ARCH>.md.
1779         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
1780         the stack in CEE_LDFLDA. Fixes #450542.
1782         * generics.cs: Add a new test.
1784 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1786         * mini-ops.h: updated MIPS opcodes
1787         * mini-mips.c: decompose long opts
1788         * mini-mips.h: decompose long opts
1789         
1790 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
1792         * cpu-mips.md: fix length on int_rem_un
1793         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
1794         
1795 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
1797         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
1799         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
1801 2008-11-29  Martin Baulig  <martin@ximian.com>
1803         * mini-exceptions.c (mono_handle_native_sigsegv): Check
1804         mono_debug_using_mono_debugger() in addition to the
1805         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
1807 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1809         * mini-ops.h: updated more MIPS opcodes
1810         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
1811         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
1812         
1813 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1815         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
1817 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1819         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
1820         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
1821         * mini-ops.h: correct selected mips opcode entries
1822         
1823 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1825         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
1826         make them work.
1828 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1830         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
1832 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1834         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
1835         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
1836         * mini-mips.h: disable IMT
1837         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
1838         
1839 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1841         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
1843 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1845         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
1847 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
1849         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
1850         consistency.
1852 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1854         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1855         for Set/GetVector aligned versions.
1857 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1859         * basic-simd.cs: Add tests for Get/SetVector.
1861 2008-11-27  Mark Probst  <mark.probst@gmail.com>
1863         * mini.c: Removed g_slist_append_mempool().  Now in
1864         metadata/mempool.c.
1866 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1868         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
1869         size properly and make the bounds check optional.
1871         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1872         for SetVector and IsAligned.
1874 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
1876         * mini.c: Remove unused mono_normalize_opcodes () function.
1878 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1880         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
1881         using the new atomic add ops now.
1883         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
1884         add.
1886 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1888         * mini-ppc64.c: Several fixes.
1890 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1892         * cpu-mips.md: added jump_table
1893         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
1895 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1897         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
1899 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1901         * mini-ops.h: corrected a handful of MIPS opcodes.
1903 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1905         * aot-compiler.c: MIPS to use ELF writer
1907 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1909         * mini-codegen.c: remove MIPS specific assert.
1911 2008-11-25  Mark Probst  <mark.probst@gmail.com>
1913         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
1914         fixes.  PPC64 now passes most of the runtime regressions.
1916 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
1918         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
1919         volatile intervals a bit.
1921 2008-11-24  Mark Probst  <mark.probst@gmail.com>
1923         * basic-long.cs: New test case.
1925 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1927         * mini.c (mini_method_compile): Disable globalra for large methods for 
1928         now.
1930         * regalloc2.c (order_moves): Add fp support.
1932         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
1933         source bblock ends with an OP_BR_REG.
1935         * ratests.cs: Add a new test.
1937 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1939         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
1940         sharing.  PPC64 now passes generics.exe.
1942 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1944         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
1946 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1948         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
1949         memory when mono_jit_info_table_find () can't find the method in the
1950         LMF case.
1952         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
1953         AOTed code too.
1954         
1955         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
1956         writer too.
1958 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1960         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
1961         Several fixes.  PPC64 now runs exceptions.exe and
1962         devirtualization.exe.
1964 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1966         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
1967         arrays.exe and basic-math.exe.
1969 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1971         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
1972         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
1974 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1976         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
1978 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1980         * method-to-ir.c: Move bounds checking macros to ir-emit.h
1982         * ir-emit.h: Move macros from method-to-ir.c to here.
1984 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1986         * mini-ops.h: Correct the long simd ops to use LREG.
1988 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
1990         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
1991         
1992         * mini-ops.h: Correct the dreg type of a few long opcodes.
1994         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
1995         Add netbsd support.
1997 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
1999         * mini-ppc.c: remove negative stack references in epilog
2000         for platforms that don't support the red zone.
2002 2008-11-21  Mark Probst  <mark.probst@gmail.com>
2004         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
2005         point regs.  Now PPC64 passes basic-calls.exe.
2007 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2009         * basic-simd.cs: Add tests for accessors of Vector2l.
2011 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2013         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
2015         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
2016         
2017         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
2019 2008-11-21  Mark Probst  <mark.probst@gmail.com>
2021         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
2022         PPC64 passes basic-long.exe.
2024 2008-11-20  Mark Probst  <mark.probst@gmail.com>
2026         * decompose.c: Decompose carry and overflow add on PPC64 like on
2027         other 64 bit archs.  Don't decompose sub at all on PPC64.
2029         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
2030         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
2031         basic-long.exe.
2033 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2035         * basic-simd.cs: Add tests for accessors of Vector2d.
2037 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2039         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
2041         * cpu-x86.md: Same.
2043         * mini-x86.c (mono_arch_output_basic_block): Same.
2044         
2045         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
2047 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2049         * basic-simd.cs: Add tests for accessors of Vector4f.
2051 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2053         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
2055         * cpu-x86.md: Same.
2057         * mini-x86.c (mono_arch_output_basic_block): Same.
2058         
2059         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
2061 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2063         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
2065 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2067         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
2069         * cpu-x86.md: Same.
2071         * mini-x86.c (mono_arch_output_basic_block): Same.
2072         
2073         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
2075 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2077         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
2079 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2081         * simd-intrinsics.c: Enable setters for Vector16sb.
2083 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2085         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
2087         * cpu-x86.md: Same.
2089         * mini-x86.c (mono_arch_output_basic_block): Same.
2090         
2091         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
2093 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
2095         * simd-intrinsics.c: Implement setter for Vector8us.
2097 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
2099         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
2100         for dead variables.
2102 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
2104         * mini-ppc.c: remove references to the red zone in the prolog
2105         (for systems that don't support it).
2107 2008-11-19  Mark Probst  <mark.probst@gmail.com>
2109         * cpu-ppc64.md: Fixed a few instruction lengths.
2111         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
2112         now.
2114 2008-11-19  Mark Probst  <mark.probst@gmail.com>
2116         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
2117         basic.exe now.
2119 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
2121         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
2123 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
2125         * mini-ops.h: Added OP_INSERT_I2.
2127         * cpu-x86.md: Same.
2129         * mini-x86.c (mono_arch_output_basic_block): Same.
2130         
2131         * simd-intrinsics.c: Implement setter for Vector8s.
2133         * simd-methods.h: Add the names of get setters of Vector8s.
2135 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
2137         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
2138         
2139         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
2140         parameters.
2142         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
2144 2008-11-18  Mark Probst  <mark.probst@gmail.com>
2146         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
2147         for PPC64.  An empty program runs now.
2149 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
2151         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
2153         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
2154         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
2155         info for JITted code is emitted into a shared library, loadable into gdb.
2157 2008-11-18  Mark Probst  <mark.probst@gmail.com>
2159         * Makefile.am: Changes to build PPC64.
2161         * mini-arch.h: Include mini-ppc64.h on PPC64.
2163 2008-11-18  Mark Probst  <mark.probst@gmail.com>
2165         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
2166         in PPC code up to r119147.
2168 2008-11-18  Mark Probst  <mark.probst@gmail.com>
2170         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
2171         cpu-ppc64.md: Changes for PPC64.
2173         Based on code submitted by andreas.faerber@web.de at
2174         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
2175         X11/MIT license.
2177 2008-11-18  Mark Probst  <mark.probst@gmail.com>
2179         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
2180         cpu-ppc64.md: Copied from the corresponding PPC files from
2181         r118846.
2183 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
2185         * mini-ops.h: Added OP_ROUND.
2187         * cpu-x86.md: Added round.
2189         * mini-x86.c: Added support for intrinsicing Math.Round (double).
2191         * basic-math.cs: Added test_0_round to test rounding.
2193         Contributed under MIT/X11 license.
2195 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
2197         * aot-compiler.c : Fix the Winx64 build.
2199         Contributed under MIT/X11 license.
2201 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
2203         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
2204         in OP_EXTRACT_R8 to avoid possible stack corruption.
2206 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
2208         * mini-ops.h: Added OP_EXTRACT_R8/I8.
2210         * cpu-x86.md: Added extract_r8.
2212         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
2213         
2214         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
2215         a couple of OP_EXTRACT_I4.
2217         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
2219         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
2221 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
2223         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
2224         and not 4.1. 
2226 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
2228         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
2229         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
2231         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
2232         are not needed any more.
2234         * mini.h: Remove the unused INS_LIST macros.
2236         * mini.c (mini_method_compile): Remove a disable globalra case which is no
2237         longer needed.
2239         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
2240         ir-emit.h.
2242         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
2243         mono_alloc_ireg () instead.
2245         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
2246         macros.
2248         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
2249         on amd64.
2251         * aot-runtime.c (load_aot_module): Disable AOT when running under
2252         CAS.
2254         * mini-amd64.h: Change the monitor fastpath defines to check for
2255         !PLATFORM_WIN32 so they work on *bsd too.
2257         * mini.h mini.c mini-hhpa.c: Remove more unused code.
2259         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
2261         * mini.h (MonoCompile): Remove new_ir flag.
2263         * regalloc.h regalloc.c: Remove unused code.
2265         * cpu-*.md: Remove more unused opcodes.
2267         * simple-cee-ops.h simple-mini-ops.h: Removed.
2269         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
2270         
2271 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
2273         * aliasing.h: Removed.
2275         * *.c: Remove references to aliasing.h and inssel.h.
2277         * mini.c: Remove additional unused functions.
2279         * mini-ops.h cpu-*.md: Remove unused opcodes.
2281 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
2283         Remove the old JIT code.
2285         * inssel*.brg: Removed.
2287         * ssa.c abcremoval.c aliasing.c: Removed.
2289         * ssa2.c: Renamed to ssa.c.
2291         * abcremoval2.c: Renamed to abcremoval.c.
2293         * *.c: Removed all !cfg->new_ir code.
2295         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
2296         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
2298         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
2299         
2300 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
2302         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
2303         to simplify the code and cut back on the number of global symbols in the AOT
2304         file.
2305         
2306         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
2308 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
2310         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
2311         with the got/got_info tables.
2313         * mini.h: Bump AOT file format version.
2314         
2315         * unwind.h: New file, contains definitions for stack unwinding.
2317         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
2318         to cfg->unwind_ops.
2319         
2320         * aot-compiler.c: Generalize the emitting of unwind information to use the
2321         information in cfg->unwind_ops.
2323         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
2325         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
2326         AOT method frames. Enable writing symbols for methods by default.
2328 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
2330         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
2331         and make it work with vectors of element sizes 1, 2 and 4.
2333         * simd-intrinsics.c: Enable getter for all vectors with element size
2334         1, 2 or 4.
2336         * simd-methods.h: Add the names of other getters.
2338         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
2340         * cpu-x86.md: Same.
2342         * mini-x86.c: Same.
2344 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
2346         * mini-ppc.h: portability fix.
2348 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
2350         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
2351         buggy and will overwrite it.
2353 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
2355         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
2356         Use it to emit local symbols for all methods so AOTed methods show up with
2357         their full name in gdb/valgrind output.
2359 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
2361         * mini-ppc.c: portability fixes.
2363 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
2365         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
2366         entries out of the if (!generic_shared...) code so it is always done.
2367         (mono_class_init_trampoline): Do the patching when running under valgrind
2368         too, newer versions of valgrind have no problems with it.
2370 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
2372         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
2373         further sections.
2375 2008-11-13  Mark Probst  <mark.probst@gmail.com>
2377         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
2378         filters.
2380 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
2382         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
2384 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
2386         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
2388         * cpu-x86.md: Same.
2390         * mini-x86.c: Same.
2392         * simd-intrinsics.c: Same.
2394 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
2396         * simd-intrinsics.c: Enable constructor intrinsics for all types.
2398 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
2400         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
2401         to work with more Vector types.
2403 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
2405         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
2406         store the elemens directly instead of using and intermediate.
2408 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
2410         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
2412         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
2413         to preserve %eax for aot plt trampolines.
2415         * aot-compiler.c (compile_method): Don't skip synchronized methods.
2416         (encode_method_ref): Flag synchronized methods so they won't go through
2417         the AOT trampoline.
2419         * aot-compiler.c: Additional work to support AOTing synchronized methods/
2420         wrappers.
2422         * cpu-ia64.md (jmp): Increase max length.
2424 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
2426         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
2427         open generic classes.
2429         * aot-compiler.c: Enable the ELF writer on ELF platforms.
2431         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
2432         box+brtrue optimization since it causes test failures on x86.
2434 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2436         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
2438         * cpu-x86.md: Same.
2440         * mini-x86.c: Same.
2442         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
2443         for simd ctor values. 
2445         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
2446         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
2448 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2450         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
2451         LogicalRightShift.
2453         * simd-instrincs.c: Same.
2455         * basic-simd.cs: Same.
2457 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
2459         * ratests.cs: Add more tests.
2461         * regalloc2.c (add_spill_code): Handle more corner cases.
2463 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
2465         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
2466         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
2467         both the source an destination of an instruction.
2469 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
2471         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
2472         wapihandles.c: more portability changes.
2474 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
2476         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
2477         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
2478         safe to execute in a signal handler and the kernel provides better
2479         the info in /proc/self/smaps. Avoid the assert on sigaction during
2480         cleanup.
2482 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
2484         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
2485         do the bblock linking hack if it is actually needed.
2487         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
2488         up linking.
2490         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
2491         crash problem is fixed.
2493         * branch-opts.c (mono_remove_critical_edges): Link up newly added
2494         bblocks.
2496         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
2497         for catch clauses.
2498         (mini_method_compile): Set the starting value of next_vreg to 
2499         MAX_IREGS + MAX_FREGS when using globalra.
2501         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
2502         filter clauses with BB_EXCEPTION_HANDLER.
2504         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
2506 2008-11-10  Mark Probst  <mark.probst@gmail.com>
2508         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
2509         space for stdcall.  Fixes regressions on Win32.
2511 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
2513         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
2514         bblocks.
2515         (linear_scan): Remove an assert which doesn't seem to be needed.
2517         * local-propagation.c (mono_local_deadce): Avoid a call to
2518         MONO_DELETE_INS which would screw up the instruction linking.
2520         * mini.c (mono_decompose_op_imm): Make this work with globalra.
2522         * regalloc2.c: Upgrade to work the current JIT code.
2524 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
2526         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
2527         case.
2529         * aot-runtime.c: Remove some dead code.
2531         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
2532         consistency.
2533         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
2535         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
2536         trampolines using sscanf since atoi doesn't work on large unsigned values.
2538         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
2539         Initialize code_size.
2541 2008-11-08  Mark Probst  <mark.probst@gmail.com>
2543         * method-to-ir.c (mini_emit_inst_for_method): Make
2544         Interlocked.CompareExchange work for Int arguments on 32 bit
2545         archs, as well.
2547 2008-11-07  Mark Probst  <mark.probst@gmail.com>
2549         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
2551 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
2553         * main.c Fix MSVC build.
2555         Contributed under MIT/X11 license.
2557 2008-11-06  Mark Probst  <mark.probst@gmail.com>
2559         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
2560         alignment larger than 8 bytes are aligned correctly, too.
2562         * mini.c: Honor the min_align field of MonoClass when laying out
2563         the stack.
2565 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
2567         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
2569         * aot-compiler.c (emit_plt): Fix a warning.
2570         
2571         * aot-compiler.c: Implement ARM support in the binary writer.
2573 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2575         * basic-simd.cs: Add test for getter with byref arg.
2576         Fix the naming of a few tests.
2577         Add missing checks to a test.
2579 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
2581         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
2583         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
2584         most of the full-aot support for monitor enter/exit trampolines.
2586         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
2587         enter/exit trampoline creation functions.
2589         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
2590         make dist.
2592 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
2594         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
2595         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
2596         implement the needed functionality without adding crap to the runtime.
2598 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
2600         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
2601         non-x86 builds.
2603         * mini.c (mono_build_date): New global version holding the build date in
2604         string format.
2605         
2606         * Makefile.am (buildver.c): Generate a file containing the build date.
2608         * main.c: Set the build date from the generated file.
2610         * mini.c (mono_get_runtime_build_info): New helper function returning build
2611         information in a string format.
2612         
2613         * driver.c (mono_main): Print the build date in --version.
2615         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
2616         file when the bind-to-runtime-version option is used.
2618 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2620         * simd-intrinsics.c: Fix bug when using getters and byref args. 
2622 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2624         * simd-methods.h: Rename prefetch methods.
2626         * simd-intrinsics.c: Same.      
2628 2008-11-05  Mark Probst  <mark.probst@gmail.com>
2630         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
2631         sizes.
2633 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2635         * aot-compiler.c: Use the bundled elf header files instead of depending on
2636         the system one.
2637         
2638         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
2639         mempool.
2641         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
2642         on every call.
2644 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
2646         * cpu-x86.md: Add store nta ops.
2648         * mini-ops.h: Same.
2650         * mini-x86.c: Same.
2652         * mini.h: Add an enum for simd prefetch modes.
2654         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
2655         of store. Use the changed code to support store nta.
2657         * simd-intrinsics.c: Add prefetch ops for all vector types.
2659 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2661         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
2662         threads.
2663         
2664         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
2665         names.
2667         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
2668         trampolines.
2670 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2672         * mini-x86.c: Fixed commit.
2674 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2676         * aot-compiler.c (emit_plt): Align the plt section only on x86.
2678 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2680         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
2681         and MONITOR_EXIT, for the ASM fastpaths.
2683         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
2684         available.
2686         * mini.c, patch-info.h: Signature and patch infos for
2687         Monitor.Enter/Exit trampolines.
2689         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
2691         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
2692         Monitor.Enter/Exit ASM fastpath for Linux.
2694 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2696         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
2698         * objects.cs: Add a new test.
2699         
2700         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
2702         * aot-runtime.c (load_method): Run class initialization in the PLT case even
2703         if MONO_LOG_LEVEL is set.
2705         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
2707         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
2709         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
2710         
2711         * aot-compiler.c: Change the relocation code to use virtual addresses instead
2712         of file offsets. Align the sections belonging to the data segment to 
2713         PAGESIZE.
2715 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2717         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
2718         elf.h. Port it to amd64.
2720 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2722         * driver.c: Enable SIMD by default.
2724 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2726         * cpu-x86.md: Add prefetch op.
2728         * mini-ops.h: Same.
2730         * mini-x86.c: Same.
2732         * mini.h: Add an enum for simd prefetch modes.
2734         * simd-methods.h: Add prefetch function names.
2736         * simd-intrinsics.c: Add prefetch ops for all vector types.
2738 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2740         * aot-compiler.c (emit_bytes): Speed this up a little.
2742 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
2744         * aot-compiler.c: Add JIT time etc. statistics.
2745         
2746         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
2748         * mini.h (MonoCompile): Add 'got_offset' field.
2750         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
2751         method_got_offsets array.
2753         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
2754         wrappers.
2756         * aot-compiler.c (compile_method): Add generic method instances referenced
2757         by the method to the list of methods to be compiled, this is required so if
2758         A<T> references B<T>, and another assembly references A<int>, then it will
2759         also get a copy of B<int>.
2761         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
2762         when checking for monitor enter/exit.
2764 2008-10-30  Mark Probst  <mark.probst@gmail.com>
2766         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
2767         for Monitor.Enter and Monitor.Exit if enabled.
2769         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
2770         Solaris.
2772 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
2774         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
2775         of an OP_MOVE. Fixes #440046.
2777         * basic-long.cs: Add a new test.
2779 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2781         * mini.h: Add synchronization note for the managed counter-part.
2783         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
2784         returns the simd caps of the current cpu.
2786 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2788         * basic-simd.cs: Remove Console.WriteLine.
2790 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2792         * basic-simd.cs: New tests for Vector2ul.
2794 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2796         * simd-intrinsics.c: Add new vector type Vector2ul.
2798 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2800         * basic-simd.cs: New tests for Vector2l.
2802 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2804         * cpu-x86.md: Add long version of most packed int ops.
2806         * mini-ops.h: Same.
2808         * mini-x86.h: Same.
2810         * simd-intrinsics.c: Add new vector type Vector2l.
2812 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2814         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
2816         * simd-methods.h: Remove SN_op_BitwiseXor.
2818 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2820         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
2821         alignment.
2823 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2825         * basic-simd.cs: Test for Vector2d.
2827         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
2828         value.
2830 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2832         * cpu-x86.md: Add double version of all packed float ops.
2834         * mini-ops.h: Same.
2836         * mini-x86.h: Same.
2838         * simd-intrinsics.c: Add new vector type Vector2d.
2840         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
2842         * simd-methods.h: Add Duplicate.
2844 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2846         * basic-simd.cs: Test for packing with signed saturation.
2848 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2850         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
2851         found in the TYPESPEC table.
2853 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
2855         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
2856         too.
2858         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2860         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
2861         instead of the RVA, since the RVA can be changed by tools like the cil 
2862         stripper.
2864         * method-to-ir.c (mono_method_to_ir2): Ditto.
2866         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
2867         (deserialize_variable): Ditto.
2869 2008-10-25  Martin Baulig  <martin@ximian.com>
2871         * debug-mini.c (write_variable): Use
2872         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
2874 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2876         * cpu-x86.md: Add unsigned variants of packd and packw.
2878         * mini-ops.h: Same.
2880         * mini-x86.h: Emit the right instruction for packd and packw.
2881         Add unsigned variants of packd and packw.
2883         * simd-intrinsics.c: Packd and packw were used in place of their
2884         unsigned variants. Change that.
2885         Add intrinsics for (Signed)PackWithSignedSaturation.
2887         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
2889 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2891         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
2893 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2895         * mini-ops.h: Remove dword packed add/sub with saturation ops.
2897         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
2899         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
2900         sse instructions.
2902         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
2904 2008-10-24  Mark Probst  <mark.probst@gmail.com>
2906         * method-to-ir.c, mini.c: Special casing for the synchronized
2907         wrapper for the ldtoken+GetTypeFromHandle case.
2909 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2911         * mini.c (mono_replace_ins): Move this to branch-opts.c.
2913         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
2914         created/split bblocks.
2916 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2918         * mini-ops.h: Add packed signed mul high.
2919         
2920         * cpu-x86.md: Same.
2922         * mini-x86.c (mono_arch_output_basic_block): Same.
2924         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
2926         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
2928 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2930         * basic-simd.cs: Tests for Vector16sb.
2932 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2934         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
2936 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2938         * mini-ops.h: Add packed signed min, max and compare greater.
2939         
2940         * cpu-x86.md: Same.
2942         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
2943         saturation.
2945         * simd-methods.h: Add CompareGreaterThan.
2947         * simd-methods.h: Remove CompareEquals.
2949         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
2951         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
2953         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
2954         CompareEqual.
2956 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2958         * basic-simd.cs: Fix tests due to change in the API.
2960 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2962         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
2964 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2966         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
2968         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
2969         inst_offset as this has invalid values for LDADDR.
2971 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2973         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2975         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
2977 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2979         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
2980         for accessing field->data.
2982 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2984         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2986 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2988         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
2990         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
2992 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2994         * dominators.c (mono_compute_natural_loops): Allocate GList enties
2995         from the cfg mempool.
2997 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2999         * basic-simd.cs: Tests for new methods in Vector8us.
3001 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
3003         * mini-ops.h: Add multiply and store high.
3004         
3005         * cpu-x86.md: Same.
3007         * mini-x86.c (mono_arch_output_basic_block): Same.
3009         * simd-methods.h: Same.
3011         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
3012         and CompareEqual.
3014 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
3016         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
3017         mono_class_setup_vtable ().
3019         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
3020         mono_class_get_vtable_entry () for accessing klass->vtable.
3022         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
3024         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
3025         found.
3027         * method-to-ir.c (mono_save_token_info): Don't save references made from
3028         wrappers.
3030         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
3031         of generic instances.
3033         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
3035 2008-10-19  Mark Probst  <mark.probst@gmail.com>
3037         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
3038         OP_JMP depends on the method signature.  Calculate it properly.
3040 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
3041         
3042         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
3043         called directly.
3045         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
3046         instances.
3047         (emit_extra_methods): Add another table mapping method indexes to 
3048         offsets in the extra_method_info table.
3050         * mini.h: Bump AOT file format version.
3051         
3052         * aot-runtime.c: Merge most of the code from mono_aot_get_method
3053         and mono_aot_get_method_from_token () into one function.
3055 2008-10-19  Mark Probst  <mark.probst@gmail.com>
3057         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
3058         separate counter.
3060 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
3062         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
3063         methods.
3065         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
3066         disable_aot.
3068         * mini.c (mono_patch_info_equal): Compare the generic context as well.
3070         * mini.h: Bump aot file format version.
3072         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
3073         AOT file can contain native code for methods which are not in the METHOD
3074         table. Generate code for non-sharable generic instances of generic methods
3075         found in the METHODSPEC table.
3076         
3077         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
3078         encoding generic type handles.
3080         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
3081         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
3083         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
3084         macros + MONO_ADD_INS.
3086         * mini.c (mono_jump_info_token_new2): New function which takes a generic
3087         context as well.
3089         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
3091         * mini.h: Bump aot file format version.
3093         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
3095 2008-10-17  Mark Probst  <mark.probst@gmail.com>
3097         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
3098         platforms, with definable stack alignment value.  Set to 16 now
3099         for all platforms.
3101         * mini.c, mini.h, driver.c: Command line option for disabling
3102         stack alignment.
3104 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
3106         * basic-simd.cs: Tests for new methods in Vector4ui.
3108 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
3110         * mini-ops.h: Add packed int shuffle.
3111         
3112         * cpu-x86.md: Same.
3114         * mini-x86.c (mono_arch_output_basic_block): Same.
3116         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
3117         extract mask, max, min, shuffle.
3119         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
3121 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
3123         * basic-simd.cs: Tests for new methods in Vector8us.
3125 2008-10-17  Mark Probst  <mark.probst@gmail.com>
3127         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
3128         RuntimeTypeHandle, not a TypedReference.
3130 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
3132         * simd-intrinsics.c: remove relocations.
3134 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
3136         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
3137         optimizations from the x86 backend.
3139 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
3141         * simd-methods.h, simd-intrinsics.c: debloat method names and
3142         prepare for no relocations.
3144 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
3146         * mini-ops.h: Add packed min/equal and sum of absolute differences.
3147         
3148         * cpu-x86.md: Same.
3150         * mini-x86.c (mono_arch_output_basic_block): Same.
3152         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
3153         extract mask, max, min and sum of absolute differences.
3155         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
3156         method name.
3158 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
3160         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
3161         Renamed one test for consistency.
3163 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
3165         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
3166         fix to the code that deal with other blocks.
3168 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
3170         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
3172 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
3174         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
3175         that deals with vreg interference. Explicitly check for OP_LDADDR to be
3176         able to process the source reg.
3178 2008-10-16  Martin Baulig  <martin@ximian.com>
3180         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
3182         * inssel.brg: Add `OP_HARD_NOP'.
3184         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
3186         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
3187         `OP_HARD_NOP' instruction when running inside the debugger.
3189         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
3190         `OP_HARD_NOP' instruction when running inside the debugger.
3192 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
3194         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
3195         now works. The issue with the regalloc tripping up no longer
3196         happens.
3198         * simd-intrinsics.c (load_simd_vreg): Same.
3200 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
3201         
3202         * basic-simd.cs: Tests for new Vector8ui methods.
3204 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
3206         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
3207         only for type. This fixes crashes where MonoInst::klass is checked
3208         for ops of type != VTYPE or OBJ.
3210         * simd-intrinsics.c (load_simd_vreg): Same.
3212 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
3214         * mini-ops.h: Add ops for packed shuffle/max/avg and
3215         extract mask.
3216         
3217         * cpu-x86.md: Same.
3219         * mini-x86.c (mono_arch_output_basic_block): Same.
3221         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
3222         extract mask.
3224         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
3225         to emit extract mask op.
3227         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
3228         to emit word shuffles.
3230 2008-10-15  Mark Probst  <mark.probst@gmail.com>
3232         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
3233         the largest alignment needed by a variable, but at least
3234         sizeof(gpointer).
3236 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
3238         * basic-simd.cs: Tests for the fixes in the last commit.
3240 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
3242         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
3243         no longer handles STACK_PTR input.
3245         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
3247         * simd-intrinsics.c (load_simd_vreg): New function that works like 
3248         get_simd_vreg   but handles STACK_PTR input.
3250         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
3251         as the input can be an arbitrary pointer.
3253         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
3254         LDADDR local optimization directly otherwise use a store op.
3256 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
3258         * basic-simd.cs: Tests for dup low and dup high.
3260 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
3262         * mini-ops.h: Add dup low and dup high ops.
3263         
3264         * cpu-x86.md: Same.
3266         * mini-x86.c (mono_arch_output_basic_block): Same.
3268         * simd-intrinsics.c (vector4f_intrinsics): Same.
3270 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
3272         * basic-simd.cs: Tests for recently added functionality.
3274 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
3276         * mini-ops.h: Add remaining sse1 fp ops.
3277         
3278         * cpu-x86.md: Add remaining sse1 fp ops.
3280         * mini-x86.c (mono_arch_output_basic_block): Same.
3282         * mini.h: Add enum for simd FP compare conditions.
3284         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
3286         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
3287         so the backed can generate the appropriate op.
3289 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
3290         This patch squeese one more byte from the SimdIntrinsc struct.
3292         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
3293         a a shift amount intead of simply or'ing it.
3295         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
3297         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
3298         byte so we can have an aditional flags field without increasing struct size.
3300         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
3301         against the simd_supported_versions bitmask.
3303         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
3305 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
3307         * mini.c: remove rawbuffer code (the only use here is unsafe because
3308         it takes locks during signal handling and the kernel now provides much
3309         better info in proc/pid/smaps these days).
3311 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
3313         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
3314         OP_X86_PUSH_OBJ. Fixes #434620.
3316         * objects.cs: Add a test.
3317         
3318 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
3320         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
3321         that the packuswb/packusdw don't work with unsigned numbers for what
3322         would be negative numbers in signed format.
3324         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
3325         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
3327         * mini-ops.h: Add doubleword forms of many ops and packing ones.
3329         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
3331         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
3333         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
3335         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
3336         add more ops.
3338         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
3339         version as the enum in mini.h.
3341         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
3342         for sse3 ops, check the simd_version field if present. This way the code
3343         works with all versions of sse.
3345 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3347         * simd-intrinsics.c: Fixed intrinsic name typo.
3349         * mini.h: Added missing simd exported function.
3351         * basic-simd.cs: Added tests for Vector4ui.
3352         Fixed broken test for Vector16b.
3354 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
3356         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
3357         the max length to 64.
3359 2008-10-10  Mark Probst  <mark.probst@gmail.com>
3361         * method-to-ir.c: Only do the fast virtual generic method call for
3362         non-wrapper methods.
3364         * mini.h, mini-trampolines.c: The new generic virtual remoting
3365         trampoline handles virtual method calls via the vtable (as done by
3366         the fast virtual generic method calls) to remoting proxies.
3368         * mini.c (mono_jit_create_remoting_trampoline): For generic
3369         methods reate a generic virtual remoting trampoline.
3371         * mini-amd64.h: Enable fast virtual generic method calls again.
3373 2008-10-10  Mark Probst  <mark.probst@gmail.com>
3375         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
3376         restore registers when doing tail calls.
3378 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3380         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
3381         Vector4ui.
3383 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3385         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
3387 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3389         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
3391 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3393         * basic-simd.cs: Retrofit for API changes.
3395 2008-10-10  Mark Probst  <mark.probst@gmail.com>
3397         * mini-ppc.c: Handle integer stack arguments for tail calls.
3399 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3401         * optflags-def.h: Removed sse3 optimization.
3403         * driver.c: Same.
3405         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
3406         sse3.
3408         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
3410         * mini.h: Added enumeration with simd versions.
3412         * simd-intrinsics.c (emit_intrinsics): Use the new static var
3413         for detecting SSE3.
3415         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
3417         * mini.c (mini_init): Call mono_simd_intrinsics_init.
3419 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
3421         * basic-simd.cs: Added tests for Vector8u and Vector16u.
3423         * basic-simd.cs: Fixed test naming.
3425 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
3427         * mini-ops.h: Added ops for packed and saturated math, shifts
3428         and packing/unpacking.
3430         * cpu-x86.md: Added descriptors for the above ops.
3432         * mini-x86.c: Added code to emmit the above ops.
3434         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
3436 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
3438         * aot-compiler.c (compile_method): Enable AOT for generic code.
3440         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
3442 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
3444         * mini.c: add a workaround for a common screwup that ends up blamed
3445         to mono (other processes blocking signal delivery).
3447 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
3449         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
3450         in the LDFLD/STFLD opcodes. Fixes #432673.
3452         * iltests.il.in: Add a new test.
3454 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
3456         * mini-arm.c: attach the thread in unmanaged->managed transitions
3457         using delegates (bug #433148).
3459 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
3461        * basic-simd.cs: Use new ShuffleSel constants.
3463 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
3465         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
3467         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
3468         only disable simd intrinsics if no sse2 is detected.
3470         * optflags-def.h: Added sse3.
3472         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
3473         is disabled.
3475 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
3477         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
3478         when adding delegate-invoke wrappers.
3480 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
3482         * Makefile.am: Reenable the simd tests.
3484 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
3486         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
3487           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
3488           other vreg is allocated to that hreg.
3490         Contributed under MIT/X11 license.
3492 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
3494         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
3495         yet checked in.
3497 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
3499         * basic-simd.cs: New test suite for SIMD intrinsics.
3501         * Makefile.am: Added new tests.
3503 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
3505         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
3507         * mini-ops.h: Same.
3509         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
3511         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
3512         using SSE2 aware opcodes.
3514         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
3515         is enabled, this code path is only reachable if conversion ops are emmited after
3516         mono_method_to_ir.
3518         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
3520         This optimization saves 6 bytes per conversion against the old version.
3522 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
3524         * aot-compiler.c (compile_method): Don't skip methods referencing 
3525         generic methods without a corresponding entry in token_info_hash, since
3526         encode_method_ref () can handle all generic methods now.
3528         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
3529         generic context is set.
3530         
3531         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
3532         generic sharing of LDTOKEN.
3534 2008-10-06  Mark Probst  <mark.probst@gmail.com>
3536         * mini-amd64.h: Temporarily disabled fast virtual generic method
3537         calls because it breaks the System.Runtime.Remoting tests.
3539 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
3541         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
3543         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
3544         so inlining actually works.
3545         (check_inline_caller_method_name_limit): Ditto.
3547 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
3549         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
3550         64 bit safety (from Olaf Hering and Andreas Färber).
3552 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
3553         
3554         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
3555         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
3556         unused virtual call support code.
3558         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
3559         
3560         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
3561         which can't use aot trampolines.
3562         (decode_patch): Don't create aot trampolines for methods which can't use
3563         them.
3565         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
3566         use aot trampolines.
3568         * mini.h: Bump AOT image format version.
3569         
3570 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
3572         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
3573         to save_token_info () since cmethod is inflated for constrained calls.
3575         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
3577 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
3579         * Makefile.am: Add build rules for ppc64.
3580         This avoids the build failing at pedump with unresolved symbols
3581         due to lack of arch_sources. Instead it will now fail earlier
3582         due to lack of cpu-ppc64.md.
3584         Contributed under MIT/X11 license.
3586 2008-10-04  Mark Probst  <mark.probst@gmail.com>
3588         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
3589         tail calls.
3591         * iltests.il.in: Add test case for tail call with many arguments.
3593 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
3595         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
3596         to the fast virtual generic method code until the aot case is fixed.
3598 2008-10-03  Mark Probst  <mark.probst@gmail.com>
3600         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
3602 2008-10-03  Mark Probst  <mark.probst@gmail.com>
3604         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
3605         thunks.
3607 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
3608         
3609         * simd-intrinsics.c: Forgot to add this one.
3611         * mini-codegen.c: Fix macro in case SIMD is not supported.
3613 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
3614         
3615         This patch land initial JIT support for simd intrinsics.
3617         * mini-x86.h: Added new define to make --enable_minimal work on x86.
3619         * Makefile.am: Added simd-intrinsics.c
3621         * simd-intrinsics.c: New file with simd instrinsic related
3622         code.
3624         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
3626         * cpu-x86.md: Add simd related instructions.
3628         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
3630         * driver.c: Added two new --regression variants.
3632         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
3634         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
3636         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
3637         extract some complicated logic to helper functions.
3639         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
3641         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
3643         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
3644         the specialized simplification pass.
3646         * method-to-ir.c (mono_spill_global_vars): Use new macro.
3648         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
3650         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
3651         table.
3653         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
3654         if MONO_ARCH_NEED_SIMD_BANK is defined.
3656         * mini-ops.h: Added the new simd ops.
3658         * mini-x86.c: Added mono_arch_xregname.
3660         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
3662         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
3664         * mini-x86.h: Define simd related MONO_ARCH macros.
3666         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
3668         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
3670         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
3671         MONO_CLASS_IS_SIMD to deal with simd related IR.
3673         * mini.h (MonoInst): Added spill_var to the backend union.
3675         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
3677         * mini.h: Added forward declarations of the new simd fuctions.
3679         * optflags-def.h: Added new optimization names SIMD.
3681         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
3683         * regalloc.h: Added support for working with 3 register banks.
3685         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
3687         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
3689 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
3691         * mini-exceptions.c: remove 64 bit related ifdef clutter.
3693 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
3695         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
3696         instead of one on 64 bit systems.
3698         * method-to-ir.c: Remove unused includes.
3700 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
3702         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
3703         cfg->used_int_regs, since the two are different on arm.
3705 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3707         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
3708         mono_method_get_vtable_index() to get the vtable index.
3710 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3712         * method-to-ir.c (mono_method_to_ir2): Don't create native
3713         wrappers for array methods, because they're never called (and if
3714         they were called they wouldn't work).
3716 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3718         * method-to-ir.c (mono_method_to_ir2): Array methods are
3719         special-cased and must not be invoked indirectly via the (M)RGCTX
3720         when generic sharing is turned on.  Fixes #431413.
3722 2008-10-01  Mark Probst  <mark.probst@gmail.com>
3724         * method-to-ir.c: When generic sharing is active, call
3725         non-interface virtual generic methods via the standard trampoline.
3727         * mini-trampolines.c: Handle virtual generic shared methods.
3729         * mini.h, mini-x86.c, mini-x86.h: New argument for
3730         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
3731         method thunks and which is the trampoline to call if the lookup
3732         fails.  Enable the virtual generic method thunk for x86.
3734         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
3735         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
3736         argument but assert that it's NULL, because these archs don't yet
3737         implement the virtual generic method thunk.  Changes in the IMT
3738         thunk data structures.
3740 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
3742         * aot-compiler.c (emit_globals): Avoid invalid characters in
3743         the static linking symbol.
3745         * objects.cs: Add a test for the range check optimization. Fix warnings.
3747         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
3748         optimization from the current JIT.
3750         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
3751         later in decompose_array_access_opts () to allow more optimizations.
3753         * method-to-ir.c (mono_handle_soft_float): Rename this to 
3754         mono_decompose_soft_float () for consistency.
3756         * mini-ops.h: Fix arguments of OP_STRLEN.
3758         * method-to-ir.c (save_cast_details): Extract the cast details saving code
3759         into a separate function.
3760         (reset_cast_details): Ditto.
3761         (handle_unbox): Save cast details. Fixes #431254.
3763         * method-to-ir.c: Remove some obsolete FIXMEs.
3765 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3767         * ir-emit.h (alloc_dreg): Write a warning before crashing.
3769 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3771         * mini-codegen.c: More work on macros to make them
3772         ready for multiple regbanks.
3774 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3776         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
3778         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
3780 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3782         * mini-codegen.c (mono_spillvar_offset): Proper support for
3783         multiple regbanks.
3785 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3787         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
3788         the stack overflow changes.
3790 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3792         * mini-codegen.c: Make all bank macros depend on reg_bank.
3794         * mini-codegen.c (mono_local_regalloc): Make free mask
3795         initialization regbank aware.
3797 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3799         * mini-codegen.c (mono_local_regalloc): Extract callee
3800         mask selection to a function and make it regbank aware.
3802 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3804         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
3805         code to deal with many regbanks.
3807 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3809         * mini-codegen.c: More fp->regbank changes.
3811 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3813         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
3814         of a hardcoded constant.
3816 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3818         * method-to-ir.c (type_from_stack_type): Fix typo.
3820 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
3822         * mini-ia64.c (emit_move_return_value): Convert float return values to
3823         double.
3825         * objects.cs: Add a new test.
3826         
3827         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
3828         VARARG methods to fix an assert later.
3830         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
3831         end so it at least compiles.
3833 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3835         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
3837 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
3839         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
3840         optimization to a new function (emit_optimized_ldloca_ir) and enable
3841         it for both ldloca and ldloca_s.
3843 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3845         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
3846         gshared CASTCLASS code.
3848         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
3849         amd64, where the libc stack unwinder encounters stack frames referring to
3850         native code in unmapped memory.
3852         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
3853         sharing.
3855         * generics.cs: Add new test.
3857 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
3859         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
3860         add a check that one of the ARM_FPU_ constants is defined.
3862         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
3863         
3864         * mini-exceptions.c: Fix build on non-altstack platforms.
3866         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
3867         sharing of vtypes.
3869         * ir-emit.h: Add a comment to NEW_PCONST.
3871         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
3873         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
3875         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
3876         after the changes to MonoJitDomainInfo.
3878 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3880         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
3882 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3884         * mini-ppc.c: Compiler warning fixes.
3886 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3888         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
3889         for pinvokes.
3891 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3893         * exceptions-ppc.c, mini-ppc.h: Compile
3894         mono_arch_handle_altstack_exception() on Darwin, too.
3896 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3898         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
3899         work on archs which don't have generic sharing implemented, only
3900         without the vtable_arg.
3902 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3904         * mini.c: Added comment explaining why delegate ctor icall
3905         wrappers are compiled.
3907 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3909         * mini.c: Don't produce trampolines to delegate ctor icall
3910         wrappers but compile them upfront.
3912 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
3914         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
3915         runtime-set function when going back to managed code. Currently this
3916         is used to set back the protection on the soft ovf pages and/or to
3917         throw the stack overflow exception that happened in unmanaged code.
3919 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
3921         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
3922         runtime-set function when going back to managed code. Currently this
3923         is used to set back the protection on the soft ovf pages and/or to
3924         throw the stack overflow exception that happened in unmanaged code.
3926 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3928         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
3929         the support code for restoring stack protection after stack overflows
3930         that happen in unmanaged code. Don't set the exec permission on the
3931         soft overflow area.
3933 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
3935         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
3936         delegate->method_ptr is set. Fixes #428054.
3938 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3940         * tests.cs: Rename to ratests.cs.
3942         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
3943         emit_get_rgctx_... functions.
3945 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3947         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
3949 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3951         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
3952         before asserting that method is sharable.
3954 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3956         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
3957         whether method needs a static RGCTX wrapper used instead of
3958         complex conditions.
3960         * generic-sharing.c, mini.h: A few functions moved to
3961         metadata/generic-sharing.c.
3963 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3965         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
3966         Generic code sharing for value types, which essentially means
3967         treating value type methods like static methods.  The RGCTX is
3968         passed in the same way.
3970 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3972         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
3973         opcode when creating multi-dimensional arrays of open types.
3975         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
3976         open generic types.
3978         * generics.cs: Add a test.
3980         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
3982 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3984         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
3986         * mini.c (mini_method_compile): Set it when running under the debugger. 
3988         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
3989         vreg optimization if the flag is set.
3991         * driver.c (mono_main): Add --attach= option to pass options to
3992         the attach agent.
3994         * mini.c (sigquit_signal_handler): Start the attach agent.
3996         * ssapre.c: Disable this to save space since it is not yet ported to
3997         linear IR.
3999         * regalloc2.c: Disable this to save space.
4001         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
4003 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
4005         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
4006         the -v option useful again.
4008 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
4010         * mini-amd64.c (mono_arch_output_basic_block): Add support for
4011         --break-at-bb.
4013         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
4014         arrays of arrays. Fixes #428406.
4016         * method-to-ir.c (mini_emit_castclass): Ditto.
4018         * objects.cs: Add new test.
4019         
4020 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
4022         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
4023         was wrong at it choked against target_type_is_incompatible for byref types.
4025 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
4027         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
4028         places.
4030 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
4032         * mini-exceptions.c: update a few more exceptions-related counters.
4034 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
4036         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
4037         new functions to allocate from persistent mempools.
4039 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
4041         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
4042         multiple register banks in the future.
4044         * mini-codegen.c (mono_local_regalloc): Fix a warning.
4046 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
4048         * mini.c (type_to_eval_stack_type): Remove duplicated function.
4050         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
4052         * mini.h: Export type_to_eval_stack_type.
4054         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
4055         is only ins->klass of byref types.
4057 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
4059         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
4060         (mini_emit_memcpy2): Ditto.
4062         * mini-amd64.c: Fix a warning.
4064 2008-09-21  Mark Probst  <mark.probst@gmail.com>
4066         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
4067         linking.
4069 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
4071         * method-to-ir.c: Extract stloc micro-optimization to a
4072         function and apply it to all cases.
4074 2008-09-19  Mark Probst  <mark.probst@gmail.com>
4076         * method-to-ir.c: Don't fail generic code sharing in cases we
4077         already support.
4079 2008-09-18  Mark Probst  <mark.probst@gmail.com>
4081         * mini-ppc.c: Handle structs in tailcalls on Darwin.
4083 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
4085         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
4086         implementation.
4088 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
4090         * trace.c: make tracing more useful and correct, with per-thread
4091         id and indent info.
4093 2008-09-15  Mark Probst  <mark.probst@gmail.com>
4095         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
4096         doing a method call and the argument is an R4.
4098 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
4100         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
4101         generic methods.
4103 2008-09-13  Mark Probst  <mark.probst@gmail.com>
4105         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
4107 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
4109         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
4110         (MONO_JUMP_TABLE_FROM_INS): Ditto.
4112 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
4114         * driver.c: Add a --agent argument (not supported yet) to load managed
4115         agent assemblies before loading the main assembly, similarly to how the
4116         Java VM handles agents.
4118 2008-09-11  Mark Probst  <mark.probst@gmail.com>
4120         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
4121         function to do stack layout of local variables.
4123 2008-09-11  Mark Probst  <mark.probst@gmail.com>
4125         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
4126         calculation.
4128 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
4130         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
4131         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
4132         JIT if DISABLE_JIT is defined.
4134         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
4135         defined.
4137 2008-09-10  Mark Probst  <mark.probst@gmail.com>
4139         * iltests.il.in: Disable the fconv test on PPC (the result is
4140         undefined according to ECMA).
4142 2008-09-10  Mark Probst  <mark.probst@gmail.com>
4144         * iltests.il.in: Enable tail call tests for PPC.
4146         * mini.h: Add variable for storing incoming valuetype argument
4147         addresses for tail calls.
4149         * mini-ppc.c: Implement valuetype arguments and return values for
4150         tailcalls on Linux.
4152 2008-09-09  Mark Probst  <mark.probst@gmail.com>
4154         * mini-ppc.c: Partially implement tail calls (struct arguments and
4155         return values not supported).
4157         * method-to-ir.c: Enable tail calls on PPC.
4159 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
4161         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
4162         runtime-invoke wrappers to work around the problem of them getting
4163         assigned to a random class.
4165         * aot-runtime.c (mono_aot_get_method): Ditto.
4166         
4167 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
4169         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
4170         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
4172 2008-09-07  Mark Probst  <mark.probst@gmail.com>
4174         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
4175         until they're implemented properly.
4177         * exceptions-ppc.c: Use arch-independent exception-handling code
4178         instead of custom one.
4180         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
4181         for Linear IR.
4183         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
4185         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
4186         applies when __powerpc__ is defined.
4188 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
4190         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
4191         methods to their code to avoid computing the full name of wrappers and
4192         doing a lookup in a string hash table.
4194 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
4196         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
4197         we identify bblocks before method_to_ir () is ran.
4199         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
4200         Also avoid optimizing branches pointing to themselves.
4202         * mini.c (mini_method_compile): Ditto. Fixes #422947.
4204 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
4206         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
4208 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
4210         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
4211         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
4212         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
4213         'buf'.
4215         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
4216         jumped to the same entry in plt_jump_table.
4218 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
4220         * method-to-ir.c (initialize_array_data): Handle field with RVA from
4221         dynamic images.
4223 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
4225         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
4226         other assignment can be if converted. Saves 1.5% on corlib size and fixes
4227         #421807.
4229 2008-08-29  Geoff Norton  <gnorton@novell.com>
4231         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
4232         segment, and doesn't properly handle .space as .text.  Fixes
4233         AOT Mach/ARM
4235 2008-08-29  Geoff Norton  <gnorton@novell.com>
4237         * mini.c: Disable the mach exception handler when running on 
4238         ARM
4240 2008-08-29  Geoff Norton  <gnorton@novell.com>
4242         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
4243         globals on Darwin/ARM
4245 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
4247         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
4248         since too many things depend on it. Instead, call 
4249         mono_runtime_set_no_exec ().
4250         
4251         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
4252         the new JIT.
4254         * aot-compiler.c: Add an 'asm-only' AOT option.
4256         * mini.c: Avoid initializing the runtime when doing AOT compilation.
4257                 
4258         * aot-compiler.c (compile_method): Disable gshared support for now as it
4259         doesn't yet work.
4261 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
4263         * mini-amd64.h : Fix a compiler warning.
4265         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
4266           Changed to use a callback function to retrieve the unwind info.
4267           This avoids problems observed when code blocks were removed by
4268           unloading an app domain.
4270         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
4271           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
4272           to work properly.
4274         Contributed under MIT/X11 license.
4276 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
4278         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
4279           case to keep the stack aligned to 8.
4281         Contributed under MIT/X11 license.
4283 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
4285         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
4286         avoid repeated linear searches.
4288 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
4290         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
4291         methods it can't handle.
4292         
4293         * aot-compiler.c (add_method): Avoid adding a method twice.
4294         (add_wrappers): Add runtime invoke wrappers for all methods.
4296         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
4297         function to create an aot-compatible version of this trampoline.
4299         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
4301 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
4303         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
4305         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
4306         with a generic sharing failure.
4308         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
4310         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
4311         CEE_RETHROW. Fixes #419634.
4313         * mini.c (mono_method_to_ir): Ditto.
4315         * exceptions.cs: Add a new test.
4316         
4317         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
4318         to mono_type_stack_size_internal () since some callers might not pass in
4319         an rgctx.
4321         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
4322         instrument_prolog. Fixes #419878.
4324         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
4325         doubles in soft float mode volatile.
4327 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
4329         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
4331         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
4332         to handle soft float correctly.
4334         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
4335         the fast path.
4337         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
4339         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
4340         to sp, since the generics catch code requires it.
4342         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
4343         copying.
4345         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
4346         mono_arch_emit_imt_argument ().
4348         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
4350         * mini-arm.c tramp-arm.c: Generic sharing updates.
4352 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
4354         * mini-arm.c: Fix the arm build.
4356         * generic-sharing.c (mini_type_get_underlying_type): New helper function
4357         handling enums, generic instances and generic sharing.
4358         (mini_type_stack_size_full): Ditto.
4360         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
4361         
4362         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
4364         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
4366         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
4367         trampolines.
4369         * mini-arm.c: Various small generic sharing changes.
4371         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
4372         this for x86.
4373         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
4374         custom code.
4376         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
4377         helper function to return a generic class init trampoline.
4379         * method-to-ir.c mini.c: Use it.
4380         
4381         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
4382         arch-specfic function to return a generic class init trampoline.
4384         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
4385         the GENERIC_CLASS_INIT custom code.
4387         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
4388         a fatal error, not a sharing failure.
4390         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
4391         needed.
4393         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
4394         trampoline argument from MONO_ARCH_VTABLE_REG.
4396         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
4397         order of the arguments to the C trampoline: pass 'slot' as the trampoline
4398         argument, and pass the vtable in VTABLE_REG.
4400         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
4401         order of the arguments to the C trampoline: pass 'slot' as the trampoline
4402         argument, and pass the vtable in VTABLE_REG.
4403         (mono_arch_create_trampoline_code_full): Remove some special casing for
4404         the rgctx fetch trampoline.
4406         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
4407         Fixes #419273.
4409         * iltests.il: Add a test for it.
4411 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
4413         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
4415         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
4416         no longer needed.
4418         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
4419         use mono_jit_info_table_find () to avoid recursion.
4420         (mono_delegate_trampoline): Add a sync wrapper here.
4422         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
4423         here.
4425         * mini.c (mono_method_to_ir): Ditto.
4426         
4427         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
4428         add_sync_wrapper argument. Don't add a sync wrapper here.
4429         (mono_create_jump_trampoline): Don't add a sync wrapper here.
4431         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
4432         
4433 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
4435         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
4436           of nonvolatile registers back from MonoContext to CONTEXT.
4438         Contributed under MIT/X11 license.
4440 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
4442         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
4443           arguments on Winx64 there are only 4 argument registers.  For this
4444           logic to work the last argument must be pulled from the stack.  
4446         Contributed under MIT/X11 license.
4448 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
4450         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4452         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
4453         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
4454         encode/decode_method_ref ().
4456         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
4458         * aot-runtime.c (decode_patch): Ditto.  
4460         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
4461         MONO_PATCH_INFO_METHOD.
4463         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
4464         MonoGenericJitInfo.
4466         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
4467         MonoGenericJitInfo.
4469         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
4471         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
4472         one from the caller.
4474         * aot-runtime.c (decode_generic_inst): New function to decode and
4475         return a interned generic inst.
4476         (decode_klass_ref): Use it.
4477         (decode_method_ref): Ditto.
4479         * aot-compiler.c (emit_exception_debug_info): Save 
4480         jinfo->has_generic_jit_info too.
4482 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
4484         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
4486         * iltests.il.in: Add a test for fconv_to_i.
4488         * liveness.c: Disable the liveness2 pass for now to save space.
4490         * regalloc2.c: Include mempool-internals.h to fix warnings.
4492         * aot-compiler.c (encode_method_ref): Encode the context of generic
4493         instance methods.
4495         * aot-runtime.c (decode_method_ref): Inflate generic methods using
4496         the context saved in the aot file.
4498         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4500         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
4502         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
4503         volatile so they won't be optimized away.
4505 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
4507         * ssa.c:
4508         * ssa2.c:
4509         * mini.c:
4510         * regalloc2.c:
4511         * dominators.c: Remove duplicated functions that now are in
4512         mempool-internals.h.
4514 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
4516         * aot-compiler.c: Fix warnings.
4518         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
4520         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
4522         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
4523         as the patch type.
4525         * mini.c (mono_resolve_patch_target): Ditto.
4526         
4527         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
4528         (encode_klass_ref): Add support for encoding VARs/MVARs.
4530         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
4532         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
4533         the handling of the got entries into a separate 'decode_got_entry' function.
4534         Add support for RGCTX_FETCH.
4536         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
4537         clobbered by the trampoline code.
4539         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
4540         not clobbered by the indirect calling code.
4542 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
4544         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
4545         to fix the build.
4547 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
4549         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
4550         signature using the compilation mempool otherwise we would leak it.
4552 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
4554         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
4555         mono_emit_abs_call ().
4557         * patch-info.h: Add GENERIC_CLASS_INIT.
4559         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
4561         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
4562         as their target as a near call.
4564         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
4565         ABS handling code.
4566         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
4568         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
4569         call to a runtime function described by a patch.
4571         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
4572         mono_emit_abs_call, this has the advantage that the ABS handling code in
4573         mono_codegen () can handle them both, and can handle other stuff in the
4574         future without additional code.
4576         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
4577         entry.
4578         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
4579         abs addresses.
4581         * mini.h: Add missing bblock related prototypes.
4583         * mini.h (MonoCompile): Remove unused reverse_inst_list and
4584         reverse_inst_list_len fields.
4586         * mini.c: Refactor this file a bit by moving branch optimizations to 
4587         branch-opts.c.
4589         * method-to-ir.c: Merge generic sharing changes missed earlier.
4591         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
4593         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
4594         shared patches. Process METHODCONST as a shared patch.
4596         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
4597         as it crashes on the 2.0 mscorlib.
4599         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
4600         to cause crashes.
4601         
4602         * aot-compiler.c: Use is_plt_patch () in a few additional places.
4603         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
4604         by IMT.
4606         * aot-compiler.c: Reorganize the got handling code to be a bit more
4607         understandable.
4609 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
4611         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
4612         mono_patch_info_equals/hash, and use it to massively simplify
4613         get_plt_index ().
4615         * mini.c (mono_patch_info_hash): Simplify this and add support for
4616         more patch types.
4618         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
4620         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
4621         handling code, since an offset is not enough to identify a trampoline.
4623         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
4625 2008-08-17  Mark Probst  <mark.probst@gmail.com>
4627         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
4629         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
4631         * mini-ops.h: Argument and result types for OVF_CARRY ops.
4633         * decompose.c: PPC decompositions for various ops.
4635         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
4637 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
4639         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
4640         call the generic trampoline code using a call, instead of a jump, to
4641         remove some special casing from the generic trampoline code.
4643         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
4644         (mono_codegen): Ditto.
4646         * aot-compiler.c aot-runtime.c: Ditto.
4648         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
4650         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
4651         helper function to find the offset corresponding to a lazy fetch trampoline.
4653         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
4654         when doing generic sharing.
4656         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
4657         places.
4658         
4659         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
4660         mini-trampolines.c to be with the other trampoline creation functions.
4662         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
4663         as it is equal to method->signature in most cases, add a 
4664         mono_emit_method_call_full variant which takes a signature and an imt
4665         argument as well.
4667 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
4669         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
4670         to this function, since it could be computed easily from the method 
4671         argument.
4672         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
4673         more.
4675         * method-to-ir.c mini.c: Remove references to 
4676         compile_generic_method_wo_context.
4678         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
4679         generic method calls.
4680         
4681         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
4682         dimensional non-szarrays.
4684         * mini.c (mini_init): Register mono_array_new_1.
4686         * jit-icalls.c (mono_array_new_1): New jit icall.
4688         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
4689         pointing to the method.
4691         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
4692         method addresses belonging to METHOD_JUMP patches in the 
4693         jump_target_got_slot_hash.
4694         (mono_aot_load_method): Ditto.
4696         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
4697         METHOD_JUMP patches.
4699         * mini.c (mini_create_jit_domain_info): New helper function which 
4700         initializes/frees domain->runtime_info.
4701         (mini_free_jit_domain_info): Ditto.
4702         (mini_init): Install the domain hook functions with the runtime.
4704         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
4705         information maintained by the JIT.
4707         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
4708         insertion into jump_table_hash into mono_codegen (), also implement proper
4709         locking.
4711         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
4712         tail calls, it is already done by the aot code.
4713         
4714         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
4715         mechanism on amd64.
4717         * iltests.il.in: Make the jmp test a bit more complex.
4719         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
4720         generic instances which doesn't have a token.
4722         * aot-runtime.c (decode_method_ref): Ditto.
4723         
4724         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
4725         can handle this case now.
4726         (handle_box): Ditto.
4728 2008-08-15  Geoff Norton  <gnorton@novell.com>
4730         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
4731         debugging check.
4733 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
4735         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
4736         calling generic methods.
4738         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
4740         * aot-runtime.c (decode_patch_info): Ditto.
4742         * mini.c (mono_resolve_patch_target): Ditto.
4743         
4744         * patch-info.h: Add METHOD_RGCTX.
4746         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
4748 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
4750         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
4751         arguments in registers.
4753         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
4754         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
4756         * mini.c (mini_method_compile): Abort aot compilation for generic
4757         methods if generic sharing is disabled.
4758         
4759         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
4760         an mrgctx.
4762         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
4763         requiring an mrgctx.
4765         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
4766         store instructions when converting a vcall to a normal call.
4768         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
4769         mono_arch_find_jit_info.
4771 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
4773         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
4774         avoid calling mono_method_full_name () for every method even if the
4775         env var is not set.
4776         (check_inline_caller_method_name_limit): Ditto.
4778 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4780         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
4781         assemblies in one run.
4783         * aot-compiler.c (mono_compile_assembly): Only print out a count of
4784         skipped methods if it is not 0.
4786         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
4788 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4790         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
4791           MONO_ARCH_HAVE_UNWIND_TABLE.
4793         Contributed under MIT/X11 license.
4795 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4797         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
4798           from default optimizaton list on Winx64.
4800         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
4802         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
4803           the LMF from the MonoJitTlsData structure.
4805         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
4807         Contributed under MIT/X11 license.
4809 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4811         * mini.c (sigsegv_signal_handler): Fix the build.
4813         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
4814         assembly->aot_module.
4816         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
4817         hash table. This simplifies and speeds up a lot of code, and fixes support
4818         for .netmodules.
4820         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
4821         with the runtime.
4823         * mini-exceptions.c: Ditto.
4824         
4825         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
4826         'native_offset' argument, since these are computed in the 
4827         mono_find_jit_info () function.
4829         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
4830         is used by exceptions-ppc.c.
4832         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
4833         mono_arch_find_jit_info ().
4834         
4835         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
4836         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
4837         generic code in mini-exceptions.c.
4839 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
4841         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
4843         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
4844         
4845         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
4846         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
4847         called while holding the loader lock. Fixes #415608.
4848         (mono_aot_get_method_from_token_inner): Ditto.
4850 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4852         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
4853         to reduce differences between this and the generic implementation in
4854         mini-exceptions.c.
4855         (ves_icall_get_frame_info): Ditto.
4857         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
4859         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
4860         longer neccesarry.
4862         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
4863         mono_arch_get_call_filter () and make it non-static, for consistency with the
4864         other architectures.
4866 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
4868         * mini.c:
4869         * local-propagation.c:
4870         * mini-x86.c: Correct the name of arch defines.
4872 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4874         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
4875         NO_EMULATE_LONG_SHIFT_OPS define.
4877 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
4879         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
4880         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
4882         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
4883         MACH fixes. Merged from the 2.0 branch.
4885         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
4887         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
4888         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
4890         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
4892         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
4893         mono_marshal_get_native_wrapper () signature changes.
4895 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
4897         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
4898         conversion bug under arm.
4900 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
4902         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
4904         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
4905         with overflow checking.
4907 2008-08-05  Marek Habersack  <mhabersack@novell.com>
4909         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
4910         to the genmdesc.pl file
4912 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
4914         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
4915         arg_array in the soft-float versions of the LOAD/STORE macros.
4917         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
4918         implementation.
4920         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
4922 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4924         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
4925         a float HFA. Fixes #413621.
4927 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
4929         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
4930         frame_size to args_size. Fixes build.
4932 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4934         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
4935         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
4937         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
4938         the stack are not unaligned. Fixes #413247.
4939         
4940 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
4942         * mini.c: update jitted methods performance counters.
4944 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4946         * mini-exceptions.c: increase the exceptions thrown performance
4947         counter in mono_handle_exception ().
4949 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
4951         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
4952         can work with netmodules.
4954 2008-07-28  Geoff Norton  <gnorton@novell.com>
4956         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
4957         regression tests.
4959 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
4961         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
4962         correct place.
4964 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
4966         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4967           The float param registers and other param registers must be the 
4968           same index on Windows x64.
4970         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
4971           ArgValuetypeAddrInIReg argument case.  Setting the argument
4972           op to OP_VTARG_ADDR (OP_REGOFFSET)).
4974         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
4975           variable computed above as the copy length for arguments of storage
4976           type ArgValuetypeAddrInIReg.
4978         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
4979           ArgValuetypeAddrInIReg argument case.  This case will rely on
4980           mono_arch_emit_outarg_vt to emit the correct code later in the process.
4982         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
4983           a 32 byte stack allocation for all calls.  We will omit the adjustment for
4984           jump and tail call instructoins as they do not follow the typical call behavior.
4986         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
4987           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
4988           local variable and pass the local variable by reference to the called method.
4990         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
4991           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
4992           of a struct is passed in a register it must be saved with the other
4993           volatile argument on the stack.
4995         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
4996           frame pointer the stack adjustment value must be saved to the unwind 
4997           info structure.
4999         Contributed under MIT/X11 license.
5001 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
5003         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
5004         which got lost in the merge.
5006 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
5008         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
5009         build.
5011         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
5012         
5013         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
5014         icalls, since they won't be patched.
5016         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
5017         different code sequence when running under valgrind to prevent some valgrind
5018         errors.
5020         * iltests.il.in: Add new regression test.
5022         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
5023         end with a throw.
5025         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
5026         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
5028         * iltests.il.in: Add new test.
5030         * aot-compiler.c: Fix some warnings.
5032         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
5033         Fixes #412494.
5035 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
5037         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
5038         (mini_usage_jitdeveloper): Add a missing --wapi option.
5040 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
5042         * mini-codegen.c: Simplify the is_fp macros.
5043         (free_up_ireg): Remove, use free_up_reg instead.
5044         (free_up_reg): Fix the fp case.
5046 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
5048         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
5049         lowered earlier.
5051         * exceptions-x86.c: Merge some changes which seemed to have got lost
5052         in the linear-ir merge.
5054         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
5056         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
5057         long vreg volatile even if the variable was already created.
5059         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
5060         volatile variables.
5062 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
5064         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
5066         * mini.c (mono_jit_compile_method_inner): Add support for 
5067         MONO_EXCEPTION_BAD_IMAGE.
5069         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
5070         mini_method_get_context () returns NULL. Fixes #356531.
5072         * mini.c (mono_method_to_ir): Ditto.
5073         
5074         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
5075         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
5077 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
5079         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
5080         in the LDFTN implementation.
5082 2008-07-25  Mark Probst  <mark.probst@gmail.com>
5084         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
5085         code, patch calls to icalls, too, even if they're not in the
5086         shared generic code hash.  Fixes #411962.
5088 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
5090         * cpu-x86.md: Increase the length of the fcall opcodes.
5092         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
5093         calls returning floats.
5095         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
5096         on NEWARR.
5097         
5098         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
5099         missed earlier.
5101         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
5102         into the domain->method_code_hash.
5104         * aot-compiler.c: Fix win32 build.
5106         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
5107         
5108         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
5109         gshared NEWARR implementation.
5111         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
5113         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
5114         can be used outside of method_to_ir.
5116         * mini.h (MonoCompile): Add arg_types field.
5118         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
5119         
5120         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
5121         the values of the local arg_array and param_types array.
5123 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
5125         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
5126         got accesses might only get generated later when NEWOBJ is decomposed.
5127         
5128         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
5129         looking up the native code of the target method when a delegate is called
5130         for the first time.
5132         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
5133         optimization.
5135         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
5137         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
5138         AOT work on platforms without a working dlsym implementation.
5140         * mini.h: Bump AOT image format version.
5141         
5142 2008-07-24  Mark Probst  <mark.probst@gmail.com>
5144         * mini-exceptions.c: Free a MonoType with
5145         mono_metadata_free_type() instead of g_free().
5147         * aot-runtime.c: Free a MonoType.
5149 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
5151         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
5152         optimization.
5154         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
5155         fp stack on x86.
5157 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
5158         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
5159         profiler hook.
5161 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
5163         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
5164         NEWOBJ calls on valuetypes.
5166         * iltests.il.in: Add new test.
5168         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
5170 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
5172         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
5173         is no longer needed.
5175         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
5176         non register sized integer arguments.
5177         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
5178         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
5179         emit_memcpy2 ().
5181         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
5182         CEE_MONO_RETOBJ.
5183         
5184         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
5185         two a binop with different sized arguments is emitted.
5187         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
5188         instruction in the ins==NULL case.
5190 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
5192         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
5194         * mini-x86.c: Fix osx build.
5196         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
5197         opcodes as well.
5199         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
5200         instruction for non int sized variables.
5202         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
5203         implementation.
5205 2008-07-23  Robert Jordan  <robertj@gmx.net>
5207         * method-to-ir.c: Fix MSVC build.
5209 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
5211         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
5212         a non int sized type, widen it to an int since newer versions of gcc seem to
5213         generate code which needs this.
5215         * ssa2.c abcremoval2.c: Fix warnings.
5217         * *: Merge the Linear IR branch.
5219         The original branch is at trunk/branches/vargaz/mini-linear-il, and
5220         the ChangeLog file there describes all the changes done over the years. 
5221         Further documentation can be found at www.mono-project.com/Linear_IL.
5223 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
5225         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
5226           The float param registers and other param registers must be the 
5227           same index on Windows x64.
5229         Contributed under MIT/X11 license.
5231 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
5233         * mini.c: Make the previous fix GC safe.
5235 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
5237         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
5239 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
5241         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
5242           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
5243           ArgValuetypeAddrInIReg instead.
5245         Contributed under MIT/X11 license.
5247 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
5249         * mini-codegen.c (get_register_spilling): Fix a warning.
5251 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
5253         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
5254         for types which the initialization fails. Raises the provided exception
5255         at the right stop after cleanup.
5257 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
5259         * aot-compiler.c: Free most of the memory allocated during compilation.
5261         * mini.c (mini_parse_debug_options): Fix a leak.
5262         
5263         * mini.c (mini_method_compile): Don't add the method to the jit info tables
5264         during aot compilation.
5266 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
5268         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
5269         it has too much register pressure.
5271 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
5273         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
5275 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
5277         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
5278         on x86.
5280         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
5281         on amd64 similar to the way it is done on arm.
5283         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5285         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
5286         consistency, normalize error messages, avoid loading aot-only modules in
5287         normal mode.
5289         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
5290         for consistency.
5292         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
5294 2008-07-11  Martin Baulig  <martin@ximian.com>
5296         * debug-debugger.h
5297         (MonoDebuggerInfo): Add `interruption_request'.
5299 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
5301         * aot-compiler.c (emit_plt): Remove some dead code.
5303         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
5305         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
5306         return the plt info offset belonging to a given plt entry.
5308         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
5309         mono_aot_get_plt_info_offset.
5310         
5311         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
5312         similar to the amd64 code by makeing jumps through a separate jump table 
5313         instead of embedding the jump addresses into the code.
5315 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
5317         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
5318         method.
5320 2008-07-10  Martin Baulig  <martin@ximian.com>
5322         * mini.c (mini_method_compile): Disable generics sharing when
5323         running in the debugger.
5325 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
5327         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
5329         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
5330         the local register allocator from running out of registers on x86 when 
5331         using aot.
5333 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
5335         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
5336         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
5337         C4146.
5339         Contributed under MIT/X11 license.
5341 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
5343         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
5344         speed up the assembler.
5346 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
5348         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
5349         support.
5351         * mini.c: Move the soft float handling macros a bit earlier, add 
5352         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
5353         place.
5355         * mini.h: Add prototype for mono_arch_fixup_jinfo.
5357         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
5358         read-only to help catch code allocation requests.
5359         
5360         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
5361         and turn it off when using --aot-only or when compiling with --aot=full.
5363         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
5364         jump table for switches from the normal domain mempool, not the code
5365         manager.
5367         * mini-trampolines.c (get_unbox_trampoline): New function to return an
5368         unbox trampoline which handles aot-only mode too.
5370         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
5371         an AOTed unbox trampoline.
5373         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
5375 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
5377         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
5378         ""
5380         Contributed under MIT/X11 license.
5382 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
5384         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
5385           the unwind information for the method at the end of the allocated block.
5386           
5387         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
5388           MonoCompileArch to hold the unwind info for SEH on Winx64
5389         
5390         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
5391           frame pointer info for the method being compiled.
5392           
5393         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
5394           the call to mono_exception_from_token.
5395           
5396         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
5397           storing the method prolog information in a format that the Winx64 SEH can understand.  This
5398           information is stored a the end of the method block because it is all 32-bit offset based.
5400         Contributed under MIT/X11 license.
5402 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
5404         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
5406         * wapihandles.c: Fix warnings.
5408         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
5409         mode.
5411         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
5412         mono_jit_compile_method in aot-only mode since that calls the type 
5413         initializer.
5414         
5415         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
5416         get_delegate_invoke_impl in aot-only mode.
5418         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
5420 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
5422         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
5424         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
5425         is on by default.
5427         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
5429         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
5430         init trampoline from the AOT file as well.
5432         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
5433         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
5434         code.
5436         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
5437         mono_init.
5439         * exceptions-amd64.c: Add _full variants for the remaining exception code
5440         creation functions as well, allow emission of relocatable code, remove
5441         caching since that is now done by the caller.
5443         * mini-exceptions.c: Add _full variants for the remaining exception code
5444         creation functions as well, add aot-only support.
5446         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
5447         if we can determine a proper token for them.
5448         (add_wrappers): Add a few more wrappers.
5449         (emit_method_code): Remove some dead code.
5450         (emit_trampolines): Emit exception code too.
5452         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
5454         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
5455         mono_array_new_va which avoids varargs.
5457         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
5459         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
5460         mono_arch_create_specific_trampoline () in all places.
5462         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
5463         a bit so it can be used for other things as well.
5464         
5465         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
5466         on demand as well.
5468         * exceptions-amd64.c: Rename the caching from the exception code creation
5469         functions, it is done by the caller instead.
5470         
5471         * exceptions-amd64.c: Change the signature of the exception code creation 
5472         functions to allow the creation of relocatable code later.
5474         * mini-exceptions.c: Add a set of functions to query the various 
5475         runtime-generated exception functions.
5477         * mini.c mini-exceptions.c: Use the newly added functions instead of the
5478         mono_arch_.. () functions.
5479         
5480 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
5482         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
5484         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
5486         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
5487         (mini_get_vtable_trampoline): Ditto.
5489         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
5490         code in the AOT case by returning the code size and a list of relocations to
5491         the caller.
5493         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
5495 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
5497         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
5498           clean the stack.
5500         Contributed under MIT/X11 license.
5502 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
5504         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
5505         so the buffer size can be computed correctly. Fixes #404735.
5507         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
5508         normally as cfg->debug_info is already freed.
5510 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
5512         * mini-amd64.c: For calls returning vtypes in registers, don't store
5513         the return address on the stack, instead allocate a separate local for
5514         it. Fixes #404729.
5516 2008-07-05  Mark Probst  <mark.probst@gmail.com>
5518         * mini-trampolines.c, mini.h: Add an argument to
5519         mono_create_jit_trampoline_in_domain() for turning off the adding
5520         of the sync wrapper.
5522         * mini.c: Use the JIT trampoline without sync instead of
5523         ldftn_nosync in static RGCTX invoke wrappers so that the call can
5524         be patched.
5526 2008-07-04  Mark Probst  <mark.probst@gmail.com>
5528         * driver.c: Turn on GSHARED optimization by default.
5530 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
5532         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
5533         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
5535         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
5536         create a variant of the generic trampoline code callable from AOTed trampolines.
5538         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
5539         trampoline code callable from AOTed trampolines.
5541         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
5543 2008-07-04  Mark Probst  <mark.probst@gmail.com>
5545         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
5546         pass-through manner.
5548         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
5549         and don't fail sharing for them anymore.
5551         * mini-exceptions.c: Handle exceptions in shared generic methods.
5553         * generic-sharing.c: When checking the context of a generic
5554         method, also check its class's context.  Don't treat wrappers as
5555         sharable.
5557         * mini-trampolines.c: Some code factored out to
5558         metadata/generic-sharing.c.  Handle the MRGCTX case.
5560         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
5561         we must deal with the method being of another instantiation of the
5562         class.  Add static rgctx invoke wrappers to generic methods.
5564 2008-07-04  Mark Probst  <mark.probst@gmail.com>
5566         * mini.c: Provide all jit infos of generic shared methods with a
5567         generic jit info.
5569         * mini-exceptions.c: Handle the new situation that a generic info
5570         might be available, but not info about the this/vtable/mrgctx
5571         variable.
5573 2008-07-03  Mark Probst  <mark.probst@gmail.com>
5575         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
5576         generic methods.
5578 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
5580         * dominators.c (check_dominance_frontier): Fix a warning.
5582         * mini.h: Add some missing prototypes.
5584         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
5586         * driver.c (mono_jit_init_version): Correct the comments since the first
5587         argument should be the name of the root domain, not a filename.
5589         * aot-runtime.c (make_writable): Error out if this is called while running
5590         with --aot-only.
5591         (load_aot_module): Ditto.
5593         * aot-compiler.c: Really fix the computation of method indexes.
5595         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
5596         optimizations as this is no longer called frequently.
5598         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
5599         method and the invoke impl code and pass it to the delegate trampoline instead of
5600         just the delegate class.
5602 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
5604         * aot-compiler.c: Fixup the computation of method indexes.
5605         (add_wrappers): Create the base methods of the runtime invoke wrappers using
5606         the method builder infrastructure.
5608         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
5609         has no header.
5611         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
5612         mode, load the method right away instead of creating a trampoline.
5614         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
5616         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
5617         some checks a bit.
5619 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
5621         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
5622         (mono_aot_load_method): Use method_index instead of method->token.
5624         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
5625         can handle icalls etc. properly.
5627         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5629         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
5631         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
5632         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
5633         JIT_ICALL_ADDR patch type.
5635         * patch-info.h: Add JIT_ICALL_ADDR patch type.
5637         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
5638         request flag.
5639         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
5641         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
5643 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
5645         * mini.c: Use domain->jit_code_hash_lock for controlling access to
5646         domain->jit_code_hash.
5648 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
5650         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
5652 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
5654         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
5655         get_this_arg_from_call, let it compute it when needed.
5657         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
5658         gsctx from code only when needed.
5660         * mini-trampolines.c (get_generic_context): Rename this to 
5661         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
5662         it can be called by the arch backends.
5664         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
5666 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
5668         * driver.c (mono_main): Add experimental --aot-only command line option.
5670         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
5671         set.
5673 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
5675         * driver.c (DllMain): Remove mono_module_handle.
5677         Contributed under MIT/X11 license.
5679 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
5681         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
5682         for emitting methods which are not in the source assembly. Detect and report
5683         failure of assembling+linking.
5684         
5685         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
5687         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
5689 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
5691         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
5693 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
5695         * mini.h: Remove some obsolete prototypes.
5697         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
5699 2008-06-24  Mark Probst  <mark.probst@gmail.com>
5701         * mini.c (get_object_generic_inst): Variable-sized arrays are not
5702         supported by Visual Studio, so use alloca().
5704 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
5706         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
5707         Fixes #402585.
5709 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5711         * mini.c: Fail sharing of a generic method if it contains an open
5712         catch clause (because we don't pass MRGCTXs yet).
5714 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5716         * mini.c: When compiling a method with generic sharing, insert the
5717         method instantiated with an all-Object generic context into the
5718         jit info table, instead of the context of the first instantiation
5719         of the method we happen to compile.
5721 2008-06-18  Martin Baulig  <martin@ximian.com>
5723         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
5724         `major_version' and `minor_version'.
5726 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5728         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
5729         mono_method_is_generic_sharable_impl() takes an additional
5730         argument specifying whether to treat type variables as reference
5731         types.
5733 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5735         * mini.h: Removed obsolete prototypes.
5737 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5739         * mini.c: Don't fail generic sharing for initobj and sizeof - we
5740         already handle them.
5742 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5744         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
5745         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
5746         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
5747         tramp-x86.c: Added a MonoGenericContext* argument to
5748         mono_arch_get_unbox_trampoline() so that it can call other
5749         functions which require it.
5751 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5753         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
5754         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
5755         mono_arch_get_this_arg_from_call() takes a
5756         MonoGenericSharingContext* as well.
5758 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5760         * mini.c: Factor out code for emitting unbox into emit_unbox() and
5761         implement generic sharing of unbox.
5763 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5765         * mini.c: Don't compute the vtable to determine whether a field is
5766         special static, because it might not work for open types.
5768 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5770         * mini.c: Removed the unused token_type and token_source arguments
5771         from get_runtime_generic_context_ptr().
5773 2008-06-17  Marek Habersack  <mhabersack@novell.com>
5775         * mini.c (ADD_BINOP): fix the build
5777 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
5779         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
5780         a widening op.
5782 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5784         * mini.h: Removed class relations enum that's not used anymore.
5786 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5788         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
5790         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
5791         the lazy fetch trampoline access code.
5793 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
5795         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
5797 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
5799         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
5801         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
5803         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
5805 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5807         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
5808         intrinsics.
5810         * mini-ops.h: Add MIN/MAX_UN opcodes.
5812         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
5813         intrinsics.
5815         * basic-math.cs: Add more min/max tests.
5817         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5819 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5821         * mini.c: Small fix in the prologue of emit_castclass.
5823 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5825         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5827         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
5828         do not work even for unsigned types. Fixes #400014.
5830         * basic-math.cs: Add regression tests for unsigned Min/Max.
5832 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5834         * mini.c: Added additional context_used argument to several
5835         functions, which will be needed for sharing generic methods.  Use
5836         GET_RGCTX macro wherever appropriate.  Declare only one
5837         context_used in mono_method_to_ir().
5839 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5841         * mini.c, generic-sharing.c: Removed generic class relations.
5843         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
5844         functions due to MRGCTX changes.
5846 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5848         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
5849         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
5850         with calculated IMT.
5852         * mini.c: Generic sharing of calls via generic interfaces.
5854         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
5855         generic method with non-constant MonoGenericContext*.  Instead,
5856         the context is taken out of the method itself.
5858 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5860         * mini.c: Generic sharing of ldvirtftn.
5862 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5864         * mini.c: Generic sharing of ldftn.
5866 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5868         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
5870 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5872         * mini.c: Generic sharing of the special case of ldtoken followed
5873         by a call to GetTypeFromHandle.
5875 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5877         * mini.c: Generic sharing of box for nullable types.
5879 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5881         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
5882         are passed on the stack. Fixes #324807.
5884 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
5886         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
5887         for the ArgValuetypeAddrInIReg case.
5889         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
5890         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
5892         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
5893         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
5894         local variable and pass the local variable by reference to the called method.
5895           
5896         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
5897         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
5899         Contributed under MIT/X11 license.
5901 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
5903         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
5905         * debug-mini.c (mono_debug_print_vars): Release memory after printing
5906         everything.
5908 2008-06-10  Martin Baulig  <martin@ximian.com>
5910         * debug-mini.c
5911         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
5913 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
5915         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
5916         possible error when no arguments are passed.
5918         Contributed under MIT/X11 license.
5920 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
5922         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
5923         where the file name is NULL.
5925 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
5927         * mini.c: Fix s390 build.
5929 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
5931         * trace.c (mono_trace_parse_options): Fix warnings.
5933         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
5935 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
5937         * mini.c (remove_block_if_useless): Avoid printing the method name.
5938         
5939         * mini.c: Remove needless setting of ins->cil_code which is now done by 
5940         MONO_INST_NEW.
5942         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
5943         LMF. Not yet used.
5945         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
5946         translated code after it has been patched.
5948 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
5950         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
5951         avoid problems during code patching on SMP systems.
5952         (emit_call): Avoid adding a patch info which is already added by 
5953         emit_call_body.
5954         (mono_arch_emit_exceptions): Ditto.
5956 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
5958         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
5959         MONO_TYPE_ISSTRUCT already checks for it.
5961 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
5963         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
5964           structs with floats on Winx64 the float registers are not used.  
5965           The integer registers are always used..
5966         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
5967           only one register will be used and only if the size of the struct 
5968           is 1,2,4, or 8 bytes.
5970         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
5971           to work for Winx64.
5973         Contributed under MIT/X11 license.
5975 2008-06-05  Martin Baulig  <martin@ximian.com>
5977         * debug-debugger.c (debugger_lookup_class): Also call
5978         mono_class_setup_methods() here; we're only called from RTI.
5980 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
5982         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
5983         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
5984         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
5985         Post-process object files and add dtrace-generated object, if necessary.
5987         Contributed under MIT/X11 license.
5989 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5991         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
5992         element class.
5994         * mini.c: Generic sharing for unbox.any and castclass.
5996 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5998         * mini.c: Ignore tailcall prefix in shared generic code and when
5999         doing calls which require a vtable/rgctx argument.
6001 2008-06-04  Mark Probst  <mark.probst@gmail.com>
6003         * mini.c: Don't free the JIT info.
6005         * driver.c: Changes in the JIT info table testing code.
6007 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
6009         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
6010         interruption. Fix some warnings.
6012         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
6013         interruption_checkpoint.
6015 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
6017         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
6018         from embedding applications.
6020 2008-06-02  William Holmes  <billholmes54@gmail.com>
6022         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
6023           reserving 32 bytes on the stack when making calls. 
6025         Contributed under MIT/X11 license.
6027 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
6029         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
6030         the linear IL branch.
6032         * driver.c: Print out more information for --version on arm.
6034 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
6036         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
6037         bb_exit instead, since out of line bblocks might not actually be emitted
6038         out-of-line.
6039         
6040         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
6041         maximum epilog size for out of line bblocks if tracing is enabled.
6043         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
6045 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
6047         * arrays.cs: Regression tests for allocating arrays with negative sizes.
6049 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
6051         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
6052         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
6053         opcodes.
6055 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
6057         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
6058         the 'value' to store is a constant.
6060         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
6062         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
6063         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
6065 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
6067         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
6068         for accessing method->generic_container.
6070 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
6072         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
6073         
6074         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
6076         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
6078         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
6079         fails.
6081 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
6083         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
6085         * mini.c: Handle the case when mono_class_vtable () fails.
6087 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
6088         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
6089         the stat profiler.
6091 2008-05-22  Mark Probst  <mark.probst@gmail.com>
6093         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
6094         together with domain sharing.
6096 2008-05-22  Mark Probst  <mark.probst@gmail.com>
6098         * mini.c: Treat callvirts to final methods like non-virtual calls
6099         when doing generic sharing, i.e. look them up in the runtime
6100         generic context.
6102 2008-05-22  Mark Probst  <mark.probst@gmail.com>
6104         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
6105         with computed types (for generic sharing).
6107         * mini.c: Generic sharing for mkrefany and refanyval.
6109 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
6111         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
6112         possible.
6114         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
6115         the generic sharing code.
6116         
6117         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
6118         when needed.
6120 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
6122         * mini.h: Remove the declaration of mono_aot_init_vtable ().
6124 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
6126         * driver.c: updated copyright date
6128 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
6130         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
6131         needed.
6133 2008-05-19  Martin Baulig  <martin@ximian.com>
6135         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
6136         pointing to the new `_mono_debug_using_mono_debugger' variable.
6138         * driver.c
6139         (mono_main): Check mono_debug_using_mono_debugger() rather than
6140         the `MONO_INSIDE_MDB' environment variable to check whether we're
6141         inside the debugger.
6143 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
6145         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
6146         argument.
6148 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
6150         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
6152         * mini.c: Added mini_assembly_can_skip_verification. This
6153         function checks if the assembly requested to skip verification. 
6154         Fixes part of #387274.
6156 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
6158         * mini.c (mini_get_method): Disable the check for open generic classes when
6159         using generic sharing.
6161         * generics.cs: Add a test for #387034.
6163         * mini.c (mini_get_method): Check whenever the method class is an open generic
6164         type, and return NULL in that case, causing a verification error. Fixes
6165         #384123.
6167 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
6169         * driver.c (mono_main): Revert r102623. The right
6170         thing to do is to enable the verifier under verifiable
6171         unless a --security flag was passed.
6173         We need this non-trivial behavior for --verify-all otherwise
6174         mcs-compileall won't be able to use it. As it needs everything to
6175         be verified under validil.
6177 2008-05-06  Martin Baulig  <martin@ximian.com>
6179         Fix #383749.
6181         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
6182         (mono_debugger_thread_cleanup): Likewise.
6183         (mono_debugger_extended_notification): Likewise.
6185 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
6187         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
6188         against both inflated and non-inflated methods. We need to check against the
6189         generic definition for cases where the instantiated method is not visible.
6190         We need to check against the inflated types for cases where the instantiation
6191         changes any super type. This fixes #382986.
6193         Note that this doesn't need to be applied to other parts of mono_method_to_ir
6194         that check for visibiliy as generic params only appears as the type subject
6195         of tokens on call opcodes. Field manipulation and ldftn must always
6196         target an exact type.
6198 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
6200         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
6201         if no related --security flag is passed.
6203 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
6205         * mini-arch.h: Prepare support for ppc64.
6207         Contributed under MIT/X11 license.
6209 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
6211         * aot-runtime.c: Prepare support for ppc64.
6213         Contributed under MIT/X11 license.
6215 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
6217         * mini-ops.h: Prepare support for ppc64.
6219         Contributed under MIT/X11 license.
6221 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
6223         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
6225         Contributed under MIT/X11 license.
6227 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
6229         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
6230         assemblies, since aot_name is not a full path, causing us to load MS.NET 
6231         assemblies on windows.
6233 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
6235         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
6236         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
6237         * main.c: Use UTF-8 encoded command line instead of Windows default code
6238         page on Windows to support Unicode.
6239         * driver.c (DllMain): New function for mixed-mode assembly support.
6240         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
6241         export __stdcall functions without decoration.
6243         Contributed under MIT/X11 license.
6245 2008-04-28  Mark Probst  <mark.probst@gmail.com>
6247         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
6248         saving it very early.
6250 2008-04-28  Mark Probst  <mark.probst@gmail.com>
6252         * mini.h, mini.c: Lots of code for accessing the old RGCTX
6253         deleted.  The only way to access the new RGCTX is via the
6254         trampline.
6256         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
6257         vtable instead of the RGCTX to static methods.
6259         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
6260         accessing the new RGCTX.
6262         * generic-sharing.c: There is no separation between self, type
6263         arguments and other types in the RGCTX anymore.
6265 2008-04-25  Jonathan Chambers <joncham@gmail.com>
6267         * mini-amd64.c (add_general): Remove previous stack adjustment.
6268         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
6269         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
6270         for 32 bytes of stack space reserved for all calls.
6271         
6272         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
6273         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
6274         adjustment.
6275         
6276         Code contributed under MIT/X11 license.
6278 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
6280         * mini.c (mini_method_verify): Only verify non-inflated methods, check
6281         against the root definition, peeling out method and type instantiations.
6282         Cache verify success results, code that fails verification is still
6283         checked multiple times.
6285 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
6287         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
6289 2008-04-23  Jonathan Chambers <joncham@gmail.com>
6291         * mini-amd64.c (add_general): Always increment stack on Win64.
6292         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
6293         on Win64.
6294         
6295         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
6296         stack based argument handling on Win64.
6297         
6298         Code contributed under MIT/X11 license.
6300 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
6302         * Makefile.am (version.h): Add support for git-svn.
6304 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
6306         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
6307         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
6308         avoiding allocations and libc functions which might deadlock.
6309         
6310         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
6311         'no-gdb-backtrace' option is set.
6313         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
6315         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
6317 2008-04-21  Martin Baulig  <martin@ximian.com>
6319         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
6320         and `get_lmf_addr'; `notification_address' is no longer a pointer.
6322 2008-04-21  Martin Baulig  <martin@ximian.com>
6324         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
6325         `thread_vtable', `event_handler_ptr' and `event_handler'.
6327 2008-04-21  Martin Baulig  <martin@ximian.com>
6329         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
6330         allows delayed initialization of the `executable_code_buffer' when
6331         attaching.
6333 2008-04-21  Martin Baulig  <martin@ximian.com>
6335         * mini.h (mono_debugger_create_notification_function): Removed.
6336         * tramp-*.c (mono_debugger_create_notification_function): Removed.
6338         * mdb-debug-info64.s
6339         (MONO_DEBUGGER__notification_function): Added this in the .text section.
6341         * mdb-debug-info32.s
6342         (MONO_DEBUGGER__notification_function): Added this in the .text section.
6344         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
6345         currently only works on x86 and x86_64, so don't create it on ppc.
6347 2008-04-21  Martin Baulig  <martin@ximian.com>
6349         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
6351         * mini.c
6352         (mini_method_compile): In the fp elimination check, check
6353         `debug_options.mdb_optimizations' in addition to
6354         mono_debug_using_mono_debugger().       
6356         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
6357         disable some JIT optimizations which are only disabled when
6358         running inside the debugger.
6359         Added `--help-debug' option to describe the debugging options.
6360         (parse_debug_options): New static function to parse the `--debug'
6361         options, so we can easily add more stuff in future.
6363 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
6365         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
6366         the method has no body.
6368 2008-04-19  Jonathan Chambers <joncham@gmail.com>
6370         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
6371         assembly is not allowed in MSVC 64-bit compiler. 
6372         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
6373         as we get floating point exceptions everywhere.
6374         
6375         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
6376         correctly align arguments for call to throw_exception.
6377         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
6378         
6379         Code contributed under MIT/X11 license.
6381 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
6383         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
6385 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
6387         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
6389         * mini-amd64.c (NEW_INS): Set cil_code.
6391         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
6392         from mini-amd64.c so all debugger related logic is in one place.
6394         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
6395         later won't have a random ip assigned to them.
6397 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
6399         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
6400         the arch specific function initializes code_size.
6401         (mono_create_delegate_trampoline): Ditto.
6403         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
6404         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
6405         platforms.
6407         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
6408         running under the debugger.
6410         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
6411         debugger.
6413         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
6414         debugger. Also move the disabling of optimizations here from driver.c.
6415         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
6416         debugger.
6418         * mini.h (MonoCompile): Add a few new flags.
6420 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
6422         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
6423         so the cil_code field of created MonoInst's is properly set.
6424         (mini_select_instructions): Ditto.
6426         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
6427         (MONO_INST_NEW_CALL): Ditto.
6429         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
6430         in many places so the ins->cil_code field is properly initialized.
6432         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
6433         place.
6435 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
6437         * mini.c (mini_method_compile): Print a different message when compiling a 
6438         shared method.
6439         
6440         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
6441         > 1.
6443 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
6445         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
6446         SSE2 instructions.
6448         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
6449         
6450 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
6452         * mini.c (handle_stack_args): Make this return void since its return value was
6453         never used. Also set cfg->unverifiable for invalid IL instead of calling
6454         G_BREAKPOINT ().
6456 2008-04-10  Mark Probst  <mark.probst@gmail.com>
6458         * mini.c: Make sure "this" is live in catch clauses with type
6459         variables in shared generic code.
6461 2008-04-08  Mark Probst  <mark.probst@gmail.com>
6463         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
6464         generic_class_is_reference_type() to ensure the proper behaviour
6465         when sharing generic code and the type in question is a type
6466         argument.
6468 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
6470         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
6471         race conditions when printing thread dumps. Fixes #377738.
6473 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
6474         
6475         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
6476         shows up when both MonoInst arguments can cause aliasig.
6477         There is likely no way in the current JIT to trigger this problem, but
6478         it showed up in the development of generics sharing, when in a new
6479         opcode both args of an OP_GROUP can be aliases (addresses of a local).
6480         When the generics sharing code will be committed, its tests will be
6481         valid also for this bug.
6483 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
6485         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
6486         PATCH_INFO_METHOD.
6488         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
6489         NULL.
6491 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
6493         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
6494         use a more detailed exception message for InvalidCastException.
6496         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
6498         * driver.c (mono_main): Add --debug=casts option to turn on better 
6499         InvalidCastException message details.
6501         * mini.c (mini_get_debug_options): New helper function to return the address of
6502         the debug_options variable.
6504         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
6505         the jit_tls TLS variable.
6507         * mini.c (mono_jit_tls): New TLS variable.
6509         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
6510         option is used.
6512 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
6514         * mini.h: Removed verifer related stuff. This code was moved to verify.c
6516         * mini.c: Removed verifer related stuff, code moved to verify.c.
6518         * driver.c: Using code from verify.c instead of mini.c.
6520 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
6522         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
6523         longer valid.
6525 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
6527         * mini.c (check_for_method_verify): Enabling verification of
6528         corlib if mono_verify_all is set. Bugs in the verifier preventing that
6529         have been fixed.
6531 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
6533         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
6534         caller saved registers as well.
6535         
6536         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
6537         saved registers as well.
6539 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
6541         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
6543         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
6544         code.
6546 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
6548         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
6549         to get_call_info.
6550         (get_call_info): Take a gsctx argument instead of 'cfg'.
6552 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
6554         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
6555         mono_verify_all is set.
6557         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
6559         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
6561 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
6563         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
6564         an exception.
6566         * driver.c mini.c mini.h: Add a --verify-all development option to test the
6567         verifier and the code generated by the compiler.
6569 2008-03-25  Mark Probst  <mark.probst@gmail.com>
6571         * mini.c: Generic sharing of the non-nullable case of the box
6572         instruction.
6574 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
6576         * inssel.brg: Fix the build.
6578         * iltests.il.in: Add a test for lconv.ovf.u8.un.
6580 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
6582         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
6583         Array:Address. Fixes #372410.
6585         * iltests.il.in: New tests for readonly prefix.
6587 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
6589         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
6590         mini-trampolines.c.
6592         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
6593         mini-exceptions.c.
6595         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
6596         
6597         * mini.c (mono_decompose_op_imm): New helper function.
6599         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
6600         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6601         return value.
6603         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
6604         mono_arch_output_basic_block. Fix warnings.
6606         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
6607         for now.
6609 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
6611         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
6612         since the extra frame is now detected automatically inside the loop.
6614         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
6615         opts which are now in mono_peephole_ins ().
6616         
6617         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
6619         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
6620         frames and skip duplicate managed-to-native frames. Fixes #367665.
6622         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
6623         opts which are now in mono_peephole_ins ().
6624         (mono_arch_peephole_pass_2): Ditto.
6626         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
6628         * mini-codegen.c (mono_peephole_ins): New helper function containing the
6629         arch independent peephole optimizations.
6631         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
6632         opts which are now in mono_peephole_ins ().
6634         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
6635         
6636         * mini-s390.c (mono_arch_output_basic_block): Fix build.
6638         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
6639         pattern.
6641         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
6642         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
6643         opcode. 
6645 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
6647         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
6648         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6649         return value.
6651         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
6652         mono_arch_output_basic_block. Fix warnings.
6654 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6656         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6657         conv.ovf.u.un.
6659 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6661         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6662         conv.ovf.u.un.
6664         * iltests.il: Add new tests.
6666 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
6668         * mini.c: Removed Windows version macros.
6670 2008-03-20  Mark Probst  <mark.probst@gmail.com>
6672         * generic-sharing.c: Put reflection types in the extensible part
6673         of the runtime generic context.
6675         * mini.c: Generic sharing of the GetTypeHandle special case of the
6676         ldtoken instruction.
6678 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6680         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
6682         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
6683         
6684         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
6685         consistency with the other version on the linear IR branch.
6687         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
6689         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
6691         * iltests.il.in: Add new tests.
6693 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
6695         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
6697         * iltests.il.in: Add new tests.
6699 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6701         * mini.c: Two variables with the same name were declared in
6702         nesting contexts and one wasn't initialized.  Fixed.
6704 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6706         * mini.c: Generic sharing of the initobj instruction.
6708 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6710         * mini.c: make the test to optimize ldtoken from typeof() more
6711         precise.
6713 2008-03-18  Mark Probst  <mark.probst@gmail.com>
6715         * mini.c: Generic sharing of the initobj instruction for reference
6716         types.
6718 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
6720         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
6721         the mono_breakpoint_clean_code() code to perform bound checks.
6723 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
6725         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
6726         mono_arch_patch_callsite() to include the start of the managed method
6727         to be able to perform bound checks.
6729 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6731         * mini.c: Generic sharing for the isinst instruction.
6733 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6735         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6736         inssel-long32-mips.brg: Added opcodes for doing indirect calls
6737         with the runtime generic context argument.
6739         * mini.c: Share calls to several types of unsharable methods by
6740         putting the address of the method code in the runtime generic
6741         context and doing an indirect call.
6743         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6744         to switches.
6746 2008-03-16  Mark Probst  <mark.probst@gmail.com>
6748         * generic-sharing.c: Change due to a change in the runtime genric
6749         context API.
6751 2008-03-15  Martin Baulig  <martin@ximian.com>
6753         * tramp-x86.c
6754         (mono_arch_nullify_class_init_trampoline): Add call to
6755         mono_breakpoint_clean_code() to make things work when running
6756         inside the debugger.
6758         * tramp-amd64.c
6759         (mono_arch_nullify_class_init_trampoline): Add call to
6760         mono_breakpoint_clean_code() to make things work when running
6761         inside the debugger.
6763 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6765         * inssel-long.brg (reg): Fix 64 bit build.
6767 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6769         * mini.c, mini.h: Share static generic code by passing it an
6770         implicit argument pointing to the runtime generic context.
6772         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6773         inssel-long32-mips.brg: New opcodes for calling shared static,
6774         which need to be passed the runtime generic context.
6776         * mini-amd64.c, mini-x86.c: Save the runtime generic context
6777         argument on the stack in the prologue if needed.  New function for
6778         finding the runtime generic context argument from the registers
6779         saved by the trampoline.
6781         * mini-amd64.h, mini-x86.h: Specify which register to use for the
6782         runtime generic context argument.
6784         * tramp-amd64.c: Also restore the register used for the runtime
6785         generic context argument.
6787         * mini-trampoline.c: Resolve shared static calls by consulting the
6788         runtime generic context via the new argument.
6790         * generic-sharing.c: Add an argument to sharability-checking
6791         functions that specifies whether type variables should be treated
6792         as sharable type arguments.
6794         * inssel-x86.brg: Removed a superfluous, buggy rule.
6796         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6797         to switches.
6799 2008-03-14  Martin Baulig  <martin@ximian.com>
6801         * debug-debugger.c (main_thread_handler): Call
6802         mono_runtime_run_main() without sending any notifications.
6804         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
6806 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6808         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
6810 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6812         * tramp-x86.c: Fixed register restore offsets in the trampoline
6813         code for ECX and EDX.
6815 2008-03-12  Geoff Norton  <gnorton@novell.com>
6817         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
6818         different ucontext_t implementations.
6819         * exceptions-arm.c: Use the above defines to get exceptions working on 
6820         iPhone (based on a patch by Luke Howard lukeh@padl.com)
6821         * mini-arm.c: Implement iPhone icache support (based on a patch by
6822         Luke Howard lukeh@padl.com)
6824 2008-03-12  Mark Probst  <mark.probst@gmail.com>
6826         * mini.c: Enable generic sharing of calls to non-static
6827         non-interface non-generic non-value-type methods.
6829         * mini-trampolines.c: Resolve calls from shared generic code.
6831 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
6833         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
6835         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
6837 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
6839         * mini.c: some fixes for the AOT compiler.
6841 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6843         * cpu-amd64.md: Add clob:1 to some float opcodes.
6845 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
6847         * mini.h: Added MiniVerifierMode enumeration.
6849         * mini.c: Added mini_verifier_set_mode to control
6850         the usage of the new verifier.
6852         * mini.c (mono_method): Integrated the new verifier.
6854         * driver.c: Extended --security option with validil and
6855         verifiable options to activate the new verifier.
6857 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6859         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
6860         optimization to ctors taking 0 or 2 arguments too.
6862         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
6863         a bit.
6865         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
6867         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
6869 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
6871         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
6872         non-aot case as well.
6874         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
6876         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
6877         changes.
6879         * aot-compiler.c (encode_patch): Ditto.
6881         * mini.h (G_MININT32): Fix the definition of this.
6883 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
6885         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
6887         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
6889 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6891         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
6892         methods returning vtypes in registers.
6893         (mono_arch_allocate_vars): Ditto.
6895         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
6897         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
6899         * generics.cs: Add a test from the linear IR branch.
6901         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
6903         * mini.c (inline_method): Cache failed inline attempts.
6905 2008-03-04  Mark Probst  <mark.probst@gmail.com>
6907         * mini.c: For shared methods of generic classes put the location
6908         of "this" into the MonoGenericJitInfo.
6910         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
6911         register out of a MonoContext by register number.  Add the generic
6912         sharing context as an argument to mono_arch_find_this_argument().
6914         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
6915         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
6916         for new arch function.
6918         * mini-exception.c: Handle open exception clauses in shared
6919         generic code.
6921         * mini-trampolines.c: Supply additional argument to
6922         mono_arch_find_this_argument().
6924 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6926         * Makefile.am (regtests): Run the bench.exe tests last.
6928 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
6930         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
6931         a bit.
6933 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
6935         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
6936         with MS.
6938         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
6939         
6940         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
6942         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
6943         whose class has no cctor.
6945         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
6947 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
6949         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
6950         unverified.
6952 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
6954         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
6955         to be in sync with the code on the linear IR branch.
6957         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
6959         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
6961 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
6963         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
6965         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
6967         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
6969         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
6971         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
6972         
6973         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
6974         body.
6976 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
6978         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
6979         OP_LOADR4_MEMBASE emission.
6981         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
6982         (mono_spillvar_offset_float): Ditto.
6984         * mini-mips.c (mono_arch_emit_prolog): Ditto.
6986         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
6987         emission.
6989         * basic-long.cs: Add regression tests for them.
6991         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
6992         use.
6993         (mono_arch_allocate_vars): Fix representation of single-precision float
6994         argument.
6995         (mono_arch_output_basic_block): Ditto.
6997         * inssel-mips.brg: Ditto, remove duplicate items.
6999         * mini-mips.c (emit_load_volatile_arguments): New function to handle
7000         arguments of tail calls as on other platforms.
7001         (mono_arch_output_basic_block): Handle tail calls.
7003         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
7004         register.
7006         * objects.cs (test_5_pass_static_struct): Add test for it.
7008         Contributed under MIT/X11 license.
7010 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
7012         * Makefile.am: Use gmcs for compiling the regression tests.
7014         * *.2.cs *.2.il: Rename to *.cs and *.il.
7016 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
7018         * regalloc.h: Make the vassign array smaller.
7020         * mini.c (mini_method_compile): Remove an unused field in cfg.
7022         * mini-codegen.c: Add a bunch of micro optimizations.
7024 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
7026         * regalloc.h: Remove some unused fields.
7028 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
7030         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
7032         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
7034 2008-02-22  Mark Probst  <mark.probst@gmail.com>
7036         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
7038         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
7039         trampoline: Fetch an entry from the runtime generic context.  If
7040         it's NULL, jump to the actual trampoline to fill the runtime
7041         generic context.  Otherwise, return it.
7043         * mini.c: Call the lazy fetch trampoline to get entries out of the
7044         runtime generic context.
7046         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
7047         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
7048         tramp-sparc.c: Stubs for the lazy fetch trampoline.
7050 2008-02-21  Mark Probst  <mark.probst@gmail.com>
7052         * mini.c: Fetch data out of the extensible part of the runtime
7053         generic context instead of calling a helper function.
7055         * generic-sharing.c: Some functions moved into
7056         metadata/generic-sharing.c.  Helper function for fetching other
7057         types now checks and asserts against extensible rgctx (just for
7058         debugging purposes - the helper function isn't called anymore
7059         unless for debugging).
7061 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
7063         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
7064         for tail calls up to the point that the tests in iltests.exe run. Also add a
7065         dummy CKFINITE implementation.
7066         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
7067         needed for trampoline LMF frames.
7069         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
7070         trampoline LMF frames.
7072 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
7074         * mini.c (inline_method): clean any pending loader error when inlining fail.
7075         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
7077 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
7079         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
7081         * aot-runtime.c (decode_patch_info): Ditto.
7083         * mini.c (mono_resolve_patch_target): Ditto.
7084         
7085         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
7086         icall wrappers.
7088         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
7089         
7090         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
7091         if it references an icall address.
7093 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
7095         * cpu-s390x.md: Remove some more unused opcodes.
7096         
7097         * cpu-s390x.md: Remove some unused opcodes.
7099         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
7100         mono_op_imm_to_op ().
7102         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
7103         instead of a switch statement.
7104         
7105         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
7106         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
7108         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
7109         
7110         * mini-codegen.c: Remove unused mono_regstate2_... functions.
7112         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
7113         -1.
7115 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
7117         * driver.c (mono_main): Improve error reporting when an assembly cannot be
7118         opened. Fixes #362607.
7120         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
7122         * iltests.il.in: Add a test for static methods in interfaces.
7124 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
7126         * genmdesc.c (build_table): Fix a crash on older glib versions.
7128         * cpu-sparc.md: Remove some unused opcodes.
7129         
7130         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
7131         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
7133         * cpu-amd64.md: Remove some unused opcodes.
7135         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
7136         like the other opcodes.
7138 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
7140         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
7142         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
7144         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
7145         variables 'cfg' instead of 'm' for consistency.
7147         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
7149         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
7150         argument holding the vtype return address, to avoid the ambigious use of
7151         cfg->ret for this purpose.
7153         * mini.c (NEW_RETLOADA): Use vret_addr if set.
7155         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
7156         
7157         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
7158         new mono_print_ins () function which only takes one argument.
7160 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
7162         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
7163         macro arguments.
7165 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
7167         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
7169         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
7171         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
7172         opcodes and other small changes.
7174         * mini-ops.h: Add some new opcodes from the linear IR branch.
7176         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
7178         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
7179         opcodes, use the REG_MEMBASE opcodes instead.
7180         
7181         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
7182         opcodes, use the REG_MEMBASE opcodes instead.
7183         
7184         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
7185         linear IR branch.
7187         * mini.c (mono_op_imm_to_op): New helper function.
7189         * mini-ops.h: Add some opcodes from linear IR branch.
7191 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
7193         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
7194         <tsv@solvo.ru>.
7196 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
7198         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
7199         OP_ICONV_TO_R4/R8.
7201         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
7203 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
7205         * aot-compiler.c (emit_method_code): Add an assert.
7207         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
7208         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
7209         methods.
7211 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
7213         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
7214         some load/store opcodes so they are consistent. 
7215         (mono_arch_emit_prolog): Simplify some code.
7217         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
7219         * objects.cs: Add tests for large argument offsets on ARM.
7221         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
7222         stack offsets. Fixes #359651.
7224         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
7226         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
7228         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
7230         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
7232         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
7234         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
7235         rid of CEE_CONV_R_UN.
7237         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
7239 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
7241         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
7243         * mini.c (mono_normalize_opcodes): Add some more opcodes.
7245         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
7247         * cpu-amd64.md: Remove some unused opcodes.
7249         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
7251         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
7253         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
7254         arch specific functions for its parts. Call the peephole pass after local
7255         regalloc so the prolog can compute a more accurate max_offset.
7256         
7257         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
7258         the corresponding OP_I/OP_L opcodes.
7260         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
7262         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
7264 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
7266         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
7267         as they are handled in mini.c.
7269         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
7270         
7271         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
7272         case since it is handled in mini.c.
7274         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
7276         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
7278         * *.c: Use the new opcodes in the IR and back end code.
7280         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
7282         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
7284 2008-02-06  Mark Probst  <mark.probst@gmail.com>
7286         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
7287         an assert because it has a race condition.
7289 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
7291         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
7293         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
7295         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
7297         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
7298         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
7300 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
7302         * cpu-amd64.md (move): Correct the maximum size of move.
7304 2008-02-05  Mark Probst  <mark.probst@gmail.com>
7306         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
7307         the generic class init trampoline to return quickly if the class
7308         is already inited.
7310 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
7312         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
7313         issues where an 32 bit callsite cannot be patched by a 64 bit address.
7315 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
7317         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
7318         branch.
7320 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
7322         * objects.cs: Add some soft-float tests.
7324         * mini.c: Fix a couple more soft-float issues.
7326         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
7328         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
7329         avoid a REX prefix.
7331 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
7333         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
7334         exception happens while compiling a virtual method.
7336 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
7338         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
7339         
7340         * mini-sparc.c: Fix build.
7342         * mini-sparc.c (get_call_info): Add support for generic sharing.
7344         * mini-exceptions.c: Add a FIXME.
7346 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
7348         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
7349         altstack handling code.
7351         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
7352         
7353         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
7355         * mini-s390.c: Add support for generic sharing.
7357         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
7358         Fix CAS on s390.
7359         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
7361         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
7363         * mini-s390x.c: Add support for generic sharing.
7364         
7365         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
7366         Fix CAS on ia64.
7367         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
7369         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
7370         can be used since it takes a 16 bit signed immediate.
7372         * inssel-s390x.brg: Fix OP_SETRET.
7374         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
7376         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
7378         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
7380         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
7382         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
7383         in one place.
7385         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
7386         stuff.
7388         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
7389         of the unused mono_arch_patch_delegate_trampoline stuff.
7391 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
7393         * basic-long.cs: Move the fp related tests to basic-float.cs.
7395         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
7397         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
7399         * basic-calls.cs: Add a test for proper float argument passing.
7401         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
7402         if the context corresponds to an exception received through a signal.
7404         * exceptions.cs: Add a test for nullref handling at the start of a try
7405         clause.
7407         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
7409         * jit-icalls.c (mono_break): New JIT icall.
7411         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
7413         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
7415 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
7417         * cpu-*.md: Get rid of unused opcodes.
7419         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
7421         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
7422         by all platforms.
7424         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
7425         define.
7427         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
7428         the arch independent trampoline code in mini-trampolines.c.
7430         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
7432         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
7434         * mini-s390.h: Remove an unused define.
7435         
7436         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
7437         the arch independent trampoline code in mini-trampolines.c.
7439         * mini-arm.c (mono_arch_emit_prolog): Fix build.
7441 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
7443         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
7445         * mini-s390.c (mono_arch_emit_prolog): Fix build.
7447         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
7449         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
7451         * cpu-amd64.md: Use smaller sizes for int opcodes.
7453         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
7455         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
7456         objects.cs.
7458         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
7459         debugging.
7461         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
7462         instead of though a pointer to save an indirection when accessing elements of
7463         the array.
7465         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
7466         some typos.
7467         (NOT_IMPLEMENTED): New helper macro.
7468         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
7469         of a bb.
7471         * *.c: Use the new helper macro.
7473 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
7475         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
7477 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
7479         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
7480         stack slots.
7482 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
7484         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
7485         profiling is enabled.
7486         
7487         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
7488         the end.
7489         (mono_arch_emit_prolog): Add more first bblock optimizations.
7491         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
7492         in order if possible.
7493         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
7494         bblock, since the arguments are still in their original registers.
7496         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
7498 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
7500         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
7501         as well.
7503         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
7504         offset 0.
7506         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
7508         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
7509         process async exceptions received while in unmanaged code.
7511         * mini.c (mini_init): Install a callback with the runtime which will be called
7512         when a thread receives an async exception while in unmanaged code.
7514         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
7516         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
7518 2008-01-16  Wade Berrier  <wberrier@novell.com>
7520         * cpu-g4.md:
7521         * cpu-arm.md:
7522         * cpu-s390x.md:
7523         fix build
7525 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
7527         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
7528         compilation with sun cc.
7530         * cpu-*.md: Fix the build.
7532         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
7534         * mini-amd64.h: Add some comments to the MonoLMF structure.
7536         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
7537         
7538         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
7539         in the LMF structure if possible. This saves two instructions in the
7540         managed->native wrappers.
7542         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
7544 2008-01-16  Mark Probst  <mark.probst@gmail.com>
7546         * generic-sharing.c: New type argument lookup code which uses the
7547         runtime generic context template.
7549 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
7551         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
7553         * mini-arm.c (add_general): Fix arm eabi parameter passing.
7554         (mono_arch_output_basic_block): Fix localloc implementation.
7556         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
7558         * mini-ia64.c (peephole_pass): Fix ia64 build.
7560         * mini-amd64.c (peephole_pass): Fix a warning.
7561         
7562         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
7563         at a constant offset from sp/fp.
7565         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
7566         instead of obtaining it from *lmf in the managed method case.
7568 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
7570         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
7572 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
7574         * mini.h (MonoInstList): New type.
7575         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
7576         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
7577         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
7578         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
7579         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
7580         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
7581         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
7582         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
7583         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
7584         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
7585         MONO_INST_LIST_FOR_EACH_ENTRY,
7586         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
7587         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
7588         mono_inst_list_first, mono_inst_list_last,
7589         mono_inst_list_next, mono_inst_list_prev): New instruction
7590         list handling interfaces.
7591         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
7592         list head 'ins_list'.
7593         (MonoInst): Replace next pointer with list head 'node'.
7594         (MonoCallInst): Make 'out_args' a MonoInstList.
7595         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
7596         (MonoCompile): Delete reverse_inst_list and
7597         reverse_inst_list_len.
7598         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
7599         mono_arch_lowering_pass, mono_arch_local_regalloc,
7600         mono_arch_output_basic_block, mono_arch_emit_prolog):
7601         Convert to new instruction lists.
7602         (insert_after_ins): Delete.
7603         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
7604         instruction lists.
7605         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
7606         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
7607         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
7608         mono_emulate_opcode, mono_emit_load_got_addr,
7609         inline_method, mono_method_to_ir, mono_print_bb_code,
7610         print_dfn, decompose_pass, nullify_basic_block,
7611         replace_out_block_in_code, remove_block_if_useless,
7612         merge_basic_blocks, move_basic_block_to_end,
7613         try_unsigned_compare, optimize_branches, mono_print_code,
7614         mini_select_instructions, remove_critical_edges): Likewise.
7615         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
7616         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
7617         mono_arch_output_basic_block, mono_arch_emit_prolog):
7618         Likewise.
7619         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
7620         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7621         mono_arch_output_basic_block): Likewise.
7622         (inst_list_prepend, insert_after_ins): Delete.
7623         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
7624         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
7625         instruction lists.
7626         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
7627         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
7628         mono_arch_emit_prolog): Likewise.
7629         * cfold.c (mono_constant_fold): Likewise.
7630         * liveness.c (visit_bb, mono_analyze_liveness,
7631         optimize_initlocals): Likewise.
7632         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
7633         * graph.c (mono_draw_code_cfg): Likewise.
7634         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
7635         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
7636         mono_ssa_cprop): Likewise.
7637         * abcremoval (get_relations_from_previous_bb, process_block):
7638         Likewise.
7639         * local-propagation (mono_cprop_invalidate_values,
7640         mono_local_cprop_bb): Likewise.
7641         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
7642         peephole_pass, mono_arch_output_basic_block,
7643         mono_arch_emit_prolog): Likewise.
7644         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
7645         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7646         mono_arch_emit_prolog): Likewise.
7647         (insert_after_ins): Delete.
7648         * aliasing.c (print_code_with_aliasing_information,
7649         mono_build_aliasing_information, mono_aliasing_deadce):
7650         Convert to new instruction lists.
7651         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
7652         peephole_pass, NEW_INS, mono_arch_lowering_pass,
7653         mono_arch_local_regalloc, mono_arch_output_basic_block):
7654         Likewise.
7655         (insert_after_ins): Delete.
7656         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
7657         peephole_pass, mono_arch_output_basic_block): Convert to
7658         new instruction lists.
7659         * mini-codegen (InstList, inst_list_prepend,
7660         insert_after_ins): Delete.
7661         (insert_before_ins, get_register_force_spilling,
7662         get_register_spilling, free_up_ireg, free_up_reg,
7663         create_copy_ins, create_spilled_store, alloc_int_reg,
7664         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
7665         to new instruction lists.
7666         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
7667         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7668         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
7669         (insert_after_ins): Delete.
7670         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
7671         mono_arch_local_regalloc, mono_arch_output_basic_block,
7672         mono_arch_call_opcode): Convert to new instruction lists.
7673         (insert_after_ins): Delete.
7674         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
7675         peephole_pass, mono_arch_output_basic_block,
7676         mono_arch_emit_prolog): Convert to new instruction lists.
7678 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
7680         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
7682         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
7683         Fixes #353182.
7685         * Makefile.am (version.h): Make this work with non-bash shells.
7687 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
7689         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
7691 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
7693         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
7694         the InitializeArray optimization.
7696 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
7698         * mini.c driver.c: Don't include os/gc_wrapper.h.
7700 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
7702         * mini.c (print_jit_stats): Print GC statistics if available.
7704 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
7706         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
7708 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
7710         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
7712 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
7714         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
7715         
7716         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7718         * driver.c (mono_main): Ditto.
7720 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
7722         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
7724         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
7725         in the vtable can't be encoded.
7726         (compile_method): Ditto.
7728 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
7730         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
7731         defined.
7733         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
7734         lmf->rbp.
7736         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
7737         the top LMF entry belongs to the current method.
7739         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
7741 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
7743         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
7744         
7745         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
7747         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
7749         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
7751         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
7753         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
7754         implementation.
7756         * basic-float.cs: Add an ulong->double cast test.
7758 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
7760         * mini.c (mono_method_to_ir): Fix a warning.
7762 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
7764         * mini-ops.h: Add OP_SWITCH.
7766         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
7767         CEE_SWITCH in back-end code, use OP_SWITCH instead.
7769 2007-12-11  Geoff Norton  <gnorton@novell.com>
7771         * mini-s390x.c: Minor change to the MAX() define to allow
7772         it to compile with other gcc versions.
7774 2007-12-11  Geoff Norton  <gnorton@novell.com>
7776         * cpu-s390x.md:
7777         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
7779 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7781         exceptions-arm.c (mono_arch_get_restore_context): Restore
7782         the frame pointer.
7784         exceptions-arm.c (throw_exception): Save the frame pointer.
7785         This is a partial fix for #323747. Only the client side is
7786         fixed.
7788 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7790         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
7791         was using an unrelated variable to log the class which
7792         needed the cctor to be called. This was crashing on arm.
7794 2007-12-09  Robert Jordan  <robertj@gmx.net>
7796         * mini-x86.c (mono_arch_emit_epilog):
7797         Consider all kinds of 64-bit types. Fixes #323114.
7799 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
7801         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
7803 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7805         * mini-amd64.c (peephole_pass): Add a missing instruction check.
7807 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7809         * mini.c: run type ctor before allocating an object, not only
7810         when running it's constructor method (fixes at least part of bug #342507).
7812 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7813         
7814         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
7815         
7816         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
7817         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
7818         function.
7820         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
7821         mono_generic_class_init_trampoline () the same as it is done with the other
7822         trampolines.
7824         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
7825         aot-runtime.c aot-compiler.c: Implement AOT support.    
7827 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7829         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
7830         build for archs which don't have the vtable trampoline defined
7831         yet.
7833 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7835         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
7837         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
7839         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
7841         * tramp-<ARCH>.c: Use the new helper function.
7843 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7845         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
7846         trampoline call, which takes a vtable argument.
7848         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
7849         OP_TRAMPCALL_VTABLEs like other calls.
7851         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
7852         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
7853         call.  Implemented a support function which fetches the vtable
7854         from a register set.
7856         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
7857         Implemented a generic class init trampoline, using the
7858         OP_TRAMPCALL_VTABLE opcode.
7860         * mini.c: Implemented static field access when sharing generic
7861         code.  This implies initing the class using the new
7862         OP_TRAMPCALL_VTABLE call.
7864 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7866         * mini.c: Don't compile methods with sharing enabled if their
7867         classes are disabled for sharing.
7869 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7871         * inssel.brg: Add a missing sign extension to the GETCHR and array access
7872         opcodes. Fixes #346563.
7874         * objects.cs: Add a new test.
7876         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
7878         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
7879         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
7881 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7883         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
7885 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
7887         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
7888         code stream.
7890 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
7892         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
7894         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
7895         optimization in the AOT case.
7896         
7897 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
7899         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
7900         
7901         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
7903         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
7905         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
7907         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
7908         is created by the inlined delegate ctor.
7910         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
7912         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
7914 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
7916         * cpu-x86.md: Fix the length of ckfinite.
7918 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
7920         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7921         
7922         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
7923         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
7925         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
7927         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
7928         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
7930 2007-11-28  Martin Baulig  <martin@ximian.com>
7932         * mini-x86.c
7933         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
7934         after creating the trampoline.
7936 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
7938         * aot-runtime.c (load_aot_module): Check runtime version if needed.
7940         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
7941         the same version.
7943         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
7944         instead of the calling method to help AOT.
7946         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
7948 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
7950         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
7951         is defined.
7953 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
7955         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
7956         
7957         * aot-compiler.c (compile_method): Correct check for generic method definitions.
7958         (encode_method_ref): No need to handle generic method definitions specially.
7960         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
7962         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
7963         decode_klass_info.
7965         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
7966         encode_klass_info.
7967         (compile_method): Enable generic sharing.
7969 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
7971         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
7972         (mini_method_compile): Add preliminary support for AOTing shared generic code.
7974         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
7975         generic code.
7977         * mini-trampolines.c: Fix a warning.
7979         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
7980         NEW_PCONST.
7981         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
7982         (generic_class_is_reference_type): Remove unused function.
7984         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
7985         in the generic vtable trampoline case.
7987         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
7988         
7989         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
7990         return an AOT method based on a vtable slot.
7992         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
7994         * mini.c (mini_get_vtable_trampoline): Export this.
7996 2007-11-22  Martin Baulig  <martin@ximian.com>
7998         * debug-debugger.h
7999         (MonoDebuggerInfo): Move `debugger_version' up.
8001 2007-11-22  Martin Baulig  <martin@ximian.com>
8003         * mini-amd64.c
8004         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
8006         * mini-trampolines.c
8007         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
8008         after compiling the method.
8010 2007-11-20  Martin Baulig  <martin@ximian.com>
8012         * debug-mini.c
8013         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
8014         (mono_debugger_remove_breakpoint): Likewise.
8015         (mono_debugger_check_breakpoints): Likewise.
8017         * debug-debugger.c: Implement the new breakpoint interface here.
8019 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
8021         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
8022         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
8024         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
8026 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
8028         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
8030         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
8031         mini.c.
8033         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
8034         mini.c.
8036         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
8037         returning a vtype in a register.
8039         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
8040         here from the arch specific code.
8042         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
8043         mini.c.
8045         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
8046         (mono_arch_emit_prolog): Increment maximum prolog size.
8048         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
8049         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
8051         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
8052         MonoGenericSharingContext.
8054         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
8055         MonoGenericSharingContext. Allocate memory from the cfg mempool.
8057 2007-11-15  Mark Probst  <mark.probst@gmail.com>
8059         * mini.c, mini.h, generic-sharing.c: Functions for producing code
8060         which extract fields out of the runtime generic context.  Full
8061         sharing of the NEWARR opcode.
8063 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
8065         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
8066         --enable-minimal=ssa.
8068 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
8070         * mini-trampolines.c (mono_delegate_trampoline): Update after 
8071         mono_marshal_get_delegate_invoke () signature change.
8073 2007-11-13  Mark Probst  <mark.probst@gmail.com>
8075         * mini.c: Removed the shared context in favor of the generic
8076         sharing context.  Allocate the MonoJitInfo structure with room for
8077         the generic sharing context if it's needed.
8079         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
8080         domain-internals.h now.
8082         * mini-x86.c: Pass the generic sharing context to get_call_info ().
8084         * generic-sharing.c: Several changes for working without a shared
8085         context and instead operating on open types instead.
8087 2007-11-12  David S. Miller  <davem@davemloft.net>
8089        * inssel-sparc.brg: Fix double instruction emit.
8091 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
8093         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
8094         Get/Set/Address methods.
8095         
8096         * mini.c debug-debugger.c mini-trampolines.c: Update after 
8097         mono_marshal_get_delegate_invoke signature change.
8099 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
8101         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
8102         This can happens with dynamic methods. Fixes the other bug in #322722.
8104 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
8106         * tramp-arm.c (mono_arch_patch_callsite): Support patching
8107         BX call sequence.
8109         * mini-arm.c (arm_patch): Implement patching of BX call
8110         sequence. Fixes one of the bugs in #322722.
8112 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
8114        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
8115        under Linux.  We only need to flush every 32-byte cache line.    
8117 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
8119         * mini.c:
8120         move_basic_block_to_end: Add branches when needed, eventually creating
8121         a new BB.
8122         optimize_branches: added a parameter that tells if it's ok to create
8123         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
8124         and avoid calling move_basic_block_to_end when it's not ok.
8125         Fixes bug 318677.
8127 2007-11-07  Mark Probst  <mark.probst@gmail.com>
8129         * mini.c: Abort inlining call to InitializeArray if something
8130         looks wrong.  Let the icall handle it, which now has proper safety
8131         checks.
8133 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
8135         * mini.c (mono_spill_call): add support for soft-float.
8137         * mini.c (mono_method_to_ir): add support for soft-float
8138         to inlined functions that return float.
8140         * mini.c (mono_method_to_ir): add support for soft-float
8141         to cee_stsfld opcode on float fields.
8143 2007-11-05  Geoff Norton  <gnorton@novell.com>
8145         * mini-x86.h: Fix the structure access for X86 Leopard.
8148 2007-11-05  Martin Baulig  <martin@ximian.com>
8150         * mini-trampolines.c
8151         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
8152         after compiling the method to notify the debugger.
8154 2007-11-05  Martin Baulig  <martin@ximian.com>
8156         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
8158 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
8160         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
8161         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
8163 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
8165         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
8166         native-to-managed wrappers.
8167         
8168 2007-11-01  Geoff Norton  <gnorton@novell.com>
8170         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
8171         members.
8173 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
8175         * mini.c, mini-x86.c: when getting back from unmanaged code
8176         to managed via a marshaled delegate we also need to set the
8177         right domain.
8179 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
8181         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
8182         for amd64.
8184 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
8186         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
8187         let the debugger or other external agents to tell the JIT when
8188         a sw breakpoint has been inserted in the code that the JIT needs
8189         to be able to inspect.
8191 2007-10-31  Martin Baulig  <martin@ximian.com>
8193         * debug-debugger.h
8194         (MonoDebuggerInfo): Remove `runtime_class_init'.
8196 2007-10-30  Martin Baulig  <martin@ximian.com>
8198         * debug-mini.h
8199         (mono_debugger_thread_created): Added `MonoThread *' argument.
8200         (mono_debugger_extended_notification): New public method.
8201         (mono_debugger_trampoline_compiled): New public method.
8203         * debug-mini.c
8204         (MonoDebuggerThreadInfo): Added `thread' and
8205         `extended_notifications' fields.
8207         * debug-debugger.c
8208         (debugger_executable_code_buffer): New static variable.
8210         * debug-debugger.h
8211         (MonoDebuggerInfo): Added `executable_code_buffer',
8212         `executable_code_buffer_size', `breakpoint_info_area',
8213         `breakpoint_table' and `breakpoint_table_size'.
8215 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
8217         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
8218         that IP  either is an unused value or the vtable pointer. IMT 
8219         calls use vtable + offset now. Reduced by almost half the size
8220         of IMT entries.
8222 2007-10-26  Jonathan Chambers <joncham@gmail.com>
8224         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
8225         defines to access param registers. Replace long usage with
8226         gsize as sizeof(long) != sizeof(void*) on Win64.
8228         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
8229         on Win64. Fix intrinsic, use _AddressOfReturnAddress
8230         instead of non-existant _GetAddressOfReturnAddress.
8232         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
8233         param registers. Save/restore %rdi and %rsi in MonoLMF.
8235         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
8236         param registers. Modify (throw_exception) signature to take 
8237         %rdi and %rsi on Win64. 
8239         Code is contributed under MIT/X11 license.
8241 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8243         * helpers.c: unlink debugging output files.
8245 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
8247         * mini.c: Move mono_create_ftnptr () to object.c.
8249 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8251         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
8252         optional. This function can now be used to disassemble code generated
8253         outside the JIT such as trampolines and IMT thunks.
8255         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
8257         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
8258         vtable pointer from a ldr instruction.
8260         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
8261         new IMT call sequence.
8263         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
8264         call sequence for interface invocations.
8266         * mini-arm.c (mono_arch_emit_imt_argument): added, required
8267         for imt support. This function is empty since IMT on ARM requires no
8268         special handling on the IR side.
8270         * mini-arm.c (mono_arch_find_imt_method): added, required for
8271         imt support.
8273         * mini-arm.c (mono_arch_find_this_argument): added, required
8274         for imt support.
8276         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
8277         a ldr instruction to load a value stored in the code stream.
8279         * mini-arm.c (mono_arch_build_imt_thunk):added, required
8280         for imt support.
8283 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
8285         * mini.c (mini_init): Install the jump trampoline callback.
8287 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8289         * mini-trampolines.c: handle synchronized methods with the common
8290         vtable trampoline (bug #335601).
8292 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
8294         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
8296         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
8297         64 bit platforms.
8299         * mini-ia64.h mini-ia64.c: Add support for IMT.
8301         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
8302         prolog. Fixes #331958.
8304 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
8306         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
8308 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8310         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
8311         trampoline.
8313 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8315         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
8316         trampoline.
8318 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
8320         * mini-x86.c, mini-x86.h: x86 support for the common vtable
8321         trampoline.
8323 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
8325         * mini-trampolines.c: changed the magic rampoline to understand
8326         the common vtable trampoline method: the method to invoke is
8327         determined by the vtable displacement of the call.
8329 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8331         * mini.c, mini.h: register the common vtable trampoline if the
8332         architecture supports it.
8334 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8336         * cpu-amd64.md: use the correct max length for tls_get.
8338 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
8340         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
8341         CEE_STELEM_ANY. Fixes #333696.
8343 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8345         * exceptions-x86.c: provide more graceful handling of the case where
8346         we followed a bogus function pointer from managed code (bug #332866).
8348 2007-10-11  Mark Probst  <mark.probst@gmail.com>
8350         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
8351         replaces the generic_shared flag and will carry more information
8352         in the future.
8354         * generic-sharing.c: Added mini_type_stack_size() which allows
8355         allows open types if given a generic sharing context.
8356         mini_get_basic_type_from_generic() takes a
8357         MonoGenericSharingContext* instead of a MonoCompile* now.
8359         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
8360         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
8361         mini-sparc.c, mini-x86.c: Trivial changes required by the two
8362         changes above.  Just passing arguments through to the right
8363         places.
8365 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8367         * mini-arm.c: unify the call emission to emit_code_seq().
8369 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
8371         * tramp-arm.c: reduced the trampoline size.
8373 2007-10-10  Mark Probst  <mark.probst@gmail.com>
8375         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
8376         variable handling out of arch-specific code.
8378 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
8380         * mini-arm.c: implemented fast delegate dispatch.
8382 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
8384         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
8385         that fp elimination is turned off if the space required by locals is too
8386         big. Fixes #331958.
8388 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8390         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
8391         ARM to the new style trampoline.
8393 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
8395         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
8397         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
8399 2007-10-09  Martin Baulig  <martin@ximian.com>
8401         * debug-debugger.h
8402         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
8403         `field_info_offset_offset'.     
8405 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
8407         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
8408         removed more internal usage of the r11 register and made it available
8409         to the register allocator.
8411 2007-10-08  Mark Probst  <mark.probst@gmail.com>
8413         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
8414         when sharing generics and treat type variables as references.
8416 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
8418         * mini-ppc.c: started removing the internal uses of register r11
8419         to eventually allow the register allocator to manage it as an
8420         additional available register.
8422 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8424         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
8426 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
8428         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
8429         specific trampolines as they are not performance critical as a jump
8430         target (maybe align as before only for AOT code?). This saves about
8431         200 KB of native code on x86 for monodevelop startup.
8433 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
8435         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
8436         monodevelop startup.
8438 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
8440         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
8442         * mini-sparc.h mini-sparc.c: Implement IMT support.
8444         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
8445         its smaller and doesn't clobber sparc_g1.
8447         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
8449 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
8451         * mini-ppc.c: optimized the size of the IMT thunks a bit.
8453 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8455         * mini-ppc.c: implemented fast delegate invocation.
8457 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
8459         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
8461 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
8463         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
8464         code to the new style trampoline in preparation for IMT support.
8466 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
8468         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
8469         systems already. This also reduces the specific trampiline sizes and
8470         prepares for the use of r12 as the IMT identifier register.
8472 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8474         * mini-mips.h: endianess fix (simplified from a patch by
8475         Thomas Kunze <thommy@tabao.de>, bug #323737).
8477 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
8479         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
8480         to access ucontext fields and enable netbsd support
8481         (partially from Magnus Henoch <mange@freemail.hu>).
8483 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8485         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
8486         use the preprocessor from the CPP env var if it is set.
8488 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
8490         * mini-trampolines.c: fixed an assertion and moved it earlier in the
8491         code, before interface_offset gets used.
8493 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
8495         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
8496         mono_class_setup_vtable () before accessing klass->vtable.
8498 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
8500         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
8501         hackish.
8503 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8505         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
8506         IMT slots (this saves hundreds of KB of memory in programs like
8507         IronPython and Monodevelop).
8509 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8511         * mini.c: print the delegate counter.
8513 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
8515         * mini-x86.c: make it easier to enable the debugging code for IMT
8516         slots.
8518 2007-09-28  Martin Baulig  <martin@ximian.com>
8520         * debug-debugger.h
8521         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
8522         `mono_method_klass_offset' and `mono_method_token_offset'.
8524 2007-09-20  Mark Probst  <mark.probst@gmail.com>
8526         * mini.c: First generics sharing implementation.  Can only share
8527         in very simple cases.  If sharing doesn't work it falls back to
8528         dedicated compilation.
8530         * mini.h: Flag in MonoCompile to specify whether generic
8531         compilation is shared.  Flags enum for marking which generic inst
8532         of a context is used.  Prototypes for helper functions.
8534         * generic-sharing.c: Helper functions for generic method sharing.
8536         * optflags-def.h: Optimization flag (gshared) for enabling generic
8537         method sharing added.
8539         * Makefile.am: generic-sharing.c added.
8541 2007-09-19 Daniel Nauck <dna@mono-project.de>
8543         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
8545 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
8546         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
8547         fixes bug 325507.
8549 2007-09-19  Martin Baulig  <martin@ximian.com>
8551         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
8552         mono_debug_cleanup() is now part of mono_cleanup().
8554 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
8556         * driver.c (mono_main): Fix a warning.
8558 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
8560         * aot-compiler.c: Optimize various parts when processing large assemblies.
8561         Fixes ##325568.
8563         * mini.c (mono_patch_info_hash): Improve hash function.
8565 2007-09-14  Jonathan Chambers <joncham@gmail.com>
8567         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
8568         
8569         Code is contributed under MIT/X11 license.
8571 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
8573         * mini.c (mini_init): Fix a leak.
8575         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
8577 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8579         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
8581 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
8583         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
8585 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
8587         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
8588         variance tests.
8590         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
8592         * mini.c (handle_alloc): Enable managed allocators in AOT code.
8594         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
8596         * aot-runtime.c (decode_patch_info): Ditto.
8598 2007-09-12  Jonathan Chambers <joncham@gmail.com>
8600         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
8601         static case. Cache delegates in architecture specific code, 
8602         based on number of parameters.
8603         
8604         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
8605         in architecture specific code, based on number of parameters.
8606         
8607         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
8608         caching happen in architecture specific code now.
8609         
8610         Code is contributed under MIT/X11 license.
8612 2007-09-12  Jonathan Chambers <joncham@gmail.com>
8614         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
8615         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
8616         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
8618         Code is contributed under MIT/X11 license.
8620 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
8621         * mini.c: (mono_thread_abort) Fixed bug #82416.
8623 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8625         * mini.: hook the new managed GC allocation feature into the JIT.
8627 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8629         * mini.c: implementation for the new runtime tls opcode.
8631 2007-09-11  Martin Baulig  <martin@ximian.com>
8633         * debug-debugger.h
8634         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
8635         `mono_method_inflated_offset'.
8637 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
8639         * driver.c mini.h mini.c: Add a new devel command line option for injecting
8640         async exceptions into a method.
8642         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
8643         purpose of testing whenever the unwinder works at every instruction.
8645 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8647         * mini.c: check accessibility of method used in ldftn (fixes
8648         bug #82635).
8650 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
8652         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
8654         * inssel.brg: Fix a warning.
8656 2007-09-03  Martin Baulig  <martin@ximian.com>
8658         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
8659         now takes the `main_method' as argument.
8661 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
8663         * cpu-sparc.md (endfilter): Add missing src1:i argument.
8665 2007-08-30  Jonathan Chambers <joncham@gmail.com>
8667         * driver.c: include the cil-coff.h header on Windows.
8668         
8669         Code is contributed under MIT/X11 license.
8671 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8673         * mini.c, driver.c: don't include the cil-coff.h header.
8675 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8677         * mini.c: flag places that needs fixes fo soft-float support.
8679 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
8681         * mini.h, inssel-float.brg: fix soft-float constant loads on big
8682         endian systems (partially from Dean Jenkins, bug #81924).
8684 2007-08-28  Mark Probst  <mark.probst@gmail.com>
8686         * mini.c (check_linkdemand): Remove embedded reference object in
8687         call to LinkDemandSecurityException.
8688         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
8689         with an IntPtr instead of a reference object.
8691 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
8693         * mini.c (handle_initobj): Handle alignment properly.
8695         * inssel.brg (mini_emit_memset): Ditto. 
8697         * inssel.brg (mini_emit_memcpy): Ditto. 
8699         * inssel-sparc.brg: Ditto.              
8701         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
8703 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
8705         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
8706         exceptions raised in unmanaged code. Fixes part of #82594.
8708 2007-08-24  Mark Probst  <mark.probst@gmail.com>
8710         * mini.c (mono_method_to_ir), declsec.c
8711         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
8713 2007-08-22  Martin Baulig  <martin@ximian.com>
8715         * debug-mini.h
8716         (MonoDebuggerThreadInfo): New typedef.
8717         (mono_debugger_thread_table): New global variable.
8718         (mono_debugger_thread_created): New public function.
8719         (mono_debugger_thread_cleanup): New public function.
8721         * debug-debugger.h
8722         (MonoDebuggerInfo):
8723         - removed `get_current_thread' and `lookup_assembly'.
8724         - removed `data_table'.
8725         - added `thread_table'.
8727         * mini.c
8728         (mono_thread_start_cb): Call mono_debugger_thread_created().
8729         (mono_thread_attach_cb): Likewise.
8730         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
8731         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
8732         initial domain.
8734         * driver.c (mono_main): Move mono_debug_init() up, before calling
8735         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
8737 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8739         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
8740         together when passing several arguments of type double (gives a small
8741         speedup and saves a few bytes of generated code).
8743 2007-08-20  Jb Evain  <jbevain@novell.com>
8745         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
8747 2007-08-20  Jb Evain  <jbevain@novell.com>
8749         * mini.c (mono_method_to_ir): throw MethodAccessException
8750         and FieldAccessException instead of InvalidProgramException.
8752 2007-08-20  Mark Probst  <mark.probst@gmail.com>
8754         * mini.c: CoreCLR security checks.
8756         * mini.h: Removed MonoSecurityMode (moved to
8757         metadata/security-manager.h) and mono_security_mode global var
8758         (replaced by set/get functions in security-manager.h).
8760         * driver.c: Added "core-clr-test" security mode for testing.  Used
8761         set-function for setting security mode.
8763 2007-08-17  Mark Probst  <mark.probst@gmail.com>
8765         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
8766         the new jit_info_table.
8768         * driver.c: Test code for the new jit_info_table (enabled by the
8769         define MONO_JIT_INFO_TABLE_TEST).
8771 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
8773         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8774         detection of call <REG> instruction sequence. Fixes build on freebsd.
8776 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
8778         * mini-exceptions.c: Fix a warning.
8780 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
8782         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
8783         stack overflow handling code on amd64 too.
8785         * mini-exceptions.c (mono_setup_altstack): Make this use 
8786         mono_thread_get_stack_bounds ().
8788         * mini-x86.h: Disable sigaltstack on solaris x86.
8790 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
8792         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
8794 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
8796         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
8798 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
8800         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
8802         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
8804 2007-08-03  Neale Ferguson <neale@sinenomine.net>
8806         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
8807         due to alignment.
8809 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8811         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
8812         to be emitted (bug #82281).
8814 2007-08-01  Martin Baulig  <martin@ximian.com>
8816         Merged the `debugger-dublin' branch.
8818         * debug-debugger.h (MonoDebuggerInfo):
8819         Removed the `old_*' compatibility entries.
8820         Added `debugger_version' and `data_table'.
8821         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
8822         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
8824         * debug-mini.c
8825         (MiniDebugMethodBreakpointInfo): Add `address_list'.
8826         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
8827         instead of a `gconstpointer'.
8828         (mono_debugger_insert_method_breakpoint): Return a
8829         `MonoDebugMethodAddressList *'.
8831 2007-06-28  Martin Baulig  <martin@ximian.com>
8833         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8835 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
8837         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
8838         __builtin_frame_address () since it is broken on older gcc versions.
8840 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8842         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
8843         on the stack overflow handling and made the managed stack overflows
8844         catchable in most cases using soft guard pages.
8845         * exceptions-x86.c: added code to restore the protection in the soft
8846         guard pages at the end of exception handling.
8848 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
8850         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
8852 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8854         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
8855         exception handling.
8857 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8859         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
8860         signal handling support until it has been ported to the new mechanism.
8861         * mini.c: fixed stack overflow detection and use the new
8862         architecture code  to handle signals on the altstack.
8864 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8866         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
8867         stack overflows on the alt stack.
8869 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
8871         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
8872         stack overflows on the alt stack.
8874 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
8876         * exceptions-ppc.c: cleanup preparing for altstack support.
8878 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8880         * exceptions-arm.c: cleanup preparing for altstack support.
8882 2007-07-27  Mark Probst  <mark.probst@gmail.com>
8884         * mini.c (print_jit_stats): Output hazard pointer stats.
8886 2007-07-26  Mark Probst  <mark.probst@gmail.com>
8888         * driver.c, mini.c: Replaced security mode flags with a single
8889         enum variable.
8891 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8893         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
8895 2007-07-25  Mark Probst  <mark.probst@gmail.com>
8897         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
8898         (which doesn't do anything yet) for activating Core CLR
8899         (Silverlight) security.
8901 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8903         * mini-codegen.c: work around a possible gcc bug on arm.
8905 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8907         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
8908         message for platforms that don't support AOT compilation.
8910 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8912         * mini.h, mini.c, driver.c: temporary smcs hack.
8914 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
8916         * mini-arm.h, mini-arm.c: arm EABI fixes.
8918 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
8920         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
8921         case.
8923         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
8924         trampolines taking a method argument.
8926         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
8928         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
8929         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
8931         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
8932         JIT compilation throws an exception. Fixes #82050.
8934 2007-07-19  Mark Probst  <mark.probst@gmail.com>
8936         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
8937         with the MONO_EXCEPTION_ defines.
8939 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
8941         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
8942         #82117.
8943         
8944         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
8945         the cause of an assertion.
8947 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
8949         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
8950         removed.
8952 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
8954         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
8955         assert. Should fix #82103.
8957 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
8959         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
8960         here too. Fixes #82095.
8962         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
8963         addresses.
8965         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
8967         * mini-amd64.h: Enable IMT for amd64.
8968         
8969         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
8971 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
8973         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
8975 2007-07-12  Mark Probst  <mark.probst@gmail.com>
8977         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
8978         as soon as check_linkdemand sets an exception_type.
8980 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8982         * mini-x86.c: fixed offsets for IMT call sequence.
8983         * mini-x86.h: enable IMT again.
8985 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8987         * trace.c (mono_trace_enter_method): Decode MonoType too.
8989         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
8991         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
8993         * mini-amd64.c: Add preliminary IMT implementation.
8994         
8995 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8997         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
8998         understand the new IMT-base interface invocation (thanks to
8999         Daniel Nauck for the report and the remote debugging session).
9001 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
9003         * mini-x86.c: size and speed optimizations for the IMT bsearch.
9005 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
9007         * Makefile.am (aotcheck): Make this actually use the AOTed code.
9009 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
9011         * mini-trampolines.c: implement AOT IMT support.
9012         * mini-x86.h: enable IMT support for wider testing.
9014 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
9016         * inssel.brg (emit_imt_argument): Add aot support here.
9018         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
9020 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
9022         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
9023         of the IMT implementation, partially from massi, with my
9024         implementation of the bsearch sequence. Disabled by default until
9025         the AOT code is implemented.
9027 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
9029         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
9031         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
9033 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
9035         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
9036         arch-independent IMT JIT code from Massimiliano
9037         Mantione (massi@ximian.com) with small cleanups from me.
9039 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
9041         * Makefile.am: fix svn invocation to get the svn revision to be
9042         independent of the local language (build fix).
9044 2007-07-09  Mark Probst  <mark.probst@gmail.com>
9046         * mini.c (inline_method): Reset cfg->exception_type if the
9047         inlining is aborted.  Fixes: 82049.
9049 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
9051         * mini.c: remove assert from exception handling code when exception_ptr
9052         is not set.
9054 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
9056         * mini.c (mono_codegen): Add an assert.
9058         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
9059         enter and leave code.
9060         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
9062 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9064         * mini-ppc.c: fixed memory corruption for localloc(0)
9065         (bug #81852).
9067 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
9068         
9069         * mini.c: Fix warnings.
9071 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
9073         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
9074         to emit better double->int conversions.
9076 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
9078         * mini.c: the provided Min/Max optimizations are valid for unisgned
9079         ints.
9081 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
9083         * mini.c (can_access_method, can_access_field): methods moved to metadata/class.c and renamed to mono_method_can_access_method and mono_method_can_acesss_field
9085 2007-06-28  Miguel de Icaza  <miguel@novell.com>
9087         * mini.c (mono_running_on_valgrind): Add support for reporting the
9088         method and  its boundaries to valgrind.
9090 2007-06-28  Martin Baulig  <martin@ximian.com>
9092         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
9094 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
9096         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
9098         * generic.2.cs: Add new test case.
9100 2007-06-25  Martin Baulig  <martin@ximian.com>
9102         Merged the `debugger-dublin' branch.
9104         * debug-mini.c
9105         (mono_debugger_insert_method_breakpoint): New public method.
9106         (mono_debugger_remove_method_breakpoint): Likewise.
9107         (mono_debugger_check_breakpoints): New static method.
9108         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
9110         * debug-debugger.h (MonoDebuggerInfo):
9111         Renamed (to keep backward compatibility in the vtable):
9112         `insert_breakpoint' -> `old_insert_breakpoint'.
9113         `remove_breakpoint' -> `old_remove_breakpoint'.
9114         `create_string' -> `old_create_string'.
9115         `lookup_class' -> `old_lookup_class'.
9116         `lookup_type' -> removed; changed into a dummy field.
9117         `lookup_assembly' -> `old_lookup_assembly'.
9118         Added (same functionality, but different signature):
9119         `create_string', `lookup_class', `lookup_assembly'
9120         Added new:
9121         `get_method_addr_or_bpt', `remove_method_breakpoint',
9122         `runtime_class_init'.
9124         * debug-debugger.c: Merged the `debugger-dublin' branch.
9126 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
9128         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
9129         well.
9130         (peephole_pass): Likewise.
9132 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
9134         * driver.c: hopefully make setaffinity work also for ancient
9135         versions of linux.
9137 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
9139         * driver.c : win32 build fix.
9141 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
9143         * driver.c: check for the MONO_NO_SMP env var and bind to a single
9144         processor if it is set.
9146 2007-06-21  Martin Baulig  <martin@ximian.com>
9148         * debug-mini.h: New file.
9150         * debug-mini.c
9151         (mono_debugger_insert_breakpoint_full): Moved here from
9152         ../metadata/mono-debug-debugger.c.
9153         (mono_debugger_remove_breakpoint): Likewise.
9154         (mono_debugger_breakpoint_callback): Likewise.
9156 2007-06-15  Raja R Harinath  <rharinath@novell.com>
9158         * jit-icalls.c (mono_helper_compile_generic_method): Update to
9159         changes in MonoGenericClass.
9161 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
9163         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
9165 2007-06-14  Raja R Harinath  <rharinath@novell.com>
9167         * jit-icalls.c (mono_helper_compile_generic_method): Update to
9168         removal of MonoGenericMethod.
9170 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
9172         * mini-exceptions.c: hooks for the exception events profiling API.
9174 2007-06-14  Randolph Chung  <tausq@debian.org>
9176         * Makefile.ma: Add hppa target.
9177         * mini-arch.h: Include mini-hppa.h
9178         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
9179         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
9180         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9182 2007-06-14  Randolph Chung  <tausq@debian.org>
9184         * inssel.brg: Add rules for "chained" compare-branch operations so that
9185         a single compare op can affect multiple branches.  Adjust cost for
9186         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
9187         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
9188         cost for some rules so that they can more easily be overridden by
9189         per-arch rules (with fixes from lupus).
9190         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9192 2007-06-13  Randolph Chung  <tausq@debian.org>
9194         * mini-ops.h: Reorder branch ops so that they match the order of the
9195         corresponding CEE_* ops.  The code expects them this way.
9196         Add new ops for HPPA target.
9197         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9199 2007-06-13  Randolph Chung  <tausq@debian.org>
9201         * mini-exceptions.c: Handle cases where the stack grows towards
9202         larger addresses.
9203         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9205 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
9207         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
9208         counter.
9209         * driver.c: explain where a non-matching corlib is found.
9211 2007-06-13  Mark Probst  <mark.probst@gmail.com>
9213         * mini.c (print_jit_stats): Output dynamic code allocation stats.
9215 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
9217         * mini-exceptions.c: Generate a method profile leave event during
9218         an exception to ensure that the profiler gets notified.
9220 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
9222         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
9223         branch.
9225         * cpu-amd64.md: Add long_and/or/xor opcodes.
9227 2007-06-06  Wade Berrier  <wberrier@novell.com>
9229         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
9230         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
9231         length of instruction shr_imm (expected 8, got 10)
9233 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
9235         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
9237 2007-06-06  Mark Probst  <mark.probst@gmail.com>
9239         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
9240         MonoInternalHashTable again (fixed bug in the internal hash table
9241         code).
9243 2007-06-06  Mark Probst  <mark.probst@gmail.com>
9245         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
9246         Have to figure out what makes it crash the SWF regression.
9248 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
9250         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
9252 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
9254         * mini.c: optimize out the type check when storing null in a
9255         reference array.
9257 2007-06-04  Mark Probst  <mark.probst@gmail.com>
9259         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
9260         MonoInternalHashTable.
9262 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
9264         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
9265         signed integer methods.
9267 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
9269         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
9270         permanently since the current approach doesn't work.
9272 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
9274         * inssel.brg (stmt): Only call delegate->invoke_impl if 
9275         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
9277 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
9279         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
9280         the sreg2==rdx case.
9281         
9282         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
9283         account if it contains a rex prefix.
9284         (peephole_pass): Handle OP_FMOVE as well.
9286 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
9288         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
9289         as it causes regressions.
9291 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
9293         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
9294         static case as well.
9296         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
9298         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
9299         (mono_arch_get_this_arg_from_call): Ditto.
9301         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
9303         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
9304         invoke_impl field.
9306         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
9307         (mono_arch_get_this_arg_from_call): Ditto.
9309         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
9310         
9311         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
9312         try to create optimized invoke code and use that for further invocations. 
9313         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
9315         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
9317 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
9319         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
9320         sealed classes or methods.
9321         *devirtualization.cs: tests for the new optimization
9323 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
9325         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
9326         by the update_volatile () function.
9328 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
9330         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
9331         require it.
9333         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
9335 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
9337         * mini.c: Add configure checks for header files.
9338         * mini-x86.c: Add configure checks for header files.
9339         * trace.c: Add configure checks for header files.
9340         * aot-runtime.c: Add configure checks for header files.
9341         * aot-compiler.c: Add configure checks for header files.
9342         * driver.c: Add configure checks for header files.
9343         * mini-codegen.c: Add configure checks for header files.
9344         
9345         Code is contributed under MIT/X11 license.
9347 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
9349         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
9350         icompare_imm -128 + op_iclt. Fixes #81703.
9352 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
9354         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
9356 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
9358         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
9359         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
9360         so that all isinst checks now use "interface_bitmap".
9362 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
9364         * cpu-amd64.md (jmp): Fix a warning.
9366         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
9368         * basic.cs: Add new regression test.
9370         * basic.cs: Remove test which is now in basic-long.cs.
9372         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
9374         * basic-long.cs: Add new test.
9375         
9376 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
9378         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
9380 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
9382         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
9384         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
9385         places.
9386         
9387         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
9388         throwing code a bit.
9390         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
9391         the exception throwing code a bit.
9393         * mini-x86.c (get_call_info): Allocate result from a mempool.
9395 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
9397         * aot-compiler.c (find_typespec_for_class): Fix the assert.
9399         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
9401         * mini.h (MonoCompile): Add 'token_info_hash' field.
9403         * mini.c: Save token->method associations during compilation so the AOT 
9404         compiler can use it.
9405         
9406         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
9407         which reference generic classes and methods.
9409 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
9411         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
9413         * aot-compiler.c (compile_method): Fix a typo in a comment.
9415         * aot-runtime.c (decode_cached_class_info): Skip generic types.
9417         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
9418         everything generic.
9420         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
9422 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
9424         * mini.h (MonoCompile): Add 'args' field.
9426         * mini.c (mono_compile_create_vars): Store variables representing the arguments
9427         into cfg->args.
9429         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
9431 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
9433         * mini.c (mono_compile_get_interface_var): Remove this unused function.
9435         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
9437         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
9438         opcodes for some opcodes.
9440         * mini.h *.brg *.c: Use the new opcodes.
9442 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
9444         * mini.h: Bumped aot revision.
9446         * inssel.brg: modified code generation of type checks for interfaces
9447         to use the new "MonoClass.interface_bitmap" instead of the old
9448         "MonoClass.interface_offsets".
9450 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
9452         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
9454 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
9456         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
9457         64 bit platforms.
9459 2007-04-27  Neale Ferguson <neale@sinenomine.net>
9461         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
9463 2007-04-27  Wade Berrier  <wberrier@novell.com>
9465         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
9466         mini.h) to fix build.
9468 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
9470         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
9471         
9472         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
9473         causes the corlib unit tests to fail.
9475 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
9477         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
9479         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
9481         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
9482         opcodes to the comparison relations.
9484         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
9485         opcodes to their types.
9486         
9487         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
9489         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
9490         it in cfg->arch.cinfo.
9492         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
9494         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
9495         cfg->cil_offset_to_bb.
9497 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
9499         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
9500         created becase of initlocals.
9502 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
9504         * mini-alpha.c cpu-alpha.md: More alpha port work from 
9505         Sergey Tikhonov <tsv@solvo.ru>.
9507 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
9509         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
9511 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
9513         * cpu-s390.md (break): Correct the length of break instruction.
9515 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9517         * mini.c: fix a couple of soft-float issues and comments.
9519 2007-04-15  Miguel de Icaza  <miguel@novell.com>
9521         * trace.c (is_filenamechar): - is also a filename char.
9523 2007-04-15  Neale Ferguson <neale@sinenomine.net>
9525         * mini-s390.c: Correct checking for enum type in return value processing.
9527 2007-04-14  Raja R Harinath  <rharinath@novell.com>
9529         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
9530         (version.h): Makefile is in the build directory.
9532 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
9534         * mini-amd64.h: fix for assertion failure on Solaris/amd64
9536 2007-04-11  Martin Baulig  <martin@ximian.com>
9538         * mini.c (can_access_member): Fix handling of generic classes;
9539         fixes #81259.
9541 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
9543         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
9545 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
9547         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
9549 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9551         * mini-codegen.c: make sure the right spill amount is
9552         used for fp or integer registers (fixes the float_sub_spill() on ppc).
9554 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
9556         * mini-ppc.c: fixes for the fp_branch_nan test.
9558 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
9560         * basic.cs: Comment out new test which still fails on ia64.
9562 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9564         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
9566 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9568         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
9570 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
9572         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
9573         on 64 bit machines. Fixes part of #80738.
9575         * basic.cs: Add regression test.
9577 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
9579         * inssel.brg basic.cs: Revert previous change to fix build.
9581         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
9582         platforms.
9583         
9584         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
9586         * basic.cs: Add new regression test.
9588 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
9590         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
9591         many arguments.
9593 2007-03-16  Neale Ferguson <neale@sinenomine.net>
9595         * cpu-s390x.md: Correct length of break instruction.
9597 2007-03-16  Neale Ferguson <neale@sinenomine.net>
9599         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
9600         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
9602 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
9604         * *.c: Begin WIN64 port.
9605         * mini.c:  Use correct register in profiler.
9606         * mini-amd64.c: No inline assembly on Win64.
9607         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
9608         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
9609         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
9610         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
9611         mono_arch_ip_from_context for Win64.
9612         
9613         Contributed under MIT/X11 license.
9615 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
9617         * exceptions-amd64.c (seh_handler): Ditto.
9619         * exceptions-x86.c (seh_handler): Fix a memory leak.
9621 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
9623         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
9624         mini-s390x.c: fixed peephole optimizations to deal
9625         correctly with 1 and 2 byte reload avoidance.
9627 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
9629         * cpu-s390.md, cpu-s390x.md: update localloc length.
9631 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9633         * cpu-g4.md: added missing descriptions.
9635 2007-03-14  Miguel de Icaza  <miguel@novell.com>
9637         *  Makefile.am: Add support so the tail tests are not executed on
9638         PowerPC as that is a known limitation of the PowerPC port.
9640 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
9642         * runmdesc.bat:  Move to msvc directory.
9643         
9644 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
9646         * runmdesc.bat:  Run executable that was produced by the current
9647         target and sent via an argument.
9648         
9649 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
9651         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
9652         #81102.
9654         * generics.2.cs: Add regression test.
9656 2007-03-09  Wade berrier  <wberrier@novell.com>
9658         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
9660 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
9662         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
9663         AOT code depends on this.
9665 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9667         * mini.c: more precise tracking of types in the eval stack
9668         (part of fix for bug #81044).
9670 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
9672         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
9674         * aot-compiler.c (encode_patch): Remove an obsolete comment.
9676 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
9678         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
9680         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
9682 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
9684         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
9685         a pointer on 64 bit systems. Fixes #80190.
9687         * iltests.il: Add new regression test.
9689 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9691         * mini.c: inline a constant for Environment.IsRunningOnWindows.
9693 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
9695         * trace.c: Remove an erroneous alignemnt check when tracing.
9696           Fixes --trace on OSX86.
9698 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9700         * mini-$(arch).h: initialize SP in context for all the archs.
9702 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
9704         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
9705         regressions in the thread tests.
9707 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
9709         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
9710         - fixed implementation of LOCALLOC opcode
9711         - implemented non-un compare for floats
9712         - code cleanup
9713         - implementation of FDIV and CKFINITE opcodes
9714         - fixes for latest mono updates
9715         - additional arch opcodes
9717 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9719         * Makefile.am: simplify and merge rules for cross-compilation.
9721 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
9723         * local-propagation.c: Actually *apply* the fix for bug 80591...
9725 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9727         * mini-exceptions.c: backuot part of the last change
9728         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
9730 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
9731         * inssel.brg: Fix bug 59286.
9734 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
9736         * mini-exceptions.c: patch from Zoltan to correctly check for
9737         stack boundaries (using the stack register, not the frame register),
9738         fixes bugs #80724, #79717.
9740 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
9742         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
9743         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
9745         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
9746         presence of frame pointer elimination.
9748 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
9749         
9750         * mini-x86.h: NetBSD UCONTEX_REG defines.
9752 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
9754         * inssel-amd64.brg: Fix amd64 build.
9756 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
9758         * mini.h: remove extern to workaround what looks likes gcc bug 26905
9759         on amd64.
9761 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
9763         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
9764         ends.
9766         * mini-<ARCH>.c: Use mono_is_regsize_var ().
9768 2007-01-30 Mark Mason <mason@broadcom.com>
9770            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
9771            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
9772            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
9773            beginning support for CEE_JMP [not quite working yet]
9774            * tramp-mips.c: LMF handling now works
9775         
9776 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
9778         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
9780         * mini.h (NULLIFY_INS): New macro.
9782 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9784         * mini.c: statistical profiler fix for windows, patch
9785         from Tor Lillqvist (tml@novell.com).
9787 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
9788         * local-propagation.c: Fix bug 80591.
9790 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9792         * Makefile.am: put back the --export-dynamic option as with
9793         the previous gmodule flags (thanks to Robert Jordan).
9795 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
9797         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
9799         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
9800         simplify and speed up the local register allocator. Also rename some fields
9801         like iassign->vassign.
9802         
9803         * regalloc.c: Remove some functions which are no longer used since their
9804         inlined version is in mini-codegen.c.
9805         
9806         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
9808         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
9810 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
9812         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
9813         narrowing. Fixes #80622.
9815         * iltests.il: Add new regresssion test. 
9817 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9819         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
9820         debug-debugger.c, debug-debugger.h: warning fixes.
9821         * driver.c: updated copyright year and made it fit in one line.
9823 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
9825         * aot-runtime.c: updated to use mono-dl instead of gmodule.
9827 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
9829         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
9831         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
9833         * iltests.il: Add new test for bug #80507.
9835 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9837         * mini-arm.h: use soft-float also on vfp for now.
9839 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9841         * mini.c: fix some more soft-float issues.
9843 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
9845         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
9847 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
9848         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
9849         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
9850         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
9852 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
9854         * mini-arm.c: typo fix.
9856 2007-01-23  Neale Ferguson <neale@sinenomine.net>
9858         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
9860 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
9862         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
9863         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
9865         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
9867         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
9869         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
9870         
9871         * inssel.brg: Fix a warning.
9873         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
9875         * abcremoval.c ssa.c ssapre.c: Update after this change.
9876         
9877         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
9879         * dominators.c (df_set): Use mono_bitset_union_fast.    
9881 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9883         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
9884         mini-codegen.c: reduce relocations and memory usage for the cpu
9885         description.
9887 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
9889         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
9891         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
9892         to reduce their size.
9894 2007-01-19 Mark Mason <mason@broadcom.com>
9896         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
9897         * mini-mips.c: more configuration macros, support long conditional branches, additional
9898         asserts, fix epilog instrumentation.
9899         * mini-mips.h: use standard stack walk
9900         * cpu-mips.md: increase size of div, rem and conditional branches
9901         
9902 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
9904         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
9905         to cpu spec data.
9907 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
9909         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
9910         (compile_method): Ditto.
9912         * aot-runtime.c (decode_klass_info): Ditto.
9914         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
9915         needed by the code generated by inssel.brg. Also fix a warning.
9917 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
9919         * mini.c: deal with enums that become genericinsts by
9920         being nested in a generic class (bug #79956).
9922 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9924         * mini.c: match the generic definition to check for
9925         private access with generic types (bug #78431).
9927 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9929         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
9930         to make life easier for people cross-compiling that insist on not
9931         using scratchbox.
9933 2007-01-17 Mark Mason <mason@broadcom.com>
9935         * inssel-long.brg: patch to deal with mips missing flags
9936         * inssel-long32-mips.brg: implement overflow checks
9937         * insset-mips.brg: implement overflow checks
9938         * mini-mips.h: implement conditional exception handling
9939         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
9940           Remove unused code, minor cleanups.
9941         * exceptions-mips.c: minor cleanups
9942         * mini-ops.h: add mips conditional exception ops
9943         * cpu-mips.md: add mips conditional exception ops
9945         
9946 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9948         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
9949         to deal with mips missing of flags.
9951 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9953         * exceptions-ppc.c: execute fault handlers.
9955 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
9957         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
9959 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9961         * mini.c: handle also floating point values in initialize_array.
9963 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9965         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
9966         array initialization and make it conditional on the intrins option.
9968 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9970         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
9971         relocations and put the patch info names close to the enum definition.
9973 2007-01-15 Mark Mason <mason@broadcom.com>
9975         * basic.cs, exceptions.cs: break up large tests to increase debugability.
9977 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9979         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
9981 2007-01-12  Raja R Harinath  <rharinath@novell.com>
9983         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
9985 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9987         * Makefile.am: distribute the mips sources.
9989 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9991         * mini-codegen.h: handle bug #80489 here, by excluding ecx
9992         directly.
9994 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
9996         * cpu-x86.md: back out for now as this triggers other regressions.
9998 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
10000         * cpu-x86.md: force src1 and dest regpair for long shift instructions
10001         to eax:edx, so ecx can't get allocated to them (bug #80489).
10003 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
10005         * mini.c, mini-exceptions.c: enabled running fault handlers
10006         (bug #80469).
10008 2007-01-03  Miguel de Icaza  <miguel@novell.com>
10010         * driver.c: If nothing fail, do not use the string "failed",
10011         because it makes it very annoying to view test result logs on the
10012         web. 
10014 2006-12-30  Miguel de Icaza  <miguel@novell.com>
10016         * debug-debugger.c (mono_debugger_main): Rename "main" to
10017         "main_method" to prevent a warning.
10019         Remove a warning for unused field.
10021 2006-12-28  Martin Baulig  <martin@ximian.com>
10023         * debug-debugger.c
10024         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
10026 2006-12-22  Martin Baulig  <martin@ximian.com>
10028         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
10029         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
10030         seperate `.mdb_debug_info' section, so we can access it from the
10031         debugger even if the binary is stripped.
10033         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
10034         from the `.mdb_debug_info' here to prevent the linker from
10035         removing that section.
10037         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
10038         mdb-debug-info64.s.
10040 2006-12-19  Robert Jordan  <robertj@gmx.net>
10042         * mini-x86: enable the code to return small structures in
10043         registers for FreeBSD as well. Fixes bug #80278.
10044         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
10046 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
10048         * mini-x86.c: align the stack when calling the profiler
10049         function instrumenting the prolog (on OSX).
10051 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
10053         * mini.c: emit a break opcode where Debugger.Break () is called.
10055 2006-12-13  Miguel de Icaza  <miguel@novell.com>
10057         * mini.c (mono_method_to_ir): Provide useful information on this
10058         assert, to prevent others from debugging like I did.
10060 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
10062         * mini.c: enable code which was incorrectly commented
10063         (bug #80235).
10065 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
10067         * mini-x86.c: enable on OSX, too, the code to return small
10068         structures in registers.
10070 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
10072         * mini-x86.c: remove the use of the dynamic code manager here, too.
10074 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
10076         * mini.h, debug-debugger.c, tramp-*.c: fixed 
10077         mono_debugger_create_notification_function() to use
10078         mono_global_codeman_reserve () instead of a dynamic code manager.
10080 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
10082         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
10083         ves_array_element_address() jit icall and use a generated
10084         managed method instead (which is about 4 times faster for a rank 3
10085         array access).
10087 2006-11-29  Mark Mason  <mason@broadcom.com>
10089         * basic-calls.cs: additional tests for passing
10090         structures as function arguments.
10092 2006-11-29  Mark Mason  <mason@broadcom.com>
10094         * mini-mips.h: disable custom exception handling
10095         * mini-mips.c: throw/rethrow should use jalr to call
10096         exception stubs.  Fixed bug with passing structures
10097         by value. More support for tracing floating point
10098         functions.
10100 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
10102         * mini.c: fixed typo in the soft-float ldind.r4 handling
10103         (bug #80086).
10105 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
10107         * mini.c, mini.h, driver.c: added --runtime command line
10108         option to select a different runtime than the autodetected one.
10109         * jit.h: added API for embedders to initialize with a specific
10110         runtime version.
10112 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
10114         * mini.c: handle also boxing of r4 values (bug #80024).
10116 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
10118         * mini-ppc.c: force indirect calls until we reserve
10119         enough address space for all the generated code.
10121 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
10123         * exceptions-arm.c: workaround bugs in the libc definition
10124         of struct ucontext.
10126 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10128         * inssel.brg: fixes from me and Mark Mason.
10130 2006-11-23  Dick Porter  <dick@ximian.com>
10132         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
10133         semaphore display now we've fixed the initial value
10135 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10137         * inssel.brg: partially revert the last change to fix the build.
10139 2006-11-21  Mark Mason  <mason@broadcom.com>
10141         * inssel.brg: Add and use compare-and-branch macros to support
10142         architectures that do not have condition code registers (ie. MIPS).
10143         * *-mips.{c,brg,md}: Fix copyright statements
10145 2006-11-20  Mark Mason  <mason@broadcom.com>
10147         * Makefile.am: remove mini-codegen.c from list of MIPS sources
10148         * mini.c: Allow GET_CONTEXT to be specified by the arch port
10149         * mini.h: Added declaration for mono_print_ins()
10150         * mini-codegen.c: added ins_spec initializer for MIPS
10151         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
10152         vreg to be virtual and hreg to be non-virtual.
10153         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
10154         is not yet working/implemented correctly.
10155         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
10156         non-static, fixup calls to print_ins() from other parts in the file.
10158 2006-11-20  Mark Mason  <mason@broadcom.com>
10160         * basic-calls.cs: added tests for passing structures as arguments
10161         to calls.
10163 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10165         * inssel-long32.brg: optimize signed division by power of two.
10167 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
10169         * mini-arm.c: added support for interworking with thumb code
10170         (mono must be still be built using the ARM instruction encoding).
10172 2006-11-19  Miguel de Icaza  <miguel@novell.com>
10174         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
10175         verifier has different rules for it.   Fixes a few verifier issues
10176         in the test suite.
10178         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
10179         at the end, so people know what happened.
10181 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10183         * brach-opts.c: in optimize_exception_target() make sure we
10184         are in a catch clause (fixes bug #79871).
10186 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
10188         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
10189         more soft-float support fixes.
10191 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
10193         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
10194         that are passed half on the stack and half in registers.
10196 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
10198         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
10199         more mips integration work from Mark E Mason 
10200         <mark.e.mason@broadcom.com>.
10202 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
10204         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
10205         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
10206         tramp-mips.c: added sources for the mips port, not
10207         integrated in the build yet. Contributed by
10208         Mark E Mason <mark.e.mason@broadcom.com>.
10210 2006-11-14  Neale Ferguson <neale@sinenomine.net>
10212         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
10214 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10216         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
10217         put the soft-float rules in its own file since it seems to
10218         break s390 compilation.
10220 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
10222         * mini-arm.c: fixed wrnings.
10224 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
10226         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
10227         inssel-arm.brg: ARM support for soft-float.
10229 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
10231         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
10232         loads and stores of 32 bit fp values.
10234 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
10236         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
10238         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
10239         works. Fixes #79852 and #79463.
10241 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
10243         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
10244         more soft-float support WIP and fixes.
10246 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
10248         * mini-arm.c: some VFP updates.
10250 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
10252         * mini-exceptions.c: 0 is a valid local var offset in some
10253         architectures, don't assert (bug #78508).
10255 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
10257         * exceptions-arm.c: fixed off by one error in stack walk code.
10259 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
10261         * mini.h, mini.c: more precise tracking of type load exceptions.
10263 2006-11-03  Robert Jordan  <robertj@gmx.net>
10265         * Makefile.am: [WIN32] Add monow.exe target.
10266         * driver.c: [WIN32] Don't detach the console when debugging.
10267         Fixes bug #79797.
10268         
10269 2006-10-30  Miguel de Icaza  <miguel@novell.com>
10271         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
10273 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
10275         * aot-compiler.c (emit_method_info): Add a case missed earlier.
10277         * driver.c (mini_regression): Fix --regression with AOT.
10279         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
10281 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
10283         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
10285         * mini-sparc.h: Don't use sigaction on sparc/linux.
10287         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
10289         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
10291         * mini-exceptions.c: Add proper include files for getpid ().
10293 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
10295         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
10296         address instead of a MonoJitInfo* to avoid decoding the exception info for the
10297         method.
10299         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
10300         name cache to reduce its size.
10302         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
10304 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
10306         * mini-x86.c: Save/restore the current LMF structure more efficiently using
10307         the mono_lmf TLS variable.
10309         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
10310         trampoline lmf frames.  
10312         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
10314 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
10316         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
10317         the mono_lmf TLS variable.
10319         * mini-exceptions.c: Access the LMF structure through accessors.
10321         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
10322         variable instead of in jit_tls->lmf.
10324         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
10325         
10326         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
10327         trampoline lmf frames.
10329         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
10331 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
10333        * mini.c trace.c mini-x86.c: Revert these too.
10334         
10335        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
10336        signature change.
10338 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
10340         * genmdesc.c: removed now dead code.
10342 2006-10-09  Robert Jordan <robertj@gmx.net>
10344         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
10346 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
10348         * mini.h: do not leave gaps in the opcode values.
10350 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
10352         * jit-icalls.h: flag functions as internal here, too.
10354 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
10356         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
10357         functions with the internal attribute.
10359 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
10361         * aot-compiler.c: fclose the file descriptor in the profile read loop.
10363 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
10365         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
10366         for soft-float.
10368 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
10370         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
10371         tail calls as on other platforms.
10373         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
10375         * iltests.il: Add a few tailcall tests.
10377 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
10379         * driver.c: fix loop for old compilers (bug #79521).
10381 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
10383         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
10385         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
10387         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
10388         metadata without any code.
10390         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
10391         more precise debugging information using gdb.
10393 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
10395         * inssel-ia64.brg: Make the helper methods static.
10397 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
10399         * inssel-x86.brg: make the helper methods static.
10401 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
10403         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
10405 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
10407         * mini.c: updates for monoburg changes.
10408         * inssel.brg: make a few helper functions static as they should.
10410 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
10412         * Makefile.am: Move mini-codegen.c to common_sources.
10414 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
10416         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
10417         instructions.
10418         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
10419         mini-ppc.h: port to use the common local register allocator.
10421 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
10423         * mini.h: Remove the comment too then.
10425 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
10427         * mini.h: put back backend.data which is to be used shortly and
10428         doesn't increase the size of MonoInst. If any 64 bit arch aligned
10429         pointers on 4 byte boundaries it'd have much bigger issues running
10430         and you can ifdef it out anyway.
10432 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
10434         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
10435         MonoInst size by 4 bytes on 64 bit machines.
10437 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
10439         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
10440         replacement with more meaningful field names. Arch maintainers, please
10441         check the assigned names are good enough for your arch.
10443 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
10445         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
10446         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
10448 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
10450         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
10451         relocations and memory requirements, put the optimization flags
10452         definitions in their own file.
10454 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
10456         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
10458         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
10460 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
10462         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
10464 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
10466         * inssel.brg: use the correct function to get the size of an item
10467         in an array, given an element class.
10468         * aot-compiler.c: do not access class->class_size directly.
10470 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
10472         * mini.h, debug-mini.c: added a debugging function to print
10473         info about local variables and arguments in a jitted method.
10475 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
10477         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
10479         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
10481 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
10483         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
10484         inner and outer loops when passing vtypes.
10486 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
10488         * mini-ppc.c: take into account the cpu errata for cache flushing
10489         which caused some random errors (bug #79381).
10491 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
10493         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
10494         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
10496 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
10498         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
10499         loaded.
10501         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
10502         freebsd ports tree.
10504         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
10505         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
10507         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
10508         displacement.
10510 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
10512         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
10514 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
10516         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
10517         macro does not have to be changed during debugging.
10519         * cpu-alpha.md inssel-alpha.brg mini-alpha.h mini-alpha.c exceptions-alpha.c tramp-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
10521         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
10523         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
10524         
10525         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
10526         MONO_ARCH_NO_EMULATE_MUL is defined.
10528         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
10530         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
10532         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
10534         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
10535         
10536 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
10538         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
10539         stuff to mini-exceptions.c where it is used.
10541         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
10542         setup code, the real one is in mini-exceptions.c.
10544         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
10545         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
10546         some changes from the freebsd ports tree.
10548         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
10549         constants.
10550         
10551         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
10553 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
10555         * mini.c: on Linux, check for /proc to be mounted
10556         (bug# 79351, novell bug#201204).
10558 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
10560         * mini.c: handle cases where pthread_attr_getstack() behaves
10561         incorrectly (bug #78096).
10563 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
10565         * mini-arm.c: support larger stack frames (bug #79272).
10567 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
10569         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
10571         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
10572         tokens.
10574         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
10575         mono_class_from_name () to find a class from its name.
10577         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
10579 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
10581         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
10583 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
10585         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
10587 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
10589         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
10590         callinfo->trampoline.
10592         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
10593         fixes #79271.
10594         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
10595         future.
10597 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
10599         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
10601 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
10603         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
10604         stats.method_trampolines, it is already done by the generic trampoline code.
10606         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
10607         
10608 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
10610         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
10612         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
10614         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
10616         * mini.c (print_jit_stats): Print mscorlib mempool size too.
10617         
10618         * mini.c (print_jit_stats): Print new stats.
10620         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
10622 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
10624         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
10625         Address on two dimensional arrays. Fixes #78729.
10627         * mini.h (MonoCompile): Add a 'skip_visibility' field.
10629         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
10630         a method.
10632         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
10634         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
10635         #79130.
10636         
10637         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
10638         a race condition.
10639         (mini_get_ldelema_ins): Ditto.
10641 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
10643         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
10644         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
10645         Fixes #79213.
10647 2006-08-29 Neale Ferguson <neale@sinenomine.net>
10649         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
10650         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
10652         * exceptions-s390x.c: Cosmetic change.
10654         * tramp-s390.c: Fix warning.
10656         * cpu-s390.md: Correct length of mul_imm.
10658 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
10660         * aot-compiler.c: added binary writer with ELF backend
10661         implementation (only on Linux/x86 for now).
10663 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10665         * Makefile.am: Don't run net 2.0 AOT tests.
10667         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
10668         (mono_compile_assembly): Skip net 2.0 assemblies as well.
10670         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
10672 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10674         * aot-compiler.c: simplified and refactored the asm-writing code
10675         to allow different backends.
10677 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10679         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10681         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
10682         little. Share patches of type TYPE_FROM_HANDLE as well.
10684         * mini.c (mono_patch_info_equal): New helper function.
10685         (mono_patch_info_hash): Ditto.
10687         * aot-compiler.c (emit_method_code): Fix s390 build.
10689         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
10690         is not handled because it is stored as a flag and not as a type ctor. Fixes
10691         #79016.
10693 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
10695         * aot-compiler.c: Fix computation of GOT slot statistics.
10696         
10697         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
10698         Also remove support for not PIC AOT.
10700         * mini.h: Bump AOT file format version.
10702         * objects.cs: Add a test for #78990.
10704         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
10705         (peter.dettman@iinet.net.au). Fixes #79087.
10707         * basic-long.cs: Add a test for the above.
10709 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
10711         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
10712         
10713         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
10714         code somewhat.
10716 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
10718         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
10719         exceptions.
10721 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
10723         * mini.c: Don't verify COM proxy invoke calls
10724         
10726 2006-08-10  Dick Porter  <dick@ximian.com>
10728         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
10729         which process is holding semaphores locked.
10731 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
10733         * mini-ia64.c mini-amd64.c: Fix #79027.
10735         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
10737         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
10739         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
10740         implicit arguments in a vararg call. Fixes #79027.
10742 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
10744         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
10745         (mono_get_array_new_va_signature): Ditto.
10747 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
10749         * aot-runtime.c: Call init_plt lazily.
10751         * inssel-long.brg: Fix unsigned long->int conversion.
10753         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
10755         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
10756         that most data is now in the .rss/.data section.
10758 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
10760         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
10762         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
10764         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
10766         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
10768         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
10769         virtual call. Fixes #79010.
10771         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
10772         and use the result as the this argument in the real call.
10774         * generics.2.cs: Add a new test for #79010.
10775         
10776 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
10778         * mini-x86.c: Fix a warning.
10780         * aot-compiler.c: Add a bunch of statistics.
10782         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
10784 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
10786         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
10788 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
10790         * cpu-alpha.md inssel-alpha.brg mini-alpha.h mini-alpha.c exceptions-alpha.c tramp-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
10792 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10794         * mini.c (mono_method_to_ir): Obtain the original method in the
10795         CIL stream and use this to perform validation.
10797         Fixed: #78816
10799 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
10801         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
10802         (mono_arch_call_opcode): Ditto.
10804         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
10805         #78826.
10807         * mini.c (mono_patch_info_dup_mp): New helper function.
10808         
10809         * aot-compiler.c (compile_method): Fix some of the memory allocated during
10810         compilation. Fixes #78827.
10812 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
10814         * declsec.c: Use original security informations for
10815           MONO_WRAPPER_MANAGED_TO_MANAGED.
10817 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
10819         * mini.c: Allow Com Interop methods/classes and
10820         don't verify COM wrapper calls
10821         
10823 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
10825         * inssel-long32.brg: Fix long->i4 checked conversion.
10827         * exceptions.cs: Add a test for the above.
10829 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
10831         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
10833         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
10834         leaks.
10836         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
10837         #78775.
10839 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
10841         * mini.c: Fix solaris/x86 exception handling.
10843         * Makefile.am: Get rid of $(ICU_LIBS).
10845 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
10847         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
10848         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
10849         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
10851         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
10853         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
10854         this function causes a SIGSEGV.
10856 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
10858         * mini.c: Remove unused solaris/x86 includes.
10860 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
10862         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
10864 2006-06-20  Jb Evain  <jbevain@gmail.com>
10866         * cpu-g4.md: fix max length of start_handler instruction.
10868 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
10869         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
10871 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
10872         * ssa.c: Fixed bug 78653 for SSA based deadce.
10873         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
10874         MonoInst.flags, used in SSA based deadce.
10875         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
10876         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
10878 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
10880         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
10881         it can end up using non executable memory on ppc64 systems
10882         running ppc32 userspace (fix from Johannes Berg).
10884 2006-06-14  Dick Porter  <dick@ximian.com>
10886         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
10887         4.1.1
10889 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
10890         * mini.c: Made so that inline is locally disabled if it would
10891         trigger a .cctor, because too many apps depend on this behavior
10892         (which seems to be also the one of the MS CLR).
10894 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
10896         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
10897         No idea why this worked before.
10899         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
10900         which branch to outer exception clauses since they could skip the
10901         inner finally clauses. Fixes #78633.
10903         * exceptions.cs: Add a test for the above.
10905         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
10906         Fixes #78629.
10908         * iltests.il: Add a test for the above.
10910 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
10912         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
10913         after the end of a try bblock, to prevent asserts in mini_method_compile ().
10915         * iltests.il: Add a test for the above.
10917 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
10919         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
10920         
10921         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
10922         methods as instrinsics.
10924 2006-06-09  Wade Berrier <wberrier@novell.com>
10926         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
10927         (simple-cee-ops.h ssapre-mini-ops.h)
10929 2006-06-09  Neale Ferguson <neale@sinenomine.net>
10931         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
10932         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
10933         instruction).
10934         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
10935         * cpu-s390x.md: Fix max. length values for a couple of instructions.
10937 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
10939         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
10941 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
10943         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
10944         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
10945         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
10946         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
10947         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
10948         of opcodes, so that bug 78549 should not happen again.
10949         * ssapre.c: Updated to use the renamed files.
10951 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
10953         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
10954         in OP_ATOMIC_EXCHANGE_I4.
10956 2006-06-07  Wade Berrier <wberrier@novell.com>
10958         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
10959         in mono_debugger_create_notification_function)
10961 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
10963         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
10964         
10965         * mini.c (type_from_stack_type): Disable some changes which do not
10966         seem to work.
10968         * driver.c: Reenable opts.
10970         * mini.h (MonoStackSlot): New structure to keep track of the verification state
10971         of the evaluation stack.
10972         
10973         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
10974         evaluation stack trace at entry to the bblock.
10976         * mini.c (merge_stacks): New function to perform verification of stack merges.
10977         Turned off by default.
10979         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
10980         STACK_MP.
10981         
10982 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
10984         * local-propagation.c: Fixed bug 78549.
10986 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
10988         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
10990 2006-06-02  Miguel de Icaza  <miguel@novell.com>
10992         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
10993         tramp-arm.c, tramp-ia64.c
10994         (mono_debugger_create_notification_function): Update signature to
10995         new signature and use new protocol for creating the notification
10996         function.  
10998         Should fix the build.
11000 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
11002         * exceptions-ppc.c (mono_jit_walk_stack)
11003         (ves_icall_get_frame_info): Fix the build
11005 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
11007         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
11009 2006-05-31  Raja R Harinath  <rharinath@novell.com>
11011         * il2tests.2.il: New file for generics CIL tests.  Add test for
11012         #78019.
11013         * Makefile.am: Update.
11015         Fix #78019
11016         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
11017         to nullable types.
11019 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
11021         * aliasing.c: Fixed bug 78311.
11023 2006-05-29  Martin Baulig  <martin@ximian.com>
11025         * mini-exceptions.c (mono_find_jit_info): When computing the
11026         native offset, check whether we're actually inside the method's
11027         code; call mono_debug_print_stack_frame() to format the frame.
11028         (ves_icall_System_Exception_get_trace): Call
11029         mono_debug_print_stack_frame() to format the stack frame.
11030         (ves_icall_get_trace): Update to the new debugging API.
11031         (mono_jit_walk_stack_from_ctx): Likewise.
11032         (ves_icall_get_frame_info): Likewise.
11034         * mini.c (get_method_from_ip): Use the new debugging API.
11035         (mono_print_method_from_ip): Likewise.
11037         * exceptions-ppc.c
11038         (mono_jit_walk_stack): Use the new debugging API.
11039         (ves_icall_get_frame_info): Likewise.   
11041 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
11043         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
11045 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
11047         * mini.c: Added "limitator" to inline for debugging.
11049 2006-05-24  Martin Baulig  <martin@ximian.com>
11051         * debug-debugger.c (mono_debugger_init): Create a private,
11052         malloc()-based code manager for the notification function and
11053         intentionally leak it on exit.  This fixes the crash-on-exit race
11054         condition.
11056         * tramp-amd64.c
11057         (mono_debugger_create_notification_function): Added
11058         `MonoCodeManager *' argument.
11060         * tramp-x86.c
11061         (mono_debugger_create_notification_function): Added
11062         `MonoCodeManager *' argument.
11064 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
11066         * aliasing.c: Fixed 64 bit issue.
11067         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
11068         default since all known bugs are fixed (one more time!).
11070 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
11072         * mini.c: write barrier support.
11074 2006-05-23  Martin Baulig  <martin@ximian.com>
11076         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
11077         check at the top of the file.
11079 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
11081         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
11082         reverting changes without reason and without changelog entries.
11084 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
11086         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
11087         to a few opcodes. Fixes #78439.
11089         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
11090         consistency with other archs.
11092         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
11094 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
11096         * debug-debugger.c: fix the build.
11098 2006-05-17  Martin Baulig  <martin@ximian.com>
11100         * debug-debugger.c
11101         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
11102         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
11103         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
11104         (debugger_attach): Call GC_mono_debugger_add_all_threads().
11106 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
11108         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
11110 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
11112         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
11113         MONO_TYPE_GENERICINST.
11114         
11115         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
11116         MONO_TYPE_GENERICINST.
11118 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
11120         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
11121         #78325.
11123 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
11125         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
11126         mempool.
11127         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
11129 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
11131         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
11132         mono_trace_cleanup ().
11134         * iltests.il: Fix problem with the newly added test.
11136         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
11137         due to register constraints, free up the previous hreg. Fixes #78314.
11139         * iltests.il: Add new test for #78314.  
11141         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
11142         Interlocked.Add. Fixes #78312.
11144         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
11145         
11146 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
11148         * inssel.brg (mini_emit_virtual_call): Fix a warning.
11150 2006-05-05  Martin Baulig  <martin@ximian.com>
11152         * debug-mini.c (mono_debug_open_block): New method.
11154         * mini-amd64.c
11155         (mono_arch_output_basic_block): Call mono_debug_open_block() at
11156         the beginning of each basic block.
11158         * mini-x86.c
11159         (mono_arch_output_basic_block): Call mono_debug_open_block() at
11160         the beginning of each basic block.
11162 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
11164         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
11165         default until I understand why they break the build on amd64.
11167 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
11169         * mini.c (mini_cleanup): Call mono_cleanup ().
11171         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
11172         errors.
11174 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
11176         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
11177         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
11178         default since all known bugs are fixed, and I cannot reproduce bug
11179         77944... I'm asking Matt Hargett to test again after this commit.
11181 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
11183         * mini-codegen.c: Fixed typo that thrashed inline.
11185 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
11187         * dominators.c (compute_dominators): Avoid using a worklist since
11188         it is not correct in some cases. Instead, iterate over all bblocks as
11189         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
11191 2006-04-28  Miguel de Icaza  <miguel@novell.com>
11193         * mini.c (mono_jit_compile_method_inner): Use
11194         mono_prepare_exception_from_error that resets the value
11195         internally.
11197 2006-04-27  Miguel de Icaza  <miguel@novell.com>
11199         * mini.c: Move the mini_loader_error_to_exception to metadata. 
11200         
11201 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
11203         * aliasing.c: Fixed bug 78210.
11205 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
11207         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
11208         default until all their problems (or the ones they trigger) are fixed.
11210 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
11212         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
11213         
11214         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
11215         as loaded only after resolving patches since that could invoke the same method.
11217         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
11219         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
11220         functions.
11222         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
11223         AOT loader.
11225         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
11226         stack.
11228         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
11229         made from AOT code through the PLT table.
11231         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
11232         holding the plt offset when a call is made to the aot plt trampoline.
11233         
11234 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
11236         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
11237         amd64 AOT support.
11239         * Makefile.am (common_sources): Fix build breakage.
11241         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
11242         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
11243         intra-assembly calls if possible.
11244         
11245         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
11247         * mini-trampolines.c: Handle PLT entries.
11249         * mini.c: Avoid creating a GOT var for calls.
11251         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
11252         from mscorlib code.
11254         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
11255         from mscorlib code.
11257         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
11258         AOT code.       
11260         * mini.h: Bump AOT file format version.
11261         
11262         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
11263         covers more cases.
11265 2006-04-25  Martin Baulig  <martin@ximian.com>
11267         * driver.c: Disable copyprop, consprop and inline when running
11268         inside the debugger.
11270 2006-04-25  Martin Baulig  <martin@ximian.com>
11272         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
11273         with `get_current_thread' and added `detach'.
11274         (MonoDebuggerMetadataInfo): Added `thread_size',
11275         `thread_tid_offset', `thread_stack_ptr_offset' and
11276         `thread_end_stack_offset'.
11278 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
11280         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
11281         aot-runtime.c.
11283         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
11284         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
11286         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
11288         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
11290         * aot.c: Add support for ADJUSTED_IID.  
11292 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
11294         * aot.c (emit_method_order): Don't align method_order_end.
11296         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
11297         the interface ID changes.
11299 2006-04-21  Dick Porter  <dick@ximian.com>
11301         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
11302         cleaning up a thread.  Fixes the new part of bug 77470.
11304 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
11306         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
11307         to managed wrapper.
11308                      
11309 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
11311         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
11312         
11313         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
11314         SIGSEGV. Fixes #78072.
11316         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
11317         unregister our SIGABRT handler.
11319 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
11321         * mini.c: Disabled inline where it can alter the call stack in a
11322         way visible from managed code.
11323         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
11324         default.
11326 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
11328         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
11329         on other platforms. Fixes #78089.
11331 2006-04-13  Martin Baulig  <martin@ximian.com>
11333         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
11334         determine whether we're inside the debugger.
11336         * debug-debugger.h
11337         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
11339 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
11341         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
11342         handler clauses. Fixes #78024.
11344         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
11345         in the CALL_MEMBASE opcodes. Fixes #78088.
11346         (mono_arch_get_vcall_slot_addr): Ditto.
11348 2006-04-10  Martin Baulig  <martin@ximian.com>
11350         * debug-debugger.c: The thread handling code has now been moved
11351         into ../metadata/threads.c.
11353 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
11355         * driver.c (mono_main): Fix --with-gc=none build.
11357         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
11358         (mono_spillvar_offset_float): Ditto.
11359         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
11360         hreg, not when its !global, since on ia64, there is a third category: stacked
11361         registers.      
11363 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
11365         * mini.c: set MonoInst->klass for load field address and a few other
11366         places.
11368 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
11370         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
11372 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
11374         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
11375         the branch opt changes.
11377 2006-04-06  Dick Porter  <dick@ximian.com>
11379         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
11380         
11381         * wapihandles.c (mini_wapi_seminfo): 
11382         * driver.c (mono_main): Add semaphore info option
11384 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
11386         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
11387         branch optimization changes. Fixes #78009.
11389 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
11391         * mini.c: ignore accessibility of methods in managed->native wrappers.
11393 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
11395         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
11396         
11397         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
11399 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
11401         * mini.c: Modify the branch optimizations to preserve the invariant that
11402         the entries inside the in_bb and out_bb arrays are unique.
11403         (mono_unlink_bblock): Avoid creation of new arrays.
11405 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
11407         * mini.c (mono_unlink_bblock): Fix regression caused by previous
11408         change (#77992).
11410 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
11412         * mini.c (optimize_branches): Remove the "optimizations" in
11413         the cbranch1/cbranch2 -> branch cases which were causing several
11414         problems in the past. Fixes #77986.
11416 2006-03-31  Chris Toshok  <toshok@ximian.com>
11418         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
11419         default optimizations :(
11421 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
11423         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
11424         branch.
11426 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
11428         * local-propagation.c: Added comments to structs and removed
11429         "Mono" prefixes from local tree mover types.
11431 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
11433         * Makefile.am (arch_sources): Define this for each architecture so 
11434         libmono_la_SOURCES is defined in one place.
11436 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
11438         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
11439         from handles/.
11441 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
11443         * driver.c: print the GC name supplied by configure.
11445 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
11447         * local-propagation.c: Added tree mover, and moved here all the
11448         local propagation code from mini.c
11449         * mini.c: Added support for treeprop, and moved all the local
11450         propagation code to local-propagation.c
11451         * mini.h: Added support for treeprop
11452         * driver.c: Added support for treeprop, enabled consprop, copyprop,
11453         treeprop, inline and deadce by default
11454         * Makefile.am: Added local-propagation.c
11456 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
11458         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
11460 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
11462         * debug-debugger.c: make it compile without the Boehm GC.
11464 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
11466         * mini.c: fixed issue with mismatch when an icall is registered
11467         with multiple names but same address.
11469 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11471         * declsec.c, mini-exceptions.c: use write barrier to set reference
11472         fields of managed objects.
11474 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
11476         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
11477         (can_access_internals): Fix a warning.
11479         * mini.c (print_method_from_ip): Rename this to 
11480         mono_print_method_from_ip so it gets exported.
11482         * trace.c: Deal with strings inside StringBuilder's containing garbage
11483         and fix memory leaks. Fixes #77848.
11485 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
11487         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
11488         fixes #77787.
11490 2006-03-16 Neale Ferguson <neale@sinenomine.net>
11491         
11492         * mini-s390.c: Remove OP_X86_TEST_NULL.
11494 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11496         * mini.c: use the correct GetHashCode() for the moving collector.
11498 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
11500         * liveness.c: Regalloc spill cost tuning.
11502 2006-03-15 Neale Ferguson <neale@sinenomine.net>
11503         
11504         * mini-s390x.h: Correct S390_LONG macro.
11506         * mini-s390x.c: Cleanup unused code.
11508 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
11510         * jit-icalls.h: New file.
11512         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
11513         icalls and include that instead of including jit-icalls.c.
11515         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
11516         OP_X86 opcodes.
11518 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
11520         * mini.c: when checking for member accessibility, also check for
11521         friend assemblies and for explicit interface implementations.
11523 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
11525         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
11527         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
11529         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
11530         common cases are done first.    
11532         * mini-ops.h: Only define platform specific opcodes on the given platform.
11534         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
11535         branch.
11536         
11537 2006-03-14  Martin Baulig  <martin@ximian.com>
11539         Revert Paolo's change from r57348:
11541         * mini.h: don't use gboolean for bitfields.
11542         * mini.c: verifier changes for fields and methods accessibility.
11544 2006-03-13  Neale Ferguson <neale@sinenomine.net>
11546         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
11548         * mini-s390x.c: Fix conv_r_un.
11550         * cpu-s390, cpu-s390x.md: Fix lengths.
11552 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
11554         * mini.c: nested types have access to all the nesting
11555         levels, not just the enclosing types.
11557 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
11559         * mini.c: added a few more verification checks.
11561 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
11563         * liveness.c: Merge optimizations from the linear-il branch.
11565 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
11567         * mini-ia64.c (emit_call): Add a comment.
11569         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
11571         * tramp-ia64.c: Fix some warnings.
11573 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
11575         * mini.h: don't use gboolean for bitfields.
11576         * mini.c: verifier changes for fields and methods accessibility.
11578 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
11580         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
11581         lazy icall wrapper changes.
11583         * dominators.c: Replace all the dominator algorithms with faster
11584         ones from the linear-il branch.
11586         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
11587         the mempool.
11589         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
11590         common cases are done first.
11592         * mini-amd64.c: Fix some warnings.
11594         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
11595         from the mempool.
11597         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
11598         added code.
11600         * mini.h: Add a missing prototype.
11602 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
11604         * mini.c: Compile icall wrappers lazily.
11606         * mini-codegen.c: Use printf instead of g_print since its much faster.
11608         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
11609         function.
11611         * mini.c (optimize_branches): Cache the negative result from 
11612         remove_block_if_useless ().
11614         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
11615         Also fix some bblock linking issues.
11617         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
11618         assembly files.
11620         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
11622         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
11623         accessed fields first, for better cache behavior.
11624         
11625 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
11627         * mini.c: speedup IList<T> array accesses.
11629 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
11631         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
11632         inline_costs counter. Fixes #77190.
11634 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
11636         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
11637         trace messages. Fixes #77706.
11639 2006-03-04  Martin Baulig  <martin@ximian.com>
11641         * tramp-amd64.c, tramp-x86.c
11642         (mono_debugger_create_notification_function): Use
11643         mono_global_codeman_reserve() to allocate a buffer at runtime and
11644         return it.
11646         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
11648         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
11649         notification function at runtime and then call `initialize' in the
11650         `MONO_DEBUGGER__debugger_info' vtable.
11652 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
11654         * iltests.il: Fix a visibility problem.
11656 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11658         * driver.c, mini.c: add hooks for the counters API.
11660 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11662         * driver.c: show disabled options.
11664 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11666         * linear-scan.c: always use cost-driven selection.
11668 2006-02-28  Raja R Harinath  <rharinath@novell.com>
11670         * jit-icalls.c (helper_compile_generic_method): Revert change from
11671         2006-02-24.
11673 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
11675         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
11677 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
11679         * inssel.brg: style fixes, mostly to force the updated monoburg
11680         to run for people using svn.
11682 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11684         * mini.c: match monoburg changes.
11686 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11688         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
11689         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
11690         declaration in the header file.
11692 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11694         * helpers.c: reduce relocations and mem usage.
11696 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11698         * mini.h, mini-codegen.c: disable logging features if
11699         requested by configure.
11701 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
11703         * mini.c: tiny verifier changes.
11705 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11707         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
11708         cpu-pentium.md: stack alignment changes for osx/x86,
11709         partially from Geoff Norton <gnorton@customerdna.com>.
11711 2006-02-24  Raja R Harinath  <harinath@gmail.com>
11713         * jit-icalls.c (helper_compile_generic_method): Update to changes
11714         in metadata/class.c.
11716 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
11717         
11718         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
11719         
11720         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
11721         interface calls with large offsets.
11723 2006-02-23  Raja R Harinath  <rharinath@novell.com>
11725         * jit-icalls.c (helper_compile_generic_method): Document the
11726         special-case we depend on so that we can inflate the method twice
11727         with the same context with no bad side-effects.
11729 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
11731         * mini-x86.c, mini-amd64.c: fix for case when xen support
11732         is disabled.
11734 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
11736         * mini-x86.c, mini-amd64.c: generate code to access tls items
11737         in a faster way for Xen systems.
11739 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11741         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
11742         updates and compilation fixes for the OSX/x86 port, mostly from
11743         Geoff Norton <gnorton@customerdna.com>.
11745 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11747         * inssel.brg: faster interface call implementation
11748         to sync with the interface_offsets MonoVTable changes.
11750 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11752         * mini.c: more verification checks.
11754 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
11756         * mini.c: added a few more verification checks.
11758 2006-02-17      Neale Ferguson <neale@sinenomine.net>
11760         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
11761         facility on the processor and use it if available.
11763 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11765         * driver.c, aot.c, mini.c: throw exception if the IL code is
11766         invalid or unverifiable.
11768 2006-02-17  Raja R Harinath  <rharinath@novell.com>
11770         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
11771         m.StructField.
11773 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
11775         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
11777 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11779         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
11780         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
11781         handling of instantiated generic valuetypes.
11783 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
11785         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
11786         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
11787         instead.
11789         * generics.2.cs: Revert the nullable reftypes tests.
11791 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
11793         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
11794         using __builtin_frame_address (1) as it doesn't work in the presence
11795         of optimizations. Hopefully fixes #77273.
11797         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
11798         -> generics.cs change as it doesn't work with some automake versions.
11800 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11802         * mini.c: handle systems that sue a different way to
11803         retrieve the stack address of the current thread.
11805 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
11807         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
11808         it specially in the makefile.
11810         * generics.2.cs: Add tests for nullable reference types.
11812 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11814         * mini.c: always handle the case when mono_jit_init()
11815         is called in a thread different from the main thread,
11816         confusing libgc (bug #77309).
11818 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
11820         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
11822 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11824         * mini.c: change optimize_branches () to use a single loop
11825         and introduce a new optimization to simplify some range checks.
11827 2006-02-03  Martin Baulig  <martin@ximian.com>
11829         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
11830         and merged with debugger_thread_manager_add_thread().
11831         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
11832         inform the debugger about the main thread.
11834 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11836         * basic.cs: Add test for div.un/rem.un constant folding.
11838 2006-02-03  Neale Ferguson <neale@sinenomine.net>
11840         * cpu-s390x.md: correct int_xor_imm length
11842 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11844         * generics.2.cs: New test for #77442.
11846         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
11847         #77442.
11849 2006-02-02  Martin Baulig  <martin@ximian.com>
11851         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
11852         <mono/metadata/mono-debug-debugger.h>   
11854         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
11856 2006-02-02  Martin Baulig  <martin@ximian.com>
11858         * debug-debugger.h: New header file for debug-debugger.c.
11860         * debug-debugger.c: Big API cleanup; don't run the managed Main()
11861         function is a separate thread anymore; add support for attaching.
11863 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
11865         * tramp-x86.c: Fix a warning.
11867 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
11869         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
11870         on very large methods.
11872         * aot.c (load_patch_info): Fix a warning.
11874 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11876         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
11877         mini-ops.h: alu membase optimizations.
11879 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
11881         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
11882         to speedup StringBuilder.
11884 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
11886         * dominators.c (mono_compute_natural_loops): Fix detection of
11887         loop body start blocks.
11889         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
11891 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
11893         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
11894         #75145.
11896 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
11898         * aliasing.c: Fixed aliasing issue on 64 bit archs.
11900 2006-01-25  Martin Baulig  <martin@ximian.com>
11902         * debug-debugger.c: Moved the `MonoDebuggerManager' and
11903         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
11904         started to cleanup this file a little bit.
11906 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
11908         * mini.c: optimize a codepath frequently happening in generics code.
11910 2006-01-23  Martin Baulig  <martin@ximian.com>
11912         * Makefile.am: Only compile debug-debugger.c on supported platforms.
11914         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
11915         functions directly.
11917         * driver.c: debug-debugger.c is only available if
11918         `MONO_DEBUGGER_SUPPORTED' is defined.   
11920 2006-01-23  Martin Baulig  <martin@ximian.com>
11922         * debug-debugger.c: Only enable this on platforms where the Mono
11923         Debugger is working (x86 and x86_64).
11925 2006-01-21  Martin Baulig  <martin@ximian.com>
11927         The Mono Debugger is now using the normal `mono' instead of the
11928         `mono-debugger-mini-wrapper' when executing managed code.
11930         * debug-debugger.c: New file; previously known as
11931         debugger/wrapper/wrapper.c.
11933         * debug-mini.c (mono_init_debugger): Removed.
11935         * driver.c (mono_main): Added new `--inside-mdb' command line
11936         argument which is used when running inside the debugger.
11938 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
11940         * liveness.c (mono_analyze_liveness): Remove some unused data
11941         structures.
11943 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
11945         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
11947 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
11949         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
11950         depends on implementation details of monobitset.
11952         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
11953         Fixes #77271.
11955 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
11957         * liveness.c: Update after monobitset changes.
11959 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
11961         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
11963 2006-01-11 Neale Ferguson <neale@sinenomine.net>
11965         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
11967         * mini-s390x.c: Remove warning messages.
11969 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
11971         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
11973 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
11975         * generics.2.cs: Add ldelem/stelem_any test.
11977 2006-01-10 Neale Ferguson <neale@sinenomine.net>
11979         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
11981 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
11983         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
11984         
11985 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
11987         * generics.2.cs: Reenable vtype tests.
11989         * inssel-x86.brg: Remove an icorrect valuetype rule.
11991 2006-01-06 Neale Ferguson <neale@sinenomine.net>
11993         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
11994         initial support for OP_ABS.
11996 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11998         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
12000 2006-01-05 Neale Ferguson <neale@sinenomine.net>
12002         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
12003         conversion and implement LADD/LSUB.
12005         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
12006         architectures.
12008 2006-01-05 Neale Ferguson <neale@sinenomine.net>
12010         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
12012         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
12013         architectures.
12015 2006-01-05 Neale Ferguson <neale@sinenomine.net>
12017         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
12018         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
12019         (stack walk problem).
12021 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
12023         * aot.c (mono_aot_load_method): Fix a warning.
12025 2006-01-03  Neale Ferguson <neale@sinenomine.net>
12027         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
12029 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
12031         * iltests.il: Add test for #77148.
12033         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
12034         #77148.
12036 2006-01-03  Neale Ferguson <neale@sinenomine.net>
12038         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
12040 2006-01-03  Neale Ferguson <neale@sinenomine.net>
12042         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
12043         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
12045         * basic-long.cs: Add lconv-to-r4/r8 tests.
12047 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
12049         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
12051         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
12052         here as on other archs.
12054 2005-12-29 Neale Ferguson <neale@sinenomine.net>
12056         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
12058 2005-12-29 Neale Ferguson <neale@sinenomine.net>
12060         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
12061         
12062         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
12064         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
12065         instrument_prolog; Add memory_barrier instruction.
12067 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
12069         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
12071 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
12073         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
12075         * aliasing.c inssel.brg: Fix warnings.
12077         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
12078         could skip initialization of some parts of memory.
12080         * mini.c mini-ia64.c: Fix warnings.
12082         * inssel-sparc.brg: Add an implementation of lneg which actually works.
12084 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
12086         * aliasing.c (mono_build_aliasing_information): Add a workaround for
12087         a crash seen on sparc.
12089         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
12090         
12091         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
12093 2005-12-21 Neale Ferguson <neale@sinenomine.net>
12095         * mini-ops.h: Add s390_backchain instruction
12097         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
12099         * cpu-s390.md: Add s390_backchain instruction
12101         * mini-s390.c: Significant ABI changes
12103         * mini-s390.h: Cater for zero length structures
12105 2005-12-20 Neale Ferguson <neale@sinenomine.net>
12107         * mini-s390.c: ABI fixes
12109         * inssel-s390.brg: Remove debug statements
12111         * cpu-s390.md: Fix length of ATOMIC_xx operations
12113 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
12115         * basic-float.cs: Add float<->long conversion tests.
12117 2005-12-16 Neale Ferguson <neale@sinenomine.net>
12119         * mini-s390.c: Fix LOCALLOC processing.
12121         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
12123 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
12125         * iltests.il: Add tests for some opcodes not covered by the other
12126         tests.
12128 2005-12-15 Neale Ferguson <neale@sinenomine.net>
12130         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
12131         register loading for Tail processing; Correct trace output.
12133         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
12135         * cpu-s390.md: Correct size of jmp instruction. 
12137 2005-12-13 Neale Ferguson <neale@sinenomine.net>
12139         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
12141 2005-12-13 Neale Ferguson <neale@sinenomine.net>
12143         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
12144           Bring s390 up to current level.
12146 2005-12-12  Zltan Varga  <vargaz@gmail.com>
12148         * generics.2.cs: Disable the newly added tests as they do not work yet.
12149         
12150         * generics.2.cs: Add valuetype tests.
12152 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
12154         * basic-long.cs: Add i4->u8 test.
12156         * objects.cs: Add tests for JIT intrinsic.
12158         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
12159         optimizations lost by a mistake.
12161 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
12163         * basic-long.cs: Remove a test moved to objects.cs.
12165         * arrays.cs: Add more array tests.
12167 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
12169         * arrays.cs: Add new tests for multi-dimensional arrays.
12171 2005-12-06  Raja R Harinath  <rharinath@novell.com>
12173         * Makefile.am (test_sources2): Add generics.2.cs.
12174         (EXTRA_DIST): Add test_sources2.
12176 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
12178         Support for boxing and unboxing nullable types as well as the
12179         isinst operation on nullables, per the CLI ammendment.
12181         * inssel.brg (CEE_ISINST): Special case for nullable
12183         * mini.c (handle_unbox_nullable): new method
12184         (handle_box): Special case for nullable types
12185         (mono_method_to_ir): Call handle_unbox_nullable in correct
12186         places.
12188         * generics.2.cs: New test suite
12190         * Makefile.am: Support for regression tests with generics.
12192 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
12194         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
12195         allocated to registers. Fixes #76800.
12197 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
12199         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
12201 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
12203         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
12204         of platforms.
12206 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
12208         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
12209         objects.cs.
12211         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
12212         
12213         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
12214 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
12216         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
12217         single precision before storing to a single precision location.
12219 2005-11-28  Raja R Harinath  <rharinath@novell.com>
12221         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
12223 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
12225         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
12226         correct files.
12228         * basic.cs: Remove test_0_byte_compares test which was moved to
12229         objects.cs a long time ago.
12231 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
12233         * aliasing.c: Fixed aliasing issue on 64 bit archs.
12235 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
12237         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
12238         handlers are called.
12240         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
12241         throwing code.
12243          * mini-ia64.c: Add support for the throw->branch exception 
12244         optimization.   
12246         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
12248 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
12250         * mini.c: Enabled "fastpath" deadce :-)
12251         
12252 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
12254         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
12255         alias analysis pass to support it.
12256         * mini.h: Likewise.
12257         * ssa.c: Likewise.
12258         * liveness.c: Likewise (liveness computation can use aliasing
12259         information to be more accurate).
12260         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
12261         moreover made so that "--compile-all" uses the given optimization
12262         flags and not the default ones.
12263         * aliasing.c: Alias analysis (new file).
12264         * aliasing.h: Likewise.
12265         * Makefile.am: added "aliasing.c" and "aliasing.h".
12266         
12267 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
12269         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
12270         OP_L opcodes.
12272 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
12274         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
12275         fp >= end_of_stack exit condition, as it is not needed, and it might
12276         become true for fp eliminated frames.
12278 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
12280         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
12281         coded offsets.
12283 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
12285         * mini-arm.c: fixed alignment of doubles/longs to match
12286         the C ABI (bug #76635).
12288 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
12290         * aot.c: fix compilation with --enable-minimal=aot.
12292 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
12294         * mini-arm.c: fixed compatibility with the new
12295         floating point emulator package for compares.
12297 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
12299         * mini.c : reverted sig->pinvoke changes (r51396-51397).
12301 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
12303         * mini-exceptions.c (print_stack_frame): Output to stderr.
12304         (mono_handle_native_sigsegv): Ditto.
12306 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
12308         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
12309         OP_LCONV_TO_OVF_I implementation.
12311         * mini-amd64.c: Add support for the throw->branch exception 
12312         optimization.
12314         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
12315         when the catch clause catches a more general exception, i.e. Object.
12317 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
12319         * cpu-ia64.md: Remove unused opcodes.
12321         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
12322         specific defines for architectures defining USE_SIGACTION.
12324         * mini-ia64.c: Fix some warnings.
12326         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
12327         version seemed to skip a frame.
12329 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
12331         * mini.c: Clean up the usage of sig->pinvoke flag. Now
12332         only calls which are made to native code use this flag.
12334 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
12336         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
12337         varargs methods as well.
12338         
12339         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
12340         which have save_lmf set. Reorganize methods prologs a bit.
12342         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
12343         debugger to the proper place.
12345 2005-10-29  Martin Baulig  <martin@ximian.com>
12347         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
12348         when running inside the debugger until the debugger has support
12349         for it.
12351 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
12353         * mini.h: Fix a warning.
12355 2005-10-24  Miguel de Icaza  <miguel@novell.com>
12357         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
12358         we expose publicly, this returns the string.
12360 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
12362         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
12363         with fp elimination.
12365 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
12367         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
12368         native stacktrace using the glibc 'backtrace' function if available.
12370 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
12372         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
12374         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
12375         handle SIGSEGVs received while in native code.
12377         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
12378         code, call mono_handle_native_sigsegv which will abort the runtime
12379         after printing some diagnostics, instead of converting it into a
12380         confusing NullReferenceException.
12382 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
12384         * cpu-pentium.md: Remove unused opcodes.
12386 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
12388         * mini-amd64.h (MonoLMF): Add rsp field.
12390         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
12391         the lmf too.
12393 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
12395         * mini-codegen.c (get_register_spilling): Fix some warnings.
12397 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
12399         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
12400         elimination during exception handling. Enable fp elimination by
12401         default.
12403         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
12404         elimination.
12406 2005-10-16  Martin Baulig  <martin@ximian.com>
12408         * mini-exceptions.c
12409         (mono_debugger_run_finally): New public method for the debugger.
12411 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
12413         * debug-mini.c (mono_debug_init_method): Fix warning.
12415         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
12416         the 'exname' parameter const to fix some warnings.
12418 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
12420         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
12421         introduced by the previous patch.
12423 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
12425         * basic-float.cs: Add test for precision of float arithmetic.
12427         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
12428         when loading/storing single values from/to memory.
12430         * mini.c (mono_jit_compile_method_with_opt): Create the function
12431         pointers in the correct domain.
12433 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
12435         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
12436         introduced by previous patch.
12437         
12438         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
12439         when out_filter_idx is NULL.
12441         * mini-exceptions.c: Don't run filter clauses twice during exception
12442         handling. Fixes #75755.
12444 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
12446         * aot.c: Add support for ldflda wrappers.
12448         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
12449         #75902.
12451 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
12453         * mini.c, mini.h: do not consider exception handlers blocks when
12454         setting up interface variables.
12456 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
12458         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
12460 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
12462         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
12463         causes a regression.
12465         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
12467 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
12469         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
12470         of the OP_P definitions.
12472         * TODO: Add a proposal for dealing with the CEE/OP mess.
12474         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
12475         optimizations from the x86 port.
12477         * cpu-amd64.md: Ditto.
12479         * basic.cs basic-long.cs: Add tests.
12481 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
12483         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
12484         Patrik Torstensson's implementation of my exception-handling
12485         optimization idea, when the exception object is not used
12486         (bug #62150).
12488 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
12490         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
12491         of the mul_imm optimizations from the old jit.
12493 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
12495         * mini.c, liveness.c: patch by Patrik Torstensson and
12496         Zoltan Varga to improve performance in methods with
12497         exception clauses.
12499 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
12501         * driver.c: Remove 'Globalization' entry from --version.
12503 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
12505         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
12506         there is a profiler interested in JIT events.
12508         * aot.c: Load profile files produced by the AOT profiling module, and
12509         reorder methods based on the profiling info. Add a 'method_order' table
12510         to the AOT file to make mono_aot_find_jit_info work with the reordered
12511         methods.
12513         * mini.h: Bump AOT file version info.
12515 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
12517         * mini-arm.h: work around what looks like a gcc bug when optimizations
12518         are enabled.
12520 2005-09-28  Raja R Harinath  <rharinath@novell.com>
12522         * Makefile.am (AM_CFLAGS): Don't use += to append inside
12523         conditionals.  Use ...
12524         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
12526 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
12528         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
12529         to determine the amount of memory to copy when passing valuetypes.
12531         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
12532         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
12534 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
12536         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
12537         information about aot.
12539 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
12541         * *.c: Replace the use of {Enter,Leave}CriticalSection with
12542         macros. This will allow a deadlock debugger to easily be plugged
12543         in.
12545 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
12547         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
12549 2005-09-27  Raja R Harinath  <rharinath@novell.com>
12551         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
12552         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
12553         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
12554         ($(arch_built)) [CROSS_COMPILING]: Error out.
12556 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
12558         * aot.c: Add support for the no_special_static flag for classes.
12560 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
12562         * Reapply reverted patches.
12564         * *: Revert r50174 as well.
12566         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
12568 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
12570         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
12572 2005-09-23  Miguel de Icaza  <miguel@novell.com>
12574         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
12575         part of the SIG_HANDLER_SIGNATURE.  
12577 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
12579         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
12580         statistics.
12582         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
12583         introduced by previous patch.
12585 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
12587         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
12588         saved registers too.
12590         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
12591         upon the information returned by get_call_info ().
12592         
12593         * mini-x86.c (add_float): Fix stack size calculation.
12594         (mono_arch_call_opcode): Rewrite this so it works based up the
12595         information returned by get_call_info ().
12596         (mono_arch_get_this_vret_args): Ditto.
12598 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
12600         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
12601         in cinfo to determine the registers which need to be used.
12603 2005-09-20  Miguel de Icaza  <miguel@novell.com>
12605         * driver.c (mono_main): Add --server and --desktop flags. 
12607 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
12609         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
12610         registers as global registers.
12612         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
12613         longer needed with the new register allocator.
12615         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
12617         * cpu-ia64.md: Remove unused opcodes.
12618         
12619         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
12620         
12621 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
12623         * cpu-amd64.md: Remove unused opcodes.
12625         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
12626         needed with the new register allocator.
12628         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
12629         reg-reg moves.
12631 2005-09-16  Raja R Harinath  <rharinath@novell.com>
12633         * Makefile.am (check-local): Don't invoke semdel-wrapper.
12635 2005-09-16  Martin Baulig  <martin@ximian.com>
12637         * exceptions-amd64.c
12638         (throw_exception): Don't call mono_debugger_throw_exception() if
12639         we're a rethrow - see the FIXME in the code.
12641 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
12643         * mini.c (mono_init_exceptions): This only works on some architectures.
12644         
12645 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
12647         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
12648         on ia64.
12650         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
12652         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
12653         now in mini-exceptions.c.
12655 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
12657         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
12658         now in mini-exceptions.c.
12660 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
12662         * exceptions-x86.c: Applied patch from Patrik Torstensson 
12663         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
12665         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
12666         code into mini-exceptions.c. Add some assertions to it.
12668 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
12670         * aot.c (emit_section_change): Applied patch from "The Software Team" 
12671         (<software@solmersa.com>). Fix as errors on windows.
12673 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12675         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
12676         method info into the LMF.
12678 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12679         
12680         * mini-ia64.c: Add proper unwind info for method epilogs.
12682         * exceptions-ia64.c: Add some code to help debugging.
12683         
12684         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
12686         * mini-exceptions.c: Fix warning.
12688 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12690         * mini.c: Really fix build.
12692         * mini-x86.c mini-amd64.c: Fix build.
12694 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12696         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
12698         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
12699         some Interlocked methods as intrinsics.
12701         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
12702         for Thread methods as well.
12704         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
12706         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
12708         * mini-ia64.c mini-x86.c mini-amd64.c 
12709         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
12710         OP_MEMORY_BARRIER.
12711         
12712         * mini.c (mono_init_exceptions): Fix build breakage.
12714 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
12716         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
12717         of instructions. Use the new ia64_unw_op macros for emitting unwind
12718         info.
12720         * mini.c (mono_init_exceptions): Initialize exception handling
12721         related trampolines at startup.
12723 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
12725         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
12727 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
12729         * mini.c: Handle type loading errors gracefully during compilation and
12730         throw the appropriate exception.
12732 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
12734         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
12735         for the mono binary.
12737 2005-09-09  Martin Baulig  <martin@ximian.com>
12739         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
12740         the release.
12742 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12744         * mini-arm.h: use emulation for conv.r.un for the release.
12746 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12748         * mini-arm.c, objects.cs: more fixes and tests for them.
12750 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12752         * mini-arm.c: align structures to at least 4 bytes to be able
12753         to keep our current optimized memcpy.
12755 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
12757         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
12759 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12761         * mini.c: ignore SIGPIPE.
12763 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
12765         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
12767         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
12769 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
12771         * mini.h: Add prototype for mono_allocate_stack_slots_full.
12773 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12775         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
12776         exception handling support.
12777         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
12778         patch by Brian Koropoff <briank@marakicorp.com>).
12780 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
12782         * mini.c: revert another 'optimization' which breaks when
12783         items on the eval stack need to be saved at a basic block end
12784         (bug #75940).
12786 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12788         * jit-icalls.c: for arrays, ensure we always provide
12789         lower bounds.
12791 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
12793         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
12794         
12795         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
12797 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
12799         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
12800         arguments in their original register.
12802 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
12804         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
12805         memset/memcpy.
12807         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
12808         when ssapre is enabled.
12810         * inssel-long.brg: Fix bug in previous patch.
12812         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
12813         multiplication by a constant.
12815 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
12817         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
12818         icc.
12820         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
12821         saving registers.
12823 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
12825         * inssel-arm.brg: apply changes tested by Brian Koropoff
12826         <briank@marakicorp.com>.
12828 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
12830         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
12831         
12832 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
12834         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
12835         to the same register if dreg is just a base register.
12836         (print_ins): Improve printing of membase opcodes.
12838         * inssel-x86.brg: Add optimized ldind(reg) rules.
12840         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
12842 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
12844         * mini.c: when running under valgrind, set the stack bottom for
12845         the GC at the actual approximate stack for the app (fixes running
12846         mono with valgrind).
12848 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
12850         * mini.c: do no break at the first valuetype to init found
12851         (fixes bug #75791).
12853 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
12855         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
12857 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
12859         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
12861 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
12863         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
12865 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12867         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
12869         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
12870         code.
12872         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
12873         code.
12875         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
12876         methods.
12878 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
12880         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
12882 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12884         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
12885         in the tail recursion optimization.
12887         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
12888         debug info into the assembly file.
12890         * iltests.il: Add test for filter regions.
12892         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
12893         initial stack of filter regions. Fixes #75755.
12895 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
12897         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
12898         stack requirements.
12900 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12902         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
12903         the check for an already compiled method on non-ia64 platforms.
12904         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
12905         proper domain.
12907         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
12909         * inssel-x86.brg: Add some optimized call rules.
12911 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
12913         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
12914         method here.
12916         * mini.h mini-trampolines.c: Pass the trampoline argument to 
12917         mono_arch_patch_delegate_trampoline.
12919         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
12921         * mini-trampolines.c: Fix build.
12923         * mini-amd64.h: Add delegate trampolines.
12925         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
12927         * inssel-amd64.brg: Add optimized call rules.
12928         
12929         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
12931         * inssel-ia64.brg: Add optimized ldind(reg) rules.
12933 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
12935         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
12936         change.
12938         * mini-ia64.c: Remove LMF fixmes.
12940         * mini-ia64.h: Remove most fields from LMF.
12942         * inssel-ia64.brg (stmt): Fix unaligned access errors.
12944         * mini-trampolines.c: Add support for IA64 function descriptors.
12946         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
12947         for IA64 function descriptors.
12949 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
12951         * tramp-arm.c: patch the vtable for virtual calls. Added
12952         support code to register/unregister the LMF.
12953         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
12954         more LMF work.
12956 2005-08-19  Dick Porter  <dick@ximian.com>
12958         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
12959         bit value if needed.
12961 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
12963         * mini.c (mini_get_method): Move handling of wrapper data here.
12965         * mini.c (mono_method_to_ir): Add support for dynamic methods.
12967         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
12968         virtual.
12970         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
12971         bblock->code does not remain empty.
12973 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
12975         * arrays.cs: Add regression test for #75832.
12977         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
12978         rules. Fixes #75832.
12980         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
12981         instruction scheduling.
12983 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
12985         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
12987 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
12989         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
12991         * mini-codegen.c: Fix VC build.
12993         * cpu-pentium.md: Increase length of atomic_exhange_i4.
12995 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12997         * mini.h: fix signature for mono_register_opcode_emulation.
12999 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
13001         * mini.c: Get rid of most of the helper_sig_... constants using
13002         mono_create_icall_signature ().
13004 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
13006         * jit-icalls.c (helper_ldstr): New helper function.
13008         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
13010         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
13011         throw, load the string using a helper call instead of creating a string object.
13013         * aot.c: Update after LDSTR changes.
13015         * mini.h: Bump AOT file version.
13016         
13017         * aot.c: Save class size info into the AOT file. Print more statistics during
13018         compilation.
13020         * mini.h: Bump AOT file version.
13022         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
13023         ordering of disasm cases. Fixes #74957.
13025 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
13027         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
13028         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
13029         the generic code needed for the ARM port.
13031 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
13033         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
13034         inssel-arm.brg: more ARM features and fixes.
13036 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
13038         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
13039         ARM port work in progress.
13041 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
13043         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
13045         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
13047         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
13049         * inssel.brg (mini_emit_memset): Add support for unaligned access.
13051         * *-ia64.*: Ongoing IA64 work.
13052         
13053         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
13055 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
13057         * TODO: Remove out-of-data todo stuff.
13059         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
13060         dead code.
13062         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
13064         * mini.h: Bump corlib version.
13066 2005-07-27  Martin Baulig  <martin@ximian.com>
13068         * mini-codegen.c
13069         (create_copy_ins): Added `const unsigned char *ip' argument; set
13070         `copy->cil_code' from it.
13072 2005-07-27  Martin Baulig  <martin@ximian.com>
13074         * mini-exceptions.c (mono_handle_exception): Don't call
13075         mono_debugger_handle_exception() for filters.
13077 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
13079         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
13080         as well.
13082 2005-07-26  Martin Baulig  <martin@ximian.com>
13084         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
13086         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
13087         helper_compile_generic_method() if the method is actually virtual
13088         and non-final.
13090 2005-07-26  Martin Baulig  <martin@ximian.com>
13092         * mini.c
13093         (trampoline_code): Renamed to `mono_trampoline_code' and made it
13094         public; this is now accessed directly by the debugger.
13095         (mono_generic_trampoline_code): Removed.
13097         * debug-mini.c
13098         (mono_debug_init_method): Also add interncalls and wrappers.
13100 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
13102         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
13104 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
13106         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
13108 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
13110         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
13112 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
13114         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
13115         getting TLS offsets on AMD64 too.
13117 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
13119         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
13121 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
13123         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
13124         inssel-arm.brg, mini-arm.h: ARM port work in progress.
13126 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
13128         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
13130         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
13131         to mini.c.
13133         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
13134         mono_sparc_is_virtual_call ().
13135         
13136         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
13138         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
13139         trampoline parameters.
13141         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
13142         
13143         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
13144         to mono_arch_get_vcall_slot_addr.
13146         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
13147         trampoline code.
13149         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
13151 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
13153         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
13155 2005-07-19  Martin Baulig  <martin@ximian.com>
13157         * exceptions-amd64.c (throw_exception): Call
13158         mono_debugger_throw_exception() here like we're doing it on i386.
13160 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
13162         * mini-ia64.c: Add optimized TLS access support.
13164 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
13166         * mini-exceptions.c: Ongoing IA64 work.
13168         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
13170         * mini.c: Use the default optimization set when embedding. Fixes
13171         #75194.
13173 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
13175         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
13176         of trampolines to a separate file.
13178         * mini-trampolines.c: New file.
13180         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
13181         separate file.
13182         
13183         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
13184         amd64/ia64 code.
13186         * mini-codegen.c: Fix cygwin build.
13188 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
13190         * mini.c: Add some minor changes needed by the IA64 port.
13192         * *-ia64.*: Ongoing IA64 work.
13194 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
13196         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
13197         trampolines into arch-independent and arch-dependent parts.
13199         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
13201 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
13203         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
13205         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
13206         the xp-regalloc-branch for amd64.
13208         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
13209         xp-regalloc-branch for x86.
13211 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
13213         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
13215 2005-07-06  Martin Baulig  <martin@ximian.com>
13217         * mini.c
13218         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
13219         (mono_jit_runtime_invoke): Likewise.
13221 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
13223         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
13224         on x86 too.
13225         
13226         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
13227         without loading their metadata. Reorganize the file format so exception handling+
13228         debug info is kept separate from normal method info. Create MonoJitInfo 
13229         structures for methods lazily.
13231         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
13232         loading metadata.
13233         (x86_class_init_trampoline): Patch AOT class init trampolines too.
13235         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
13237         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
13238         in AOT code.
13240         * mini.h: Bump AOT file version.
13242 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
13244         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
13246 2005-07-01  Raja R Harinath  <rharinath@novell.com>
13248         * Makefile.am (check-local): Call semdel-wrapper.
13250 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
13252         * mini-x86.c: Revert the last change as it seems to break the build..
13254 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
13256         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
13257         
13258         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
13260 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
13262         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
13263         outside of the macro, so strange stuff doesn't happen with gcc4
13264         (NEW_AOTCONST_TOKEN): Likewise.
13266 2005-06-28  Martin Baulig  <martin@ximian.com>
13268         * mini.c (mini_class_is_system_array): New static method; use this
13269         instead of `klass->parent == mono_defaults.array_class' everywhere
13270         since this also works for the new generic array class.
13272 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
13274         * inssel.brg: Remove warnings.
13276 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
13278         * mini-ia64.c: Ongoing IA64 work.
13280         * basic-float.cs: Add float->i1 conversion test.
13282         * iltests.il: Add conv.u4 test.
13284 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
13286         * inssel-long.brg: Fix bug caused by last change.
13288 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
13290         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
13291         BSDs.  Allows the x86 JIT to work on OSX86
13293 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
13295         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
13296         u4->i8 conversion.
13298         * mini-ia64.c: Ongoing IA64 work.
13300 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
13302         * mini-ia64.c: Ongoing IA64 work.
13304         * driver.c: Clean up jit_code_hash as well when using --regression.
13306         * inssel-long.brg: Fix long->i4/u4 conversion rules.
13308         * basic-long.cs: Add tests for long->u4 conversion.
13310 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
13312         * mini.c: Take mono_get_domainvar out of macros. This makes sure
13313         that we do not depend on undefined C behavior: the order stuff
13314         gets evaluated within an expression. Fixes mono when compiled on
13315         GCC 4.
13317 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
13319         * *-ia64.*: Ongoing IA64 work.
13321         * aot.c: Lower memory usage while loading AOT methods.
13323         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
13325         * mini.h: Bump AOT file format version.
13327 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
13329         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
13331 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
13333         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
13334         not on callee assembly). Fixed some comments.
13336 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
13338         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
13339         it gets proper disassembly.
13340         (emit_method_info): Remove some dead code.
13342         * mini.c (mini_method_compile): Allways allocate the GOT var in
13343         mono_method_to_ir for emulating opcodes.
13345 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
13347         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
13348         before freeing the code memory. Fixes #74990.
13350         * objects.cs: Add regression test for #74992.
13352         * liveness.c: Extend live ranges of arguments to the beginning of the
13353         method. Fixes #74992.
13355         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
13356         so it points into the faulting instruction.
13358 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
13360         * jit-icalls.c (mono_imul_ovf): Add exception handling.
13362         * *-ia64.*: Ongoing IA64 work.
13364         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
13366 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
13368         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
13370         * *-ia64.*: Ongoing IA64 work.
13372 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
13374         * basic-long.cs: Add tests for add/sub.ovf.
13376         * basic.cs: Add tests for sub.ovf.
13378         * *-ia64.*: Ongoing IA64 work.
13380 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
13382         * *-ia64.*: Ongoing IA64 work.
13384         * basic.cs: Add conv.ovf.i4.un test.
13386 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
13388         * mini.c: (remove_block_if_useless) Fixed bug 75061.
13389         
13390 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13392         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
13394 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
13396         * *-ia64.*: Ongoing IA64 work.
13398 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13400         * trace.[ch]:
13401         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
13403 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
13405         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
13407 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
13409         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
13411         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
13412         of a call is callable by a near call.
13414 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
13416         * mini-ia64.c: Ongoing IA64 work.
13418 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
13420         * genmdesc.c: Make the generated array non-static.
13422         * inssel-long.brg: Fix LSHR_IMM rule.
13424         * *-ia64.*: Ongoing IA64 work.
13426         * *-ia64.*: Ongoing IA64 work.
13428 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
13430         * *-ia64.*: Ongoing IA64 work.
13432         * *-ia64.*: Ongoing IA64 work.
13433         
13434         * mini-ia64.c: Ongoing IA64 work.
13436         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
13438 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
13440         * objects.cs basic-calls.cs: Move some tests to objects.cs.
13441         
13442         * objects.cs basic-long.cs: Move some tests to objects.cs.
13444 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
13446         * *-ia64.*: Ongoing IA64 work.
13448         * iltests.il: Add a new test.
13450         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
13451         newobj. Fixes #75042.
13453 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
13455         * *-ia64.*: Ongoing IA64 work.
13456         
13457         * *-ia64.*: Ongoing IA64 work.
13458         
13459         * *-ia64.*: Ongoing IA64 work.
13461         * basic.cs objects.cs: Move tests accessing static variables as well.
13463         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
13465 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
13467         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
13469         * driver.c: Always print failed tests.
13471         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
13472         frame pointer.
13474         * *ia64*: Ongoing IA64 work.
13476 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
13478         * basic.cs: Add tests for add.ovf. Fix warnings.
13480 2005-05-18  Miguel de Icaza  <miguel@novell.com>
13482         * driver.c (mono_main): Avoid crash if no argument is passed to
13483         --break;  Do not use g_error, but f_printf.   And fix all other
13484         ocurrences of the same crash.
13486 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
13488         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
13489         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
13490         Fixes #74742.
13492 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
13494         * *-ia64.*: Add beginnings of IA64 backend.
13496         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
13498 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
13500         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
13501         Fixes #74925.
13503         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
13505         * mini-amd64.c: Fix a warning.
13507 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
13509         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
13510         in float_neg. Fixes #74897.
13512         * mini-amd64.c (emit_call): Fix another near call bug.
13514 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
13516         * declsec.c: Keep the appdomain information in the structure. Added a 
13517         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
13518         value gets overwritten).
13519         * declsec.h: Set the default MonoArray for the the stack to 6. Added
13520         an MonoAppDomain member to MonoSecurityFrame.
13521         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
13522         used in the stack walk. Now use a MonoArray which grow (double) when
13523         it gets full.
13525 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
13527         * mini.c: Re-enabled runtime cleanup, since running threads should
13528         now properly stop when exiting.
13530 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
13532         * mini-codegen.c: New file contaning the arch-independent local
13533         register allocator. Not used by any architectures yet.
13535         * mini.h linear-scan.c: Merge some changes from the 
13536         mini-xp-local-regalloc branch.
13538 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
13540         * mini-amd64.c (emit_call): Fix calls to native functions when the
13541         runtime is compiled as a shared library. Fixes #74756.
13543         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
13544         on a literal field. Fixes #74751.
13546 2005-04-25  Raja R Harinath  <rharinath@novell.com>
13548         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
13550 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
13552         * objects.cs: Add missing null casting test.
13554 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
13556         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
13557         in wrapper methods. Also rename 'address' variable to 'offset'.
13559 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
13561         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
13562         warnings.
13563         
13564         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
13566         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
13567         work on windows.
13569 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
13571         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
13573 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
13575         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
13576         just the last bytes.
13578 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
13580         * aot.c (mono_compile_assembly): Fix warning.
13582         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
13583         by the _MSC_VER stuff.
13585 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
13587         * inssel-long.brg: Fix #74588.
13589         * cpu-amd64.md: Fix #74591.
13591         * iltests.il: Add new regression tests.
13593 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
13595         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
13596         valuetype.
13598 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
13600         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
13602         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
13603         from Bill Middleton <flashdict@gmail.com>.
13605 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
13607         * arrays.cs: Add new regression test. Fix warnings.
13609 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
13611         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
13612         and leakage in CKFINITE.
13614         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
13615         this to a null op since it is called on amd64 too.
13617         * exceptions-amd64.c (get_throw_trampoline): Align stack.
13619         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
13620         body since this is not used on amd64.
13621         
13622         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
13624         * mini-amd64.c: Remove obsolete fixmes.
13626         * mini.c (print_method_from_ip): Fix debugging support.
13628 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13630         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
13631         so that expressions that don't give much gain are not reduced.
13632         * ssapre.h: Likewise.
13634 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
13636         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
13638         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
13640         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
13642 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
13644         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
13646         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
13648 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
13650         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
13651         stack touching.
13653         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
13655         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
13657         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
13659         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
13660         MONO_ARCH_USE_SIGACTION. Fixes #74252.
13662         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
13664         * mini-x86.c: Fix up stack overflow handling.   
13666         * exceptions.cs: Add new regression test.
13668 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
13670         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
13671         mono_jit_thread_attach.
13673         * mini.c (mono_method_to_ir): Verify called method is not abstract.
13675 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13677         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
13678         avoid calling constructors using callvirt.
13680         * inssel.brg: Fix #74073.
13682 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
13684         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
13685         compilation with non-GCC compilers.
13686         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
13687         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
13689 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13691         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
13692         klass->interface_offsets (will likely fix bug#74073).
13694 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13696         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
13698 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
13700         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
13701         to amd64_div_reg_size ().
13702         
13703         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
13705 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
13707         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
13709 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13711         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
13713 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13715         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
13716         
13717         * mini.c (mono_precompile_assembly): Load and precompile referenced
13718         assemblies as well. Fixes #74015.
13720 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
13722         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
13724 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
13726         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
13727         a lot of checks and (anyway) permissions cannot work until corlib is 
13728         loaded.
13730 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
13732         * mini-ppc.c: fixed ABI issue on sysv/ppc.
13734 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
13736         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
13737         calls (fixes bug#72824).
13739 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13741         * mini.c: fix tail recursion elimination (see test in bug#73936).
13743 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
13745         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
13746         some fp functions in sse2 mode.
13748 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
13750         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
13752 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
13754         * mini.h mini.c: Add mono_get_jit_tls_key ().
13756         * mini-x86.c: Enable fast TLS support on windows.
13758 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
13760         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
13761         * mini.c: Check for p/invoke method when generating code. If a
13762         p/invoke method, or it's class, isn't decorated with [Suppress
13763         UnmanagedCodeSecurity] then generate code to call System.Security.
13764         UnmanagedDemand (only if the security manager is active).
13766 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13768         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
13769         last change as it seems to cause strange crashes.
13770         
13771 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13773         * *.c: handle unsafe function pointers where needed.
13775 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13777         * mini.c (mono_jit_free_method): Remove the fixme too.
13779 2005-03-15  Miguel de Icaza  <miguel@novell.com>
13781         * mini.c: As discussed, make the code actually free the delegate
13782         thunk now, to enable the debugging of delegate problems, use
13783         MONO_DEBUG=1 when running Mono. 
13785         This takes also care of parts of the leaks as seen by Joe.
13787 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
13789         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
13790         thread_tls_offset calculation.
13792 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
13794         * declsec.c: Reworked linkdemand checks for icall. The previous code
13795         was using the declaration code (untrusted) and didn't work as expected
13796         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
13797         specific case.
13799 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
13801         * iltests.il: Add new localloc test.
13803         * mini-amd64.c: Handle large stack allocations the same way as on
13804         windows if stack overflow handling is working.
13805         
13806         * mini-amd64.c: Allocate the signal stack using mmap.
13808         * mini.c (sigsegv_signal_handler): Fix reading of context.
13810         * mini-exceptions.c: Fix up stack overflow handling.
13812         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
13814         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
13816         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
13818         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
13820         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
13821         tramp_init functions as they are no longer needed.
13823 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
13825         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
13826         
13827         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
13829         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
13830         
13831         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
13832         support that now.
13834         * mini-ops.h: Add OP_LMUL_IMM.
13836         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
13837         long mul/div opcodes as intrinsic.
13839         * mini-amd64.c (emit_call): Handle the case when the callee might be
13840         an AOT method.
13842 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
13844         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
13845         extra safe.
13846         
13847         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
13849         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
13851 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
13853         * mini.c (mono_codegen): Don't leak here, to help people running
13854         monogrind.
13856 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
13858         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
13859         conversions in sse2 mode.
13861         * basic-float.cs: Add regression test.
13862         
13863         * mini-amd64.c: Reenable sse2.
13865 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13867         * mini-amd64.c: Disable sse2 until some regressions are fixed.
13869 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
13871         * driver.c: Copyright text should include 2005.
13872         
13873 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13875         * cpu-amd64.md (load_membase): Fix more max lengths.
13877 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
13879         * cpu-amd64.md (load_membase): Fix max length.
13881         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
13883         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
13885         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
13886         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
13888         * basic-float.cs: Add rounding regression test.
13890         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
13892 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
13894         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
13895         structures in registers for pinvoke wrappers.
13897 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
13899         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
13901 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
13903         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
13904         wrapper to mono_jit_thread_attach.
13906         * mini.c (mini_jit_thread_attach): New jit icall.
13908         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
13909         native->managed wrappers.
13911         * exceptions.cs: Add new regression test.
13913         * mini.c (optimize_branches): Check regions in the cbranch to throw
13914         block case as well. Fixes #73242.
13916 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13918         * mini.c: thread safety fixes.
13920 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
13922         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
13923         patching stuff, since delegates use jump trampolines so there is
13924         no caller.
13926         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
13927         jump trampolines.
13928         
13929         * tramp-amd64.c: Fix build.
13931         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
13932         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
13934         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
13935         Rename this to mono_arch....
13936         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
13938         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
13940         * mini-amd64.c (emit_call): If both the caller and the callee is
13941         guaranteed to have 32 bit addresses, emit a normal call.
13943         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
13945         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
13946         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
13947         method_ptr inside delegates.
13949 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
13951         * mini.c (mono_jit_free_method): Free the method info even if the native code is
13952         invalidated. Fixes #73001.
13954         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
13956         * mini-x86.c: Only use stdcall for pinvokes on windows.
13958 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13960         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
13961         * mini-x86.c: remove unreliable __thread var offset detection,
13962         use the correct accessors and enable by default.
13964 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
13966         * mini.c (mono_jit_free_method): Fix memory leak.
13968 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
13970         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
13972 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
13974         * cpu-amd64.md: Fix lengths of atomic opcodes.
13976 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13978         * driver.c: try to not imply using ICU is any good.
13980 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
13982         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
13983         functions as inline ops.
13985         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
13986         some Interlocked functions as inline ops.
13988         * mini.c (move_basic_block_to_end): Fix bug in last patch.
13990         * mini.h (MonoBasicBlock): Reorganize fields a bit.
13992         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
13994         * mini.c: Add support for OP_NOT_TAKEN.
13996         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
13997         structures in registers for pinvoke wrappers.
13999         * mini-amd64.c: Fix warnings.
14001 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
14003         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
14005         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
14007         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
14008         address instead of loading the address from it.
14010         * mini-x86.c: Add support for returning small structs in registers
14011         on Win32. Fixes part of #70864.
14012         
14013 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
14015         * trace.c (get_token): Improve error checking.
14017 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
14019         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
14021 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
14023         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
14024         it can be reused for MonoClass.
14025         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
14026         _LINKDEMAND.
14028 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
14030         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
14031         instead of a MonoReflectionMethod. The method information wasn't used
14032         when displaying SecurityException details (but will be now).
14034 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
14036         * Makefile.am : windows build fix.
14038 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
14040         * iltests.il: Add new regression test.
14042         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
14043         #72522.
14045 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
14047         * mini.c: Moved linkdemand check into helper function check_linkdemand
14048         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
14049         LDFTN, LDVIRTFTN).
14051 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
14053         * declsec.c: Added statistics counter for different kinds of 
14054         LinkDemands.
14055         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
14056         (and commented) declaration.
14057         * mini.c: Added statistics counter for security Demand code 
14058         generation. Added display of security statistics.
14060 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
14062         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
14063         Fix compilation errors under gcc-2.95.
14065 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
14067         * mini.c, driver.c: Use the new jit trampoline hashtable
14069 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
14071         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
14073 2005-02-11  Martin Baulig  <martin@ximian.com>
14075         * debug-mini.c (mono_debug_close_method): Free the line number array.
14077 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
14079         * aot.c: Break up large methods into smaller ones. Share GOT slots for
14080         icalls.
14082         * mini.h: Bump AOT file format version. 
14084 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
14086         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
14087         APTC and P/Invoke.
14088         * declsec.h: Added macros to get/set lazyly initialized security 
14089         informations about assemblies. Added new enum for different type of
14090         possible LinkDemand violation. Added function to check LinkDemands.
14091         * mini.h: Added a field to MonoCompile to hold any security violation
14092         detected when JITting a method (so it can be thrown later).
14093         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
14094         and CEE_CALLVIRT. Added code to throw exception at the end of
14095         mini_method_compile (note: the exception is unhandled right now).
14097 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
14099         * mini.c, jit-icalls.c: use the managed implementation of
14100         memset for initobj and memset, to avoid managed <-> unmanaged
14101         transitions.
14103 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
14105         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
14106         optimization if it would need a GOT var.
14108         * basic.cs: Add tests for constant propagation and switch statements.
14110         * ssa.c: Fix out-of-range constant propagation and switch statements.
14112 2005-02-09    <vargaz@freemail.hu>
14114         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
14116 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
14118         * cpu-amd64.md (load_membase): Fix max length of load_membase.
14120 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
14122         * mini.c: update to new signature of mono_class_get_allocation_ftn().
14124 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
14126         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
14127         arithmetic operations.
14129 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
14131         * mini-ppc.c: add a workaround for broken user code that
14132         DllImports vararg functions with non-vararg signatures.
14134 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
14136         * mini.c (mono_jit_compile_method_inner): Add detection and a 
14137         meaningfull error message for assemblies written in Managed C++.
14139         * tramp-amd64.c mini-amd64.h: Add support for 
14140         create_trampoline_from_token ().
14142         * aot.c mini-x86.c abcremoval.c: Applied patch from
14143         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
14145 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
14147         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
14148         which takes a MonoImage/token as parameter instead of a MonoMethod.
14150         * aot.c: Use the new trampoline for initializing vtables.
14152         * aot.c: Add support for ldfld/stfld_remote wrappers.
14154         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
14155         rules for compare <MEM>, IMM.
14157         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
14159         * aot.c: Handle inherited finalizers correctly.
14161 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
14163         * inssel.brg (stmt): Add a missing _setup_... ().
14165         * aot.c: Save some parts of the class state to the AOT file and use it
14166         to recompute that state when a class is initialized.
14168         * mini.c: Install AOT hooks into the runtime.
14170         * mini.h: Bump AOT file format version.
14171         
14172         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
14173         Fixes #72148.
14175         * iltests.il: Add new test.
14177 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
14179         * mini.c: fix typo.
14181 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
14183         * mini.c: setup the statistical profiler in the thread attach
14184         callback to cope with the new single thread code.
14186 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
14188         * mini-ppc.c: ensure we have enough room for the profiler
14189         calls (fixed bug#72084).
14191 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
14193         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
14194         it.
14196 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
14198         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
14200 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
14202         * ssapre.c: Fixed an issue with down safety (this allows IronPython
14203         to succesfully execute parrotbench).
14204         * ssapre.h: Likewise.
14206 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
14208         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
14209         variable for stores to method arguments (fixes a SSAPRE issue).
14211 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
14213         * mini.c: handle value types in dup, fixes gen-112.cs.
14215 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
14217         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
14218         sequence for calls in dynamic methods to avoid thunks.
14220 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
14222         * mini.c: correctly remove dynamic methods from the hashtable.
14224 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
14226         * driver.c: Disabled SSAPRE until fix the bug that appears
14227         in IronPython's parrotbench.
14229 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
14231         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
14233         * mini.c (mono_method_to_ir): Revert the previous change.
14234         
14235         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
14236         when AOT compiling.
14238         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
14239         mono_jit_info_table_find () etc. when running under valgrind.
14241         * inssel.brg: Fix warnings.
14243         * mini-exceptions.c: Fix warnings.
14245 2005-01-31  Martin Baulig  <martin@ximian.com>
14247         * driver.c (compile_all_methods_thread_main): Don't try to compile
14248         generic methods or anything which has type parameters.
14250 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
14252         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
14254         * TestDriver.cs: Add --verbose flags.
14256         * graph.c ssa.c: Fix 64 bit warnings.
14257         
14258         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
14259         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
14260         Fix 64 bit warnings.
14262         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
14263         variable not spotted by gcc.
14264         
14265         * mini-amd64.c inssel-amd64.brg: Applied patch from  
14266         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
14267         X86_COMPARE_MEMBASE opcodes.
14269         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
14271 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
14273         * *: MonoMethod->signature might be NULL now. You *MUST* use
14274         mono_method_signature.
14276 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
14278         * driver.c (compile_all_methods_thread_main): Compile the methods
14279         without invoking cctors.
14281 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
14283         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
14284         * basic-calls.cs: test for the above.
14286 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
14288         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
14289         MonoJitInfo changes.
14291 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
14293         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
14294         eagerly if it contains dynamic methods.
14295         
14296         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
14298         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
14299         trace, it is now computed by an icall from trace_ips.
14300         
14301         * mini-exceptions.c: Fix a warning.
14303 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
14305         * mini-exceptions.c: don't bother getting stack trace info if
14306         it's not going to be used.
14308 2005-01-27  Raja R Harinath  <rharinath@novell.com>
14310         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
14311         ssapre-mini-ops.h.
14313 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
14315         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
14317         * aot.c: Avoid calling mono_method_get_header () if not needed.
14319         * mini.h: Bump AOT file format version.
14320         
14321         * mini.c (mono_emit_native_call): Allocate a GOT var here.
14323         * mini.c (mono_print_tree): Print more info for calls.
14325 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
14327         * declsec.h: Remove warning by adding missing include for marshal.h
14329 2005-01-26  Martin Baulig  <martin@ximian.com>
14331         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
14332         `ip' twice.
14334 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
14336         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
14337         flags.
14339         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
14341         * aot.c (mono_compile_assembly): Fix a warning.
14343 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
14345         * declsec.c: Look for security attributes on the original MonoMethod 
14346         (and not the wrapped one). This fix permissions on icalls.
14348 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
14350         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
14352         * mini.c (mono_allocate_stack_slots): Add a fixme.
14354         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
14356 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
14358         * inssel.brg: optimize casts of sealed types (more
14359         optimizations waiting for fixes in remoting).
14361 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
14363         * inssel.brg (stmt): Add another dummy rule.
14365         * driver.c: Fix warnings.
14367         * driver.c (mono_main): If running under valgrind, instruct glib to use
14368         the system allocation functions so valgrind can track the memory
14369         allocated by the g_... functions.
14371         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
14373         * mini-ops.h: Add OP_DUMMY_STORE opcode.
14375         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
14377         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
14378         variables in try regions.
14380         * mini.c (mini_method_compile): Don't disable optimizations on large
14381         methods when AOT compiling.
14383         * mini.c (mono_allocate_stack_slots): New arch independent method to 
14384         allocate stack slots. Not yet used.
14386 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
14388         * debug-mini.c (mono_debug_close_method): Plug some leaks.
14390 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
14392         * mini-ppc.c: make the branch info relative as the code
14393         buffer can be reallocated.
14395 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
14397         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
14398         * driver.c: Removed the AOT/security restriction. Now initialize the
14399         security manager (in metadata) if --security is used.
14400         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
14401         rather than the pointer to declarative security, when AOT is used.
14403 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
14405         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
14406         basic blocks, reduced intrinsic exception throwing code size.
14408 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
14410         * driver.c (mini_usage): Reorder the usage screen.
14412 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
14414         * mini.c (mono_resolve_patch_target): Fix warning.
14416 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
14418         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
14419         previous patch.
14421         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
14423         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
14424         breaks the amd64 build.
14426         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
14427         register allocation. Fixes #71454.
14429         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
14431         * arrays.cs: Add new regression test.   
14433 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
14435         * ssapre.c: Turned usage of snprintf to GString.
14436         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
14437         (I left it on by mistake in my previous commit).
14439 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
14441         * mini.c, cfold.c, basic-calls.cs: preserve side effects
14442         on cond branch optimization (fixes bug# 71515).
14444 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
14446         * abcremoval.c: Fixed bug 71062.
14447         * abcremoval.h: Likewise.
14449 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
14451         * mini.c: Added a new functionality to optimize_branches, the removal
14452         of useless basic blocks, and fixed some problem in the removal of
14453         critical edges; some utility functions added for both purposes.
14454         * ssapre.c: Added complex expression support, and fixed bug 70637.
14455         * ssapre.h: Likewise.
14456         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
14457         enabled in SSAPRE.
14458         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
14459         * driver.c: Re-enabled SSAPRE.
14461 2005-01-19  Martin Baulig  <martin@ximian.com>
14463         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
14464         the result of mono_get_method_constrained().
14466 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
14468         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
14469         manager.
14471 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
14473         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
14474         be detected.  Fixes #59296.
14476 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
14478         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
14479         which can happen. Fixes #71361.
14481 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
14483         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
14484         manager.
14486 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
14488         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
14489         appdomain-unload.exe to fail.
14490         
14491         * mini.c: Fix some memory leaks.
14493 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
14495         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
14496         Fixed bug and sped up some codepaths.
14498 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
14500         * mini.c: Fix some memory leaks.
14502         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
14503         conversion.
14505         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
14507         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
14508         #71320.
14510         * iltests.il: Add regression test for #71320.
14512 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
14514         * mini.c (mono_codegen): Fix installation of profiler hooks.
14516         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
14518 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
14520         * mini.h, mini.c, cfold.c: optimize access to enum
14521         readonly fields, too. Eval conditional branches if possible
14522         to perform unreachable code removal in more cases.
14524 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
14526         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
14528         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
14529         code manager.
14531         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
14532         WinXP DEP. Fixes #71244.
14534 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
14536         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
14538 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
14540         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
14542 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
14544         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
14545         changes.
14547         * mini.h: Bump AOT version.
14549         * mini.h (MonoCompile): Change exvar to a hash table.
14551         * mini.c: Allocate a separate exvar for each handler block.
14553         * mini.c: Get rid of the computation of filter_lengths, its not needed.
14555         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
14556         ex var with the pending exception and only throw if the two are equal.
14557         Fixes #68552.
14558         
14559         * exceptions.cs: Add tests for rethrow and nested catch clauses.
14561         * mini-x86.c: Fix warnings.
14563         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
14564         used by all the ports now.
14566         * aot.c: Add write-symbols and save-temps options.
14568 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
14570         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
14572 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
14574         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
14575         operations.
14577         * tramp-s390.c: Check vtable slot belongs to the domain.
14579         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
14580         as per other platforms.
14582         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
14584 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
14586         * driver.c: we don't run the Main() code in a subthread anymore.
14588 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
14590         * mini.c: added experimental rtc support in the statistical
14591         profiler: if the user has the permission, more accurate statistics
14592         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
14593         The MONO_RTC value must be restricted to what the linux rtc allows:
14594         power of two from 64 to 8192 Hz.
14596 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
14598         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
14600 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
14602         * mini-ppc.c: better icache flush for smp.
14604 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
14606         * mini-amd64.c (emit_move_return_value): Fix memory leak.
14608         * mini-x86.c (get_call_info): Add the get_call_info () code from the
14609         amd64 port, not yet used.
14611 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
14613         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
14614         a struct type.
14616 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
14618         * driver.c: Added --security option to activate the security manager.
14619         Right now this will allow code generation for declarative demands and
14620         is disabled when AOT is specified.
14621         * mini.c: Add code generation for declarative security demands.
14622         * mini.h: Add mono_use_security_manager as an extern gboolean.
14624 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
14626         * aot.c (mono_compile_assembly): Speed up compilation a bit by
14627         emitting more dense assembly code.
14629         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
14630         exception throwing stuff.
14632 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
14634         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
14635         dead code.
14637         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
14638         left in by mistake.
14640         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
14641         fixed.
14643         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
14645         * tramp-*.c: Only patch vtable slots if the object is in the current
14646         domain. Fixes appdomain-unload.exe.
14648         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
14649         
14650         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
14651         x86 branch.
14653 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
14655         * mini.c (reverse_branch_op): New helper function.
14657         * mini.c (optimize_branches): Run the new optimization only on 
14658         platforms which support it. Also reverse all kinds of branches.
14660         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
14662         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
14663         a throw statement.
14665         * mini.c (optimize_branches): Reverse not-equals branches if the false
14666         bblock is a throw. This happens a lot of time with argument checking in
14667         corlib.
14669         * mini.c (mono_codegen): Add support for placing basic blocks after
14670         the function epilogue.
14672         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
14673         function epilogue.
14674         
14675 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
14677         * mini.c (setup_stat_profiler): Only set this up if the platform
14678         supports ITIMER_PROF.
14680 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
14682         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
14683         previous patch.
14685         * inssel.brg: Fix a warning.
14687 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
14689         * mini.c: added support for statistical profiler 
14690         (run with: --profile=default:stat).
14692 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
14694         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
14696         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
14698         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
14699         related to global registers from the amd64 port.
14701 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
14703         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
14705         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
14706         with global registers.
14707         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
14709         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
14711 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
14713         * debug-mini.c (encode_value): Fix off-by-one.
14715         * aot.c (encode_value): Likewise.
14717         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
14719 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
14721         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
14722         AOT.
14724         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
14725         
14726         * aot.c (emit_method_info): Increase size of temp buffer.
14728         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
14729         the AOT case.
14731 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
14733         * aot.c (emit_method_info): Fix build.
14734         
14735         * aot.c: Further rework of the AOT file format to reduce the size of
14736         the method info data.
14738         * mini.h: Bump AOT file format version.
14740 2004-12-27  Martin Baulig  <martin@ximian.com>
14742         * mini.c (mini_get_method): New static method; call
14743         mono_get_method_full() and mono_get_inflated_method().
14744         (mono_method_to_ir): Use mini_get_method() instead of
14745         mono_get_method_full(). 
14747 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
14749         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
14751 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
14753         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
14755         * inssel-amd64.brg: Add some optimization rules.
14757 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
14759         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
14760         standard not GC'd stuff is fine.
14762 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
14764         * aot.c: Rework the AOT file format to get rid of most of the global
14765         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
14767         * mini.h: Bump AOT file format version.
14768         
14769 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
14771         * mini.h: Bump AOT file format version.
14773         * aot.c (mono_aot_is_got_entry): New function to determine if an 
14774         address is inside a GOT.
14776         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
14778         * cpu-pentium.md: Increase the maximum size of some instructions which
14779         might involve a got access.
14780         
14781         * mini.c (get_method_from_ip): Another debug helper function.
14783         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
14784         when got var accesses are created during the decompose phase.
14786         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
14788         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
14789         argument mini_compile_method and to MonoCompile, and use this to
14790         determine whenever a given method is compiled for AOT. This allows the
14791         other methods compiled during AOT compilation to be free of AOT stuff,
14792         so the backends does not need to add special support for them by
14793         creating a fake GOT etc.
14795         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
14796         longer needed.
14798 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14800         * mini.c (mono_method_to_ir): It turns out that some of the
14801         x-appdomain wrappers are lax with types, so just ignore this for
14802         all wrappers.
14804         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
14805         at the vtable->klass. If it is non-shared code we can just use the
14806         vtable.
14808 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
14810         * mini-ppc.c: access MonoDomain from tls, too.
14812 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
14814         * declsec.c: Removed unused variable (and related warning ;-)
14816 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14818         * iltests.il: New test for LDELEMA on an array of ref types.
14820         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
14821         all ldelema's on reftypes.
14822         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
14823         it was the wrong place to put it.
14825         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
14826         register to pop to make this cleaner, at the request of Paolo.
14828 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14830         * mini-ops.h (OP_GETHASHCODE): New op.
14832         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
14834         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
14835         operation.
14837         For a microbenchmark, this reduces the cost of Hashtable.get_Item
14838         by 25%.
14839         
14840         * mini-x86.c (mono_arch_output_basic_block): Rather than
14842         add ebp, 4
14844         Emit
14846         pop edx
14848         The first is 3 bytes while the second is 1. This saves 36 kb on
14849         mscorlib, quite a big saving. When bootstraping mcs, I was able to
14850         see a small boost because of icache locality.
14852         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
14854 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
14856         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
14857         started code sharing with the generic code.
14859 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
14861         * mini-ppc.c, cpu-g4.md: added code for direct access to
14862         tls data slots.
14864 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
14866         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
14867          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
14868         to OP_TLS_GET.
14870 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
14872         * declsec.c|h: Added functions to cache the declarative stack modifiers
14873         in MonoJitInfo and to create a security frame from a MonoJitInfo 
14874         structure.
14875         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
14876         created. Register internal calls for System.Security.SecurityFrame::
14877         _GetSecurityFrame and _GetSecurityStack.
14878         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
14879         the definitions for the new stack walk/callback mechanism.
14880         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
14881         first security frame for LinkDemands and InheritanceDemands) and
14882         GetSecurityStack for Demands. Both use the new mono_walk_stack code
14883         from lupus.
14884         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
14885         walk initialization (lupus).
14887 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14889         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
14890         idiom.
14891         (handle_loaded_temps): Do not create a temporary variable for
14892         things that we know are temps. They will never be modified.
14893         (mono_spill_call): Set MONO_INST_IS_TEMP
14894         (mono_emulate_opcode): ditto
14895         (emit_tree): ditto
14896         (mono_method_to_ir.CEE_DUP): ditto
14898 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
14900         * mini.c (type_to_eval_stack_type): Make this handle the void type
14901         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
14902         (emit_tree): use ip_in_bb to special case some common idioms
14903         Update all callers to pass in the IP.
14904         (mono_method_to_ir): Make CEE_CALL* do the above as well.
14906         This gives us a nice 2% speedup in mcs bootstrap.
14908         * mini-x86.c (peephole_pass): Peephole pass to make
14909         mov  [foo], eax
14910         push [foo]
14912         into
14914         mov [foo], eax
14915         push eax
14917         * mini.c (ip_in_bb): new method.
14918         (mono_method_to_ir): use this method rather than doing the hash
14919         lookup ourselves.
14921         * linear-scan.c (mono_linear_scan): When expiring actives, you
14922         don't need to keep around variables that expire on this
14923         instruction. This makes it so that:
14924              a = b + 1
14925         will turn into:
14926              store (ebx add (ebx, 1))
14927         which will become
14928              add ebx, 1
14930 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
14932         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
14933         combination to avoid doing two copies. Fix up problems with previous
14934         patch.
14936         * mini.c: Fix 64 bit warnings.
14938         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
14940 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
14942         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
14943         changes from the x86 code.
14945         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
14947 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
14949         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
14950         throwing code to reduce its size, unify the AOT and non-aot code and 
14951         get rid of relocations in the AOT case.
14953         * mini-x86.h mini.c exceptions-x86.c 
14954         (mono_arch_get_throw_corlib_exception): New arch specific function to 
14955         raise corlib exceptions which doesn't require relocations in the 
14956         caller.
14958         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
14960 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
14962         * mini.c (mono_emit_method_call): Only allocate the got var when it is
14963         needed.
14965         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
14966         in the AOT case.
14968 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14970         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
14971         with add function when used from Inc/dec atomic 
14972         functions. Re-enabled optimization on x86.
14973         * mini-ops.h: renamed atomic_add functions to
14974         allow _add to match the Interlocked::Add and
14975         _add_next to match Interlocked::Inc/Dec.
14977 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
14979         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
14980         linking of BBs to the end BB, and enabled SSAPRE also with
14981         consprop and copyprop (which was prevented by that bug).
14983 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14985         * mini-x86.c: disabling the Interlocked optimizing code. 
14987 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
14989         * aot.c (load_aot_module): Move reading of got_addr after the AOT
14990         file version check.
14991         
14992 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14994         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
14995         interlocked optimization due lack of support on x86, rewrote 
14996         exchange to take into account that base may be in eax.
14997         
14998         xsp works again; activated Interlocked optimizing code.
14999         
15000 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
15002         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
15004 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
15006         * mini-ops.h: Add new opcodes.
15008         * mini.h: Add new patch types. Add got_var to MonoCompile.
15010         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
15011         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
15012         make it work with all kinds of patchable code.
15014         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
15015         address of the GOT, and referencing entries in the GOT.
15017         * mini.c: Add code to load the GOT address if needed by an opcode.
15019         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
15020         independent AOT code on the x86 using an elf-style Global Offset Table.
15022 2004-12-14  Raja R Harinath  <rharinath@novell.com>
15024         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
15026 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15028         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
15029         when running xsp.
15031 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
15033         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
15034         of Interlocked:Increment/Decrement/Add as inline ops.
15035         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
15037 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
15039         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
15040         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
15042 2004-12-12  Duncan Mak  <duncan@ximian.com>
15044         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
15045         again. `patch_info->table_size' is no longer valid after Zoltan's
15046         commit #37636.
15048 2004-12-12  Martin Baulig  <martin@ximian.com>
15050         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
15051         if we are the "real" method, ie. not an inlined method inside it.
15053 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
15055         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
15056         before we look in the special fields table. This fixes
15057         ../tests/thread-static-init.cs.
15059 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15061         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
15062         for Array get_Rank and get_Length. Fixes bug #70465.
15064 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
15066         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
15067         separate structure to reduce the size of MonoJumpInfo.
15069 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
15071         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
15073 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
15075         * mini.c (mini_get_inst_for_method): Changed to allow ports
15076         to return a MonoInst instead of opcode 
15077         (renamed mini_get_opcode_for_method to better reflect the new functionality)
15078         
15079         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
15080         Allow ports to return a created MonoInst instead of op-code, will enable
15081         new optimizations.
15082         (renamed mini_get_opcode_for_method to better reflected the functionality)
15084 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
15086         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
15088 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
15090         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
15091         Fixes #69985.
15093 2004-12-08  Martin Baulig  <martin@ximian.com>
15095         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
15096         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
15098 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
15100         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
15101         correctly.
15103         * exceptions.cs: Disable some tests which depend on properties of x86 fp
15104         arithmetic.
15106 2004-12-08  Raja R Harinath  <rharinath@novell.com>
15108         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
15110 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
15112         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
15113         bug introduced by the previous patch.
15115 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
15117         * mini-ppc.c, objectc.cs: handle large structs passed by value
15118         (fixes bug #69972).
15120 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
15122         * mini-ppc.c: OP_ARGLIST implementation from
15123         Geoff Norton  <gnorton@customerdna.com>.
15125 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15127         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
15128         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
15130 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
15132         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
15134 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15136         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
15137         support.
15139 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
15141         * mini-sparc.c: Zero out localled-ed memory.
15143         * iltests.il: Add tests for zeroing out localloc-ed memory.
15145 2004-12-04  Martin Baulig  <martin@ximian.com>
15147         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
15148         mono_method_get_signature_full().       
15150 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
15152         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
15153         and some utility functions (always for SSAPRE), integrated SSAPRE.
15154         * mini.h: Likewise.
15155         * driver.c: Added ssapre option.
15156         * ssa.c: Small fix on OP_ARG handling.
15157         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
15158         * Makefile.am: Likewise.
15160 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
15162         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
15163         now in the xp code.
15165         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
15166         icall.
15168 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15170         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
15171         
15172         * cpu-s390.md : Increase instruction length of oparglist.
15174         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
15176 2004-11-30  Martin Baulig  <martin@ximian.com>
15178         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
15179         virtual generic methods.  We call a special helper_compile_generic_method()
15180         icall to retrieve the method from the vtable, inflate and compile
15181         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
15183         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
15185 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
15187         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
15189 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
15191         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
15192         Fixes #69929.
15194 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
15196         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
15197         platforms with PIC aot.
15199 2004-11-28  Martin Baulig  <martin@ximian.com>
15201         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
15202         Fixes gen-112.cs.
15204 2004-11-28  Martin Baulig  <martin@ximian.com>
15206         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
15207         the result of mono_type_get_underlying_type() to check whether
15208         we're byref.
15210 2004-11-26  Martin Baulig  <martin@ximian.com>
15212         * mini.c
15213         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
15214         in the g_assert().
15216 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
15218         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
15219         the same way as the other arguments so they won't get clobbered.
15221         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
15222         calls through R11 since it is clobbered by the trampoline code.
15224 2004-11-26  Raja R Harinath  <rharinath@novell.com>
15226         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
15227         pick up in-tree mscorlib.dll.
15229 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
15231         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
15233         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
15234         runtime data/code are now stored in a table similar to the GOT in ELF. 
15235         This allows the code itself to be position independent.
15237         * aot.c: Fix loading of referenced assemblies after the lazy assembly
15238         loading changes.
15240         * aot.c: Attach ELF type (object/function) directives to all global
15241         symbols.
15243         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
15245         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
15247         * mini-amd64.h: Turn on PIC AOT code.
15249         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
15250         returning the offset within an OP_AOTCONST instruction where the GOT
15251         offset needs to be added.
15253         * mini.h: Bump AOT file format version.
15255 2004-11-25  Martin Baulig  <martin@ximian.com>
15257         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
15258         uninflated generic methods.
15260 2004-11-25  Martin Baulig  <martin@ximian.com>
15262         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
15264 2004-11-24  Martin Baulig  <martin@ximian.com>
15266         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
15267         original klass (this only applies for generic instances).
15269 2004-11-24  Martin Baulig  <martin@ximian.com>
15271         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
15272         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
15273         that array).
15275 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
15277         * mini.c (mono_method_to_ir): Disable inlining for methods containing
15278         localloc. Fixes #69678.
15280         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
15281         
15282 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
15284         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
15285         used SSE registers on pinvoke calls. Fixes #69774.
15287 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
15289         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
15290         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
15292 2004-11-23  Raja R Harinath  <rharinath@novell.com>
15294         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
15295         Refer directly to the mcs/ tree.
15297 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15299         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
15300         Check if a trampoline for a synchronized method is required. 
15302 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
15304         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
15305         with localloc if needed. Throe arithmetric exception in
15306         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
15307         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
15309 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
15311         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
15312         types before switching on type.  Fixes #69622.
15314 2004-11-19  Raja R Harinath  <rharinath@novell.com>
15316         * Makefile.am (check-local): New.  Integrate into 'make check'.
15317         (MCS,RUNTIME): Define using in-tree mono and mcs.
15318         (ILASM): New.
15319         (%.exe): Use $(ILASM).
15321 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
15323         * mini-ppc.c: adjust initial prolog size (bug #69691).
15325 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
15327         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
15328         #69664.
15330 2004-11-17  Raja R Harinath  <rharinath@novell.com>
15332         * Makefile.am (clean-local): Rename from 'clean'.
15334 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15336         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
15337         to mono_arch_is_int_overflow. 
15338         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
15339         SIGFPE events.
15341 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
15343         * declsec.c|h: New files to support declarative security attributes.
15344         Added function to check if a method has (applicable) security.
15345         * mini.c|h: Add check for declarative security attributes in
15346         mono_method_check_inlining.
15347         * Makefile.am: Added declsec.c and declsec.h to the build.
15349 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
15351         * mini.c, mini.h: update to keep dynamic code info per-domain.
15353 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
15355         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
15356         (mini_init): Get rid of it from here too.
15358 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
15360         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
15361         implemented OP_RETHROW (patch by Geoff Norton
15362         <gnorton@customerdna.com>).
15364 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
15366         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
15367         between appdomains.  Fixes appdomain-unload on PPC.
15369 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
15371         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15372         mini-exceptions.c: handle the new wrapper types.
15373         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
15374         token value as a MonoClass* when compiling a wrapper.
15375         mono_jit_create_remoting_trampoline now takes an additional
15376         MonoRemotingTarget parameter.
15377         
15378 2004-11-10  Martin Baulig  <martin@localhost>
15380         * mini.c (mono_method_to_ir): Use `generic_container->context'
15381         rather than creating a new one.
15383 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15385         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
15387         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
15389 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
15391         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
15392         the experimental aot cache stuff.
15394 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15396         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15397         mini-exceptions.c: update to exception clause structure changes.
15399 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
15401         * exceptions-x86.c (throw_exception): Fix warnings.
15403         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
15404         for OP_RETHROW.
15406 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
15408         * exceptions-sparc.c (get_throw_exception): Really fix this.
15410 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
15412         * tramp-*.c: we no longer support icalls without wrappers, so
15413         a bit of code can be removed here
15415 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
15417         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
15418         patch.
15420         * cpu-sparc.md: Add op_rethrow.
15422         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
15424         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
15426         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
15427         * mini-ops.h: Add OP_RETHROW.
15429         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
15431         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
15433 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
15434         
15435         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
15436         Makes the output much easier to read
15438 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
15440         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
15441         prevents another huge leak when compiling with ssa. Secondly, the
15442         performance of doing this rather than freeing the lists is much
15443         better. GList does a lock every time you allocate a list link,
15444         so that it can use a memory pool. So, it is better to just use
15445         a memory pool of our own.
15446         
15447         * ssa.c, linear-scan.c: replace g_list_remove_link with
15448         g_list_delete.  The remove one does not free the GList, so we were
15449         leaking memory. On -O=all --compile-all with corlib, this cut down
15450         3 MB of allocations.
15452 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
15454         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
15456         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
15458         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
15459         into a new function mono_create_jit_trampoline ().
15461 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
15463         * trace.c (get_spec): Allow tracing of classes without a namespace.
15465 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
15467         * mini.c: Fix pointer overwrite in mini_method_compile.
15469 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
15471         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
15472         The darwin ABI needs some special handling for 1 and 2 byte structs
15473         Lets use lbz/lhz instead of lwz everywhere.
15474         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
15475         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
15476         Use stb/sth for the former, and put the latter always on stack instead of in
15477         argument registers.
15479 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
15481         * trace.c (is_filenamechar): Add '_'.
15483 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
15485         * mini-s390.c: Fix prolog length to allow for large trace requirements.
15487         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
15489 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
15491         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
15492         depends on libmonogc. Fixes #68805.
15494 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
15496         * mini.c (mono_jit_free_method): Provide extra information for
15497         this error.  Currently this leaks, but will be turned into a
15498         developer option in the future.
15500 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
15502         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
15504 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
15506         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
15507         boundary. Fixes reading of PATCH_INFO_R4 and R8.
15508         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
15510 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
15512         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
15513         trampolines for AOT code.
15515 2004-10-22    <vargaz@freemail.hu>
15517         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
15518         constructed types. Fixes #68136.
15520 2004-10-21  Martin Baulig  <martin@ximian.com>
15522         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
15523         if it returns true, unwind the stack to the call instruction.
15525 2004-10-21    <vargaz@freemail.hu>
15527         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
15529         * mini.h: Bump AOT version number.
15531         * objects.cs: Add another test for unbox trampolines.
15533         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
15534         valuetype methods.
15536 2004-10-20    <vargaz@freemail.hu>
15538         * driver.c: Add SHARED to the set of optimizations tested.
15540         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
15542         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
15543         used by CEE_NEWARR.
15545         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
15547 2004-10-20  Martin Baulig  <martin@ximian.com>
15549         * mini-exceptions.c (mono_handle_exception): Call
15550         mono_debugger_handle_exception() to tell the debugger about
15551         catch/finally clauses.
15553 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
15555         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
15557         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
15558         #68447.
15560 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
15562         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
15563         methods as their native size, fixed bug #57543, #57545.
15564         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
15565         This saves a temporary register and mullw call down into 1 (minor perf
15566         increase for cases like sum = sum * 5;  This use to translate into:
15567             li r11,5
15568             mullw r28,r28,r11
15569         It now translates to
15570             mulli r28,r28,5
15572 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
15574         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
15575         #68388.
15577 2004-10-11  Martin Baulig  <martin@ximian.com>
15579         * mini.c (mono_method_to_ir): If we're a generic method, get the
15580         MonoGenericContainer from our MonoMethodNormal and create a
15581         MonoGenericContext from it.
15583 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
15585         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
15587         * basic-long.cs: Add test for checked i8->i2 cast.
15589 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15591         * inssel-ppc.brg: added a couple of speedup rules.
15593 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
15595         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
15596         to speed up rebuilds.
15598 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15600         * mini-s390.c: Minor fix to OP_OR_IMM.
15602 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
15604         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
15605         better. Fixes appdomain-unload.exe on sparc.
15607 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
15609         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
15610         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
15611         see bug 67324.
15613 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
15615         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
15617 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
15619         * mini.c: Always generate a field read/write wrapper for members
15620         of the class MarshalByRefObject since the actual instance could
15621         be a CBO.
15623 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
15625         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
15627 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
15629         * driver.c mini.h trace.c: Move the setting of the main assembly into
15630         a separate function called mono_trace_set_assembly () and call it after
15631         actually loading the main assembly. Fixes #66872.
15633 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
15635         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
15636         using the code manager.
15638 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
15640         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
15642 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
15644         * cpu-amd64.md: Fix bug in previous patch.
15645         
15646         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
15647         #66650.
15649 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
15651         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15652         mini-exceptions.c: updates for changed stack walk interface.
15654 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15656         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
15658 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
15660         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
15662 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
15664         * driver.c (mini_regression_list): Do not call mono_assembly_close 
15665         since assemblies can't be unloaded.
15666         
15667 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15669         * cpu-amd64.md: Fix more instruction lengths.
15671         * cpu-amd64.md: Fix lengths of some instructions.
15673 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
15675         * inssel.brg: Make the array ldelema check aot friendly.
15677 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15679         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
15681         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
15683 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
15685         * mini-x86.c: Fix build.
15687         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
15688         mono_type_get_underlying_type () helper function to simplify code.
15689         
15690 2004-09-09  Martin Baulig  <martin@ximian.com>
15692         * mini-amd64.c: Don't access `type->data.klass' directly, call
15693         mono_class_from_mono_type() instead since the type may be a
15694         generic instance.
15696 2004-09-09  Martin Baulig  <martin@ximian.com>
15698         * mini-amd64.c (get_call_info): Fix support for generic instances.
15699         (add_valuetype): Use mono_class_from_mono_type() to get the class
15700         since we can be a generic instance.
15702 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
15704         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
15706 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
15708         * liveness.c: reset spill costs on each scan: bug 62107
15710 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
15712         * exceptions-sparc.c (mono_arch_find_jit_info): remove
15713         unnecessary line that doesn't compile
15715 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
15717         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
15718         trampolines, make them call an error function so people can fix their
15719         code.
15721 2004-09-06  Martin Baulig  <martin@ximian.com>
15723         * mini.c (mono_method_to_ir): When initializing locals, handle a
15724         generic instances like a valuetype if it's a valuetype and like a
15725         class if it's a class.
15727 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15729         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
15730         stack. Fixes #64674.
15732         * exceptions.cs: Add test for unwinding of call arguments.
15734 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
15736         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
15737         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
15738         set the carry/borrow flag). The sparc and s390 implementations
15739         can now use optimized versions (and simplify the code). ppc bugfixes.
15741 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15743         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
15745 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
15747         * inssel-amd64.brg: Remove leftover 32 bit rule.
15749         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
15751 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
15753         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
15754         mono_arch_find_jit_info functions into a new function. Fix a memory
15755         leak.
15757         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
15758         refactored code.
15759         
15760 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15762         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
15763         as well.
15764         
15765         * exceptions.cs: Add array size tests.
15767         * mini.c: Allocate a separate icall wrapper for each arity of 
15768         mono_array_new_va. Fixes #59509.
15770         * exceptions.cs: Add testcase for 64578.
15772         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
15774         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
15775         
15776 2004-09-02  Martin Baulig  <martin@ximian.com>
15778         * mini.c (mono_method_to_ir): When initializing the locals, call
15779         handle_initobj() on the generic instance itself, not its
15780         underlying type.
15782 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15784         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
15785         MonoJitInfo for dynamic methods.
15787         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
15789         * mini.c: Add support for freeing JIT data for dynamic methods.
15790         
15791 2004-09-01  Martin Baulig  <martin@ximian.com>
15793         * mini-x86.c (is_regsize_var): Added support for generic
15794         instances.
15795         (mono_arch_emit_prolog): Make this compile again, use
15796         `x86_push_imm_template (code)'.
15798 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
15800         * mini-x86.c: make all push_imm instructions that get
15801         patched always emit the long form
15803 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
15805         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
15806         in a per-domain hash.
15808         * mini-amd64.c (merge_argument_class_from_type): Handle generic
15809         types.
15811 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
15813         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
15814         work.
15815         
15816         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
15817         work.
15819         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
15820         Beginnings of SSE2 support.
15822         * exceptions.cs: Add more tests for checked int<->uint casts.
15824 2004-08-28  Martin Baulig  <martin@ximian.com>
15826         * mini-x86.c (mono_arch_instrument_epilog): Added support for
15827         generic instances.
15829         * mini.c
15830         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
15831         Handle generic instances recursively.
15833 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15835         * iltests.il: test for conv.u8 on a constant
15837 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15839         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
15840         LCONV_x4 (shrun_32 (membase)).
15842 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15844         * inssel-x86.brg: c&p rules for push/setret of long
15846 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15848         * inssel-x86.brg: c&p rules for compare (base, regvar) and
15849         compare (regvar, base)
15851         * inssel-x86.brg: more burg love
15853         * inssel.brg: more cleanup
15855         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
15857 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15859         * basic-long.cs, basic-calls.cs: new tests for optimization.
15861 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
15863         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
15864         patch.
15866 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15868         * mini-amd64.c (read_tls_offset_from_method): Add another case.
15869         
15870 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
15872         * inssel.brg (mini_emit_memcpy): use 
15873         NO_UNALIGNED_ACCESS to disable memcpy optimization
15875 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15877         * mini-amd64.c: Handle generic types in various places.
15879         * mini.c (mono_method_to_ir): Handle generic types in init locals.
15881 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
15883         * mini.c (handle_box): Fix warning.
15885         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
15887         * mini-amd64.h: Enable the emit_state optimization.
15889         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
15891         * mini-amd64.c: Add some new 64 bit peephole opts.
15893         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
15895         * cpu-amd64.md: sreg1 of div instructions must be %rax.
15897         * mini-amd64.c: Register allocator fixes.
15899         * mini.c: Add an optimization to emit_state to avoid allocation of new
15900         registers on some platforms.
15902 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
15904         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
15906         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
15907         allocation. Fixes #63085.
15909         * basic-long.cs: Add new regression test.
15911         * mini-amd64.c: Register allocator improvements.
15913 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
15915         * mini-amd64.c (read_tls_offset_from_method): Add another code
15916         sequence.
15918         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
15919         instruction sequence for nullifying class init trampolines.
15921         * objects.cs: Add new regalloc test.
15923         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
15925 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15927         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
15928         
15929         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
15930         arguments.
15932         * driver.c: Fix profiling after TLS changes.
15933         
15934         * driver.c (mono_main): Set mono_stats.enabled if needed.
15936         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
15937         CEE_BOX.
15939 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
15941         * mini-x86.c: use a 1 op rather than a 2 op tls access
15942         instruction -> faster.
15944 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15946         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15947         x86 backend.
15949 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
15951         * exceptions-sparc.c (throw_exception): fix typo
15953 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
15955         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
15956         set tree->dreg correctly with tls. Allow any
15957         register to be used.
15959         * mini-x86.c (read_tls_offset_from_method): add new code
15960         generation pattern seen with GCC.
15963 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15965         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
15966         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15967         exceptions-sparc.c: fix some performance issues in exception
15968         handling and setting of the stack trace for exceptions that were
15969         already thrown.
15971 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15973         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
15974         x86 backend.
15975         
15976         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
15977         registers.
15979 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
15981         This patch inlines tls access, when possible.
15982         
15983         * mini.h: new arch functions for TLS intrinsics.
15984         All platforms updated with a stub.
15986         * mini.c: use the new intrinsics
15988         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
15989         arch specific intrinsic for tls variables
15991 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15993         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
15994         under windows.
15996 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15998         * mini.c: thread local allocation
16000 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
16002         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
16004         * Makefile.am: Link against the static version of libmonogc.
16005         
16006         * Makefile.am: Link the static versions of the convenience libraries
16007         into the mono executable.
16009         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
16011 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
16013         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
16014         on integer overflow.
16016         * mini-amd64.c: Reorganize function call code.
16018         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
16020 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
16022         * inssel-x86.brg: use xor eax,eax.
16023         
16024         * basic.cs: new tests
16026 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
16028         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
16029         in exception throwing code.
16030         
16031 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
16033         * inssel-x86.brg: use xor esi,esi.
16035 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
16037         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
16038         can trace methods compiled during mini_init () too.
16040         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
16041         CEE_CONV_U4.
16043 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
16045         * Makefile.am: static link on x86 (r=zoltan)
16047 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
16049         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
16050         code since it causes some programs to fail.
16052 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
16054         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
16056 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
16058         * mini.c: ovfops_op_map - add STACK_OBJ case for
16059         CONV_I 
16060         * basic.cs: add test_0_pin_string as test
16061         case for above.
16063 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
16065         * Makefile.am: build C# if srcdir != builddir
16067 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16069         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
16070         fall-through blocks.
16072 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16074         * driver.c: enable loop by default again and include abcrem in -O=all.
16076 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
16078         * iltests.il: Add some localloc tests.
16080         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
16082         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
16083         Fixes #62574.
16085         * inssel-amd64.brg: Add some optimizations.
16087         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
16088         for gcc-3.4.
16090         * Makefile.am: Statically link mono against libmono on AMD64.
16091         
16092         * mini-amd64.c inssel-amd64.brg: Optimizations.
16094 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
16096         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
16098         * tramp-amd64.c: Patch calling code in trampolines.
16100 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
16102         * mini-amd64.c: pinvoke struct passing fixes.
16104 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
16106         * mini-sparc.c: redo change, make mono_arch_cpu_init call
16107         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
16109 2004-08-05  Duncan Mak  <duncan@ximian.com>
16111         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
16112         CEE_LDELEM_ANY.
16114 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
16116         * mini-amd64.c (emit_move_return_value): Move return value for normal
16117         calls too.
16119 2004-08-05  Martin Baulig  <martin@ximian.com>
16121         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
16122         `type->type'; just modify `type' itself when dealing with enums
16123         and generic instances.
16124         (check_call_signature): Make `simple_type' a `MonoType *'.
16126 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
16128         * mini.c: Use OP_PADD to add offsets to addresses.
16130         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
16132 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
16134         * mini-sparc.c (mono_arch_emit_epilog): fix check
16135         for folding last op into restore instruction
16137 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
16139         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
16140         helper methods using the code manager.
16141         
16142         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
16144         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
16146 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16147         
16148         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
16149           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
16151         * mini-s390.c: fix tail processing
16153 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
16155         * mini-ppc.c: mul.ovf.un exception name fix.
16157 2004-08-03  Martin Baulig  <martin@ximian.com>
16159         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
16160         instances; before jumping to `handle_enum', also modify `ptype'.
16162 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
16164         * cpu-sparc.md: fcall maximal length too small.
16166 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
16168         * mini-amd64.c mini.h: Add initial support for passing/returning 
16169         structures to/from pinvoked methods.
16171 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
16173         * mini-ppc.c: reg allocator fix.
16175 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
16177         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
16179         * inssel.brg: Optimize memset on 64 bit machines.
16181         * mini-amd64.c: Fix some vararg cases.
16183 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16185         * mini-s390.c: Corrected macro in emit_float_to_int
16187         * s390-abi.cs: Tests to exercise the s390 ABI
16189 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
16191         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
16192         caller saved regs.
16194         * basic.cs: Add a test for add.ovf.un.
16196 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
16198         * mini-sparc.c: add case for OP_IDIV_UN
16200 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
16202         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
16203         
16204         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
16206 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
16208         * basic.cs: regression tests.
16210         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
16211         regressions.
16213 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
16215         * basic.cs: Add a new test.
16217         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
16218         and AOT. Various fixes and optimizations.
16220         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
16222 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
16224         * mini-ppc.c: make sure temp regs are not used for global reg
16225         allocation.
16227 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
16229         * cpu-sparc.md: conv_i8 fix for 64bits
16231         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
16233 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
16234         
16235         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
16236         add opcode for cmp BYTE PTR [eax], imm.
16238         * inssel.brg: Make memcpy and memset takes bases.
16240 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
16242         * *-amd64.*: More AMD64 work.
16243         
16244 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
16246         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
16247         add a compare-not-equal opcode.
16248         
16249 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
16251         * mini.c: Use mono_init_from_assembly instead of mono_init.
16252         
16253 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
16255         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
16257         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
16259         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
16261         * inssel.brg: 64 bit fixes.
16263         * mini.h (MonoCallInst): Add some AMD64 specific data.
16265         * mini.h: Add some OP_P opcodes.
16267 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
16269         * basic.cs: tests for 61797 and 61740
16271 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
16273         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
16274         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
16276 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
16278         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
16280         * *-amd64*.*: Ongoing AMD64 work.
16282 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
16284         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
16286         * *-amd64*: Ongoing AMD64 work.
16288         * mini-arch.h: Add AMD64 support.
16290         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
16292         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
16294         * mini-ops.h: Add new opcodes.
16296         * Makefile.am: Add AMD64 support.
16298         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
16299         rules into the inssel-long*.brg files.
16301         * *-amd64.*: Add beginnings of AMD64 backend.
16303 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
16305         * mini.c (print_dfn): commenting out the code that prints
16306         the cil. With -O=deadce, this makes -v -v crash.
16307         
16308         * cpu-pentium.md: make checkthis have a length of 2
16310 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
16312         * mini-sparc.h: fix implementations of __builtin
16313         functions for Sun compiler for V9.
16315 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
16317         * mini.c: use the new stelem.ref wrapper
16318         * exceptions.cs, arrays.cs: new stelem.ref tests
16320 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16322         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
16323         new XSP should work with these changes).
16325 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
16326         
16327         * inssel-{long32,x86,}.brg: trivial optimizations.
16328         
16329 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
16331         * mini.c: load value when emitting box operation in
16332         constrained calls.
16334 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
16336         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
16337         is one byte shorter than cmp DWORD PTR [eax], 0.
16339 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16341         * inssel-ppc.brg: arguments on the stack are always
16342         relative to the stack pointer (spotted by Neale Ferguson).
16344 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16346         * exceptions-x86.c: delay appending the method name to the trace until
16347         after mono_jit_info_table_find is called, as this gets the real
16348         MonoMethod.
16350 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
16352         * aot.c: register roots
16354 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
16356         * aot.c : I could just use PLATFORM_WIN32 flag.
16358 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
16360         * aot.c : Reverting the previous fix. This time it broke linux build.
16362 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
16364         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
16366 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
16368         * mini.c (handle_stack_args): Remove some more debugging code.
16369         
16370         * mini.c (handle_stack_args): Remove debug output left in by mistake.
16372         * driver.c mini.h aot.c: Allow additional options to be specified with
16373         --aot and pass them to mono_compile_assembly.
16375         * aot.c: Add experimental code to AOT compile all loaded assemblies
16376         on demand and save the code into a cache in the filesystem.
16378         * aot.c: Add support for more wrapper methods.
16379         
16380         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
16381         58863.
16383         * cpu-*.md: Remove removed opcodes.
16385         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
16386         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
16387         related icalls to marshal.c.
16389 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
16391         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
16393         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
16395         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
16397 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
16398         * liveness.c: If liveness is recomputated we need to reset the information
16399         for each variable. This way, if the liveness range has been narrowed
16400         by optimizations that happened after the last computation, we can return
16401         a smaller range.
16402         
16403         For example, if you have
16404         
16405         {
16406                 int i = 0;
16407                 
16408                 // Tons of code that does not affect i
16409                 
16410                 i = foo ();
16411                 ...
16412         }
16413         
16414         i = 0 is dead code and will be removed by SSA. However, when
16415         linear scan gets to the code, i will still appear to be live
16416         throughout the entire block. This prevents good register allocation.
16418 2004-07-06  Martin Baulig  <martin@ximian.com>
16420         * debug-mini.c (mono_debug_init_method): Allow
16421         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
16422         (mono_debug_add_icall_wrapper): New method.
16424         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
16426 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
16428         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
16429         optimization.
16431 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
16433         * aot.c (mono_aot_load_method): Fix loading of debug info.
16435 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
16437         * aot.c: Add logging support.
16439 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
16441         * mini.h: Add prototype for mono_print_method_from_ip.
16443         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
16445         * inssel.brg: 64 bit fixes.
16447         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
16448         inssel-long32.brg.
16450         * Makefile.am: Add SPARC64 support.
16452 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
16454         * aot.c: Fix alignment problems on 32 bit platforms.
16456 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
16458         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
16459         SPARC64.
16461         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
16462         problems.
16464         * mini.h: Bump AOT file version. Some 64 bit fixes.
16466 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
16468         * inssel-sparc.brg: Add new rule to avoid register moves.
16470         * inssel.brg: Add ldind_to_load_membase helper function.
16472 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
16474         * mini.c: OffsetToStringData intrinsic.
16475         
16476 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
16478         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
16480         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
16481         regression tests.
16483         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
16484 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16486         * mini.c: reinstated mono_compile_get_interface_var()
16487         on x86, too, since the change breaks the Gtk# build there as well.
16489 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16491         * driver.c: remove loop from the default optimizations: it seems to
16492         interact badly with some of the other options (see bug #60613).
16494 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
16496         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
16497         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
16499 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
16501         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
16502         vararg-using methods.
16504 2004-06-21  Martin Baulig  <martin@ximian.com>
16506         * mini/mini-exceptions.c
16507         (mono_handle_exception): Added `gpointer original_ip' argument.
16508         After calling mono_unhandled_exception(), call
16509         mono_debugger_unhandled_exception() and if that returns true,
16510         restore the context and return.
16512 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
16514         * mini-ppc.c: prefer the use of relative branches so
16515         they won't need to be patched in aot code (patch from Patrick Beard).
16517 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16519         * aot.c: patch from Patrick Beard to make the output assembly
16520         more correct for the MacOSX assembler. Small tweak to
16521         generate sane images on Linux/PPC, too.
16523 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16525         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
16526         case until bug #59509 is fixed (shows up in #60332).
16528 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16530         * mini.c: make sure the needed wrappers are compiled, too, with
16531         precomp.
16533 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
16535         * driver.c: remove NPTL reference in --version output.
16537 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16539         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
16540         generate valid assembly for the Mach-O assembler.
16542 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16544         * driver.c: don't include abcrem in the all optimization specifier
16545         since it slows down jit compilation too much for now.
16547 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
16549         * mini.c: use BIGMUL only if both operands have the same signage.
16550         * iltests.il: Test for bug 60056. (errors related to signage in
16551         BIGMUL).
16553         r=lupus.
16555 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
16557         * mini.c, aot.c: memory leak fixes.
16559 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16561         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
16563 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
16565         * Makefile.am: remove the -static hack completely, it links in
16566         statically glib as well.
16568 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
16570         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
16571         * exceptions.cs: make it compile with new mcs/csc.
16573 2004-06-03 Massimiliano Mantione <massi@ximian.com>
16574         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
16575         and added relevant test case.
16577 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16579         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
16580         regressions in gtk-sharp.
16582 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
16584         * exceptions.cs: New regression tests.
16586         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
16588 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
16590         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
16592 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
16594         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
16596         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
16598 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
16600         * mini.c (mono_jit_runtime_invoke): Init class in this
16601         method instead of trusting mono_jit_compile_method to
16602         do the work (because wrappers can be in object class)
16604 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
16606         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
16608         * basic-long.cs: New regression test.
16610 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
16612         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
16613         and div/rem checks.
16615 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
16617         * Makefile.am: fix miguel's change to build mono statically against
16618         libmono (track build dependencies).
16620 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
16622         * cfold.c: Some glib versions do not have G_MININT32.
16624 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
16626         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
16627         with precision of tan, atan, sin and cos, and implemented related
16628         regressions tests (fixes bug 54467, but one new problem appeared and
16629         is not fixed yet).
16631 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
16633         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
16635         * exceptions.cs: Add test for constant folding && division by zero.
16637         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
16638         since driver.c is in libmono too, so the optimization was useless.
16640         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
16641         variable to driver.c so the compiler can emit more efficient code to
16642         access them.
16644 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16646         * Makefile.am: don't distribute generated inssel.[ch] files.
16648 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
16650         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
16651         into the default appdomain. Fixes #58707.
16653         * jit-icalls.c: Remove the broken approximation for truncl, doing
16654         no conversion is better.
16656         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
16657         Fixes #58863.
16659 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16661         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
16662         of the mcrxr instruction which is not available on some processors
16663         even if it's documented to be. Implement add and sub overflow correctly
16664         (still not complete for long unsigned). Speed up icalls a bit.
16666 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
16668         * mini.c (mono_jit_compile_method_with_opt): Make sure that
16669         we run .cctor in the current domain instead of target_domain.
16670         
16671         Fixes bug #58558, .cctor not being called in -O=shared.
16673 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16675         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
16677 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
16679         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
16680         which can be done with an imm8, do it that way.
16681         (mono_arch_output_basic_block): ditto for a jmp
16682         (mono_arch_emit_prolog): Computate maximum offset of a label.
16684 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
16686         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
16687         now tries to allocate prefered physical reg's for virtual
16688         regs. This reduces the number of emited spills/loads with
16689         20-30% on our core assemblies.
16691 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16693         * jit-icalls.c: truncl() is not needed and trunc() is
16694         the correct thing to do anyway (bug #58287).
16696 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
16698         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
16699         if available.
16701 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16703         * driver.c: enable loop optimizations by default.
16705 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16707         * mini-x86.c: fix calc of max loop size when aligning loops start.
16709 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
16711         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
16712         the stack.
16714 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
16716         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
16717         should set carry.
16719         * basic-long.cs: Add tests for add/subtract of immediates with carry.
16721         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
16722         
16723         * mini.c (inline_method): Allways inline some wrappers even if the cost
16724         is too large. Fixes #58785.
16726         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
16727         
16728 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
16730         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
16731         (crichton@gimp.org). Beginning of support for sparc/linux.
16733         * mini-sparc.c: Optimize retrieval of LMF address.
16735 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
16737         * exceptions-ppc.c:  handle alloca in methods with clauses.
16739 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
16741         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
16743 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
16745         * mini.c: Delegate most of the abort signal work to 
16746           mono_thread_request_interruption, which also handles Stop and Suspend
16747           states.
16749 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
16751         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
16752         supports the save/restore lmf opcodes.
16754 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
16756         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
16757         by gcc-3.4 as well.
16759         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
16761 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16763         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
16764         methods which contain array accesses.
16766         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
16767         boundaries. Fixes #58537.
16769         * iltests.il: Add regression test for #58537.
16771 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16773         * mini-x86.c (mono_arch_local_regalloc): Last part of
16774         fix for bug #58633 (releasing register to early).
16776 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
16778         * basic-long.cs: Add new regression test.
16780 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16782         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
16783         register too early on the chain.
16785 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16787         * mini.c (create_helper_signature): Use a helper function to reduce
16788         the code which needs to be written. Also set the calling convention of
16789         icalls on windows. Fixes #57840.
16791 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16793         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
16794         exceptions-ppc.c: added helper function to get the instruction address
16795         from a signal handler context.
16797 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16799         * helpers.c: use g_get_tmp_dir. Invokes happyness 
16800         from gonzalo.
16802 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16804         * helpers.c: Add new env variable to pass args to objdump.
16805         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
16807 2004-05-17  Radek Doulik  <rodo@ximian.com>
16809         * Makefile.am (common_sources): added abcremoval.h so it get
16810         disted and daily mono packages on go-mono.com will build again
16812 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
16814         * abcremoval.c: Fixed coding style, added copyright header.
16816         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
16818         * mini.h: Added prototype for abc removal main function.
16820         * build_relations_propagation_table.pl: Added copyright header.
16822 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16824         * basic-long.cs: reg test for complex ceq_long bug.
16826 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16828         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
16829         reg in long and clob case (bug #58343). Fixed/added comments.
16831 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
16833         * mini.c (mono_jit_runtime_invoke): Follow new convention
16834         of calling the invoke method with an function pointer.
16836 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
16838         * ChangeLog: Fix author of memory leak patch.
16840 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
16842         * Makefile.am: fix make dist as well...
16845 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
16847         * cfold.c: Made so that conversions from pointer to int4 are no-ops
16848         on archs where pointers are 4 bytes long.
16850         * Makefile.am: Added abcremoval.c source file.
16852         * abcremoval.c: Added abcremoval.c.
16854         * abcremoval.h: Added abcremoval.h.
16856         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
16858         * inssel.brg: Enabled bounds check removal.
16860         * mini.c: Added support for abcrem optimization.
16862         * mini.h: Added abcrem optimization label.
16864         * driver.c: Added support for abcrem optimization.
16866         * propagated_relations_table.def: Added propagated_relations_table.def.
16868 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
16870         * mini.c, cfold.c: fix style.
16872 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16874         * mini.c: handle issue with the low-level implementation of
16875         some long opcodes (bug #54209).
16877 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
16879         * basic.cs: test for my new cmov stuff.
16881 2004-05-13      Patrik Torstensson
16883         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
16884         opt and added peephole documentation.
16886 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
16888         * tramp-ppc.c: rewrote the generic trampoline code.
16890 2004-05-11      Patrik Torstensson
16892         * mini-x86.c: optimize long shl/shr asm code (one less branch)
16894 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
16896         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
16898         * mini.h mini.c dominators.c: Applied patch from Derek Woo
16899         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
16901         * mini.c: Add new icalls for AsAny marshalling.
16903 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16905         * tramp-ppc.c, mini-ppc.c: more cleanups.
16907 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16909         * mini.c: no warnings.
16911 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16913         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
16915 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
16917         * mini.c: In the thread abort signal handler, if the thread is in the
16918         process of being stoped, don't throw the Abort exception, just stop the
16919         thread.
16921 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
16923         * tramp-ppc.c: removed old code.
16925 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16927         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
16928         do some simple speed optimizations on ppc.
16930 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16932         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
16933         and large offsets in load/store.
16935 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16937         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
16938         it causes regressions.
16940 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16942         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
16943         support.
16945 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16947         * jit-icalls.c: remove warnings.
16948         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
16949         speedups for unsafe code.
16951 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
16953         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
16955 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
16957         * basic-calls.cs: Add new regression test.
16959         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
16960         more portable.
16962         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
16964         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
16965         is no longer used.
16967 2004-05-06      Patrik Torstensson
16969         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
16970         long reg allocation in any reg (not only eax:edx) and implemented 
16971         long shl/shr ops in asm instead of helpers.
16973 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
16975         * mini-sparc.h: Fix warnings.
16977         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
16978         stack.
16980         * mini-exceptions.c (mono_handle_exception): Call the filter in a
16981         separate statement for clarity.
16983         * mini-sparc.c: Update status.
16985 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
16987         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
16988         here.
16990 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16992         * inssel-ppc.brg: another small pre-release workaround:
16993         we don't do overflow detection for long_sub_un.
16995 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16997         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
16998         (also works around a weird ppc bug: 57957).
17000 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
17002         * tramp-ppc.c: trampoline fixes.
17004 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
17006         * mini-ppc.c: fixed typos.
17008 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
17010         * mini-ppc.c, exceptions-ppc.c: more code saves registers
17011         at the top of the stack. Fixed typos. Use a frame registers
17012         for all the methods with exception clauses.
17014 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
17016         * exceptions-ppc.c: restore fp registers.
17018 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
17020         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
17021         order from the stack top (moved the stack room to save the
17022         return value for trace after the param area). Fixed corruption
17023         in restoring registers on unwind.
17025 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
17027         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
17029 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17031         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
17032         and prolog/epilog for methods that use it. Allow
17033         enough param area room for varargs methods. Fix miguel's
17034         breakage in exception handling.
17036 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17038         * Makefile.am: run genmdesc only on current arch.
17040 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17042         * exceptions-x86.c:
17043         * mini-x86.h: fix the build on windows.
17045 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
17047         * 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.
17049         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
17051         * mini-exceptions.c: New file.
17052         
17053         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
17054         Move some parts of the x86 exception handling code to an 
17055         arch-independent file so it can be shared with other ports.
17057 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
17059         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
17061 2004-04-26  David Waite  <mass@akuma.org>
17063         * driver.c: remove comma from end of enumeration declaration
17065 2004-04-26  Jackson Harper  <jackson@ximian.com>
17067         * driver.c: parse config file before loading first assembly. This
17068         allows the user gac to be enabled/disabled. 
17069         
17070 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
17072         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
17073         simpler mechanism: we do not care what is encoded initially
17074         (branch absolute or relative), we care about the code and its
17075         target.  I kept the old code for reference for now.
17077         The new code tries first to determine if the jump is anywhere in
17078         the -/+32 absolute meg range, if it succeeds, it encodes using the
17079         absolute branch;  If not, it tried to find something in the
17080         relative range, if not, it uses the handle_thunk code. 
17082 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
17084         * exceptions-ppc.c: use the correct ip register on macosx.
17086 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
17088         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
17090 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
17092         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
17093         Raise exception on integer divide by zero by hand since the hw
17094         doesn't support it. Handle NaNs in FP compares.
17096 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
17098         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
17099         code reducing duplication between the platforms and enabled
17100         signal exception handling (on linux for now).
17102 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
17104         * exceptions-ppc.c: more macosx support.
17106 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17108         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
17110 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
17112         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
17114 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
17116         * iltests.il: more tests.
17118 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
17120         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
17121         vars as well.
17123 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
17125         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
17127 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
17129         * liveness.c: Mark variables as volatile in all basic blocks reachable
17130         from exception clauses.
17132 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
17134         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
17135         inlining.
17137 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
17139         * iltests.il, basic.cs: more tests for regalloc.
17141 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
17143         * iltests.il: Some tests for register allocation modifications
17144         I have locally.
17146 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
17148         * exceptions.cs: Add regression test for bug #56782.
17150         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
17151         original stack trace if an exception is rethrown. Fixes #56782. Oh,
17152         the beauty of fixing the same thing in 5 different files...
17154 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
17156         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
17157         methods.
17159 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
17161         * mini.c: Add support for STRWLPARRAY marshalling convention.
17163 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
17165         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
17166         to init the context to setup the regs pointer).
17168 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
17170         * exceptions-ppc.c: more exceptions work.
17172 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17174         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
17175         not allowed.
17177 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
17179         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
17180         can use the memory directly.
17182         * cpu-pentium.md: Update documentation from a post from Zoltan. 
17184         add x86_add_membase, x86_sub_membase, x86_mul_membase
17186 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
17188         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
17189         GENERAL_REGS they were also hardcoded for all PPC ports.
17191         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
17193         Remove hard-coded limit for floating point registers, use
17194         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
17196         Notice that in MacOS X calling conventions you can fit a lot more
17197         floating point values in registers, so I should update the PInvoke
17198         test to excercise the passing of floating point values on the
17199         stack (currently broken).
17200         
17201 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
17203         * tramp-ppc.c (create_trampoline_code): Added
17204         JUMP_TRAMPOLINE_SIZE. 
17205         (ppc_magic_trampoline): Follow the pattern from
17206         x86_magic_trampoline: if code is set to zero, return. 
17207         (create_trampoline_code): Always pass MonoMethod to the jump
17208         trampoline, before it was passing a null.
17209         (mono_arch_create_jump_trampoline): Implement the jump stub, could
17210         share the code with mono_arch_create_jit_trampoline. 
17212         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
17213         implemented.
17214         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
17215         implemented.  
17217         * cpu-g4.md: Added length for jmp instruction, the worst case
17218         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
17219         for save_lmf).
17221 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
17223         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
17225 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
17227         * mini.c: Only set bblock->real_offset when adding a new bblock, and
17228         before each IL instruction.
17230         * mini.c (CEE_BOX): Fix warnings.
17232 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17234         * mini.c: removed a few unused vars and extra whitespace.
17236 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
17238         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
17239         checks.
17240         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
17241         index.
17242         (OP_GETCHR): use the above
17243         (CEE_LDELEMA): use the above.
17245         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
17246         version of the generic impl.
17247         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
17248         (CEE_LDELEMA): use the above.
17250 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
17252         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
17253         Fixes #56317.
17255         * iltests.il: Added new regression test for #56317.
17257 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
17259         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
17260         under NetBSD. Fixes #56450.
17262         * liveness.c (update_gen_kill_set): Fix previous patch.
17264 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17266         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
17268 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
17270         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
17271         ldsfld and ldsflda.
17273         * inssel-sparc.brg: Add more optimizations.
17275         * mini-sparc.c: Replace multiply/divide with shifts if possible.
17277 2004-04-01  Martin Baulig  <martin@ximian.com>
17279         * mini.c (handle_box): New static function; moved the
17280         implementation of CEE_BOX here.
17281         (mono_method_to_ir): Added `constrained_call' variable.
17282         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
17283         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
17284         mono_method_get_constrained() to get the method.
17286 2004-04-01  Martin Baulig  <martin@ximian.com>
17288         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
17289         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
17290         (mono_method_to_ir): We don't need these macros anymore since
17291         mono_class_get_full() already takes care of it. 
17293 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17295         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
17296         use @function (as doesn't accept #function here) and check the return
17297         value of system and stop if fails.
17299 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17301         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
17303 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
17305         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
17307         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
17309         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
17310         #56223.
17312         * basic-long.cs: Add test for negation of Int64.MinValue.
17314 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
17316         * mini-sparc.c: Update status.
17318         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
17320         * exceptions-sparc.c: Fix return value in filters.
17322         * inssel-sparc.brg: Fix register allocation in some rules.
17324 2004-03-28  Martin Baulig  <martin@ximian.com>
17326         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
17327         if neccessary.  
17329 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
17331         * mini-x86.c (mono_arch_patch_code): Fix warnings.
17332         
17333         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
17334         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
17335         remove unused conv_u4 opcode.
17337         * mini-x86.c: Remove valgrind workaround since it slows down things
17338         even when mono is not run under valgrind.
17340 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
17342         * mini-sparc.c: Update status.
17344         * inssel-sparc.brg: Add some optimizations.
17346         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
17347         future delay slot filling. Add support for varargs, tail calls and JMP.
17349         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
17350         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
17352         * inssel.brg: Fix register allocation in OP_ARGLIST.
17354         * inssel.brg: Fix warnings.
17356 2004-03-25  Martin Baulig  <martin@ximian.com>
17358         * mini.c (inflate_generic_field): Removed.
17359         (mini_get_method): Removed, use mono_get_method_full(),
17360         (mini_get_class): Removed, use mono_class_get_full().
17361         (mono_method_to_ir): Pass our generic context to
17362         mono_field_from_token().        
17364 2004-03-25  Martin Baulig  <martin@ximian.com>
17366         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
17367         of a `MonoMethod *'.
17368         (mini_get_method): Take a `MonoGenericContext *' instead
17369         of a `MonoMethod *'.
17370         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
17371         a new local variable called `generic_context' which holds the
17372         current `MonoGenericContext *'; use it to lookup things.
17374 2004-03-24  Martin Baulig  <martin@ximian.com>
17376         * mini.c (mini_get_class): New static method; if we're inside a
17377         generic instance, inflate the class if neccessary.
17378         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
17380 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
17382         * iltests.il: New regression test for #55976.
17384         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
17385         #55976.
17387 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
17389         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
17390         output.
17392 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
17394         * liveness.c: Consider SSA stores as well as loads when making vars
17395         volatile.
17397         * exceptions.cs: New regression tests for register allocation.
17398         
17399 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
17401         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
17402         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
17403           domain lock only to protect puntual access to data structures.
17404           Added access lock for sighash, jit_icall_hash_name, 
17405           jit_icall_hash_addr and domain->code_mp.
17407 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
17409         * driver.c: Print SIGSEGV handling method.
17411         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
17413         * mini.c (setup_jit_tls_data): Handle case when this is called
17414         multiple times for a thread.
17416         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
17417         is different from fbxx_un. Fixes #54303. Also use constants instead of
17418         magic numbers in a lot of places.
17420 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
17422         * exceptions.cs: Fix cctor test when --regression is used.
17424 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
17426         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
17427         for Linux/ppc.
17429 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
17431         * inssel-ppc.brg: fixed register assignments for some rules.
17433 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
17435         * exceptions.cs: Add test for exceptions in static constructors.
17437         * mini.c (mono_jit_compile_method_with_out): Move the calling of
17438         static constructors outside the domain lock. Fixes #55720.
17440 2004-03-17  Martin Baulig  <martin@ximian.com>
17442         * mini.c (get_generic_field_inst): Removed, this'll never happen.
17443         (inflate_generic_field): Take the `MonoMethod *' instead of the
17444         `MonoClass *' and added support for generic method.
17445         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
17446         have a `field->parent->gen_params', only inflate the field if it's
17447         an open constructed type.
17449 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
17451         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
17452         exception object instead of the preconstructed ones.
17454 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17456         * mini.c: reverted changed to sigsegv_signal_handler commited
17457         accidentally in the previous patch.
17459 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17461         * mini.c:
17462         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
17463         running --aot with an old assembly.
17465 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
17467         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
17468         point values.
17470         * mini-sparc.c: Add support for v9 branches with prediction.
17472 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
17474         * mini.c (mini_init): #warning is GNUC only
17476         * mini-sparc.h: implement __builtin_frame_address
17477         and __builtin_return_address for Sun C compiler
17479 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
17481         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
17483 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
17485         * basic-calls.cs: Add test for unaligned byref long argument passing.
17487         * mini-ops.h: Add sparcv9 compare and branch instructions.
17489         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
17490         v9 instructions if we have a v9 cpu.
17492         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
17493         registers for global allocation.
17495         * exceptions-sparc.c: Fixes.
17496         
17497 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
17499         * liveness.c (mono_analyze_liveness): Optimized version.
17501         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
17503         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
17504         sparc work.
17506         * basic-float.cs basic-calls.cs: New regression tests.
17508 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
17510         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
17511         sigaltstack implementation.
17513         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
17514         
17515         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
17516         stuff if SIGSEGV_ON_ALTSTACK is not defined.
17518 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
17520         * mini.c: Fix warnings.
17521         
17522         * mini.c (mono_resolve_patch_target): New function which contains the
17523         arch independent part of the patching process.
17525         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
17526         patching code to a separate function.
17528 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
17530         * mini.c (add_signal_handler): ifdef out on Windows
17532 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
17534         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
17535         cpu-sparc.md: Add exception handling support + other fixes.
17537         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
17538         typed GC detection in --version.
17540         * basic.cs exceptions.cs: New regression tests.
17542         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
17543         the arch specific code can store data during a compilation.
17545         * mini-ops.h: Add OP_SETFRET.
17547         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
17548         function, register a separate icall for each arity, so the icalls can
17549         get a wrapper.
17550         
17551         * mini.c (mono_print_tree): Print negative offsets in a more readable
17552         form.
17553         
17554         * mini.c: Make signal handling work on sparc.
17555         
17556         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
17558         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
17560         * jit-icalls.c: Emulate truncl by aintl on solaris.
17562         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
17564 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
17566         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
17568 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
17570         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
17571         a MarshalByRef type, inline a method that performs the check, taking into
17572         account that the object can be a proxy. Also implemented tow new opcodes:
17573         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
17574         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
17575         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
17577 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
17579         * mini-ppc.c: if a relative branch displacement is too big
17580         but it points to and area reachable with an absolute branch, 
17581         avoid the thunks.
17583 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
17585         * mini.c: optimize small copies in cpblk.
17587 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
17589         * basic-calls.cs basic-float.cs: New regression tests.
17591         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
17592         negative offsets from %fp. Implement localloc. Fix local register 
17593         allocation. Fix the case when the this argument needs to be saved to
17594         the stack. Implement some missing opcodes.
17596 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
17598         * mini.c (mini_method_compile): Reenable global regalloc in methods
17599         with exception handlers.
17601         * linear-scan.c (mono_varlist_sort): Fix warning.
17603         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
17605         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
17606         regalloc costs.
17608         * liveness.c: Make all variables uses in exception clauses volatile, to
17609         prevent them from being allocated to registers. Fixes #42136.
17611 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
17613         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
17614         causes regressions.
17616         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
17617         argument to mono_arch_regalloc_cost.
17619         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
17620         precisely.
17622 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
17624         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
17625         Make the cost of allocating a variable to a register arch dependent.
17627         * basic-calls.cs: Fix compilation of tests.
17628         
17629         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
17630         helper function to cut back on the number of #ifdefs needed.
17632         * mini-ppc.c: Fix compilation.
17634         * basic-calls.cs: New regression tests.
17636         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
17638         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
17639         of l0 since that is callee saved.
17641         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
17642         to virtual calls.
17644         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
17645         of delay instruction.
17647         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
17649         * mini.h (MonoCallInst): Add 'virtual' flag.
17651         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
17653 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
17655         * *.cs: New regression tests.
17657         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
17658         work.
17660         * mini.c (mono_runtime_install_handlers): Fix build.
17662         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
17663         'signal_stack_size' members.
17665         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
17666         alternate signal stack.
17668         * exceptions-x86.c: Add stack overflow handling.
17670         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
17671         functions to arch independent code.
17673         * mini.c (mono_print_tree): Print more detailed info for load_membase
17674         opcodes.
17675         
17676 2004-02-23  Martin Baulig  <martin@ximian.com>
17678         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
17680 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
17682         * mini-x86.c: fixed reg allocation for div/rem.
17684 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
17686         * driver.c (mono_main): Report some configuratio options on --version.
17688 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
17690         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
17691         low in the address space. Correctly flush memory in thunks where we
17692         output native code.
17694 2004-02-20  Martin Baulig  <martin@ximian.com>
17696         * mini.c (mini_get_method): New static method; inflate all generic
17697         methods and methods in open generic instances.
17698         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
17699         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
17701 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17703         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
17705         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
17707 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
17709         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
17711         * mini-sparc.c (flushi mono_arch_output_basic_block): make
17712         it compile using Sun's compiler.
17714 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17716         * 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.
17718         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
17720 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17722         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
17723         code.
17724         * mini-ppc.c: handle calls outside of the allowed range with thunks
17725         allocated using the code manager.
17726         * tramp-ppc.c: use the code manager to hold generated native code.
17727         Fixed the magic trampoline to just patch vtable entries.
17729 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
17731         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
17732         independent file.
17734 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
17736         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
17737         PPC.
17739         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
17740         if we have a working __thread implementation.
17742         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
17743         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
17745 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
17747         * mini-x86.c: Fix compilation under gcc 2.
17748         
17749 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
17751         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
17752         contains a call to the wrapped function.
17754         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
17755         OP_<CALL>_IMM opcodes, and use them under X86.
17756         
17757         * mini.c (mono_jit_find_compiled_method): Fix warning.
17759         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
17761         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
17763         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
17764         functionality to mini.c.
17766         * mini.c (mono_create_jump_trampoline): New function to create a jump
17767         trampoline. Return a compiled method instead of a trampoline if it
17768         exists. Add a cache for jump trampolines.
17770         * mini.c (mono_jit_find_compiled_method): New function to return a
17771         compiled method if it exists.
17773         * mini-x86.c: Call mono_create_jump_trampoline instead of 
17774         mono_arch_create_jit_trampoline.
17776         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
17777         a jump trampoline. Fixes #52092.
17778         
17779 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
17781         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
17782         which is not up-to-date. Add check_corlib_version () instead.
17784         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
17785         have to call it.
17786         
17787         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
17788         since newer valgrind versions do not need it.
17790         * mini.c (mono_jit_compile_method_with_opt): New helper function to
17791         compile a method with a given set of optimizations.
17793         * mini.c: Compile icall wrappers on-demand instead of at startup.
17795         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
17796         wrapper for an icall.
17798 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
17800         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
17801         #54063.
17803         * iltests.il: Add test for non-empty stack before switch instruction.
17805 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
17807         * mini.c: Add support for new stringbuilder marshalling conventions.
17809         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
17811 2004-02-01  Martin Baulig  <martin@ximian.com>
17813         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
17814         in `ginst->mtype_argv'.
17816 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
17818         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
17819         facilitate grepping.
17821 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
17823         * mini.c: fixed buglet in initobj generic implementation for references.
17825 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
17827         * Makefile.am: make the version script conditional.
17828         * jit-icalls.c: handle missing truncl().
17830 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
17832         * exceptions.cs: Add more tests for double->int conversion.
17834         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
17835         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
17837 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
17839         * driver.c: make --verbose --version emit an error
17840         if the loaded corlib doesn't match the runtime version.
17842 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17844         * mini-ppc.h: export ppc_patch().
17845         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
17846         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
17847         on par or better than on MacOSX.
17849 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
17851         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
17852         mono_lookup_pinvoke_call.
17854         * mini-x86.c: Under windows, the default pinvoke calling convention is
17855         stdcall. Fixes #52834.
17857         * mini.c (optimize_branches): Add an upper bound to the number of
17858         iterations to prevent infinite loops on strange loops. Fixes #53003.
17860 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
17862         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
17863         and ISINST. Fixes #52093.
17865         * objects.cs (test_0_vector_array_cast): New tests.
17866         
17867 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
17869         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
17870         checking in Array.Set ().
17872         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
17873         #52590.
17875         * object.cs (test_0_multi_array_cast): New regression test.
17877 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
17879         * exceptions-ppc.c: fix build on Linux/PPC.
17881 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
17883         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
17884         running under valgrind.
17885         (x86_magic_trampoline): Fix build bustage.
17887         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
17888         negative values as well. This is needed for the encoding of the line number
17889         info, since sometimes the line numbers are not in increasing order.
17891 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
17893         * cpu-pentium.md (localloc): Increase the size of the localloc 
17894         instruction since it is a loop under Win32.
17896         * debug-mini.c (record_line_number): Get rid of unneccesary memory
17897         allocation.
17899 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
17901         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
17902         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
17903         Max Horn (max@quendi.de). Fix file names in comments.
17905 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
17907         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
17908         avoid stack overflow.
17909         (replace_usage): Avoid uninitialized variable warnings.
17911         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
17912         and taking the address of valuetype variables.
17914 2004-01-03  Patrik Torstensson
17916         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
17917         for other purposes than FP later on.
17919 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
17921         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
17922         of tail calls.
17924 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17926         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
17928 2003-12-30  Patrik Torstensson <p@rxc.se>
17930         * mini-x86.h: Decreased number of availiable fp regs.
17931         Solves corner cases with FP spilling.
17933 2003-12-23  Patrik Torstensson <p@rxc.se>
17935         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
17936         for floating point stack tracking / spilling on x86. 
17937         Fixes bug #49012.
17938         
17939         * basic-float.cs: added float mul overflow test.
17941 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
17943         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
17945 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17947         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
17948         supports for cond branches that overflow the immediate
17949         overflow offset. mcs can compile simple programs.
17951 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17953         * exceptions-ppc.c: exception handling support wip:
17954         finally handlers get run on exception.
17956 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
17958         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
17959         profiling.
17961 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17963         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
17964         initial support for stack walking and unwinding.
17966 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
17968         * driver.c (mono_main): Make corlib-out-of-sync message more 
17969         descriptive. Also remove verify_corlib call.
17971 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17973         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
17974         not overlap with other call's arguments, too.
17976 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
17978         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
17979         move to arch-specific code the choice of arch-specific
17980         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
17981         * mini.c: ensure emulation calls will not interleave
17982         with other calls.
17984 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
17986         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
17987         the magic trampoline stack frame is dropped before executing
17988         the new method.
17990 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17992         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
17993         and integer to fp conversions. Added support for overflowing
17994         arguments on the stack. Reserve a couple more registers as temps.
17995         Added support for aot compilation (as output still needs to be
17996         tweaked, though).
17998 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
18000         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
18001         Don't overwrite return register in some corner cases.
18003 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
18005         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
18006         static constructors when AOT compiling.
18008         * driver.c (mono_main): Call mono_check_corlib_version.
18010 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
18012         * cpu-g4.md, basic.cs: fixed div target register.
18014 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
18016         * mini-ppc.c, basic.cs: shl_imm fix with test.
18018 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
18020         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
18021         structures by value. Misc fixes.
18022         * objects.cs: more tests.
18024 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
18026         * mini-ppc.c: lconv.ovf.i implemented.
18028 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18030         * mini.c:
18031         (mini_init): don't error out if someone already called g_thread_init.
18033 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
18035         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
18036         to be any type per the spec. Fix abnormal memory usage when
18037         the same object is repeatedly thrown.
18039 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
18041         * mini.c: check for overruns in IL code.
18043 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
18045         * TODO: Add/remove some todo entries.
18047 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
18049         * driver.c (mono_main): Call mono_verify_corlib.
18051 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
18053         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
18054         This has been moved to mini.c
18055         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
18056         type being casted is marshalbyref it could be a proxy, so instead of
18057         emitting the type check code, emit a call to a runtime method that will
18058         perform the check by calling CanCastTo if needed.
18060 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
18062         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
18063         methods with large stack frames under Win32.
18065 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
18067         * Makefile.am: Distribute regression tests.
18069         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
18070         at the end instead of inserting each variable into the sorted list.
18072         * linear-scan.c (mono_varlist_sort): New helper function.
18073         
18074 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
18076         * mini.c: ensure arguments and locals are within bounds.
18078 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
18080         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
18081         related fixes.
18083 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
18085         * mini.c (mono_cprop_copy_values): Fix crash.
18087         * aot.c: Set verbosity back to 0.
18088         
18089 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
18091         * regalloc.c: complete memory leak fix by Laurent Morichetti
18092         (l_m@pacbell.net).
18094 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
18096         * driver.c (main_thread_handler): Revert the previous patch.
18098         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
18099         under valgrind.
18101         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
18102         memory from the memory pool.
18104         * driver.c (main_thread_handler): Turn on all optimizations when
18105         --aot is used.
18107         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
18108         an array for better performance.
18110         * regalloc.c (mono_regstate_assign): Fix memory leak.
18112         * debug-mini.c (mono_debug_serialize_debug_info): New function to
18113         serialize the debug info.
18115         * debug-mini.c (mono_debug_add_aot_method): New function to load the
18116         debug info from the serialized representation.
18118         * aot.c: Save debug info into the generated file and load it when 
18119         loading a method.
18121         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
18123 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
18125         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
18126         More FP-related fixes.
18128 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
18130         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
18131         and register allocation buglet. Hello world now runs.
18133 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
18135         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
18136         * tramp-ppc.c: fixed class init trampoline.
18137         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
18139 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
18141         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
18142         mini.c: more ppc changes/fixes.
18144 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
18146         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
18147         Also optimize the case when the arguments are the same in the caller 
18148         and in the callee.
18150         * iltests.il: Add tests for tail calls with valuetype arguments.
18152 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
18154         * mini-ppc.c: fixes for struct return type.
18156 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
18158         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
18159         mono_spillvar_offset() to arch-specific code.
18161 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
18163         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
18165 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
18167         * exceptions-x86.c: Fix stack space leaks.
18168         
18169         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
18170         registers from the lmf if the method has save_lmf set.
18172 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
18174         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
18175         of icall wrappers into InvokeInDomain, since these are now per-domain.
18177 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
18179         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
18180         make some opcode emulation and intrinsic ops enabled/disabled 
18181         according to the architecture. More fixes.
18183 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
18185         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
18187 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
18189         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
18190         arch-specific handling for 'this' and struct return type to
18191         arch-specific code.
18193 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18195         * aot.c: prevent divide by zero error when reporting (it happened with
18196         Accessibility.dll).
18198 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
18200         * mini.h (inst_switch): Remove unused macro.
18202 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18204         * aot.c:
18205         (load_aot_module): free 'info->methods' and 'info' properly. No more
18206         "free(): invalid pointer blah" messages when you have an old aot
18207         compiled assembly.
18209 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
18211         * jit-icalls.c, mini.c: Added support for context static fields.
18213 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
18215         * mini.c (mono_method_blittable): Methods which set LastError are not 
18216         blittable either. Fixes #51108.
18217         
18218 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
18220         * mini.c: flush icache.
18221         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
18223 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
18225         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
18227 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
18229         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
18230         safe on IA32.
18232         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
18233         vararg calls.
18235         * inssel.brg (CEE_MKREFANY): Fix AOT case.
18237 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
18239         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
18240         instruction when the result is discarded.
18242         * iltests.il (test_0_div_regalloc): New regression test.
18244         * arrays.cs: Fix compilation error.
18246 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
18248         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
18249         float rules to inssel-x86.brg: sane architectures with FP registers
18250         don't need to implement these rules.
18252 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
18254         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
18256 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
18258         * mini.h, inssel-long32.brg: fixed endianess issues in int64
18259         implementation of 32 bit systems.
18261 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
18263         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
18264         (Jeroen Zwartepoorte).
18266 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
18268         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
18269         the caller and the callee matches.
18270         
18271         * mini.c (mono_method_to_ir): Add comment.
18273         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
18274         signbit is missing on some platforms.
18276 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
18278         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
18280         * mini.c (setup_jit_tls_data): Call the new function.
18281         
18282         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
18284         * mini-x86.c: Add experimental support for fast access to the lmf
18285         structure under NPTL/Linux 2.6.x.
18287 2003-11-06  Martin Baulig  <martin@ximian.com>
18289         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
18290         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
18291         the debugger.
18293 2003-11-02  Martin Baulig  <martin@ximian.com>
18295         * mini.c (inflate_generic_field): New static method.
18296         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
18297         generic instance and the field is declared in a generic type, call
18298         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
18300 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
18302         * mini.h mini.c (mono_method_same_domain): New function to return
18303         whenever the caller and the callee are in the same domain.
18305         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
18307 2003-10-30  Martin Baulig  <martin@ximian.com>
18309         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
18310         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
18311         method parameters.
18312         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
18313         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
18315 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
18317         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
18318         propagation.
18320         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
18321         object here, so it is in the correct appdomain etc.
18323 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
18325         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
18326         already done.
18327         (mono_method_to_ir): Avoid freeing the type created returned from
18328         mono_type_create_from_typespec, since it is put into an internal cache
18329         by the function. Fixes pointer.exe.
18331         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
18332         trampolines for icalls and pinvokes as well. Fixes #33569.
18334 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
18336         * mini.c: Update after appdomain changes.
18338         * mini.c (mono_jit_compile_method_inner): Allways compile native
18339         method wrappers in the root domain, since there can only be one
18340         instance of them, whose address is stored in method->info.
18342 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
18344         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
18345         environment variable. Instead detect automatically whenever running
18346         under valgrind using the magic macro RUNNING_ON_VALGRIND from
18347         valgrind.h.
18349 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
18351         * trace.c, trace.h: New files that implement the new trace option
18352         parsing. 
18354         * driver.c: Document new --trace options.
18356         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
18357         mini-x86.c: Apply:
18359         -       if (mono_jit_trace_calls)
18360         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
18362         * mini.h: prototypes.
18363         
18364 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
18366         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
18368         * mini.c inssel.brg: Implement typedefbyref opcodes.
18370         * mini.c (mono_jit_compile_method): Remove unused local variable.
18372         * mini.c (mono_jit_compile_method_inner): Ditto.
18373         
18374 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
18376         * tramp-x86.c (x86_class_init_trampoline): Fix build.
18377         
18378         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
18380 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
18382         * mini.c (mono_no_aot): Remove unused global variable.
18384         * mini.c: Thread safety fixes.
18386 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
18388         * mini.c (mono_create_class_init_trampoline): Add a lock around
18389         class_init_hash_addr.
18391         * arrays.cs (test_0_newarr_emulation): Add new regression test for
18392         #30073.
18394         * mini.c: Decompose the NEWARR instruction before decomposing its
18395         arguments. Fixes #30073.
18397 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
18399         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
18400         convention.
18402 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
18404         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
18406         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
18408         * driver.c: Add support for compiling icall wrappers to --compile.
18410 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
18412         * inssel.brg: The empty value in class->interface_offsets is -1, not
18413         0. Fixes #49287.
18415 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
18417         * objects.cs: New test for 'is' operator on an array of interfaces.
18419 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18421         * tramp-ppc.c: update trampoline code to support jumps
18422         and class initialization.
18424 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
18426         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
18428         * inssel.brg (OP_UNBOXCAST): Fix #46027.
18430         * inssel.brg (OP_UNBOX): Remove unused rule.
18432         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
18433         region instead of one for each method. Fixes #47813.
18435 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
18437         * exceptions.cs (test_0_nested_finally): New regression test for
18438         nested exception handlers.
18440         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
18442         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
18444         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
18445         inlining.
18447         * mini.c (mono_method_check_inlining): Make the inlining limit 
18448         configurable by an environment variable.
18449         
18450         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
18452         * mini.h: Bump AOT file version.
18454         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
18455         token, store the image along with the token, since the token might not 
18456         refer to the same image as the method containing the relocation, 
18457         because of inlining.
18459 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
18461         * mini.c (mono_precompile_assemblies): New function to compile
18462         all methods in all loaded assemblies.
18464         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
18466         * regalloc.h regalloc.c (MonoRegState): Change the type of 
18467         iassign and fassign to int*, since they can contain large negative
18468         values if the register is spilled. Also added some comments. Fixes
18469         #45817.
18471         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
18472         under Win32. Fixes #42964.
18474 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
18476         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
18478         * aot.c: Added support for AOT compiling methods which contain calls
18479         to wrappers. Currently, only remoting-invoke-with-check wrappers are
18480         handled.
18481         
18482         * driver.c (compile_all_methods): Run the compilation in a thread
18483         managed by mono. Fixes #44023.
18485         * mini.c (mono_codegen): Print full method name in verbose output.
18487         * mini-x86.c (mono_arch_patch_code): Fix warning.
18488         
18489         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
18490         jumps, since the method we are jumping to might be domain-specific.
18492         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
18494 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18496         * inssel.brg: string chars are unsigned.
18498 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
18500         * TODO: New todo item.
18502         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
18503         which calls mono_runtime_class_init and patches the call site to
18504         avoid further calls.
18505         (mono_arch_create_class_init_trampoline): New arch specific function 
18506         to create a class init trampoline.
18507         (create_trampoline_code): Generalized so it can create
18508         class init trampolines as well.
18510         * mini.c (helper_sig_class_init_trampoline): New helper variable.
18511         (mono_create_class_init_trampoline): New function to create and cache
18512         class init trampolines.
18513         (mono_find_class_init_trampoline_by_addr): New function to lookup the
18514         vtable given the address of a class init trampoline. Used by the
18515         patching process.
18516         (mono_codegen): Generate a call to a trampoline instead of
18517         mono_runtime_class_init in LDSFLD[A].
18518         (mono_codegen): Add relocations for the new trampoline.
18519         
18520         * mini.h mini-x86.c aot.c: Added a new relocation type: 
18521         MONO_PATCH_INFO_CLASS_INIT.
18523         * mini.h: Bump AOT version number.
18525         * aot.c: Create a copy of the loaded code instead of using the original
18526         so methods which call each other will be close in memory, improving
18527         cache behaviour.
18528         
18529         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
18530         patch since it breaks the regression tests.
18531         
18532         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
18533         for the register saving instruction sequence since the 
18534         frame_state_for function in glibc 2.3.2 don't seem to detect it.
18536 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
18538         * TODO: Fix todo item && remove another.
18540 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
18542         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
18543         previous checkin.
18545         * aot.c: Moved the check for MONO_LASTAOT into the initialization
18546         function of the module.
18548         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
18549         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
18550         --no-aot command line option.
18552 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
18554         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
18555         by Bernie Solomon (bernard@ugsolutions.com).
18557         * inssel.brg: Refactor the interface offset table related code into
18558         its separate functions and add support for the AOT case.
18560 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
18562         * aot.c (mono_aot_get_method_inner): Fix memory leak.
18563         
18564         * aot.c: Added mono_aot_verbose variable and made all debugging
18565         output depend on the value of this variable.
18567         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
18568         method_label and info_label.
18570         * mini.h mini-x86.c aot.c: Added a new relocation type 
18571         MONO_PATCH_INFO_IID for klass->interface_id.
18573         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
18574         the MonoJitInfo structure.
18576         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
18577         a non-root appdomain in shared mode.
18579 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18581         * aot.c: make aot loader less verbose. Remove free of unused variable.
18583 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
18585         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
18587         * .cvsignore: Added *.dll.
18589         * mini.c (mono_print_tree_nl): New function callable while debugging.
18591         * mini.c (mono_print_code): Export this.
18593         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
18594         patched code.
18596 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
18598         * mini.h (MonoCompile): Added 'jit_info' field.
18600         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
18601         the cfg structure, since it is needed by the AOT compiler.
18603         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
18605         * aot.c: A major rewrite. Changes include:
18606         - save exception tables for methods which have them.
18607         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
18608         to g_module_symbol.
18609         - reworked the file format so it is now much smaller and needs
18610         fewer relocation entries.
18611         
18612 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
18614         * aot.c (load_aot_module): Fix build bustage on platforms without
18615         Boehm GC.
18617 2003-09-04  Martin Baulig  <martin@ximian.com>
18619         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
18621 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
18623         * TODO: Some new optimization ideas.
18625         * aot.c: Move AOT module loading logic here from mono_assembly_open.
18627         * aot.c: Save the optimization flags used to compile the code into
18628         the AOT module.
18630         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
18631         support emitting domain specific code.
18632         
18633         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
18634         no longer domain neutral. It can be made domain neutral by compiling 
18635         with --optimize=shared.
18637         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
18638         between appdomains.
18640         * driver.c mini.h mini.c: New --no-aot debugging option which disables
18641         loading of AOT code.
18643         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
18644         
18645         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
18646         if there is no domain neutrality information.
18648 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
18650         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
18651         format version into the generated library.
18653         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
18654         callee method into the caller since one of them could be shared.
18656         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
18657         system exceptions from AOT code now works.
18659         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
18660         method if it is domain neutral and the callee is not.
18662         * graph.c (cfg_emit_one_loop_level): Fix warning.
18664 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
18666         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
18667         last checkin.
18669 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
18671         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
18672         is needed  by code which is executed before mono_runtime_init ().
18673         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
18674         
18675         * mini.c (mono_thread_abort): Fix warning.
18676         (mono_jit_compile_method): Call static constructor in the AOT case too.
18678         * aot.c (mono_compile_assembly): Fix warning.
18680 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18682         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
18684 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
18686         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
18688         * cpu-pentium.md: Fix the length of call opcodes so they include the
18689         ESP restoring instruction. Fixes #47968.
18691 2003-08-28  Martin Baulig  <martin@ximian.com>
18693         * mini-x86.c (mono_arch_call_opcode): Added support for
18694         MONO_TYPE_GENERICINST.
18696         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
18698 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
18700         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
18701         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
18703         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
18704         metadata_section.
18706 2003-08-26  Martin Baulig  <martin@ximian.com>
18708         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
18709         when reporting an error, set this to the actual error location.
18710         (mono_method_to_ir): Report the correct error location if
18711         get_basic_blocks() returned an error.
18713 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
18715         * mini.c (mono_type_blittable): OBJECT is not blittable.
18716         (mono_method_blittable): Methods which have marshalling descriptors
18717         are not blittable either. Fixes #47842.
18719 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
18721         * driver.c mini.c: Use an environment variable instead of a global 
18722         variable. Also fix the build.
18724         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
18725         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
18726         reporting this. 
18728         * driver.c mini.c: Added --with-valgrind option to turn off some
18729         code which prevents mono from running under valgrind.
18731         * mini.c (mono_emit_call_args): Fixed warning.
18733         * mini.c (mono_emulate_opcode): Fixed warning.
18735 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18737         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
18738         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
18739         regalloc.c, regalloc.h: specify available registers in arch-specific
18740         code and support floats in the regallocator (patch by Laurent Morichetti 
18741         <l_m@pacbell.net>)
18743 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18745         * mini.c: mono_thread_current() can be called only after
18746         mono_runtime_init(): rearrange code to not call it early on.
18748 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18750         * mini.c: allocate jump tables in the code mempools.
18752 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18754         * mini.c, mini.h: make sure per-thread data allocated by the jit is
18755         freed.
18757 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
18759         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
18760         12 to 16.  This fixes bug #47453.
18763 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18765         * mini-ppc.c: fixed indexed load and unsigned compares.
18767 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
18769         * mini.c: reenabled installation of handler for
18770           thread abort signal.
18772 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18774         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
18775         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
18776         until it's fixed and actually useful.
18778 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18780         * inssel-long32.brg: couple more opcodes implemented.
18782 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18783         
18784         * mini-sparc.c: Even more opcodes implemeted.
18786 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
18788         * mini-sparc.c: More opcodes implemented.
18790 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
18792         * mini-sparc.c: More opcodes implemented.
18794 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18796         * inssel-sparc.brg: Add some needed rules.  Direct
18797         copy from PPC.
18798         * Makefile.am: Use inssel-sparc.brg
18799         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
18800         an assert happy for now.
18802 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
18804         * mini-sparc.c: Fixed compile errors.
18805         * exceptions-sparc.c: Same.  We now produce a mono binary 
18806         on sparc-linux.  Yea.
18808 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
18810         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
18811         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
18812         They compile, but do not work.
18814 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18816         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
18817         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
18818         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
18819         (ct@gentoo.org).
18821 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18823         * mini.c: more opcodes implemented and better support for generics.
18825 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18827         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
18828         * mini.c, mini.h: first cut at generics support: some new instructions 
18829         added and changed the behaviour of some of the existing ones.
18831 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
18833         * mini.c: Removed definition of metadata_shared mutex here.
18835 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18837         * mini-x86.c: make vararg calls work for instance methods.
18839 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18841         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
18842         returns the arguments in a separte list, now.
18844 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18846         * aot.c, mini.c: updates for array type representation changes.
18848 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
18850         * mini.c: register function to perform jit shutdown.
18852 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18854         * mini.c: use a faster allocator if possible.
18856 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18858         * aot.c: some cleanups and portability changes.
18860 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18862         * mini.c: use faster allocation for CEE_BOX if possible.
18864 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18866         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
18867         Moved inlined mempcy code to its own function so that is can be
18868         reused. Added an inline memset function as well (optimized initobj).
18869         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
18871 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18873         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
18875 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18877         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
18878         arch code can setup the cpu for CLR execution, if needed.
18879         We use it on x86 to set the precision of FP operations.
18881 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18883         * mini.c: disable some optimizations if we can guess they'll cost too
18884         much for a given method.
18886 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18888         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
18889         
18890 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18891         * mini.h mini.c mini-x86.c: Added instruction level coverage 
18892         info collection support.
18894 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18896         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
18897         is now implemented in the profiling API. Get rid of a couple of
18898         unnecessary global variables.
18900 2003-06-15  Nick Drochak <ndrochak@gol.com>
18902         * basic-long.cs: tests for negative values for bigmul, and unsigned.
18903         * cpu-g4.md: add op_bigmul and op_bigmul_un
18904         * cpu_pentium.md: add op_bigmul_un
18905         * inssel-long32.brg: add rule for unsigned bigmul
18906         * mini-ops.h: define OP_BIGMUL_UN
18907         * mini-x86.c: THE BUG: handle (un)signed properly
18908         * mini.c: choose unsigned opcode if needed.
18909         This set of patches fixes bug #44291
18911 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
18913         * mini.c (optimize_branches): improved to handle all kinds of
18914         conditional branches.
18916 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18918         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
18919         don't raise exceptions.
18921 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18923         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
18924         to arch-specific files.
18926 2003-06-09  Martin Baulig  <martin@ximian.com>
18928         * Makefile.am (libs): Added $(LIBGC_LIBS).
18930 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
18932         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
18933         and OP_ATAN (fixes bug#44293).
18935 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
18937         * Makefile.am, mini-x86.c: rename cpu description array to
18938         pentium_desc, since some compilers define the 'pentium' preprocessor
18939         symbol.
18941 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
18943         * mini.c (mini_select_instructions): add explicit branch if the
18944         following block is not the false target of a conditional branch -
18945         we need this with any optimization that reorder or remove bblocks
18947         * mini.c (optimize_branches): bug fixes
18949 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
18951         * mini.c (mono_method_to_ir): inline static readonly fields
18953         * ssa.c (fold_tree): start cfold support for long (very simple
18954         cases only)
18956         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
18958 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18960         * inssel.brg: fixed memcpy (bug #44219).
18962 2003-06-05  Dick Porter  <dick@ximian.com>
18964         * driver.c: Set the glib log levels to not abort if g_message
18965         recurses.
18967         g_set_prgname() has to happen before mini_init() so that the
18968         process handle gets the info.
18969         
18970 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18972         * driver.c: add intrins to the default optimizations to get wider
18973         exposure.
18975 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18977         * mini.h: some large basic blocks will overflow a 16-bit
18978         integers for symbolic registers.
18980 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18982         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
18983         (mono_arch_output_basic_block): fix bug 43499 
18985 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18987         * mini.c: kill duplicated definition of mono_debug_format.
18989 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18991         * mini-x86.c, arrays.cs: fixed register allocation bug.
18993 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18995         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
18997         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
18999 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19001         * mini.c:
19002         (print_method_from_ip): also print source location information if
19003         available.
19005 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
19007         * mini.c (mono_find_block_region): bug fix in region code
19008         (mini_method_compile): enable removing unreachable code again, but
19009         only in methods without exception clauses.
19011 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
19013         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
19014         Implemented arglist opcode and handling of TypedReference type.
19015         Fixed x86 call convention when a structure is returned.
19016         Minimal support for calling static vararg methods.
19018 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
19020         * mini.c (mini_method_compile):  always remove unreachable code,
19021         because the code in them may be inconsistent  (access to dead
19022         variables for example).
19024 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
19026         * driver.c, debug-mini.c: warning fixes.
19028 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
19030         * Makefile.am, jit.h, mini.h: install header for embedding mono.
19032 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
19034         * mini.c: thread-static fields are registered in mono_class_vtable(),
19035         so ensure the function is called before checking for them.
19037 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
19039         * mini.c (optimize_branches): fix for bug 43586
19041         * jit-icalls.c (mono_llmult_ovf): added an additional check for
19042         overflow (fixes Bug #43639)
19044 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19046         * mini.c, objects.cs: allow the use of stobj for primitive types.
19048 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19050         * mini.c: be less strict about argument checking until we support
19051         running the verifier.
19053 2003-05-27  Nick Drochak <ndrochak@gol.com>
19055         * basic-long.cs: tests for (ulong)int * (ulong)int also
19056         * mini.c: use the same trick for (ulong)int * (ulong)int
19058 2003-05-27  Nick Drochak <ndrochak@gol.com>
19060         * basic-long.cs: add regression test for (long)int * (long)int
19061         * cpu-pentium.md: add op_bigmul specification
19062         * inssel-long32.brg: add OP_BIGMUL rule
19063         * mini-ops.h: add OP_BIGMUL
19064         * mini-x86.c: register allocator: handle case where src1 needs to be
19065         in EAX.
19066         * mini.c: substitute special BIGMUL opcode in the tree for 
19067         (long)int * (long)int
19069 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
19071         * jit-icalls.c: call the type ctor on field access if needed.
19073 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
19075         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
19076         to a method (including results of ldelema, bug#43207).
19078 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
19080         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
19081         colors to show exception handler blocks.
19083         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
19084         (fix for pinvoke7.cs).
19086 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19088         * mini.h, mini.c: ensure correct initialization order for types that
19089         require it. Prepare for lazy compilation of jit icall wrappers.
19090         Provide a name for opcode emulation to reduce unneeded mallocing.
19092 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
19094         * mini-x86.c: better register restoring code and profiling
19095         support for tail calls.
19097 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19099         * mini.h, driver.c: prepare for leaf methods optimization.
19101 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
19103         * mini.c: get targets of branches before converting a method.
19105 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
19107         * mini.c (optimize_branches): added some experimental code (disbaled) 
19109 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
19111         * mini.c (optimize_branches): fix branch to branch optimization 
19113         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
19115         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
19117         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
19119         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
19120         if needed.
19122 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
19124         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
19125         enable use of interface variables again.
19127         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
19128         I1 to registers because there is no simply way to sign extend 8bit
19129         quantities in caller saved registers on x86.
19131         * inssel-float.brg: set costs of some rules to 2 so
19132         that monobure always select the arch. specific ones if supplied,
19133         regardless of the order we pass the files to monoburg.
19135 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
19137         * mini.c, mini-x86.c: since the magic trampoline for jumps
19138         can't patch the code directly, we do it as soon as the
19139         method gets compiled.
19141 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
19143         * mini-x86.c, mini.h: introduce a new patching method
19144         to support CEE_JMP and tail calls.
19145         * mini.c: obey tail.call. Don't precompile methods target
19146         of CEE_JMP.
19147         * tramp-x86.c: new trampoline code to handle methods
19148         reached through a jump.
19150 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
19152         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
19153         bit values to registers
19155 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
19157         * mini.c (mono_compile_get_interface_var): share interface
19158         variables if possible.
19160 2003-05-16  Martin Baulig  <martin@ximian.com>
19162         * debug-mini.c (mono_init_debugger): New function to initialize
19163         the debugger.  This is not in the debugger since it needs to
19164         access some of mini's internals.
19166 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
19168         * mini.c (mono_method_to_ir): inlining fixes/cleanups
19170 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
19172         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
19173         for value type handling.
19175 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
19177         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
19178         (mono_method_check_inlining): enable inlining of all kinds of wrappers
19180 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
19182         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
19183           the constructor through a proxy.
19185 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
19187         * jit-icalls.c, inssel.brg: fixes to array element address
19188         calculations.
19190 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
19192         * mini-x86.c (is_regsize_var): allocate pointer to registers
19194 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
19196         * driver.c: fixed typo, added intrins to the set of optimizations
19197         tested with regressions.
19199 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
19201         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
19202         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
19203         test case.
19205 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
19207         * inssel.brg: remove some common pop instructions without side effects
19209 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19211         * inssel-x86.brg: fixed thinko in int to double conversions.
19213 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
19215         * mini.c, jit-icalls.c: added runtime thread-static variable support.
19217 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
19219         * inssel-long32.brg: two more missing instructions.
19221 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
19223         * mini.c (mono_emit_call_args): set the cil_code for all arguments
19224         if not already set.
19226 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
19228         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
19229         correctly.
19231         * basic-float.cs: Added tests for negative zero.
19233 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
19235         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
19236         a couple of missing operations for long casts, with test cases.
19238 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19240         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
19242 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
19244         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
19245         code size estimation.
19247 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
19249         * mini.c (mono_jit_create_remoting_trampoline): make it work with
19250         abstract methods (fix bug 42542)
19252         * aot.c: add ability to handle array types
19253         
19254 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
19256         * mini.c: Call the _specific versions of the object allocation
19257         functions if possible.
19259 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
19261         * driver.c: call setlocale ().
19263 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
19265         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
19266         windows build.
19268 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
19270         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
19272         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
19273         wrappers (fix bug 42122)
19275 2003-05-04  Martin Baulig  <martin@ximian.com>
19277         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
19279         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
19280         s/mini_set_defaults/mono_set_defaults/g.
19282 2003-05-04  Martin Baulig  <martin@ximian.com>
19284         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
19286 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19288         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
19289         (reported by Don Roberts).
19291 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
19293         * mini.c: temporarily work around two bugs for this release.
19295 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
19297         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
19298         that contains -export-dynamic and it makes using the ld script
19299         useless.
19300         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
19302 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
19304         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
19305         specific cpu.
19307 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
19309         * mini.c: make sure leave calls all the needed finally blocks,
19310         even when the target jumps out of multiple exception clauses.
19312 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
19314         * ldscript, Makefile.am: add linker script to reduce the number of
19315         exported symbols (should also fix the issues with libwine defining
19316         some of the same symbols in io-layer).
19318 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
19320         * driver.c (mini_main): Avoid assertion when no file name is given on 
19321         the command line.
19323 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
19325         * driver.c: added --version/-V command line option.
19326         Added the inline optimization in the regression tests.
19328 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
19330         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
19331         to the type in the method signature (fixes bug#42134).
19333 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
19335         * mini.c: when inlining, check this is not null only when needed (bug #42135).
19337 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
19339         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
19341 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19343         * driver.c: fixed bug #42100.
19345 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
19347         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
19349 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
19351         * mini.c: moved most of the code required to do inlining to its own
19352         function so it can be reused. Inline also ctors if appropriate.
19354 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
19356         * Makefile.am: Link with -export-dynamic so shared libs loaded by
19357         the runtime can call mono API functions.
19359 2003-04-27  Martin Baulig  <martin@ximian.com>
19361         * debug-mini.c (mono_debug_init_method): Added
19362         `guint32 breakpoint_id' argument; if the method has a breakpoint,
19363         send a notification to the debugger.
19365         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
19366         running in the Mono Debugger, just pass the breakpoint number to
19367         mono_debug_init_method().
19369         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
19371 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
19373         * mini.c: allow some more unsafe compares.
19375 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19377         * mini-x86.c, Makefile.am: make distcheck works (partially from
19378         a patch by Richard Lee <r.h.lee@attbi.com>).
19379         * regset.c, regset.h: removed, they are unused.
19381 2003-04-25  Dick Porter  <dick@ximian.com>
19383         * driver.c: Usage reports the name as 'mono' not 'mini'
19384         * exceptions-x86.c: Build and run on freebsd
19386 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
19388         * Makefile.am: install the program with the 'mono' name and
19389         the library as libmono instead of mini and libmini.
19391 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
19393         * driver.c: provide the APIs for the embedding interface of the old jit.
19395 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
19397         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
19399 2003-04-23  Martin Baulig  <martin@ximian.com>
19401         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
19403         * driver.c: Added `--debug' command line argument to enable
19404         debugging support.
19406 2003-04-23  Martin Baulig  <martin@ximian.com>
19408         * debug.[ch]: Removed.  The code is now in
19409         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
19411         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
19412         last six months.
19414 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
19416         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
19418 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19420         * mini.c:
19421         (mini_cleanup): moved mono_runtime_cleanup call after the call to
19422         mono_domain_finalize.
19423         (mini_method_compile): use mono_method_profile* if the the option is
19424         enabled.
19426 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
19428         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
19429         methods with their wrapper.
19431         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
19432         methods with their wrapper.
19434         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
19435         their wrapper.
19437         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
19438         wrapper.
19440         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
19441         methods.
19443 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
19445         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
19447 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
19449         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
19450         of the mempool. This is slightly faster and uses less memory
19452 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19454         * mini.c: avoid O(n) allocation for variables.
19456 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19458         * mini.c: handle items on the stack after inlining methods.
19460 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
19462         * mini.c: make the method->opcode optimization dependent
19463         on MONO_OPT_INSTRINS and do it lazily.
19465 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
19467         * driver.c: print overall results at the end of regression run.
19469 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
19471         * inssel.brg: don't overwrite symbolic registers.
19473 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
19475         * inssel-x86.brg: fix conversion from long to float.
19477 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
19479         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
19481 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
19483         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
19485         * driver.c: Added --print-vtable option as in the old JIT.
19487 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
19489         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
19491 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
19493         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
19495 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
19497         * mini.c regalloc.c regalloc.h: Fix memory leak.
19499 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
19501         * aot.c (mono_aot_get_method): register all used strings
19503 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
19505         * mini.c: always intern strings references with ldstr at compile time.
19507 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
19509         * Makefile.am: add BUILT_SOURCES.
19511 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
19513         * driver.c: give a better error message when the assembly to execute
19514         doesn't have an entry point.
19516 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
19518         * Makefile.am: added hack for automake
19520         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
19521         correct sematics.
19523         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
19525 22003-04-07  Martin Baulig  <martin@ximian.com>
19527         * Makefile.am: Added Makefile.am.
19529         * debugger-main.c: Removed, this is now in the debugger where it
19530         belongs.
19532         * mini.pc.in: Call this package `mini' for the moment.