Fix LCONV_TO_xx and ICONV_TO_xx. Fix leave_method dump of returned
[mono.git] / mono / mini / ChangeLog
blobad5865a5e9be873f813a5e83683d49a8c6c35c32
1 2009-06-24  Neale Ferguson <neale@sinenomine.net>
3         * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
4         dump of structure return value. Fix some formatting.
5         * cpu-s390x.md: Fix lengths of instruction sequences.
6         * mini-s390.c: Minor formatting changes.
8 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
10         * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
11         Use sigaction on freebsd as well.
13 2009-06-23  Zoltan Varga  <vargaz@gmail.com>
15         * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
16         uses #ifdef on it.
17         
18         * mini.c (mini_init): Revert a change which breaks cross-compilation.
20 2009-06-22  Mark Probst  <mark.probst@gmail.com>
22         * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
24 2009-06-22  Mark Probst  <mark.probst@gmail.com>
26         * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
28 2009-06-20  Martin Baulig  <martin@ximian.com>
30         * debug-mini.c
31         (MonoDebuggerThreadFlags): New enum typedef.
32         (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
33         (mono_debugger_thread_created): Added `gpointer func' argument;
34         initialize the new `thread_flags' field.
36 2009-06-18  Martin Baulig  <martin@ximian.com>
38         * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
39         (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
41         * debug-debugger.c
42         (mini_debugger_set_attach_ok): New function; sets the attach-ok
43         flag in `MONO_DEBUGGER__info.runtime_info'.
45         * driver.c
46         (mono_main): Call mini_debugger_set_attach_ok() if generics
47         sharing is disabled.
49 2009-06-22  Zoltan Varga  <vargaz@gmail.com>
51         * aot-compiler.c (add_wrappers): Fix a warning.
53         * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
54         the ppc load/store macro changes.
56 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
58         * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
60         * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
61         not just the got symbol.
63         * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
64         on ppc.
66         * aot-compiler.c unwind.c: Add infrastructure for unwind support on
67         ppc.
68         
69         * aot-compiler.c: Remove some fixmes.
71         * driver.c (mono_main): Print a helpful message when cross-compiling.
73         * mini.c (mini_init): Disable signal handlers when cross-compiling.
75         * method-to-ir.c (initialize_array_data): Do the optimization if the
76         target byte order is little endian, instead of the host byte order.
78         * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
79         wrappers into the mscorlib image, Emit a unique plt symbol for each
80         image, emit symbols for plt entries.
82         * image-writer.c (img_writer_emit_symbol_size): New function to emit
83         a .size directive.
84         
85 2009-06-20  Zoltan Varga  <vargaz@gmail.com>
87         * aot-compiler.c (add_wrappers): Avoid calling 
88         mono_marshal_get_type_info () since it can assert for some types.
90         * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of 
91         ldtoken are used inside wrappers.
93         * helpers.c: Add support for prefixing tools with the arch name.
95         * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
96         quantities when using ilp32.
98         * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
99         spill slots. Use sizeof(mgreg_t) for the spill slot size.
101         * image-writer.c: Use .long on ilp32.
103         * aot-compiler.c: Use 32 bit loads on ilp32.
104         
105 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
107         * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
109         * mini-ops.h: Use TARGET_POWERPC define for consistency.
111         * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
113         * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the 
114         second got slot of every aot image.
115         
116         * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
117         aot on platforms with function pointers.
119         * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
120         support for aot/full aot on ppc/ppc64.
121         
122         * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
123         arguments which are needed on ppc.
125         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
126         argument.
128         * mini-trampolines.c aot-runtime.c: Update after the above changes.
129         
130         * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
132         * regalloc2.c (BITS_PER_CHUNK): Ditto.  
134         * aot-compiler.c (emit_got_info): Fix reading unused memory.
136         * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
138 2009-06-17  Geoff Norton  <gnorton@novell.com>
140         * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
142 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
144         * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
145         to control whenever the dwarf writer is in xdebug or aot mode.
146         (emit_class_dwarf_info): Use a separate abbrev for structures without
147         children.
149         * aot-compiler.c: Pass the appending parameter to 
150         mono_dwarf_writer_create ().
152         * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
153         falls through to its next bblock. Fixes #513931.
155         * iltests.il: Add a test.
157         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
158         infor even if emit_line is FALSE, as the apple linker seems to require it.
160         * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
162         * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
163         gcc does.
164         (emit_fde): Ditto.
166 2009-06-15  Zoltan Varga  <vargaz@gmail.com>
168         * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
169         mips build.
171 2009-06-13  Zoltan Varga  <vargaz@gmail.com>
173         * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
174         'has_call_handler' fields.
176         * method-to-ir.c (mono_method_to_ir): Set them if needed.
178         * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
179         first bblock if not needed. Fixes #512790.
180         
181 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
183         * aot-compiler.c (mono_compile_assembly): Fix a warning.
184         
185         * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
186         wrappers.
188         * aot-runtime.c (mono_aot_get_method): Use the original method's code for
189         remoting-invoke-with-check wrappers, which are not needed when running with
190         full-aot, since it doesn't support remoting.
191         
192 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
194         * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
196         * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
197         method info, it is not used anymore.
199         * mini.h: Bump AOT file format version.
200         
201         * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
202         word smaller.
204         * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
205         change above.
206         
207         * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
209         * mini.h: Bump AOT file format version.
210         
211 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
213         * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
214         TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
215         iphone.
217         * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
218         of CKFINITE and FBGE for VFP.
220 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
222         * aot-compiler.c: Don't align code to 16 bytes on arm.
223         
224         * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
225         before the methods they belong to.
227         * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
228         the full-aot case if possible, since the trampoline will be called right 
229         away.
231         * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
232         trampolines to 1024 after the change above.
234         * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
235         trampoline to save 8 bytes per trampoline.
237         * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
238         change above.
240 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
242         * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
244 2009-06-08  Martin Baulig  <martin@ximian.com>
246         * debug-mini.c
247         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
248         (_mono_debugger_throw_exception): Don't make this static.
249         (_mono_debugger_unhandled_exception): Likewise.
250         (mono_debugger_handle_exception): Moved to mini-exceptions.c
252         * debug-mini.c
253         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
254         (_mono_debugger_throw_exception): Add function prototype.
255         (_mono_debugger_unhandled_exception): Likewise.
257         * mini-exceptions.c
258         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
259         arg; return the first exception handler if the exception is caught
260         and we're running inside the debugger.
261         (mono_debugger_handle_exception): Moved here from debug-mini.c;
262         improve exception handle inside runtime-invoke, check whether the
263         exception is actually caught in the method being invoked and not
264         by the runtime-invoke-wrapper.
266 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
268         * image-writer.c: Improve support for the osx assembler.
270         * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
271         support them.
273 2009-06-08  Martin Baulig  <martin@ximian.com>
275         * debug-mini.c
276         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
277         (_mono_debugger_throw_exception): Don't make this static.
278         (_mono_debugger_unhandled_exception): Likewise.
279         (mono_debugger_handle_exception): Moved to mini-exceptions.c
281         * debug-mini.c
282         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
283         (_mono_debugger_throw_exception): Add function prototype.
284         (_mono_debugger_unhandled_exception): Likewise.
286         * mini-exceptions.c
287         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
288         arg; return the first exception handler if the exception is caught
289         and we're running inside the debugger.
290         (mono_debugger_handle_exception): Moved here from debug-mini.c;
291         improve exception handle inside runtime-invoke, check whether the
292         exception is actually caught in the method being invoked and not
293         by the runtime-invoke-wrapper.
295 2009-06-07  Zoltan Varga  <vargaz@gmail.com>
297         * image-writer.c (append_subsection): Don't align subsections of the
298         debug_line section as a workaround.
300         * dwarfwriter.c: Emit line number info in the AOT case as well.
302 2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
304         This patch is contributed under the terms of the MIT/X11 license
306        * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
307        code_len <= code_size
309 2009-06-06  Zoltan Varga  <vargaz@gmail.com>
311         * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
313 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
315         * aot-compiler.c aot-runtime.c: Delete references to static rgctx
316         invoke wrappers, we now use trampolines instead.
318 2009-06-04  Mark Probst  <mark.probst@gmail.com>
320         * mini-darwin.c: The exception thread must not be registered with
321         the GC.
323 2009-06-04  Mark Probst  <mark.probst@gmail.com>
325         * mini-gc.c: Disable the code because it makes SGen crash.
327 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
329         * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
330         instead of asserting.
332 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
334         * aot-compiler.c (mono_compile_assembly): Move the creation of the
335         output file after the code has been compiled.
337 2009-05-30  Zoltan Varga  <vargaz@gmail.com>
339         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
341 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
343         * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
344         entries distinction to simplify the code.
346         * mini.h: Bump AOT file format version.
347         
348 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
350         * objects.cs: Fix the signature of one of the tests.
352         * mini.c (mini_create_ftnptr): New helper function, moved here from
353         object.c.
354         (mini_get_addr_from_ftnptr): Ditto.
355         (mini_init): Install the new helpers.
357 2009-05-28  Martin Baulig  <martin@ximian.com>
359         Correctly initialize the debugger when embedding Mono.
361         * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
362         `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
363         see documentation in mini_debug_running_inside_mdb().
365         * debug-debugger.c
366         (mini_debug_running_inside_mdb): New function to check whether
367         we're running inside mdb.
369         * mini.c (mini_init): Call mini_debugger_init() if we're running
370         inside the debugger.
372         * driver.c (mono_main): Moved the call to mini_debugger_init()
373         into mini_init() to make this work when embedding Mono.
375         * debug-debugger.c (mini_debugger_init): Warn about duplicate
376         calls to mini_debugger_init().
378         * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
379         mono_debugger_main() -> mini_debugger_main() and put them inside a
380         `MONO_DEBUGGER_SUPPORTED' conditional.
382 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
384         * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
385         this is no longer in use.
386         * mini.h: Same.
388 2009-05-26  Zoltan Varga  <vargaz@gmail.com>
390         * mini-sparc.c (add_outarg_load): Fix the sparc build.
392         * aot-compiler.c (emit_method_code): Always write out C style symbols for
393         methods.
395 2009-05-27  Martin Baulig  <martin@ximian.com>
397 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
399         * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
400         long_conv_to_r_un to 64 bits.
402         * cpu-x86.md: Increase the instruction size due to the changes.
404         * iltests.il.in: Add regression test.
406         Fixes #467201.
408 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
410         * objects.cs: Move the previous test from basic.cs to here.
412 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
414         * basic.cs: Add regression test for #506915.
416 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
418         * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
419         optimization we must check the bb of the first byte of stobj as
420         it's the only one set in cil_offset_to_bb.
422         Fixes #506915.  
424 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
426         * image-writer.c: Fix pointer directive on ppc64.
428 2009-05-24  Zoltan Varga  <vargaz@gmail.com>
430         * image-writer.c (asm_writer_emit_section_change): Avoid using
431         .bss subsections on ppc too.
433 2009-05-23  Zoltan Varga  <vargaz@gmail.com>
435         * image-writer.c: Fix the definition of TARGET_ASM_....
436         
437         * image-writer.c: Fix the emission of assembler directives in the last
438         change.
440         * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
441         exception throwing code to accomodate ppc64.
443         * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
444         size to work on ppc64 too.
446         * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
447         too.
449         * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
450         the assembler dialect instead of using platform specific defines.
452 2009-05-22  Geoff Norton  <gnorton@novell.com>
454         * mini-arm.c (get_call_info): If a structure is split between the stack
455         and argument registers, we should not advance the stack pointer by the entire
456         native size, but just by the amount that spilled.
458 2009-05-22  Zoltan Varga  <vargaz@gmail.com>
460         * mini-arm.c (get_call_info): Handle structures with alignment requirements
461         correctly.
463 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
465         * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
466         wrappers normally.
467         
468         * aot-compiler.c (add_extra_method): Fix up the collection of extra
469         methods so wrapper don't get added twice.
470         (add_generic_instances): Don't add methods of arrays.
472         * generics.cs: Mark one test as !FULLAOT.
474 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
476         * mini-x86.c (emit_move_return_value): Remove unused vars.
478 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
480         * mini-x86.c (mono_arch_emit_call): The decompose code now supports
481         decomposing 8 bytes structs into a LCALL.
483         * mini-x86.c (emit_move_return_value): We no longer push the vtype
484         pointer for where to store the returned regs.
486         * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
487         state the concern.
489         Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
491 2009-05-20  Miguel de Icaza  <miguel@novell.com>
493         * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
494         without getenv.
496 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
498         * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
500         * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
501         generics.
503 2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
505         * local-propagation.c (mono_local_cprop): Avoid local propagation
506         across paired add/sub if the first instruction dest reg is it's
507         source reg. For example:
509         int_add_imm R12 <- R12 [1] clobbers: 1
510         int_sub_imm R42 <- R12 [1] clobbers: 1
512         The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
513         maintain the math identify.
515         Fixes #505375.
517 2009-05-20  Andreia Gaita  <avidigal@novell.com>
519         * Makefile.am: avoid going on the network just to get the revision,
520         use git log instead
522 2009-05-19  Massimiliano Mantione  <massi@ximian.com>
524         Fixed estimate for short branches on amd64 (they were off mark, and
525         enabling call prolog-epilog instrumentations caused assertions).
526         * mini.h (struct MonoBasicBlock): added max_length field to hold the
527         estimate for the maximum length of this basic block.
528         * mini-amd64.c:
529         - mono_arch_emit_prolog: compute max_length for each basic block
530           (instead of max_offset), and inflate size estimate also for entry bb
531           in case of code instrumentation.
532         - mono_arch_output_basic_block: get rid of "cpos" (the current
533           estimated "position" in the code), and always use "offset" instead,
534           which is accurate; at the beginning of the function quickly recompute
535           max_offset for all the remaining blocks, starting from the current
536           cfg->code_len (which is correct, and not estimated) and using the
537           estimated block lengths computed previously.
539 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
541         * exceptions-ppc.c: Remove the caching from the trampoline creation 
542         functions, it is already done in the caller.
544         * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
546         * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
547         MONO_ARCH_GSHARED_SUPPORTED define.
549         * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
551         * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
552         function.
554 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
556         * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
557         call to mono_marshal_get_rgctx_invoke ().
559         * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
560         mono_marshal_get_static_rgctx_invoke (), all platforms which support
561         gshared use the static rgctx trampolines now.
562         
563         * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
564         platform supports it.
566 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
568         * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
570         * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
572 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
574         * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
576         * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
577         for ppc.
579 2009-05-15  Massimiliano Mantione  <massi@ximian.com>
581         Made it possible for mono_arch_instrument_epilog to preserve
582         argument registers, otherwise instrumenting the "epilogue" before
583         a tail call would clobber them.
584         * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
585         if like mono_arch_instrument_epilog but with an additional parameter
586         that states if argument registers must be preserved.
587         * mini.c: implemented mono_arch_instrument_epilog as a call to
588         mono_arch_instrument_epilog_full without asking to preserve argument
589         registers (this makes the existing code work as usual).
590         * mini-amd64.c:
591         - mono_arch_instrument_epilog: add parameter to transform it into
592         mono_arch_instrument_epilog_full, and preserve argument registers
593         when required.
594         - mono_arch_output_basic_block, OP_TAILCALL case: call
595         mono_arch_instrument_epilog_full.
596         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
597         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
598         only transformed mono_arch_instrument_epilog into
599         mono_arch_instrument_epilog_full.
601 2009-05-15  Geoff Norton  <gnorton@novell.com>
603         * mini-darwin.c: This works on arm now.
605 2009-05-14  Geoff Norton  <gnorton@novell.com>
607         * jit.h, driver.c: Allow full-aot to be decided programatically by the
608         embedding api.
610 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
612         * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
613         label names.
615         * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
616         wrappers during full aot mode correctly.
618         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
619         methods correctly.
621         * aot-compiler.c (mono_aot_method_hash): Use our internal version of
622         mono_metadata_type_hash ().
624 2009-05-14  Massimiliano Mantione  <massi@ximian.com>
626         * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
627         mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
628         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
629         Removed MONO_INST_BRLABEL from the instruction flags, and the
630         remaining code that used it, because we do not support branches inside
631         basic blocks (and branch target labels) anymore.
632         * Makefile.am: As part of the above cleanup, remove reference to
633         BURG files which don't exist anymore.
635 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
637         * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
638         osx.
640         * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
641         to use mono_arch_throw_corlib_exception.
643         * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
644         mono_arch_throw_corlib_exception for throwing corlib exceptions.
646         * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
647         domain mempool.
649         * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
651         * aot-compiler.c: Emit a local symbol prefixed with the assembly name 
652         for the got to make debugging easier and to avoid confusing it with the
653         system got.
654         
655         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
656         method so a breakpoint can be set when using gdb.
658 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
660         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
661         on mono_method_get_imt_slot ().
663         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
664         num_decodes variables.
666         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
667         change as it doesn't seem to work.
668         
669         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
670         wrappers.
672 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
674         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
675         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
677         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
678         builder when using full aot.
680         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
681         here, it is already handled.
682         
683         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
684         correctly for IMT.
686         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
688         * mini-arm.h: Enable IMT for full aot.
689         
690         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
691         arch doesn't support it.
693         * mini.c (mini_init): Don't disable IMT for full aot if the
694         architecture supports it.
696         * mini.h (MonoAotTrampoline): New enum containing the different types
697         of 'numerous' trampolines.
698         (MONO_AOT_FILE_VERSION): Bump this.
700         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
701         static rgctx trampolines. Add support for full-aot IMT thunks.
703         * mini-amd64.h: Enable IMT for full aot.
705         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
706         to exclude tests belonging to a category.
708         * generics.cs: Mark some tests with a !FULLAOT category.
710         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
711         generics tests.
713 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
715         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
716         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
717         (emit_plt): Fix a warning.
719 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
721         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
722         back into aot-compiler.c to a place where the other functions shared by
723         the runtime and aot compiler are.
724         
725         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
726         as done previously, instead of in MonoAotFileInfo, since pointers might have
727         alignment requirements.
729         * mini.h: Bump AOT file format version.
731 2009-05-10  Miguel de Icaza  <miguel@novell.com>
733         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
734         that is used at runtime from the aot-compiler.c, this makes it
735         work on setups that remove the AOT compiler from the output
736         image. 
738 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
740         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
741         PPC.
743         * mini-ppc.h: Enable static rgctx trampolines for ppc.
745         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
747         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
748         stuff to mono_arch_decompose_long_opts ().
749         (mono_decompose_opcode): Remove some dead code.
751 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
753         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
754         cmethod can be null for quite a some reasons.
756 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
758         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
760 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
762         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
764 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
766         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
767         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
768         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
769         calls returning structures by addr on amd64.
771         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
773         * iltests.il.in: Restructure the tail call tests a bit.
774         
775 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
777         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
778         for virtual methods too.
780 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
782         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
783         due to regression in verifying System.dll.
785 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
787         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
788         in dynamic methods.
790         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
791         instances.
793         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
794         g_str_hash () which can change.
796         * driver.c (mini_regression): Disable optimizations not supported by
797         the cpu. Fixes #500019.
799         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
800         build.
802 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
804         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
805         to the latest LLVM code.
807 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
809         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
811 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
813         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
814         x86/amd64.
816         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
817         no longer saving offsets, so just save the patch types along with the other
818         info.
819         * aot-runtime.c (load_patch_info): Update after the changes to 
820         encode_patch_list ().
821         (decode_got_entry): Removed, merged into load_patch_info ().
822         (is_shared_got_patch): Removed, call the same function from
823         aot-compiler.c.
825         * mini.h: Bump aot file format version.
826         
827         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
828         half-finished no-dlsym code.
830         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
831         option.
833         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
834         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
836 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
838         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
839         buffer length to work with AOT code.
841         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
842         ldfld/stfld opcodes.
844         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
845         as it is not used.
847         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
849         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
851         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
852         LLVM API.
854         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
855         if needed. Don't decompose long operations when using llvm.
857 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
859         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
860         PAGESIZE constant.
862         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
864 2009-05-03  Martin Baulig  <martin@ximian.com>
866         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
867         mono_debugger_insert_method_breakpoint() since the class init
868         handler we're inserting at the top of the method already gives us
869         a notification.
871 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
873         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
874         to mono_arch_decompose_long_opts () for x86 and arm.
876 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
878         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
879         TARGET_AMD64 here.
881 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
883         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
884         JIT code.
886 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
888         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
889         number of trampolines used in full-aot mode.
891         * aot-compiler.c: Add an ntrampolines option to set the number of 
892         trampolines emitted in full-aot mode.
894 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
896         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
897         a volatile load. Get rid of get_tempname (), llvm assigns names
898         automatically.
900         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
901         builder function.
903         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
904         a value.
906         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
907         level 1.
909         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
910         to the same register as a fixed sreg2. Fixes #497271.
912         * iltests.il.in: Add a new test.
914 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
916         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
917         stack, since pushes complicate exception handling.
919         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
920         the stack if they are passed using moves.
922         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
924         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
925         when using llvm.
927         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
928         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
929         of FMOVE if it is an R4.
931 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
933         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
935         * mini.h (LLVMCallInfo): New structure to store calling convention 
936         information for the LLVM back end similar to the CallInfo structures in 
937         the back-ends.
939         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
940         call information in a format usable by LLVM.
941         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
943         * method-to-ir.c (mono_emit_call_args): Emit calls using 
944         mono_llvm_emit_call () when compiling using LLVM.
946         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
947         comments to all functions. Fix memory leaks. Add a public init/cleanup
948         function.
950         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
952         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
953         mono_array_new_va () jit icall.
954         
955 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
957         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
958         multiple machine description files to be specified.
959         * mini-ops.h: fixes for cross-compilation.
961 2009-04-22  Miguel de Icaza  <miguel@novell.com>
963         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
964         some porting work.
966 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
968         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
969         to prevent asserts in various passes. Fixes #497220.
971 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
973         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
974         a racy assert.
976         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
977         table to avoid duplicates.
979         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
980         
981         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
982         option is used.
984 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
986         * mini.c (mini_method_verify): Fail fulltrust code if the exception
987         is for method or field access.
989 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
991         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
992         a Value to stdout.
994         * mini-llvm.c (mono_llvm_emit_method): Use it.
995         
996         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
997         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
998         on volatile values.
1000         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
1001         synchronized methods.
1003         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
1005         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
1007         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
1008         OP_LOADI8_MEM.
1010         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
1011         allowing some options to be set dynamically.
1013 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
1015         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
1016         unconditional branch.
1018         * mini.h (MonoTrampolineType): Add new trampoline type 
1019         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
1020         compiled code.
1022         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
1023         function.
1025         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
1026         creation function.
1028         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
1029         is enabled. Instead, use the llvm vcall trampoline.
1030         
1031         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
1033         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
1034         
1035         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
1036         functions.
1038         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
1039         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
1041         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
1042         OP_IA64_CSET opcode.
1044         * mini.c: Fix a warning.
1046         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
1047         THROW to the appropriate llvm type.
1049 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
1051         * mini.c (mini_method_compile): Add statistics for methods JITted
1052         with/without LLVM.
1054 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
1056         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
1057         OP_IA64_CMP_<cond>_IMM opcodes.
1059 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
1061         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
1062         corlib exceptions.
1064         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
1065         correctly.
1067         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
1068         GENERICINST.
1070 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
1072         * mini-exceptions.c : add thread id to EXCEPTION trace message.
1074 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
1076         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
1077         support.
1079         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
1080         rgctx invoke trampolines for x86.
1082         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
1083         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
1084         (mono_arch_get_vcall_slot): Simplify this.
1086 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
1088         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
1089         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
1091 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
1093         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
1094         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
1096         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
1098         * liveness.c (visit_bb): Remove a needless assert.
1100 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
1102         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
1103         full aot support to the arch specific code.
1105         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
1107         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
1109         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
1110         
1111         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
1112         collect information about the delegate invoke impl trampolines.
1114         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
1115         to save trampolines during full-aot mode.
1117         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
1118         creation function which returns a trampoline which sets the rgctx
1119         argument.
1120         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
1121         wrapper if possible.
1122         (mono_delegate_trampoline): Ditto.
1124         * mini.c (mono_jit_runtime_invoke): Ditto.
1126         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
1127         
1128         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
1130         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1131         
1132 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
1134         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
1135         just setting the opcode to OP_NOP.
1137 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
1139         * mini.c (mini_method_compile): Put the last change inside an 
1140         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
1141         
1142         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
1143         and extend live ranges to cover the whole method when using xdb.
1145         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
1146         do it in the trampolines.
1148         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
1149         needed.
1151         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
1152         
1153         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
1154         call code in full-aot mode since IMT is disabled there.
1155         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
1156         new JIT no longer has that restriction.
1158         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1160         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
1161         a more compact format.
1162         (mono_aot_wrapper_name): New function to return a unique name for a
1163         wrapper method, also used by the AOT runtime.
1165         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
1166         aot-compiler.c.
1168         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
1169         when a ICollection<T> etc is encountered.
1170         (add_generic_instances): Process method arguments/locals too.
1171         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
1172         trampoline names.
1174         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
1175         
1176 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
1178         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
1180         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
1182         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
1183         representing the result of the decomposition. Nullify instructions
1184         instead of setting them to OP_NOP since nops can't have registers
1185         set.
1187 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
1189         * aot-compiler.c (mono_compile_assembly): Split this huge function into
1190         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
1191         info. Strip 'mapping symbols' on ARM.
1193         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
1194         
1195         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
1196         this with the native genmdesc.
1198 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
1200         * aot-runtime.c:  Fixing the MSVC build.
1202         Code is contributed under MIT/X11 license.
1204 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
1206         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
1207         JITted code depends on it.
1209 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
1211         * aot-compiler.c: Use new MonoGenericParam accessors.
1213 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
1215         Reduce memory usage and improve correctness wrt MonoGenericParam
1216         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
1217         handing.  Avoid allocating MonoGenericParams, but use the ones in
1218         the container itself.
1220 2009-04-07  Miguel de Icaza  <miguel@novell.com>
1222         * tasklets.c: Return exceptions in the out argument.
1224 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
1226         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
1227         opcode. Use pointer types in more places instead of casting them to 
1228         integers.
1230         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
1231         optimizations.
1232         (mono_llvm_optimize_method): New helper function to optimize a method.
1234         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
1235         widening code so it could be called from more places.
1236         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
1237         code paths in the call opcodes.
1239 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
1241         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
1243 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
1245         * dwarfwriter.c: Use _ to separate class name 
1246         components as gdb can't handle '.'. Represent reference variables
1247         as 'class <NAME>&'.
1248         
1249         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
1251         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
1252         
1253         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
1255         * gc-test.cs: New file with GC stack marking tests.
1256         
1257         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
1258         negative numbers for vfp.
1260         * basic-float.cs: Add a test.
1261         
1262 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
1264         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
1266 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
1268         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
1269         part of tasklet/continuation support.
1271 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
1273         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
1274         amd64 opcodes inside an ifdef.
1276         * dwarfwriter.c: Emit inheritance information for classes, emit fields
1277         of complex types.
1278         
1279         * dwarfwriter.c (emit_type): Emit the class info for classes.
1281 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
1283         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
1285         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
1287         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
1289         * ssa.c (mono_ssa_compute): Fix some memory leaks.
1291 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
1293         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
1295         * mini-llvm.c: Update comments.
1297         * mini.h (COMPILE_LLVM): New macro.
1299         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
1301         * ssa.c (mono_ssa_compute): Ditto.
1302         
1303         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
1304         the unwind ops from a DWARF FDE.
1306         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
1307         methods by extracting the dwarf unwind ops from the unwind info generated
1308         by LLVM.
1309         
1310         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
1311         calls.
1313         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
1314         addressing modes.
1316 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
1318         * Makefile.am (llvm_sources): Enable this.
1320         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
1321         failing back to the JIT if something cannot be handled.
1323         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
1324         compiling with LLVM.
1326         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
1327         compiling with LLVM.
1329         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
1330         compiling with LLVM.
1332         * mini-ops.h: Add a few opcodes needed by LLVM.
1334         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
1335         has no unwind info.
1337         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
1338         backend.
1340         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
1342         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
1344 2009-04-01  Mark Probst  <mark.probst@gmail.com>
1346         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
1347         ridiculously large methods.
1349 2009-03-31  Martin Baulig  <martin@ximian.com>
1351         * debug-debugger.c (debugger_remove_breakpoint): Call
1352         mono_debugger_remove_class_init_callback ().
1354 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
1356         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
1357         right before emitting code, not at the start.
1359         * mini.c (mono_postprocess_patches): Extract this into a separate function
1360         from mono_codegen ().
1362         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
1363         byref types correctly.
1365 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
1367         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
1368         by the last change.
1370 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
1372         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
1373         indirect calls, this avoids problems where get_vcall_slot () would get
1374         confused by the native code for the instruction preceeding the call.
1375         (mono_arch_get_vcall_slot): Simplify this.
1376         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
1378         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
1379         register allocator now seems to depend on them instead of the data in
1380         cpu-<ARCH>.md.
1382         * mini.c (mini_method_compile): Throw the correct type of exception if
1383         mono_method_get_header () fails because of a loading error.
1385 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
1387         * mini.c (mini_method_compile): Clear the loader error if the method
1388         header cannot be decoded.
1390         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
1391         interface methods on proxies correctly.
1393         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
1394         this argument for vtype methods. Add precise liveness info for arguments.
1396         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
1397         LIVERANGE_START/END opcodes.
1399         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
1400         for arguments and values in registers.
1402 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
1404         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
1405         return a valuetype. Fixes #487518.
1407         * iltests.il: Add a test.
1408         
1409         * aot-compiler.c: Use mono_thread_create () to create helper threads.
1411         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
1412         closed over a null reference correctly.
1414 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
1416         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
1418 2009-03-25  Mark Probst  <mark.probst@gmail.com>
1420         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
1421         allocated to the same registers as fixed sregs.
1423 2009-03-24  Mark Probst  <mark.probst@gmail.com>
1425         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
1426         ATOMIC_CAS_IMM ops.
1428         * method-to-ir.c: Handle more cases for
1429         Interlocked.CompareExchange.
1431         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
1432         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
1433         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
1435 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
1437         * aot-runtime.c (decode_method_ref): Fix a warning.
1439         * unwind.c (mono_unwind_frame): Ditto.  
1441 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
1443         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
1444         (mono_compile_assembly): Enable the binary writer for full-aot as well.
1446         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
1447         fix the handling of large values in the ALU_PC_G0_NC relocation.
1449 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
1451         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
1453 2009-03-22  Mark Probst  <mark.probst@gmail.com>
1455         * method-to-ir.c (mono_spill_global_vars): Support for ternary
1456         ops.
1458 2009-03-22  Mark Probst  <mark.probst@gmail.com>
1460         * method-to-ir.c: MINI_OP3 needs a comma.
1462         * method-to-ir.c, mini.h, mini.c: Remove
1463         mono_init_op_sreg_counts ().
1465 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
1467         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
1468         OP_JMP.
1469         
1470         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
1471         assertion.
1473         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
1475         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
1476         code somewhat.
1478 2009-03-21  Mark Probst  <mark.probst@gmail.com>
1480         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
1481         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
1482         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
1483         operations.
1485 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
1487         * driver.c: Change location of gc_wrapper.h.
1489         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
1490         inside finally clauses correctly. Fixes #485721.
1492         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
1493         after the change above.
1495         * exceptions.cs: Add a test.
1496         
1497 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
1499         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
1501         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
1502         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
1503         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
1505         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
1506         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
1508 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
1510         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
1511         Simplify logic for ensure_method_is_allowed_to_call_method. 
1512         Handle wrappers on callers.
1514 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
1516         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
1517         them don't run yet.
1519         * basic-simd.cs: Fix the names of some test methods.
1521 2009-03-18  Geoff Norton  <gnorton@novell.com>
1523         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
1525 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
1527         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
1529 2009-03-17  Jb Evain  <jbevain@novell.com>
1531         * driver.c: remove now uneeded call to mono_gc_base_init before
1532         mono_profiler_load.
1534 2009-03-17  Jb Evain  <jbevain@novell.com>
1536         * dwarfwriter.c (token_handler): handle more cases.
1538 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
1540         * method-to-ir.c: Remove more dead code (that was required only
1541         because of method_is_safe). Fix compiler warnings.
1543 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
1545         * method-to-ir.c: Remove unneeded/useless method_is_safe
1546         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
1548 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
1550         * mini.c (mini_method_compile): Print the method been compiled with
1551         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
1552         for people not familiar with the runtime.
1554 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
1556         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
1557         a managed object which is later put into a GList. Return its class instead.
1559         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
1560         stack slots when using sgen.
1562 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
1564         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
1566 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
1568         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
1569         > so it works on the first vreg as well.
1571 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
1573         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
1574         trigger randomly.
1576         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
1577         
1578         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
1579         implement GArray.
1581 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
1583         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
1584         native->IL offset mapping.
1586 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
1588         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
1590         * basic.cs: Add a test.
1592 2009-03-11  Mark Probst  <mark.probst@gmail.com>
1594         * mini-x86.c (mono_arch_output_basic_block): Use different
1595         registers in case the ones we want to overwrite are used by the
1596         other operand.  Fixes regression in #480807.
1598 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
1600         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
1602         * dwarfwriter.c (emit_line_number_info): The line number info for
1603         IL code was off by one. Fix that.
1605         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
1606         stack.
1608 2009-03-09  Mark Probst  <mark.probst@gmail.com>
1610         Contributed under the terms of the MIT/X11 license by Steven
1611         Munroe <munroesj@us.ibm.com>.
1613         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
1614         Fixes #483462.
1616 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
1618         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
1619         as well.
1621 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
1623         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
1624         the delegate ctor handling code. Fixes #482638.
1625         
1626         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
1627         #481458.
1629         * iltests.il.in: Add a test.
1630         
1631         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
1632         mini-posix.c.
1634 2009-03-05  Mark Probst  <mark.probst@gmail.com>
1636         * mini-trampolines.c (mono_create_jump_trampoline): If the method
1637         is shared generic code, return the trampoline, even if the method
1638         has already been compiled.  Fixes #479763.
1640         * mini.c, mini.h: New function
1641         mono_jit_find_compiled_method_with_jit_info() which is the same as
1642         mono_jit_find_compiled_method() but also returns the jit info.
1644 2009-03-05  Mark Probst  <mark.probst@gmail.com>
1646         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
1647         for methods which actually have one.  For all other methods, make
1648         sure the this argument var is live the whole method.
1650         * mini.c (mini_method_compile): Every shared method has a
1651         this/vtable/mrgctx info.  Fixes #480807.
1653 2009-03-05  Mark Probst  <mark.probst@gmail.com>
1655         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
1656         generic/imt thunks where some entries branch through the vtable,
1657         while other entries branch directly.
1659 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
1661         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
1663         * mini-windows.c: Ditto.
1664         
1665         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
1666         ctors.
1668 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
1670         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
1671         down an assert.
1673 2009-03-04  Mark Probst  <mark.probst@gmail.com>
1675         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
1676         #481403.
1678 2009-03-04  Mark Probst  <mark.probst@gmail.com>
1680         * exceptions-x86.c: Include debug-mini.h - fixes build.
1682 2009-03-04  Martin Baulig  <martin@ximian.com>
1684         * debug-mini.c: Clean up the exception API and add documentation.
1685         (mono_debugger_handle_exception): New public method; this is
1686         called when throwing an exception or encountering an unhandled one.
1687         (mono_debugger_call_exception_handler): Formerly known as
1688         mono_debugger_handle_exception(); this is used to tell the
1689         debugger that we're about to invoke an exception handler.
1691 2009-03-04  Martin Baulig  <martin@ximian.com>
1693         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
1694         ../metadata/mono-debug-debugger.c; save and reset exception state.
1696 2009-03-02  Martin Baulig  <martin@ximian.com>
1698         * debug-mini.c: Moved the debugger exception handling here from
1699         ../metadata/mono-debug-debugger.c.
1701         * debug-mini.h
1702         (MonoDebuggerExceptionAction): New exception typedef.
1704         * debug-mini.c
1705         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
1707         * exceptions-amd64.c
1708         (mono_amd64_throw_exception): Use the new debugger exception
1709         handling code.
1711         * mini-exceptions.c
1712         (mono_handle_exception_internal): Don't call
1713         mono_debugger_unhandled_exception() here.
1715 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
1717         * mini.c aot-compiler.c: Update after the changes to 
1718         mono_marshal_get_runtime_invoke ().
1720         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
1721         Virtual generic methods might not have method->slot set, work around
1722         that.
1724         * generics.cs: Add a test.
1726 2009-03-02  Geoff Norton  <gnorton@novell.com>
1728         * mini.c:
1729         * driver.c: Allow signal chaining of SIGFPE as well.
1731 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
1733         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
1734         this since it now receives the method not its generic context in the
1735         IMT reg.
1737         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
1738         generic/imt thunks where some entries branch through the vtable, while
1739         other entries branch directly.
1741         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
1743         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
1744         support for interface methods as well.
1746         * mini-trampolines.c: Add support for virtual generic methods in interfaces
1747         using the normal IMT thunks.
1749         generics.cs: Add new tests.
1750         
1751         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
1752         the generic inst to the generic imt thunks. This fixes AOT support, 
1753         improves consistency with the normal IMT thunks, and makes it easier to
1754         add support for interface generic virtual methods later.
1756         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
1757         
1758 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
1760         * driver.c (mono_set_signal_chaining): New public API function to enable
1761         signal chaining on POSIX platforms.
1763         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
1764         (si@lindenlab.com) to implement signal chaining. The original patch was
1765         contributed under the MIT X/11 license:
1766         https://bugzilla.novell.com/show_bug.cgi?id=318894
1768 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
1770         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
1771         too until it can be made to run on amd64.
1773 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
1775         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
1776         to  get_generic_context_from_code () + get_call_info () if possible.
1778 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
1780         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
1781         suspend-on-sigsegv functionality.
1783         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
1784         to suspend when a native SIGSEGV is received. This is useful for debugging
1785         crashes which don't happen under gdb, since a live process contains more
1786         information than a core file.
1788         * mini-exceptions.c (mono_print_thread_dump): Use 
1789         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
1791         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
1793         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
1794         
1795         * basic-float.cs: Disable the tests which currently fail on amd64.
1797         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
1798         value to mono_arch_patch_callsite () to fix crashes.
1799         
1800         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
1802 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
1804         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
1805         nop code by patching the call address to point to the nullified class init
1806         trampoline, as the former does not seem to be safe on SMP machines.
1808 2009-02-23  Mark Probst  <mark.probst@gmail.com>
1810         * mini-ops.h: Fix the argument types for a few x86 opcodes where
1811         they were wrong.
1813 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
1815         * basic-float.cs basic-calls.cs: Fix warnings.
1817 2009-02-22  Mark Probst  <mark.probst@gmail.com>
1819         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
1820         correct frame pointer in the LMF.  Should fix #478394.
1822 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
1824         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
1826         * image-writer.c: Make the binary writer less verbose.
1828 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
1830         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
1831         are called from runtime invoke wrappers.
1833 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
1835         * cpu-ppc.md (store_memindex): Increase the size of this.
1837 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1839         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1841         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
1843         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
1844         OP_LCONV_TO_R_UN.
1846         Last fix for of #467201.
1849 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1851         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1853         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
1854         and long_conv_to_r8_2:
1856         Fixed part of #467201.
1858 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1860         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1862         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
1863         conversion to 32 bits.
1865         * cpu-x86.md: Increase the size of int_conv_to_r4.
1867         * basic-float.cs: Add a test for this.
1869         Fixed part of #467201.
1871 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1873         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1875         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
1876         conversion to 64 bits.
1878         * basic-float.cs: Add a test for this.
1880         Fixed part of #467201.
1882 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1884         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1886         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
1887         This behavior is compatible with MS.
1889         * iltest.il.in: Add a test for this.
1891         Fixed part of #467201.
1893 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
1895         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
1897         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
1898         change the precision of the value.
1900         * cpu-x86.md: Define len for float_conv_to_r4.
1902         * basic-float.cs: Add a test for this.
1904         Fixed part of #467201.
1906 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
1908         * mini.c: Adjust locking order to the new semantics where the loader lock
1909         comes first.
1911 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
1913         * aot-runtime.c:
1914         * mini-amd64.c:
1915         * mini-arm.c:
1916         * mini-ia64.c:
1917         * mini-mips.c:
1918         * mini-ppc.c:
1919         * mini-sparc.c:
1920         * mini-trampolines.c:
1921         * mini-x86.c:
1922         * mini.c:
1923         * tramp-alpha.c:
1924         * tramp-amd64.c:
1925         * tramp-arm.c:
1926         * tramp-hppa.c:
1927         * tramp-ia64.c:
1928         * tramp-mips.c:
1929         * tramp-ppc.c:
1930         * tramp-s390.c:
1931         * tramp-s390x.c:
1932         * tramp-sparc.c:
1933         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
1935 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
1937         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
1938         as it is incorrect.
1940 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
1942         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
1943         for cctors if needed.
1945 2009-02-17  Mark Probst  <mark.probst@gmail.com>
1947         * mini-ppc.c: Fix build on Darwin.
1949 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
1951         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
1952         version instead of 3 as valgrind doesn't like version 3.
1954         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1956         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
1957         usable for hashing methods.
1958         (emit_extra_methods): Use the new hash to avoid putting every method in the
1959         same hash bucket.
1961         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
1963         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
1964         whenever a method ref could match a method.
1965         
1966         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
1967         test to fail.
1968         
1969         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
1970         methods refs.
1972         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
1974         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
1975         the encoding buffer.
1977         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
1978         mono_method_get_header () on inflated methods as an optimization.
1980 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
1982         * ssa.c (fold_ins): Fix another crash if the instruction following the
1983         switch was optimized away.
1985 2009-02-16  Mark Probst  <mark.probst@gmail.com>
1987         Contributed under the terms of the MIT/X11 license by Steven
1988         Munroe <munroesj@us.ibm.com>.
1990         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
1992 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
1994         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
1995         around the mono_domain_alloc calls, it is now done by the functions
1996         themselves.
1998         * aot-compiler.c (compile_method): Only add wrappers referenced by
1999         the method if compiling with full AOT.
2000         (mono_compile_assembly): Error out if --aot=full is specified on
2001         a platform where it is not supported.
2003         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
2004         on ARM too.
2006         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
2007         AOT support.
2009         * aot-runtime.c (load_named_code): Handle 
2010         mono_arm_throw_exception_by_token.
2012         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
2014         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
2015         unaligned.
2017         * Makefile.am (fullaotcheck): Exit if a test fails.
2019         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
2020         on ARM.
2021         (mono_compile_assembly): Handle the assembler failing.
2023         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
2024         accepting subsections of .bss.
2026         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
2027         was optimized away.
2029         * aot-compiler.c: Remove some unused includes.
2030         
2031         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
2032         now in MonoImageWriter.
2034         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
2035         code sequence which matches a non-virtual call. Fixes #472654.
2037 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
2039         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
2040         xdebug code.
2041         
2042         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
2043         use the image/dwarf writers directly.
2045         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
2046         field.
2048         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
2049         MonoDwarfWriter.
2051         * image-writer.h: Fix some typos.
2053         * dwarfwriter.h dwarfwriter.c: New files.
2054         
2055         * aot-compiler.c: Extract the DWARF info writing functionality into a 
2056         separate module.
2058         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
2059         argument to return unwind info.
2061         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
2063         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
2064         
2065         * aot-runtime.c (decode_method_ref): Add a case for 
2066         MONO_AOT_METHODREF_WRAPPER_NAME.
2068         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
2069         for AOT.
2071         * aot-compiler.c (encode_method_ref): Use the new constants.
2073         * aot-runtime.c (decode_method_ref): Ditto.
2075         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
2076         be compiled, not the icall itself.
2078 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
2080         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
2081         using decode_method_ref ().
2083         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
2084         convert it to an in32. Fixes #475859.
2086         * arrays.cs: Add a test.
2088 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
2090         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
2091         OP_LCONV_TO_U2.
2093         * basic-long.cs: Add a test.
2095 2009-02-12  Mark Probst  <mark.probst@gmail.com>
2097         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
2098         remove the frame pointer in leaf methods which don't receive any
2099         arguments, don't throw exceptions and don't do dynamic stack
2100         allocations.
2102 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
2104         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
2105         the fail_tramp changes. Hopefully fixes #475132.
2107 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
2109         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
2110         instead of mono_metadata_signature_dup_full.
2112 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
2114         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
2115         for processing jump tables. Fixes #473787.
2117 2009-02-11  Mark Probst  <mark.probst@gmail.com>
2119         * mini-generic-sharing.c: mini_method_get_context() just calls
2120         mono_method_get_context_general() now.
2122         * mini.c, mini.h: Moved get_object_generic_inst(),
2123         construct_object_context_for_method() and
2124         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
2126 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
2128         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
2129         basic block fell through to its successor bblock without a branch. Fixes
2130         #474718.
2132         * iltests.il.in: Add a test.
2133         
2134         * aot-compiler.c (encode_method_ref): Encode methods of array types.
2135         (can_encode_patch): We can now handle arrays of generic parameters and
2136         array methods.
2138         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
2140         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
2141         the AOT file to avoid some #ifdefs in aot-runtime.c
2143         * mini.h: Bump AOT file format version.
2145 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
2147         * Makefile.am (fullaotcheck): Make this run the tests.
2149         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
2151 2009-02-10  Mark Probst  <mark.probst@gmail.com>
2153         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
2154         individually.  Fixes #473482.
2156 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
2158         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2160 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
2162         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
2163         (mono_compile_assembly): Hush compile warnings about
2164         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
2165         code path.
2167 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
2169         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
2171         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
2173         * aot-compiler.c: Fix arm support.
2175         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
2176         img_writer_emit_unset_mode () function.
2178         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
2179         (mono_unwind_get_dwarf_pc_reg): Ditto.
2181         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
2182         Move almost all platform specific code to a set of arch_ functions, 
2183         and document them to ease porting.
2184         
2185         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
2187         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
2189         * aot-compiler.c: Extract the image writing functionality into a separate
2190         module to reduce the size of this file.
2192 2009-02-09  Geoff Norton  <gnorton@novell.com>
2194         * mini-s390.c: Fix the signature of emit_sig_cookie.
2196 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
2198         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
2200         * aot-runtime.c (is_shared_got_patch): Ditto.
2202         * aot-runtime.c (load_named_code): Cope with the fact that 
2203         decode_got_entry () won't decode the patch fully if its corresponding got
2204         entry is already filled.
2205         
2206         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
2207         Initialize *ji.
2208         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
2210         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
2211         as the moving pointer instead of 'buf' for consistency with the rest of the
2212         codebase.
2213         (mono_arch_create_monitor_exit_trampoline): Ditto.
2215         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
2216         generic_class_init trampolines.
2217         (add_generic_class): Extract some code from add_generic_instances () into a
2218         separate function so it can be called from other places too.
2219         (compile_method): Call add_generic_class () for the classes of inflated methods
2220         referenced by the method.
2221         (can_encode_patch): Allow references to generic parameters.
2223         * aot-runtime.c: Add support the patches required by the new trampolines.
2224         
2225         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
2226         support.
2228         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
2229         full-aot support.
2231         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
2232         this from get_throw_pending_exception, make the signature full aot compatible.
2234         * Makefile.am (fullaotcheck): New target to run full-aot tests.
2236         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
2238         * exceptions.cs: Add a test.
2240 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
2242         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
2243         use the DWARF_DATA_ALIGN constant instead.
2245         * exception-<ARCH>.c: Update after the above change.
2247         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
2248         dwarf unwinder.
2250         * mini-arm.c: Enable the dwarf unwinder.
2252         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
2253         instead of mono_class_setup_vtable ().
2255 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
2257         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
2258         dwarf unwinder.
2260         * mini-x86.h: Enable the dwarf unwinder.
2262 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
2264         Fix mcs/tests/test-7.cs
2265         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
2266         2009-02-03.
2268 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
2270         * mini.c (print_jit_stats): Remove some unused statistics.
2272 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
2274         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
2276 2009-02-05  Mark Probst  <mark.probst@gmail.com>
2278         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
2279         the method we get from mono_object_get_virtual_method() because
2280         that function does it properly, now.
2282 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
2284         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
2285         opcodes. Fixes #472775.
2287 2009-02-05  Mark Probst  <mark.probst@gmail.com>
2289         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
2290         fact that mono_find_jit_info() sometimes returns the context
2291         corresponding to the jit info in new_ctx.  Fixes #472600.
2293 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
2295         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
2296         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
2297         klass->enum_basetype directly.
2299         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
2300         enum subtypes.
2302         * unwind.c: Avoid 0 sized arrays.
2304 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
2306         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
2307         size on systems with 64k pages. Fixes #471389.
2309 2009-02-04  Mark Probst  <mark.probst@gmail.com>
2311         Contributed under the terms of the MIT/X11 license by Steven
2312         Munroe <munroesj@us.ibm.com>.
2314         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
2315         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
2316         necessary.
2318 2009-02-04  Mark Probst  <mark.probst@gmail.com>
2320         Contributed under the terms of the MIT/X11 license by Steven
2321         Munroe <munroesj@us.ibm.com>.
2323         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
2324         comparison fix.
2326         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
2327         The trampoline can be longer on PPC64.
2329 2009-02-04  Mark Probst  <mark.probst@gmail.com>
2331         Contributed under the terms of the MIT/X11 license by Steven
2332         Munroe <munroesj@us.ibm.com>.
2334         * mini-ppc.c: Compiler warning fixes and trivial code
2335         simplifications.
2337 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
2339         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
2340         ins->dreg which could be a hardware register, not a vreg.
2342         * aot-compiler.c (emit_method_dwarf_info): Ditto.
2343         
2344         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
2345         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
2347         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
2348         
2349         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
2350         ->dreg, that is not the vreg we are looking for.
2352         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
2354         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
2355         LIVERANGE_END.
2357         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
2358         strange crashes.
2360 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
2362         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
2364         * aot-compiler.c (emit_line_number_info): Fix line number emission when
2365         the line diff is 0.
2367         * aot-compiler.c: Add xdebug support on x86.
2369         * unwind.c: Add x86 support.
2370         
2371         * aot-compiler.c (emit_exception_debug_info): Control the emission of
2372         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
2374         * mini.c (mini_method_compile): Ditto.
2375         
2376         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
2377         the variable index.
2379         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
2380         which mimic .push_section/.pop_section in GAS.
2381         
2382         * aot-compiler.c: Emit precise live range information for variables.
2384         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
2386         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
2387         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
2388         them.
2390         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
2391         the live ranges of variables.
2393         * mini.h (struct MonoMethodVar): Add two fields containing the live range
2394         of the variable in terms of native offsets.
2396 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
2398         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
2399         
2400 2009-02-02  Mark Probst  <mark.probst@gmail.com>
2402         Contributed under the terms of the MIT/X11 license by Steven
2403         Munroe <munroesj@us.ibm.com>.
2405         * exceptions-ppc.c (restore_regs_from_context): Correct operand
2406         order (offset then base reg) for ppc_load_multiple_regs.
2407         (emit_save_saved_regs) Correct operand order for
2408         ppc_store_multiple_regs.
2409         (mono_arch_get_call_filter): Correct operand order for
2410         ppc_load_multiple_regs.
2412         * mini-ppc.c (emit_memcpy): Fix operand order for
2413         ppc_load_reg_update and ppc_store_reg_update.
2414         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
2415         (mono_arch_emit_epilog): Correct operand order for
2416         ppc_load_multiple_regs.
2418         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
2419         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
2421 2009-02-02  Mark Probst  <mark.probst@gmail.com>
2423         * cpu-ppc64.md: Fixed storer4_memindex length.
2425 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
2427         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
2428         line number info.
2429         
2430         * aot-compiler.c (emit_line_number_info): Optimize this.
2432 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
2434         * aot-compiler.c: Disassemble tokens in the IL disassembly.
2435         
2436         * aot-compiler.c: Add debug info for methods without debug info by
2437         emitting an IL file and having the line number info referencing that file.
2439         * aot-compiler.c: Optimize the size of the generated line number info.
2441         * aot-compiler.c: Emit line number info in xdebug mode.
2443         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
2444         million arguments.
2446 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
2448         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
2450         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
2451         is used.
2453 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
2455         * basic-calls.cs: Test for the weird crash found on arm.
2456         
2457 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
2459         * cpu-arm.md: Increase the size of storer8_membase_reg and
2460         loadr8_membase_reg to 24 bytes to accomodate the extra add.
2462         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
2463         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
2464         reg to LR otherwise we'll be loading/storing from just the offset.
2466 2009-01-30  Miguel de Icaza  <miguel@novell.com>
2468         Question: if we are storing gint32's inside the "*native_offset",
2469         should we change the signature to "gint32 *native_offset" to
2470         ensure that we do not have type definition problems?
2471         
2472         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
2473         an int * as this is what the other function expects, causes
2474         problems with Freescale's compiler that defined int32_t to be a
2475         long and makes int incompatible 
2477 2009-01-30  Miguel de Icaza  <miguel@novell.com>
2479         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
2480         filename conflict with bjam.
2482 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
2484         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
2485         as it might use decomposed ops.
2487 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
2489         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
2491         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
2492         is defined.
2494         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
2496         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
2497         offsets.
2499         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
2500         way registers are stored in MonoContext on arm.
2502         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
2503         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
2505         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
2507         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
2509         * mini.c (mini_init): Register mono_isfinite.
2511         * jit-icalls.c (mono_isfinite): New jit icall.
2513         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
2514         
2515         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
2516         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
2517         the parent frame.
2519 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
2521         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
2522         separate frame and stack pointers, so we must use FP to find the register
2523         spill area.
2524         The FP reg is retrieved from the MonoContext::regs array.
2526 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
2528         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
2529         as FPA requires it.
2531 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
2533         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
2534         return R4 and R8 when not running under softfloat.
2536         Fixes basic-calls.exe
2538 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
2540         * mini-arm.c: Implement some overflow opcodes.
2542 2009-01-29  Miguel de Icaza  <miguel@novell.com>
2544         * ssa.c: handle another alloca.h
2546         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
2547         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
2548         MONO_ARCH_USE_SIGACTION. 
2550         * aot-runtime.c, mini-exceptions.c: Replace platform define with
2551         capability defines.
2553         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
2555         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
2556         PPC targets as sigaction does not exist on all platforms, define
2557         this on a per-platform basis.
2559         Instead of erroring out if the platform is not defined, include
2560         mini-ppc-os.h, and expect that the OS specific setting provides
2561         the required information.   
2563 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
2565         * aot-compiler.c: Fix --enable-minimal=aot.
2567 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
2569         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
2570         previous change.
2572 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
2574         * exceptions-arm.c: Fix warnings.
2576         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
2577         ARM.
2579         * mini-x86.c: Fix --enable-minimal=jit build.
2581         * mini.c: Really fix --enable-minimal=jit build.
2582         
2583         * mini.c (construct_object_context_for_method): Move this outside
2584         the DISABLE_JIT block to fix the --enable-minimal=jit build.
2586         "Backported" of r124984 from 2.0 branch.
2587         
2588         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
2590         "Backport" of r124977 + r124978 from 2.0 branch.
2591         
2592         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
2593         to avoid calling mono_exception_from_token () from the throw trampoline.
2594         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
2595         for throwing corlib exceptions, this fixes full-aot support for corlib
2596         exceptions.
2598         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
2600 2009-01-29  Miguel de Icaza  <miguel@novell.com>
2602         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
2603         part of the changes to split the code in mini into operating
2604         system specific files.
2606         This patch was done by copying mini.c to the respective files to
2607         preserve SVN history.
2609 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
2611         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
2613 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
2615         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
2616         remoting-invoke-with-check wrappers of shared methods.
2618         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
2620 2009-01-27  Mark Probst  <mark.probst@gmail.com>
2622         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
2623         optimization if the top of stack is the last instruction in the
2624         bblock.  Otherwise it might have been used after its definition.
2625         Fixes #469742.
2627 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
2629         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
2630         method as well when get_vcall_slot () fails to match a code sequence.
2632         * mini-arm.c: Fix the android build, which doesn't have
2633         __aeabi_read_tp.
2635 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
2637         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
2638         the s390x build.
2640 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
2642         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
2644 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
2646         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
2647         and put its id into jinfo->used_regs. This is only used on amd64,
2648         which is currently the only platform generating unwind info.
2650         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
2651         the dwarf unwinder. This is required to correctly handle async exceptions
2652         like thread abort and stack overflows, which can happen while a method
2653         is in the middle of its prolog or epilog.
2654         
2655         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
2656         the unwind info belonging to an AOTed method.
2658         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
2659         into cfg->unwind_ops.
2660         
2661         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
2663         * mini.c (mini_init): Call mono_unwind_init ().
2664         (mini_cleanup): Call mono_unwind_cleanup ().
2666         * unwind.c: Add functions for managing a set of unwind info entries, allowing
2667         unwind info to be shared between methods.
2669         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
2670         saved in the LMF.
2672         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
2673         get_throw_pending_exception () to avoid initialization races.
2675         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
2676         mono_arch_exceptions_init () function.
2678         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
2680 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
2682         * mini.c (mono_get_domain_intrinsic): New helper function.
2683         (mono_get_thread_intrinsic): Ditto.
2685         * mini-arm.c mini-ia64.c: Use the new helper functions.
2686         
2687         * method-to-ir.c (mono_method_to_ir): Fix the comment for
2688         the last constrained_call change, since it is needed in the non-AOT
2689         case as well.
2691         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
2692         
2693         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
2694         mono_get_lmf_addr () on arm eabi linux.
2696 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
2698         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
2699         code sequence which matches a non-virtual call.
2701 2009-01-23  Mark Probst  <mark.probst@gmail.com>
2703         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
2704         stack pointer (r1).
2706 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
2708         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
2709         runtime-invoke wrappers, since they are also shared based on signature.
2711 2009-01-22  Mark Probst  <mark.probst@gmail.com>
2713         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
2714         info from the (correct) context.
2716 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
2718         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
2719         
2720         * unwind.c (mono_unwind_frame): New function to unwind through a frame
2721         using dwarf unwinding info. Not yet used.
2723         * mini.c (mini_init): When using xdebug, disable freeing of domains.
2725 2009-01-21  Mark Probst  <mark.probst@gmail.com>
2727         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
2728         descriptors.
2730         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
2731         special case and handle mono_arch_delegate_invoke_impl() returning
2732         function descriptors.
2734         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
2735         trampolines return function descriptors, too.
2737 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
2739         * method-to-ir.c (handle_alloc): Avoid generic instances in the
2740         out_of_line optimization.
2742 2009-01-21  Martin Baulig  <martin@ximian.com>
2744         * mini.h
2745         (MonoCompile): Added `disable_deadce_vars' to disable removing
2746         unused variables.
2748         * mini.c
2749         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
2750         inside the debugger.
2752         * liveness.c (mono_analyze_liveness): Don't remove any unused
2753         variables if `cfg->disable_deadce_vars' is set.
2755 2009-01-21  Mark Probst  <mark.probst@gmail.com>
2757         * method-to-ir.c: Only apply exception constructor optimization if
2758         the the method actually belongs to an exception class.  Fixes
2759         #467456.
2761 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
2763         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
2764         change inside a #ifdef __mono_ppc64__.
2766         * aot-compiler.c (compile_method): Remove the previous limitation.
2768         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
2769         on type variables in AOTed code.
2770         
2771         * aot-compiler.c (compile_method): Skip generic methods having type 
2772         constraints on their generic parameters.
2774         * aot-compiler.c (compile_method): Check for methods which cannot be
2775         encoded inside RGCTX_FETCH patches as well.
2777         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
2778         build.
2780 2009-01-20  Mark Probst  <mark.probst@gmail.com>
2782         * method-to-ir.c: Force the vtable variable in shared generic code
2783         for the case that they might show up on a stack trace where they
2784         are needed.
2786         * mini-exceptions.c: Save and use generic sharing info as well as
2787         IP in stack traces to resolve shared generic instantiations.
2789 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
2791         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
2792         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
2794 2009-01-20  Mark Probst  <mark.probst@gmail.com>
2796         * method-to-ir.c: Do generic sharing for array constructors.
2798 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
2800         * mini-exceptions.c (mono_print_thread_dump): Add information
2801         about the thread state using wapi_current_thread_desc.
2803 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
2805         * basic-simd.cs: Tests for the new constructors. 
2807 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
2809         * mini-ops.h: Added OP_EXPAND_*
2811         * cpu-x86.md: Same.
2813         * mini-x86.c (mono_arch_output_basic_block): Same.
2814         
2815         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
2817 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
2819         * iltests.il.in: Add a test for #467385.
2821 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
2823         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
2824         thread been cleaned up is not the same currently in execution.
2826         Fixes appdomain-unload crashes on windows, osx and linux variants
2827         without the __thread keyword.
2829 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
2831         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
2832         (koush@koushikdutta.com). Implement this for android.
2834         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
2835         begins with a digit.
2837         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
2838         mono_marshal_get_write_barrier ().
2840 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
2842         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
2843         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
2844         that pass them on a register pair.
2846         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
2847         test was crashing due to that.
2849 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
2851         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
2852         trampoline code. Include ucontext.h only if available.
2854 2009-01-15  Mark Probst  <mark.probst@gmail.com>
2856         * mini.c: mono_domain_lookup_shared_generic() takes an open method
2857         and doesn't check whether it's sharable, like it was before
2858         removing the shared generics hash.  This brings IronPython
2859         performance back to what it was before that change.
2861 2009-01-14  Mark Probst  <mark.probst@gmail.com>
2863         * method-to-ir.c: Handle delegate invocation optimization earlier,
2864         otherwise it would be handled (much more slowly) by the
2865         final/sealed optimization.
2867 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
2869         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
2870         domain is not set. Fixes #465864.
2872 2009-01-12  Mark Probst  <mark.probst@gmail.com>
2874         * method-to-ir.c: Don't stop sharing of generic methods with catch
2875         clauses - we already handle those.
2877 2009-01-12  Mark Probst  <mark.probst@gmail.com>
2879         * mini.c, mini.h: lookup_generic_method() is now
2880         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
2881         making the shared_generics_hash obsolete.
2883 2009-01-12  Mark Probst  <mark.probst@gmail.com>
2885         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
2886         use the red zone.  Make room on the stack first and then use it,
2887         not the other way around.
2889 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
2891         * mini.c (mini_init): Call mono_xdebug_init ().
2893         * aot-compiler.c (mono_xdebug_init): Make this non-static.
2895 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
2897         * TestDriver.cs: Add an --iter argument to run tests multiple times.
2899         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
2900         trampolines.
2902         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
2903         debug+unwind info for trampolines.
2905         * mini.c (mono_create_unwind_op): New helper function.
2907         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
2909 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
2911         * aot-compiler.c: Fix the build.
2913 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
2915         * Makefile.am: Update dtrace-prelink.sh location.
2917 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
2919         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
2920         optimization. Fixes #464520.
2922 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
2924         * mini-amd64.c : Adding code to save/restore non-volatile registers
2925            on Winx64.
2927         * exceptions-amd64.c : Adding code to save/restore non-volatile 
2928           registers on Winx64.
2930         Contributed under MIT/X11 license.
2932 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
2934         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
2935         __GNUC_MINOR__ which can break when the major version changes.
2937 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
2939         * basic-simd.cs: Add tests for usage of the sizeof opcode.
2941 2009-01-07  Geoff Norton  <gnorton@novell.com>
2943         * helpers.c:  Allow mono -v -v -v to work on darwin.
2945 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
2947         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
2948           pattern. 
2950         Contributed under MIT/X11 license.
2952 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
2954         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
2955         instead of directly accessing type->data.klass. Fixes #462016.
2956         (mono_allocate_stack_slots_full): Ditto.
2958         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
2959         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
2961         * aot-compiler.c (emit_plt): Fix ARM build.
2963 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
2965         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
2966         
2967         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
2968         change.
2970         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
2971         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
2972         #463357.
2974         * iltests.il.in: Add a regression test.
2976 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2978         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
2980 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2982         * basic-simd.cs: Add a regression test for #462457.
2984 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2986         * mini-ops.h: Add a definition of XPHI.
2988         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
2990         * ssa.c (op_phi_to_move): Handle XPHI.
2992         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
2994         Fixes #462457
2996 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2998         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
3000 2008-12-31  Geoff Norton  <gnorton@novell.com>
3002         * mini-ppc.c: The prolog size allocated can be too small for darwin
3003         ppc32 under certain circumstances.  Also fix a small logic bug.
3005 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
3007         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
3008         while loading AOT methods.
3010         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
3011         since only the former is nulled out after a successful cast. This prevents
3012         crashes with rethrown exceptions when using --debug=casts.
3014 2008-12-24  Mark Probst  <mark.probst@gmail.com>
3016         * mini.h: New macro for checking whether a method is final,
3017         i.e. whether the method or its class is marked final.
3019         * method-to-ir.c: Use the new macro for all final-checks
3020         consistently.  Fixes the crash in the System.ServiceModel tests.
3022 2008-12-23  Mark Probst  <mark.probst@gmail.com>
3024         * mini-exceptions.c (get_exception_catch_class): Corrected another
3025         overly strict assertion.
3027 2008-12-23  Mark Probst  <mark.probst@gmail.com>
3029         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
3030         Clobbering it is not allowed because the caller might use it as
3031         the vtable register in the interface call.
3033 2008-12-19  Mark Probst  <mark.probst@gmail.com>
3035         * mini-exceptions.c (get_exception_catch_class): Corrected an
3036         overly strict assertion.
3038 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
3039         
3040         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
3042         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
3044         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
3046         * cpu-mips.md: correct lengths for certain long_ opcodes.
3048         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
3050         * 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().
3051         
3052 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
3054         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
3055         
3056 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
3057         
3058         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
3059         
3060 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
3062         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
3063         next basic block.
3064         
3065 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
3067         * 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
3069         * 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)
3070         
3071 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
3072         
3073         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
3074         
3075 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
3077         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
3078         gshared code. Fixes #458947.
3080         * generics.cs: Add a test.
3082 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
3083         
3084         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3085         
3086         * mini-mips.c: first pass n32 code generation.
3088         * mini-mips.h: datatypes and defines for n32 support.
3090         * exceptions-mips.c: first pass n32 code generation.
3091         
3092         * tramp-mips.c: first pass n32 code generation.
3093         
3094         * cpu-mips.md: add long_ opcodes.
3095         
3096 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
3098         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3100         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3101         
3102         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3103         
3104         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3106         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3108         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3110         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3112         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3114         * helpers.c: for mips/n32, don't pass -mips32 to objdump
3116 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
3118         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
3120 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
3122         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
3124 2008-12-12  Mark Probst  <mark.probst@gmail.com>
3126         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
3127         descriptors for helper functions directly in front of the code.
3129 2008-12-11  Mark Probst  <mark.probst@gmail.com>
3131         * method-to-ir.c: Removed an unnecessary assertion.
3133 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
3135         * method-to-ir.c: Merge SGEN changes from the old JIT.
3137 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
3139         * driver.c (compile_all_methods_thread_main): Handle failure of
3140         mono_get_method ().
3142 2008-12-10  Mark Probst  <mark.probst@gmail.com>
3144         * mini-ppc.c: Merged with mini-ppc64.c.
3146         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
3148         * Makefile.am: Use the same sources for PPC and PPC64.
3150         * mini-ppc64.c: Removed.
3152 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
3154         * branch-opts.c (remove_block_if_useless): Extract fall through detection
3155         code to mono_bb_is_fall_through.
3156         
3157         * branch-opts.c (mono_remove_critical_edges): Same.
3159 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
3161         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
3162         expect that an OP_BR_REG will be there.
3164 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
3166         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
3167         for the many branch ops. The original check miss OP_BR_REG.
3169         Fixes #457574.
3170         
3171 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
3173         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
3175 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
3177         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
3178         while holding the aot lock.
3180 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
3182         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
3183         
3184 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
3186         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
3187           to release all runtime callable wrappers held by the runtime.
3189         Contributed under MIT/X11 license.
3191 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
3193         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
3194           for Winx64.
3196         Contributed under MIT/X11 license.
3198 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
3200         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
3201         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
3203 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
3205         * cpu-mips.md: fix ckfinite length
3207         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
3208         (mono_arch_lowering_pass): cleanup, rearrange for clarity
3209         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
3210         
3211 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
3213         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
3214         
3215 2008-12-08  Geoff Norton  <gnorton@novell.com>
3217         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
3218         size by 8 bytes as well.
3220 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
3222         * basic-simd.cs: Fix method names for Vector16b.
3223         
3224 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
3226         * basic-simd.cs: Fix method names for Vector16sb.
3228 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
3230         * basic-simd.cs: Fix method names for Vector8us.
3231         
3232 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
3234         * basic-simd.cs: Fix method names for Vector8s.
3235         
3236 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
3238         * basic-simd.cs: Fix method names for Vector4ui.
3240 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
3242         * basic-simd.cs: Fix method names for Vector2l.
3244 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
3246         * basic-simd.cs: Fix method names for Vector2d.
3248 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
3250         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
3251         that are extension methods.
3253 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
3255         * basic-simd.cs: Fix method names for Vector4f.
3257 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
3259         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
3260         as such. Fixes #456669.
3262 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
3264         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
3265         
3266 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
3268         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
3269         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
3270         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
3271         (mips_adjust_stackframe): handle FP spills
3272                 
3273         * mini-ops.h: add mips_mtc1_s2
3274         
3275         * cpu-mips.md: add mips_mtc1_s2
3276         
3277 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
3279         * unwind.c: New file, move the unwind info encoding functions here from
3280         aot-compiler.c, so they could be used at runtime too.
3282 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
3284         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
3285         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
3286         
3287 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
3289         * mini-mips.c: cleanup warnings
3290         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
3291         (mips_adjust_stackframe): handle case of taking the address of stack locals
3292         
3293 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
3295         * aot-compiler.c: Implement a few functions missing from the asm writer.
3296         (emit_method_code): Only write symbols for methods when using the bin
3297         writer, since the assembler can't deal with the characters in our method
3298         names.
3300         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
3302         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
3303         call.
3305         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
3306         a bit to also restore %rax.
3308 2008-12-05  Mark Probst  <mark.probst@gmail.com>
3310         * mini-ppc.c: Some simple merges from mini-ppc64.c.
3312 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
3314         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
3315         arguments.
3317 2008-12-05  Mark Probst  <mark.probst@gmail.com>
3319         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
3321         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
3322         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
3324         * exceptions-ppc64.c: Removed.
3326         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
3328 2008-12-05  Mark Probst  <mark.probst@gmail.com>
3330         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
3331         tramp-ppc64.c.
3333         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
3335         * tramp-ppc64.c: Removed.
3337 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
3339         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
3340         the TYPESPEC table.
3342 2008-12-05  Mark Probst  <mark.probst@gmail.com>
3344         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
3346         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
3347         mini-ppc.h instead of mini-ppc64.h.
3349         * mini-ppc64.h: Removed.
3351 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
3353         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
3354         
3355         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
3356         
3357 2008-12-05  Mark Probst  <mark.probst@gmail.com>
3359         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
3360         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
3361         code easier.
3363 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
3365         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
3367 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
3369         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
3371 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
3373         * basic-simd.cs: Tests for operator == and != on Vector4f.
3375 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
3377         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
3379         * simd-intrinsics.c: Kill useless enum.
3381 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
3383         * cpu-mips.md: add long_conv_to_ovf_i4_2
3384         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
3386 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
3388         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
3389         
3390         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
3392 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
3394         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
3395         
3396 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
3398         * basic-simd.cs: Add tests for new methods.
3400 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
3402         * simd-intrinsics.c: Add support for operator == and !=
3403         on Vector4(u)i.
3405         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
3407 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
3409         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
3411 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
3413         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
3415         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
3416         MONO_PATCH_INFO_ICALL_ADDR.
3418         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
3420         * aot-compiler.c: Resurrect full-aot support.
3422 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
3424         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
3425         
3426 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
3428         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
3429         
3430 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
3432         * basic-simd.cs: Fix tests to work under ppc.
3433         Remove tests for methods that will be removed.
3435 2008-12-03  Mark Probst  <mark.probst@gmail.com>
3437         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
3438         generic type (via a typedef or typeref) correctly.
3440 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
3442         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
3443         diagnose an assertion failure.
3445 2008-12-02  Mark Probst  <mark.probst@gmail.com>
3447         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
3448         Fix trampoline size.
3450         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
3451         conversion opcodes are implemented natively instead via emulation.
3453 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
3455         * cpu-mips.md: remove mips_xori
3457         * mini-ops.h:  remove mips_xori
3459         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
3461         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
3462         
3463         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
3464         
3465 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
3467         * cpu-mips.md: fix instruction lengths.
3469         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
3471         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
3473         * mini-ops.h: fix slti / sltiu op profiles.
3474         
3475 2008-12-02  Martin Baulig  <martin@ximian.com>
3477         * method-to-ir.c (mono_method_to_ir): Disable debugging
3478         information for the init locals block to make the debugger stop
3479         after all locals have been initalized.
3481 2008-12-02  Martin Baulig  <martin@ximian.com>
3483         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
3484         running inside the debugger.
3486 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
3488         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
3489         is enabled.
3491         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
3492         alu->alu imm optimization which only shows if deadce is disabled.
3494         * aot-compiler.c: Rename the function names for the binary and asm writers
3495         so they can coexist in the same process. Rework the xdebug code to use the
3496         asm writer. This avoids the need to call into the runtime to dump the
3497         debugging info. Add more debugging info for types.
3499         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
3501         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
3502         cpu description tables, they can't occur in cpu-<ARCH>.md.
3504         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
3505         the stack in CEE_LDFLDA. Fixes #450542.
3507         * generics.cs: Add a new test.
3509 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
3511         * mini-ops.h: updated MIPS opcodes
3512         * mini-mips.c: decompose long opts
3513         * mini-mips.h: decompose long opts
3514         
3515 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
3517         * cpu-mips.md: fix length on int_rem_un
3518         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
3519         
3520 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
3522         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
3524         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
3526 2008-11-29  Martin Baulig  <martin@ximian.com>
3528         * mini-exceptions.c (mono_handle_native_sigsegv): Check
3529         mono_debug_using_mono_debugger() in addition to the
3530         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
3532 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
3534         * mini-ops.h: updated more MIPS opcodes
3535         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
3536         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
3537         
3538 2008-11-28  Mark Probst  <mark.probst@gmail.com>
3540         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
3542 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
3544         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
3545         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
3546         * mini-ops.h: correct selected mips opcode entries
3547         
3548 2008-11-28  Mark Probst  <mark.probst@gmail.com>
3550         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
3551         make them work.
3553 2008-11-28  Mark Probst  <mark.probst@gmail.com>
3555         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
3557 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
3559         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
3560         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
3561         * mini-mips.h: disable IMT
3562         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
3563         
3564 2008-11-28  Mark Probst  <mark.probst@gmail.com>
3566         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
3568 2008-11-28  Mark Probst  <mark.probst@gmail.com>
3570         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
3572 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
3574         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
3575         consistency.
3577 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
3579         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
3580         for Set/GetVector aligned versions.
3582 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
3584         * basic-simd.cs: Add tests for Get/SetVector.
3586 2008-11-27  Mark Probst  <mark.probst@gmail.com>
3588         * mini.c: Removed g_slist_append_mempool().  Now in
3589         metadata/mempool.c.
3591 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
3593         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
3594         size properly and make the bounds check optional.
3596         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
3597         for SetVector and IsAligned.
3599 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
3601         * mini.c: Remove unused mono_normalize_opcodes () function.
3603 2008-11-26  Mark Probst  <mark.probst@gmail.com>
3605         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
3606         using the new atomic add ops now.
3608         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
3609         add.
3611 2008-11-26  Mark Probst  <mark.probst@gmail.com>
3613         * mini-ppc64.c: Several fixes.
3615 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
3617         * cpu-mips.md: added jump_table
3618         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
3620 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
3622         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
3624 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
3626         * mini-ops.h: corrected a handful of MIPS opcodes.
3628 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
3630         * aot-compiler.c: MIPS to use ELF writer
3632 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
3634         * mini-codegen.c: remove MIPS specific assert.
3636 2008-11-25  Mark Probst  <mark.probst@gmail.com>
3638         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
3639         fixes.  PPC64 now passes most of the runtime regressions.
3641 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
3643         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
3644         volatile intervals a bit.
3646 2008-11-24  Mark Probst  <mark.probst@gmail.com>
3648         * basic-long.cs: New test case.
3650 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
3652         * mini.c (mini_method_compile): Disable globalra for large methods for 
3653         now.
3655         * regalloc2.c (order_moves): Add fp support.
3657         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
3658         source bblock ends with an OP_BR_REG.
3660         * ratests.cs: Add a new test.
3662 2008-11-23  Mark Probst  <mark.probst@gmail.com>
3664         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
3665         sharing.  PPC64 now passes generics.exe.
3667 2008-11-23  Mark Probst  <mark.probst@gmail.com>
3669         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
3671 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
3673         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
3674         memory when mono_jit_info_table_find () can't find the method in the
3675         LMF case.
3677         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
3678         AOTed code too.
3679         
3680         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
3681         writer too.
3683 2008-11-23  Mark Probst  <mark.probst@gmail.com>
3685         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
3686         Several fixes.  PPC64 now runs exceptions.exe and
3687         devirtualization.exe.
3689 2008-11-22  Mark Probst  <mark.probst@gmail.com>
3691         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
3692         arrays.exe and basic-math.exe.
3694 2008-11-22  Mark Probst  <mark.probst@gmail.com>
3696         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
3697         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
3699 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
3701         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
3703 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
3705         * method-to-ir.c: Move bounds checking macros to ir-emit.h
3707         * ir-emit.h: Move macros from method-to-ir.c to here.
3709 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
3711         * mini-ops.h: Correct the long simd ops to use LREG.
3713 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
3715         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
3716         
3717         * mini-ops.h: Correct the dreg type of a few long opcodes.
3719         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
3720         Add netbsd support.
3722 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
3724         * mini-ppc.c: remove negative stack references in epilog
3725         for platforms that don't support the red zone.
3727 2008-11-21  Mark Probst  <mark.probst@gmail.com>
3729         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
3730         point regs.  Now PPC64 passes basic-calls.exe.
3732 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3734         * basic-simd.cs: Add tests for accessors of Vector2l.
3736 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3738         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
3740         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
3741         
3742         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
3744 2008-11-21  Mark Probst  <mark.probst@gmail.com>
3746         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
3747         PPC64 passes basic-long.exe.
3749 2008-11-20  Mark Probst  <mark.probst@gmail.com>
3751         * decompose.c: Decompose carry and overflow add on PPC64 like on
3752         other 64 bit archs.  Don't decompose sub at all on PPC64.
3754         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
3755         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
3756         basic-long.exe.
3758 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3760         * basic-simd.cs: Add tests for accessors of Vector2d.
3762 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3764         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
3766         * cpu-x86.md: Same.
3768         * mini-x86.c (mono_arch_output_basic_block): Same.
3769         
3770         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
3772 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3774         * basic-simd.cs: Add tests for accessors of Vector4f.
3776 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3778         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
3780         * cpu-x86.md: Same.
3782         * mini-x86.c (mono_arch_output_basic_block): Same.
3783         
3784         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
3786 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3788         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
3790 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3792         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
3794         * cpu-x86.md: Same.
3796         * mini-x86.c (mono_arch_output_basic_block): Same.
3797         
3798         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
3800 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3802         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
3804 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3806         * simd-intrinsics.c: Enable setters for Vector16sb.
3808 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
3810         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
3812         * cpu-x86.md: Same.
3814         * mini-x86.c (mono_arch_output_basic_block): Same.
3815         
3816         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
3818 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
3820         * simd-intrinsics.c: Implement setter for Vector8us.
3822 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
3824         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
3825         for dead variables.
3827 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
3829         * mini-ppc.c: remove references to the red zone in the prolog
3830         (for systems that don't support it).
3832 2008-11-19  Mark Probst  <mark.probst@gmail.com>
3834         * cpu-ppc64.md: Fixed a few instruction lengths.
3836         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
3837         now.
3839 2008-11-19  Mark Probst  <mark.probst@gmail.com>
3841         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
3842         basic.exe now.
3844 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
3846         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
3848 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
3850         * mini-ops.h: Added OP_INSERT_I2.
3852         * cpu-x86.md: Same.
3854         * mini-x86.c (mono_arch_output_basic_block): Same.
3855         
3856         * simd-intrinsics.c: Implement setter for Vector8s.
3858         * simd-methods.h: Add the names of get setters of Vector8s.
3860 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
3862         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
3863         
3864         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
3865         parameters.
3867         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
3869 2008-11-18  Mark Probst  <mark.probst@gmail.com>
3871         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
3872         for PPC64.  An empty program runs now.
3874 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
3876         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
3878         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
3879         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
3880         info for JITted code is emitted into a shared library, loadable into gdb.
3882 2008-11-18  Mark Probst  <mark.probst@gmail.com>
3884         * Makefile.am: Changes to build PPC64.
3886         * mini-arch.h: Include mini-ppc64.h on PPC64.
3888 2008-11-18  Mark Probst  <mark.probst@gmail.com>
3890         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
3891         in PPC code up to r119147.
3893 2008-11-18  Mark Probst  <mark.probst@gmail.com>
3895         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
3896         cpu-ppc64.md: Changes for PPC64.
3898         Based on code submitted by andreas.faerber@web.de at
3899         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
3900         X11/MIT license.
3902 2008-11-18  Mark Probst  <mark.probst@gmail.com>
3904         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
3905         cpu-ppc64.md: Copied from the corresponding PPC files from
3906         r118846.
3908 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
3910         * mini-ops.h: Added OP_ROUND.
3912         * cpu-x86.md: Added round.
3914         * mini-x86.c: Added support for intrinsicing Math.Round (double).
3916         * basic-math.cs: Added test_0_round to test rounding.
3918         Contributed under MIT/X11 license.
3920 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
3922         * aot-compiler.c : Fix the Winx64 build.
3924         Contributed under MIT/X11 license.
3926 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
3928         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
3929         in OP_EXTRACT_R8 to avoid possible stack corruption.
3931 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
3933         * mini-ops.h: Added OP_EXTRACT_R8/I8.
3935         * cpu-x86.md: Added extract_r8.
3937         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
3938         
3939         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
3940         a couple of OP_EXTRACT_I4.
3942         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
3944         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
3946 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
3948         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
3949         and not 4.1. 
3951 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
3953         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
3954         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
3956         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
3957         are not needed any more.
3959         * mini.h: Remove the unused INS_LIST macros.
3961         * mini.c (mini_method_compile): Remove a disable globalra case which is no
3962         longer needed.
3964         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
3965         ir-emit.h.
3967         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
3968         mono_alloc_ireg () instead.
3970         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
3971         macros.
3973         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
3974         on amd64.
3976         * aot-runtime.c (load_aot_module): Disable AOT when running under
3977         CAS.
3979         * mini-amd64.h: Change the monitor fastpath defines to check for
3980         !PLATFORM_WIN32 so they work on *bsd too.
3982         * mini.h mini.c mini-hhpa.c: Remove more unused code.
3984         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
3986         * mini.h (MonoCompile): Remove new_ir flag.
3988         * regalloc.h regalloc.c: Remove unused code.
3990         * cpu-*.md: Remove more unused opcodes.
3992         * simple-cee-ops.h simple-mini-ops.h: Removed.
3994         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
3995         
3996 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
3998         * aliasing.h: Removed.
4000         * *.c: Remove references to aliasing.h and inssel.h.
4002         * mini.c: Remove additional unused functions.
4004         * mini-ops.h cpu-*.md: Remove unused opcodes.
4006 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
4008         Remove the old JIT code.
4010         * inssel*.brg: Removed.
4012         * ssa.c abcremoval.c aliasing.c: Removed.
4014         * ssa2.c: Renamed to ssa.c.
4016         * abcremoval2.c: Renamed to abcremoval.c.
4018         * *.c: Removed all !cfg->new_ir code.
4020         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
4021         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
4023         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
4024         
4025 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
4027         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
4028         to simplify the code and cut back on the number of global symbols in the AOT
4029         file.
4030         
4031         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
4033 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
4035         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
4036         with the got/got_info tables.
4038         * mini.h: Bump AOT file format version.
4039         
4040         * unwind.h: New file, contains definitions for stack unwinding.
4042         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
4043         to cfg->unwind_ops.
4044         
4045         * aot-compiler.c: Generalize the emitting of unwind information to use the
4046         information in cfg->unwind_ops.
4048         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
4050         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
4051         AOT method frames. Enable writing symbols for methods by default.
4053 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
4055         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
4056         and make it work with vectors of element sizes 1, 2 and 4.
4058         * simd-intrinsics.c: Enable getter for all vectors with element size
4059         1, 2 or 4.
4061         * simd-methods.h: Add the names of other getters.
4063         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
4065         * cpu-x86.md: Same.
4067         * mini-x86.c: Same.
4069 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
4071         * mini-ppc.h: portability fix.
4073 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
4075         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
4076         buggy and will overwrite it.
4078 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
4080         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
4081         Use it to emit local symbols for all methods so AOTed methods show up with
4082         their full name in gdb/valgrind output.
4084 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
4086         * mini-ppc.c: portability fixes.
4088 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
4090         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
4091         entries out of the if (!generic_shared...) code so it is always done.
4092         (mono_class_init_trampoline): Do the patching when running under valgrind
4093         too, newer versions of valgrind have no problems with it.
4095 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
4097         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
4098         further sections.
4100 2008-11-13  Mark Probst  <mark.probst@gmail.com>
4102         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
4103         filters.
4105 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
4107         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
4109 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
4111         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
4113         * cpu-x86.md: Same.
4115         * mini-x86.c: Same.
4117         * simd-intrinsics.c: Same.
4119 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
4121         * simd-intrinsics.c: Enable constructor intrinsics for all types.
4123 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
4125         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
4126         to work with more Vector types.
4128 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
4130         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
4131         store the elemens directly instead of using and intermediate.
4133 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
4135         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
4137         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
4138         to preserve %eax for aot plt trampolines.
4140         * aot-compiler.c (compile_method): Don't skip synchronized methods.
4141         (encode_method_ref): Flag synchronized methods so they won't go through
4142         the AOT trampoline.
4144         * aot-compiler.c: Additional work to support AOTing synchronized methods/
4145         wrappers.
4147         * cpu-ia64.md (jmp): Increase max length.
4149 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
4151         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
4152         open generic classes.
4154         * aot-compiler.c: Enable the ELF writer on ELF platforms.
4156         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
4157         box+brtrue optimization since it causes test failures on x86.
4159 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4161         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
4163         * cpu-x86.md: Same.
4165         * mini-x86.c: Same.
4167         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
4168         for simd ctor values. 
4170         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
4171         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
4173 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4175         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
4176         LogicalRightShift.
4178         * simd-instrincs.c: Same.
4180         * basic-simd.cs: Same.
4182 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
4184         * ratests.cs: Add more tests.
4186         * regalloc2.c (add_spill_code): Handle more corner cases.
4188 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
4190         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
4191         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
4192         both the source an destination of an instruction.
4194 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
4196         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
4197         wapihandles.c: more portability changes.
4199 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
4201         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
4202         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
4203         safe to execute in a signal handler and the kernel provides better
4204         the info in /proc/self/smaps. Avoid the assert on sigaction during
4205         cleanup.
4207 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
4209         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
4210         do the bblock linking hack if it is actually needed.
4212         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
4213         up linking.
4215         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
4216         crash problem is fixed.
4218         * branch-opts.c (mono_remove_critical_edges): Link up newly added
4219         bblocks.
4221         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
4222         for catch clauses.
4223         (mini_method_compile): Set the starting value of next_vreg to 
4224         MAX_IREGS + MAX_FREGS when using globalra.
4226         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
4227         filter clauses with BB_EXCEPTION_HANDLER.
4229         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
4231 2008-11-10  Mark Probst  <mark.probst@gmail.com>
4233         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
4234         space for stdcall.  Fixes regressions on Win32.
4236 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
4238         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
4239         bblocks.
4240         (linear_scan): Remove an assert which doesn't seem to be needed.
4242         * local-propagation.c (mono_local_deadce): Avoid a call to
4243         MONO_DELETE_INS which would screw up the instruction linking.
4245         * mini.c (mono_decompose_op_imm): Make this work with globalra.
4247         * regalloc2.c: Upgrade to work the current JIT code.
4249 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
4251         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
4252         case.
4254         * aot-runtime.c: Remove some dead code.
4256         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
4257         consistency.
4258         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
4260         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
4261         trampolines using sscanf since atoi doesn't work on large unsigned values.
4263         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
4264         Initialize code_size.
4266 2008-11-08  Mark Probst  <mark.probst@gmail.com>
4268         * method-to-ir.c (mini_emit_inst_for_method): Make
4269         Interlocked.CompareExchange work for Int arguments on 32 bit
4270         archs, as well.
4272 2008-11-07  Mark Probst  <mark.probst@gmail.com>
4274         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
4276 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
4278         * main.c Fix MSVC build.
4280         Contributed under MIT/X11 license.
4282 2008-11-06  Mark Probst  <mark.probst@gmail.com>
4284         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
4285         alignment larger than 8 bytes are aligned correctly, too.
4287         * mini.c: Honor the min_align field of MonoClass when laying out
4288         the stack.
4290 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
4292         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
4294         * aot-compiler.c (emit_plt): Fix a warning.
4295         
4296         * aot-compiler.c: Implement ARM support in the binary writer.
4298 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4300         * basic-simd.cs: Add test for getter with byref arg.
4301         Fix the naming of a few tests.
4302         Add missing checks to a test.
4304 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
4306         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
4308         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
4309         most of the full-aot support for monitor enter/exit trampolines.
4311         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
4312         enter/exit trampoline creation functions.
4314         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
4315         make dist.
4317 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
4319         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
4320         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
4321         implement the needed functionality without adding crap to the runtime.
4323 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
4325         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
4326         non-x86 builds.
4328         * mini.c (mono_build_date): New global version holding the build date in
4329         string format.
4330         
4331         * Makefile.am (buildver.c): Generate a file containing the build date.
4333         * main.c: Set the build date from the generated file.
4335         * mini.c (mono_get_runtime_build_info): New helper function returning build
4336         information in a string format.
4337         
4338         * driver.c (mono_main): Print the build date in --version.
4340         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
4341         file when the bind-to-runtime-version option is used.
4343 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4345         * simd-intrinsics.c: Fix bug when using getters and byref args. 
4347 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4349         * simd-methods.h: Rename prefetch methods.
4351         * simd-intrinsics.c: Same.      
4353 2008-11-05  Mark Probst  <mark.probst@gmail.com>
4355         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
4356         sizes.
4358 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
4360         * aot-compiler.c: Use the bundled elf header files instead of depending on
4361         the system one.
4362         
4363         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
4364         mempool.
4366         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
4367         on every call.
4369 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
4371         * cpu-x86.md: Add store nta ops.
4373         * mini-ops.h: Same.
4375         * mini-x86.c: Same.
4377         * mini.h: Add an enum for simd prefetch modes.
4379         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
4380         of store. Use the changed code to support store nta.
4382         * simd-intrinsics.c: Add prefetch ops for all vector types.
4384 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
4386         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
4387         threads.
4388         
4389         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
4390         names.
4392         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
4393         trampolines.
4395 2008-11-04  Mark Probst  <mark.probst@gmail.com>
4397         * mini-x86.c: Fixed commit.
4399 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
4401         * aot-compiler.c (emit_plt): Align the plt section only on x86.
4403 2008-11-04  Mark Probst  <mark.probst@gmail.com>
4405         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
4406         and MONITOR_EXIT, for the ASM fastpaths.
4408         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
4409         available.
4411         * mini.c, patch-info.h: Signature and patch infos for
4412         Monitor.Enter/Exit trampolines.
4414         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
4416         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
4417         Monitor.Enter/Exit ASM fastpath for Linux.
4419 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
4421         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
4423         * objects.cs: Add a new test.
4424         
4425         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
4427         * aot-runtime.c (load_method): Run class initialization in the PLT case even
4428         if MONO_LOG_LEVEL is set.
4430         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
4432         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
4434         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
4435         
4436         * aot-compiler.c: Change the relocation code to use virtual addresses instead
4437         of file offsets. Align the sections belonging to the data segment to 
4438         PAGESIZE.
4440 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
4442         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
4443         elf.h. Port it to amd64.
4445 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
4447         * driver.c: Enable SIMD by default.
4449 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
4451         * cpu-x86.md: Add prefetch op.
4453         * mini-ops.h: Same.
4455         * mini-x86.c: Same.
4457         * mini.h: Add an enum for simd prefetch modes.
4459         * simd-methods.h: Add prefetch function names.
4461         * simd-intrinsics.c: Add prefetch ops for all vector types.
4463 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
4465         * aot-compiler.c (emit_bytes): Speed this up a little.
4467 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
4469         * aot-compiler.c: Add JIT time etc. statistics.
4470         
4471         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
4473         * mini.h (MonoCompile): Add 'got_offset' field.
4475         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
4476         method_got_offsets array.
4478         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
4479         wrappers.
4481         * aot-compiler.c (compile_method): Add generic method instances referenced
4482         by the method to the list of methods to be compiled, this is required so if
4483         A<T> references B<T>, and another assembly references A<int>, then it will
4484         also get a copy of B<int>.
4486         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
4487         when checking for monitor enter/exit.
4489 2008-10-30  Mark Probst  <mark.probst@gmail.com>
4491         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
4492         for Monitor.Enter and Monitor.Exit if enabled.
4494         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
4495         Solaris.
4497 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
4499         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
4500         of an OP_MOVE. Fixes #440046.
4502         * basic-long.cs: Add a new test.
4504 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
4506         * mini.h: Add synchronization note for the managed counter-part.
4508         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
4509         returns the simd caps of the current cpu.
4511 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
4513         * basic-simd.cs: Remove Console.WriteLine.
4515 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
4517         * basic-simd.cs: New tests for Vector2ul.
4519 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
4521         * simd-intrinsics.c: Add new vector type Vector2ul.
4523 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
4525         * basic-simd.cs: New tests for Vector2l.
4527 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
4529         * cpu-x86.md: Add long version of most packed int ops.
4531         * mini-ops.h: Same.
4533         * mini-x86.h: Same.
4535         * simd-intrinsics.c: Add new vector type Vector2l.
4537 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
4539         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
4541         * simd-methods.h: Remove SN_op_BitwiseXor.
4543 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
4545         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
4546         alignment.
4548 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
4550         * basic-simd.cs: Test for Vector2d.
4552         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
4553         value.
4555 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
4557         * cpu-x86.md: Add double version of all packed float ops.
4559         * mini-ops.h: Same.
4561         * mini-x86.h: Same.
4563         * simd-intrinsics.c: Add new vector type Vector2d.
4565         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
4567         * simd-methods.h: Add Duplicate.
4569 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
4571         * basic-simd.cs: Test for packing with signed saturation.
4573 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
4575         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
4576         found in the TYPESPEC table.
4578 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
4580         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
4581         too.
4583         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4585         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
4586         instead of the RVA, since the RVA can be changed by tools like the cil 
4587         stripper.
4589         * method-to-ir.c (mono_method_to_ir2): Ditto.
4591         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
4592         (deserialize_variable): Ditto.
4594 2008-10-25  Martin Baulig  <martin@ximian.com>
4596         * debug-mini.c (write_variable): Use
4597         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
4599 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4601         * cpu-x86.md: Add unsigned variants of packd and packw.
4603         * mini-ops.h: Same.
4605         * mini-x86.h: Emit the right instruction for packd and packw.
4606         Add unsigned variants of packd and packw.
4608         * simd-intrinsics.c: Packd and packw were used in place of their
4609         unsigned variants. Change that.
4610         Add intrinsics for (Signed)PackWithSignedSaturation.
4612         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
4614 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4616         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
4618 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4620         * mini-ops.h: Remove dword packed add/sub with saturation ops.
4622         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
4624         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
4625         sse instructions.
4627         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
4629 2008-10-24  Mark Probst  <mark.probst@gmail.com>
4631         * method-to-ir.c, mini.c: Special casing for the synchronized
4632         wrapper for the ldtoken+GetTypeFromHandle case.
4634 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
4636         * mini.c (mono_replace_ins): Move this to branch-opts.c.
4638         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
4639         created/split bblocks.
4641 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4643         * mini-ops.h: Add packed signed mul high.
4644         
4645         * cpu-x86.md: Same.
4647         * mini-x86.c (mono_arch_output_basic_block): Same.
4649         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
4651         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
4653 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4655         * basic-simd.cs: Tests for Vector16sb.
4657 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
4659         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
4661 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
4663         * mini-ops.h: Add packed signed min, max and compare greater.
4664         
4665         * cpu-x86.md: Same.
4667         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
4668         saturation.
4670         * simd-methods.h: Add CompareGreaterThan.
4672         * simd-methods.h: Remove CompareEquals.
4674         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
4676         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
4678         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
4679         CompareEqual.
4681 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
4683         * basic-simd.cs: Fix tests due to change in the API.
4685 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
4687         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
4689 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
4691         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
4693         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
4694         inst_offset as this has invalid values for LDADDR.
4696 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
4698         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
4700         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
4702 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
4704         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
4705         for accessing field->data.
4707 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
4709         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
4711 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
4713         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
4715         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
4717 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
4719         * dominators.c (mono_compute_natural_loops): Allocate GList enties
4720         from the cfg mempool.
4722 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
4724         * basic-simd.cs: Tests for new methods in Vector8us.
4726 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
4728         * mini-ops.h: Add multiply and store high.
4729         
4730         * cpu-x86.md: Same.
4732         * mini-x86.c (mono_arch_output_basic_block): Same.
4734         * simd-methods.h: Same.
4736         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
4737         and CompareEqual.
4739 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
4741         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
4742         mono_class_setup_vtable ().
4744         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
4745         mono_class_get_vtable_entry () for accessing klass->vtable.
4747         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
4749         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
4750         found.
4752         * method-to-ir.c (mono_save_token_info): Don't save references made from
4753         wrappers.
4755         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
4756         of generic instances.
4758         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
4760 2008-10-19  Mark Probst  <mark.probst@gmail.com>
4762         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
4763         OP_JMP depends on the method signature.  Calculate it properly.
4765 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
4766         
4767         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
4768         called directly.
4770         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
4771         instances.
4772         (emit_extra_methods): Add another table mapping method indexes to 
4773         offsets in the extra_method_info table.
4775         * mini.h: Bump AOT file format version.
4776         
4777         * aot-runtime.c: Merge most of the code from mono_aot_get_method
4778         and mono_aot_get_method_from_token () into one function.
4780 2008-10-19  Mark Probst  <mark.probst@gmail.com>
4782         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
4783         separate counter.
4785 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
4787         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
4788         methods.
4790         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
4791         disable_aot.
4793         * mini.c (mono_patch_info_equal): Compare the generic context as well.
4795         * mini.h: Bump aot file format version.
4797         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
4798         AOT file can contain native code for methods which are not in the METHOD
4799         table. Generate code for non-sharable generic instances of generic methods
4800         found in the METHODSPEC table.
4801         
4802         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
4803         encoding generic type handles.
4805         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
4806         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
4808         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
4809         macros + MONO_ADD_INS.
4811         * mini.c (mono_jump_info_token_new2): New function which takes a generic
4812         context as well.
4814         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
4816         * mini.h: Bump aot file format version.
4818         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
4820 2008-10-17  Mark Probst  <mark.probst@gmail.com>
4822         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
4823         platforms, with definable stack alignment value.  Set to 16 now
4824         for all platforms.
4826         * mini.c, mini.h, driver.c: Command line option for disabling
4827         stack alignment.
4829 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
4831         * basic-simd.cs: Tests for new methods in Vector4ui.
4833 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
4835         * mini-ops.h: Add packed int shuffle.
4836         
4837         * cpu-x86.md: Same.
4839         * mini-x86.c (mono_arch_output_basic_block): Same.
4841         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
4842         extract mask, max, min, shuffle.
4844         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
4846 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
4848         * basic-simd.cs: Tests for new methods in Vector8us.
4850 2008-10-17  Mark Probst  <mark.probst@gmail.com>
4852         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
4853         RuntimeTypeHandle, not a TypedReference.
4855 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
4857         * simd-intrinsics.c: remove relocations.
4859 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
4861         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
4862         optimizations from the x86 backend.
4864 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
4866         * simd-methods.h, simd-intrinsics.c: debloat method names and
4867         prepare for no relocations.
4869 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
4871         * mini-ops.h: Add packed min/equal and sum of absolute differences.
4872         
4873         * cpu-x86.md: Same.
4875         * mini-x86.c (mono_arch_output_basic_block): Same.
4877         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
4878         extract mask, max, min and sum of absolute differences.
4880         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
4881         method name.
4883 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
4885         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
4886         Renamed one test for consistency.
4888 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
4890         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
4891         fix to the code that deal with other blocks.
4893 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
4895         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
4897 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
4899         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
4900         that deals with vreg interference. Explicitly check for OP_LDADDR to be
4901         able to process the source reg.
4903 2008-10-16  Martin Baulig  <martin@ximian.com>
4905         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
4907         * inssel.brg: Add `OP_HARD_NOP'.
4909         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
4911         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
4912         `OP_HARD_NOP' instruction when running inside the debugger.
4914         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
4915         `OP_HARD_NOP' instruction when running inside the debugger.
4917 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
4919         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
4920         now works. The issue with the regalloc tripping up no longer
4921         happens.
4923         * simd-intrinsics.c (load_simd_vreg): Same.
4925 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
4926         
4927         * basic-simd.cs: Tests for new Vector8ui methods.
4929 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
4931         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
4932         only for type. This fixes crashes where MonoInst::klass is checked
4933         for ops of type != VTYPE or OBJ.
4935         * simd-intrinsics.c (load_simd_vreg): Same.
4937 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
4939         * mini-ops.h: Add ops for packed shuffle/max/avg and
4940         extract mask.
4941         
4942         * cpu-x86.md: Same.
4944         * mini-x86.c (mono_arch_output_basic_block): Same.
4946         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
4947         extract mask.
4949         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
4950         to emit extract mask op.
4952         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
4953         to emit word shuffles.
4955 2008-10-15  Mark Probst  <mark.probst@gmail.com>
4957         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
4958         the largest alignment needed by a variable, but at least
4959         sizeof(gpointer).
4961 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
4963         * basic-simd.cs: Tests for the fixes in the last commit.
4965 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
4967         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
4968         no longer handles STACK_PTR input.
4970         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
4972         * simd-intrinsics.c (load_simd_vreg): New function that works like 
4973         get_simd_vreg   but handles STACK_PTR input.
4975         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
4976         as the input can be an arbitrary pointer.
4978         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
4979         LDADDR local optimization directly otherwise use a store op.
4981 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
4983         * basic-simd.cs: Tests for dup low and dup high.
4985 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
4987         * mini-ops.h: Add dup low and dup high ops.
4988         
4989         * cpu-x86.md: Same.
4991         * mini-x86.c (mono_arch_output_basic_block): Same.
4993         * simd-intrinsics.c (vector4f_intrinsics): Same.
4995 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
4997         * basic-simd.cs: Tests for recently added functionality.
4999 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
5001         * mini-ops.h: Add remaining sse1 fp ops.
5002         
5003         * cpu-x86.md: Add remaining sse1 fp ops.
5005         * mini-x86.c (mono_arch_output_basic_block): Same.
5007         * mini.h: Add enum for simd FP compare conditions.
5009         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
5011         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
5012         so the backed can generate the appropriate op.
5014 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
5015         This patch squeese one more byte from the SimdIntrinsc struct.
5017         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
5018         a a shift amount intead of simply or'ing it.
5020         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
5022         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
5023         byte so we can have an aditional flags field without increasing struct size.
5025         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
5026         against the simd_supported_versions bitmask.
5028         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
5030 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
5032         * mini.c: remove rawbuffer code (the only use here is unsafe because
5033         it takes locks during signal handling and the kernel now provides much
5034         better info in proc/pid/smaps these days).
5036 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
5038         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
5039         OP_X86_PUSH_OBJ. Fixes #434620.
5041         * objects.cs: Add a test.
5042         
5043 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
5045         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
5046         that the packuswb/packusdw don't work with unsigned numbers for what
5047         would be negative numbers in signed format.
5049         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
5050         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
5052         * mini-ops.h: Add doubleword forms of many ops and packing ones.
5054         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
5056         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
5058         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
5060         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
5061         add more ops.
5063         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
5064         version as the enum in mini.h.
5066         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
5067         for sse3 ops, check the simd_version field if present. This way the code
5068         works with all versions of sse.
5070 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5072         * simd-intrinsics.c: Fixed intrinsic name typo.
5074         * mini.h: Added missing simd exported function.
5076         * basic-simd.cs: Added tests for Vector4ui.
5077         Fixed broken test for Vector16b.
5079 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
5081         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
5082         the max length to 64.
5084 2008-10-10  Mark Probst  <mark.probst@gmail.com>
5086         * method-to-ir.c: Only do the fast virtual generic method call for
5087         non-wrapper methods.
5089         * mini.h, mini-trampolines.c: The new generic virtual remoting
5090         trampoline handles virtual method calls via the vtable (as done by
5091         the fast virtual generic method calls) to remoting proxies.
5093         * mini.c (mono_jit_create_remoting_trampoline): For generic
5094         methods reate a generic virtual remoting trampoline.
5096         * mini-amd64.h: Enable fast virtual generic method calls again.
5098 2008-10-10  Mark Probst  <mark.probst@gmail.com>
5100         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
5101         restore registers when doing tail calls.
5103 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5105         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
5106         Vector4ui.
5108 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5110         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
5112 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5114         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
5116 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5118         * basic-simd.cs: Retrofit for API changes.
5120 2008-10-10  Mark Probst  <mark.probst@gmail.com>
5122         * mini-ppc.c: Handle integer stack arguments for tail calls.
5124 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5126         * optflags-def.h: Removed sse3 optimization.
5128         * driver.c: Same.
5130         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
5131         sse3.
5133         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
5135         * mini.h: Added enumeration with simd versions.
5137         * simd-intrinsics.c (emit_intrinsics): Use the new static var
5138         for detecting SSE3.
5140         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
5142         * mini.c (mini_init): Call mono_simd_intrinsics_init.
5144 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
5146         * basic-simd.cs: Added tests for Vector8u and Vector16u.
5148         * basic-simd.cs: Fixed test naming.
5150 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
5152         * mini-ops.h: Added ops for packed and saturated math, shifts
5153         and packing/unpacking.
5155         * cpu-x86.md: Added descriptors for the above ops.
5157         * mini-x86.c: Added code to emmit the above ops.
5159         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
5161 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
5163         * aot-compiler.c (compile_method): Enable AOT for generic code.
5165         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
5167 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
5169         * mini.c: add a workaround for a common screwup that ends up blamed
5170         to mono (other processes blocking signal delivery).
5172 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
5174         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
5175         in the LDFLD/STFLD opcodes. Fixes #432673.
5177         * iltests.il.in: Add a new test.
5179 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
5181         * mini-arm.c: attach the thread in unmanaged->managed transitions
5182         using delegates (bug #433148).
5184 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
5186        * basic-simd.cs: Use new ShuffleSel constants.
5188 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
5190         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
5192         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
5193         only disable simd intrinsics if no sse2 is detected.
5195         * optflags-def.h: Added sse3.
5197         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
5198         is disabled.
5200 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
5202         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
5203         when adding delegate-invoke wrappers.
5205 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
5207         * Makefile.am: Reenable the simd tests.
5209 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
5211         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
5212           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
5213           other vreg is allocated to that hreg.
5215         Contributed under MIT/X11 license.
5217 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
5219         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
5220         yet checked in.
5222 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
5224         * basic-simd.cs: New test suite for SIMD intrinsics.
5226         * Makefile.am: Added new tests.
5228 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
5230         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
5232         * mini-ops.h: Same.
5234         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
5236         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
5237         using SSE2 aware opcodes.
5239         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
5240         is enabled, this code path is only reachable if conversion ops are emmited after
5241         mono_method_to_ir.
5243         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
5245         This optimization saves 6 bytes per conversion against the old version.
5247 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
5249         * aot-compiler.c (compile_method): Don't skip methods referencing 
5250         generic methods without a corresponding entry in token_info_hash, since
5251         encode_method_ref () can handle all generic methods now.
5253         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
5254         generic context is set.
5255         
5256         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
5257         generic sharing of LDTOKEN.
5259 2008-10-06  Mark Probst  <mark.probst@gmail.com>
5261         * mini-amd64.h: Temporarily disabled fast virtual generic method
5262         calls because it breaks the System.Runtime.Remoting tests.
5264 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
5266         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
5268         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
5269         so inlining actually works.
5270         (check_inline_caller_method_name_limit): Ditto.
5272 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
5274         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
5275         64 bit safety (from Olaf Hering and Andreas Farber).
5277 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
5278         
5279         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
5280         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
5281         unused virtual call support code.
5283         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
5284         
5285         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
5286         which can't use aot trampolines.
5287         (decode_patch): Don't create aot trampolines for methods which can't use
5288         them.
5290         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
5291         use aot trampolines.
5293         * mini.h: Bump AOT image format version.
5294         
5295 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
5297         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
5298         to save_token_info () since cmethod is inflated for constrained calls.
5300         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
5302 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
5304         * Makefile.am: Add build rules for ppc64.
5305         This avoids the build failing at pedump with unresolved symbols
5306         due to lack of arch_sources. Instead it will now fail earlier
5307         due to lack of cpu-ppc64.md.
5309         Contributed under MIT/X11 license.
5311 2008-10-04  Mark Probst  <mark.probst@gmail.com>
5313         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
5314         tail calls.
5316         * iltests.il.in: Add test case for tail call with many arguments.
5318 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
5320         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
5321         to the fast virtual generic method code until the aot case is fixed.
5323 2008-10-03  Mark Probst  <mark.probst@gmail.com>
5325         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
5327 2008-10-03  Mark Probst  <mark.probst@gmail.com>
5329         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
5330         thunks.
5332 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
5333         
5334         * simd-intrinsics.c: Forgot to add this one.
5336         * mini-codegen.c: Fix macro in case SIMD is not supported.
5338 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
5339         
5340         This patch land initial JIT support for simd intrinsics.
5342         * mini-x86.h: Added new define to make --enable_minimal work on x86.
5344         * Makefile.am: Added simd-intrinsics.c
5346         * simd-intrinsics.c: New file with simd instrinsic related
5347         code.
5349         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
5351         * cpu-x86.md: Add simd related instructions.
5353         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
5355         * driver.c: Added two new --regression variants.
5357         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
5359         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
5361         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
5362         extract some complicated logic to helper functions.
5364         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
5366         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
5368         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
5369         the specialized simplification pass.
5371         * method-to-ir.c (mono_spill_global_vars): Use new macro.
5373         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
5375         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
5376         table.
5378         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
5379         if MONO_ARCH_NEED_SIMD_BANK is defined.
5381         * mini-ops.h: Added the new simd ops.
5383         * mini-x86.c: Added mono_arch_xregname.
5385         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
5387         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
5389         * mini-x86.h: Define simd related MONO_ARCH macros.
5391         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
5393         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
5395         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
5396         MONO_CLASS_IS_SIMD to deal with simd related IR.
5398         * mini.h (MonoInst): Added spill_var to the backend union.
5400         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
5402         * mini.h: Added forward declarations of the new simd fuctions.
5404         * optflags-def.h: Added new optimization names SIMD.
5406         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
5408         * regalloc.h: Added support for working with 3 register banks.
5410         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
5412         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
5414 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
5416         * mini-exceptions.c: remove 64 bit related ifdef clutter.
5418 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
5420         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
5421         instead of one on 64 bit systems.
5423         * method-to-ir.c: Remove unused includes.
5425 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
5427         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
5428         cfg->used_int_regs, since the two are different on arm.
5430 2008-10-02  Mark Probst  <mark.probst@gmail.com>
5432         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
5433         mono_method_get_vtable_index() to get the vtable index.
5435 2008-10-02  Mark Probst  <mark.probst@gmail.com>
5437         * method-to-ir.c (mono_method_to_ir2): Don't create native
5438         wrappers for array methods, because they're never called (and if
5439         they were called they wouldn't work).
5441 2008-10-02  Mark Probst  <mark.probst@gmail.com>
5443         * method-to-ir.c (mono_method_to_ir2): Array methods are
5444         special-cased and must not be invoked indirectly via the (M)RGCTX
5445         when generic sharing is turned on.  Fixes #431413.
5447 2008-10-01  Mark Probst  <mark.probst@gmail.com>
5449         * method-to-ir.c: When generic sharing is active, call
5450         non-interface virtual generic methods via the standard trampoline.
5452         * mini-trampolines.c: Handle virtual generic shared methods.
5454         * mini.h, mini-x86.c, mini-x86.h: New argument for
5455         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
5456         method thunks and which is the trampoline to call if the lookup
5457         fails.  Enable the virtual generic method thunk for x86.
5459         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
5460         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
5461         argument but assert that it's NULL, because these archs don't yet
5462         implement the virtual generic method thunk.  Changes in the IMT
5463         thunk data structures.
5465 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
5467         * aot-compiler.c (emit_globals): Avoid invalid characters in
5468         the static linking symbol.
5470         * objects.cs: Add a test for the range check optimization. Fix warnings.
5472         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
5473         optimization from the current JIT.
5475         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
5476         later in decompose_array_access_opts () to allow more optimizations.
5478         * method-to-ir.c (mono_handle_soft_float): Rename this to 
5479         mono_decompose_soft_float () for consistency.
5481         * mini-ops.h: Fix arguments of OP_STRLEN.
5483         * method-to-ir.c (save_cast_details): Extract the cast details saving code
5484         into a separate function.
5485         (reset_cast_details): Ditto.
5486         (handle_unbox): Save cast details. Fixes #431254.
5488         * method-to-ir.c: Remove some obsolete FIXMEs.
5490 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
5492         * ir-emit.h (alloc_dreg): Write a warning before crashing.
5494 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
5496         * mini-codegen.c: More work on macros to make them
5497         ready for multiple regbanks.
5499 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
5501         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
5503         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
5505 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
5507         * mini-codegen.c (mono_spillvar_offset): Proper support for
5508         multiple regbanks.
5510 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
5512         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
5513         the stack overflow changes.
5515 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
5517         * mini-codegen.c: Make all bank macros depend on reg_bank.
5519         * mini-codegen.c (mono_local_regalloc): Make free mask
5520         initialization regbank aware.
5522 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
5524         * mini-codegen.c (mono_local_regalloc): Extract callee
5525         mask selection to a function and make it regbank aware.
5527 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
5529         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
5530         code to deal with many regbanks.
5532 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
5534         * mini-codegen.c: More fp->regbank changes.
5536 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
5538         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
5539         of a hardcoded constant.
5541 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
5543         * method-to-ir.c (type_from_stack_type): Fix typo.
5545 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
5547         * mini-ia64.c (emit_move_return_value): Convert float return values to
5548         double.
5550         * objects.cs: Add a new test.
5551         
5552         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
5553         VARARG methods to fix an assert later.
5555         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
5556         end so it at least compiles.
5558 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
5560         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
5562 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
5564         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
5565         optimization to a new function (emit_optimized_ldloca_ir) and enable
5566         it for both ldloca and ldloca_s.
5568 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
5570         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
5571         gshared CASTCLASS code.
5573         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
5574         amd64, where the libc stack unwinder encounters stack frames referring to
5575         native code in unmapped memory.
5577         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
5578         sharing.
5580         * generics.cs: Add new test.
5582 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
5584         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
5585         add a check that one of the ARM_FPU_ constants is defined.
5587         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
5588         
5589         * mini-exceptions.c: Fix build on non-altstack platforms.
5591         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
5592         sharing of vtypes.
5594         * ir-emit.h: Add a comment to NEW_PCONST.
5596         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
5598         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
5600         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
5601         after the changes to MonoJitDomainInfo.
5603 2008-09-27  Mark Probst  <mark.probst@gmail.com>
5605         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
5607 2008-09-27  Mark Probst  <mark.probst@gmail.com>
5609         * mini-ppc.c: Compiler warning fixes.
5611 2008-09-27  Mark Probst  <mark.probst@gmail.com>
5613         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
5614         for pinvokes.
5616 2008-09-27  Mark Probst  <mark.probst@gmail.com>
5618         * exceptions-ppc.c, mini-ppc.h: Compile
5619         mono_arch_handle_altstack_exception() on Darwin, too.
5621 2008-09-27  Mark Probst  <mark.probst@gmail.com>
5623         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
5624         work on archs which don't have generic sharing implemented, only
5625         without the vtable_arg.
5627 2008-09-26  Mark Probst  <mark.probst@gmail.com>
5629         * mini.c: Added comment explaining why delegate ctor icall
5630         wrappers are compiled.
5632 2008-09-26  Mark Probst  <mark.probst@gmail.com>
5634         * mini.c: Don't produce trampolines to delegate ctor icall
5635         wrappers but compile them upfront.
5637 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
5639         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
5640         runtime-set function when going back to managed code. Currently this
5641         is used to set back the protection on the soft ovf pages and/or to
5642         throw the stack overflow exception that happened in unmanaged code.
5644 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
5646         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
5647         runtime-set function when going back to managed code. Currently this
5648         is used to set back the protection on the soft ovf pages and/or to
5649         throw the stack overflow exception that happened in unmanaged code.
5651 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
5653         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
5654         the support code for restoring stack protection after stack overflows
5655         that happen in unmanaged code. Don't set the exec permission on the
5656         soft overflow area.
5658 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
5660         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
5661         delegate->method_ptr is set. Fixes #428054.
5663 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
5665         * tests.cs: Rename to ratests.cs.
5667         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
5668         emit_get_rgctx_... functions.
5670 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5672         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
5674 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5676         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
5677         before asserting that method is sharable.
5679 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5681         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
5682         whether method needs a static RGCTX wrapper used instead of
5683         complex conditions.
5685         * generic-sharing.c, mini.h: A few functions moved to
5686         metadata/generic-sharing.c.
5688 2008-09-25  Mark Probst  <mark.probst@gmail.com>
5690         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
5691         Generic code sharing for value types, which essentially means
5692         treating value type methods like static methods.  The RGCTX is
5693         passed in the same way.
5695 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
5697         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
5698         opcode when creating multi-dimensional arrays of open types.
5700         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
5701         open generic types.
5703         * generics.cs: Add a test.
5705         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
5707 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
5709         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
5711         * mini.c (mini_method_compile): Set it when running under the debugger. 
5713         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
5714         vreg optimization if the flag is set.
5716         * driver.c (mono_main): Add --attach= option to pass options to
5717         the attach agent.
5719         * mini.c (sigquit_signal_handler): Start the attach agent.
5721         * ssapre.c: Disable this to save space since it is not yet ported to
5722         linear IR.
5724         * regalloc2.c: Disable this to save space.
5726         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
5728 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
5730         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
5731         the -v option useful again.
5733 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
5735         * mini-amd64.c (mono_arch_output_basic_block): Add support for
5736         --break-at-bb.
5738         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
5739         arrays of arrays. Fixes #428406.
5741         * method-to-ir.c (mini_emit_castclass): Ditto.
5743         * objects.cs: Add new test.
5744         
5745 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
5747         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
5748         was wrong at it choked against target_type_is_incompatible for byref types.
5750 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
5752         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
5753         places.
5755 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
5757         * mini-exceptions.c: update a few more exceptions-related counters.
5759 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
5761         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
5762         new functions to allocate from persistent mempools.
5764 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
5766         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
5767         multiple register banks in the future.
5769         * mini-codegen.c (mono_local_regalloc): Fix a warning.
5771 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
5773         * mini.c (type_to_eval_stack_type): Remove duplicated function.
5775         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
5777         * mini.h: Export type_to_eval_stack_type.
5779         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
5780         is only ins->klass of byref types.
5782 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
5784         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
5785         (mini_emit_memcpy2): Ditto.
5787         * mini-amd64.c: Fix a warning.
5789 2008-09-21  Mark Probst  <mark.probst@gmail.com>
5791         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
5792         linking.
5794 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
5796         * method-to-ir.c: Extract stloc micro-optimization to a
5797         function and apply it to all cases.
5799 2008-09-19  Mark Probst  <mark.probst@gmail.com>
5801         * method-to-ir.c: Don't fail generic code sharing in cases we
5802         already support.
5804 2008-09-18  Mark Probst  <mark.probst@gmail.com>
5806         * mini-ppc.c: Handle structs in tailcalls on Darwin.
5808 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
5810         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
5811         implementation.
5813 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
5815         * trace.c: make tracing more useful and correct, with per-thread
5816         id and indent info.
5818 2008-09-15  Mark Probst  <mark.probst@gmail.com>
5820         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
5821         doing a method call and the argument is an R4.
5823 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
5825         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
5826         generic methods.
5828 2008-09-13  Mark Probst  <mark.probst@gmail.com>
5830         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
5832 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
5834         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
5835         (MONO_JUMP_TABLE_FROM_INS): Ditto.
5837 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
5839         * driver.c: Add a --agent argument (not supported yet) to load managed
5840         agent assemblies before loading the main assembly, similarly to how the
5841         Java VM handles agents.
5843 2008-09-11  Mark Probst  <mark.probst@gmail.com>
5845         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
5846         function to do stack layout of local variables.
5848 2008-09-11  Mark Probst  <mark.probst@gmail.com>
5850         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
5851         calculation.
5853 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
5855         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
5856         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
5857         JIT if DISABLE_JIT is defined.
5859         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
5860         defined.
5862 2008-09-10  Mark Probst  <mark.probst@gmail.com>
5864         * iltests.il.in: Disable the fconv test on PPC (the result is
5865         undefined according to ECMA).
5867 2008-09-10  Mark Probst  <mark.probst@gmail.com>
5869         * iltests.il.in: Enable tail call tests for PPC.
5871         * mini.h: Add variable for storing incoming valuetype argument
5872         addresses for tail calls.
5874         * mini-ppc.c: Implement valuetype arguments and return values for
5875         tailcalls on Linux.
5877 2008-09-09  Mark Probst  <mark.probst@gmail.com>
5879         * mini-ppc.c: Partially implement tail calls (struct arguments and
5880         return values not supported).
5882         * method-to-ir.c: Enable tail calls on PPC.
5884 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
5886         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
5887         runtime-invoke wrappers to work around the problem of them getting
5888         assigned to a random class.
5890         * aot-runtime.c (mono_aot_get_method): Ditto.
5891         
5892 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
5894         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
5895         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
5897 2008-09-07  Mark Probst  <mark.probst@gmail.com>
5899         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
5900         until they're implemented properly.
5902         * exceptions-ppc.c: Use arch-independent exception-handling code
5903         instead of custom one.
5905         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
5906         for Linear IR.
5908         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
5910         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
5911         applies when __powerpc__ is defined.
5913 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
5915         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
5916         methods to their code to avoid computing the full name of wrappers and
5917         doing a lookup in a string hash table.
5919 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
5921         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
5922         we identify bblocks before method_to_ir () is ran.
5924         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
5925         Also avoid optimizing branches pointing to themselves.
5927         * mini.c (mini_method_compile): Ditto. Fixes #422947.
5929 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
5931         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
5933 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
5935         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
5936         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
5937         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
5938         'buf'.
5940         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
5941         jumped to the same entry in plt_jump_table.
5943 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
5945         * method-to-ir.c (initialize_array_data): Handle field with RVA from
5946         dynamic images.
5948 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
5950         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
5951         other assignment can be if converted. Saves 1.5% on corlib size and fixes
5952         #421807.
5954 2008-08-29  Geoff Norton  <gnorton@novell.com>
5956         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
5957         segment, and doesn't properly handle .space as .text.  Fixes
5958         AOT Mach/ARM
5960 2008-08-29  Geoff Norton  <gnorton@novell.com>
5962         * mini.c: Disable the mach exception handler when running on 
5963         ARM
5965 2008-08-29  Geoff Norton  <gnorton@novell.com>
5967         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
5968         globals on Darwin/ARM
5970 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
5972         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
5973         since too many things depend on it. Instead, call 
5974         mono_runtime_set_no_exec ().
5975         
5976         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
5977         the new JIT.
5979         * aot-compiler.c: Add an 'asm-only' AOT option.
5981         * mini.c: Avoid initializing the runtime when doing AOT compilation.
5982                 
5983         * aot-compiler.c (compile_method): Disable gshared support for now as it
5984         doesn't yet work.
5986 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
5988         * mini-amd64.h : Fix a compiler warning.
5990         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
5991           Changed to use a callback function to retrieve the unwind info.
5992           This avoids problems observed when code blocks were removed by
5993           unloading an app domain.
5995         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
5996           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
5997           to work properly.
5999         Contributed under MIT/X11 license.
6001 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
6003         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
6004           case to keep the stack aligned to 8.
6006         Contributed under MIT/X11 license.
6008 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
6010         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
6011         avoid repeated linear searches.
6013 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
6015         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
6016         methods it can't handle.
6017         
6018         * aot-compiler.c (add_method): Avoid adding a method twice.
6019         (add_wrappers): Add runtime invoke wrappers for all methods.
6021         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
6022         function to create an aot-compatible version of this trampoline.
6024         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
6026 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
6028         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
6030         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
6031         with a generic sharing failure.
6033         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
6035         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
6036         CEE_RETHROW. Fixes #419634.
6038         * mini.c (mono_method_to_ir): Ditto.
6040         * exceptions.cs: Add a new test.
6041         
6042         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
6043         to mono_type_stack_size_internal () since some callers might not pass in
6044         an rgctx.
6046         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
6047         instrument_prolog. Fixes #419878.
6049         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
6050         doubles in soft float mode volatile.
6052 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
6054         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
6056         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
6057         to handle soft float correctly.
6059         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
6060         the fast path.
6062         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
6064         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
6065         to sp, since the generics catch code requires it.
6067         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
6068         copying.
6070         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
6071         mono_arch_emit_imt_argument ().
6073         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
6075         * mini-arm.c tramp-arm.c: Generic sharing updates.
6077 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
6079         * mini-arm.c: Fix the arm build.
6081         * generic-sharing.c (mini_type_get_underlying_type): New helper function
6082         handling enums, generic instances and generic sharing.
6083         (mini_type_stack_size_full): Ditto.
6085         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
6086         
6087         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
6089         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
6091         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
6092         trampolines.
6094         * mini-arm.c: Various small generic sharing changes.
6096         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
6097         this for x86.
6098         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
6099         custom code.
6101         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
6102         helper function to return a generic class init trampoline.
6104         * method-to-ir.c mini.c: Use it.
6105         
6106         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
6107         arch-specfic function to return a generic class init trampoline.
6109         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
6110         the GENERIC_CLASS_INIT custom code.
6112         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
6113         a fatal error, not a sharing failure.
6115         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
6116         needed.
6118         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
6119         trampoline argument from MONO_ARCH_VTABLE_REG.
6121         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
6122         order of the arguments to the C trampoline: pass 'slot' as the trampoline
6123         argument, and pass the vtable in VTABLE_REG.
6125         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
6126         order of the arguments to the C trampoline: pass 'slot' as the trampoline
6127         argument, and pass the vtable in VTABLE_REG.
6128         (mono_arch_create_trampoline_code_full): Remove some special casing for
6129         the rgctx fetch trampoline.
6131         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
6132         Fixes #419273.
6134         * iltests.il: Add a test for it.
6136 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
6138         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
6140         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
6141         no longer needed.
6143         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
6144         use mono_jit_info_table_find () to avoid recursion.
6145         (mono_delegate_trampoline): Add a sync wrapper here.
6147         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
6148         here.
6150         * mini.c (mono_method_to_ir): Ditto.
6151         
6152         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
6153         add_sync_wrapper argument. Don't add a sync wrapper here.
6154         (mono_create_jump_trampoline): Don't add a sync wrapper here.
6156         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
6157         
6158 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
6160         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
6161           of nonvolatile registers back from MonoContext to CONTEXT.
6163         Contributed under MIT/X11 license.
6165 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
6167         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
6168           arguments on Winx64 there are only 4 argument registers.  For this
6169           logic to work the last argument must be pulled from the stack.  
6171         Contributed under MIT/X11 license.
6173 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
6175         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6177         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
6178         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
6179         encode/decode_method_ref ().
6181         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
6183         * aot-runtime.c (decode_patch): Ditto.  
6185         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
6186         MONO_PATCH_INFO_METHOD.
6188         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
6189         MonoGenericJitInfo.
6191         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
6192         MonoGenericJitInfo.
6194         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
6196         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
6197         one from the caller.
6199         * aot-runtime.c (decode_generic_inst): New function to decode and
6200         return a interned generic inst.
6201         (decode_klass_ref): Use it.
6202         (decode_method_ref): Ditto.
6204         * aot-compiler.c (emit_exception_debug_info): Save 
6205         jinfo->has_generic_jit_info too.
6207 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
6209         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
6211         * iltests.il.in: Add a test for fconv_to_i.
6213         * liveness.c: Disable the liveness2 pass for now to save space.
6215         * regalloc2.c: Include mempool-internals.h to fix warnings.
6217         * aot-compiler.c (encode_method_ref): Encode the context of generic
6218         instance methods.
6220         * aot-runtime.c (decode_method_ref): Inflate generic methods using
6221         the context saved in the aot file.
6223         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6225         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
6227         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
6228         volatile so they won't be optimized away.
6230 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
6232         * ssa.c:
6233         * ssa2.c:
6234         * mini.c:
6235         * regalloc2.c:
6236         * dominators.c: Remove duplicated functions that now are in
6237         mempool-internals.h.
6239 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
6241         * aot-compiler.c: Fix warnings.
6243         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
6245         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
6247         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
6248         as the patch type.
6250         * mini.c (mono_resolve_patch_target): Ditto.
6251         
6252         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
6253         (encode_klass_ref): Add support for encoding VARs/MVARs.
6255         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
6257         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
6258         the handling of the got entries into a separate 'decode_got_entry' function.
6259         Add support for RGCTX_FETCH.
6261         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
6262         clobbered by the trampoline code.
6264         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
6265         not clobbered by the indirect calling code.
6267 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
6269         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
6270         to fix the build.
6272 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
6274         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
6275         signature using the compilation mempool otherwise we would leak it.
6277 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
6279         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
6280         mono_emit_abs_call ().
6282         * patch-info.h: Add GENERIC_CLASS_INIT.
6284         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
6286         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
6287         as their target as a near call.
6289         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
6290         ABS handling code.
6291         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
6293         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
6294         call to a runtime function described by a patch.
6296         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
6297         mono_emit_abs_call, this has the advantage that the ABS handling code in
6298         mono_codegen () can handle them both, and can handle other stuff in the
6299         future without additional code.
6301         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
6302         entry.
6303         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
6304         abs addresses.
6306         * mini.h: Add missing bblock related prototypes.
6308         * mini.h (MonoCompile): Remove unused reverse_inst_list and
6309         reverse_inst_list_len fields.
6311         * mini.c: Refactor this file a bit by moving branch optimizations to 
6312         branch-opts.c.
6314         * method-to-ir.c: Merge generic sharing changes missed earlier.
6316         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
6318         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
6319         shared patches. Process METHODCONST as a shared patch.
6321         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
6322         as it crashes on the 2.0 mscorlib.
6324         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
6325         to cause crashes.
6326         
6327         * aot-compiler.c: Use is_plt_patch () in a few additional places.
6328         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
6329         by IMT.
6331         * aot-compiler.c: Reorganize the got handling code to be a bit more
6332         understandable.
6334 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
6336         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
6337         mono_patch_info_equals/hash, and use it to massively simplify
6338         get_plt_index ().
6340         * mini.c (mono_patch_info_hash): Simplify this and add support for
6341         more patch types.
6343         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
6345         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
6346         handling code, since an offset is not enough to identify a trampoline.
6348         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
6350 2008-08-17  Mark Probst  <mark.probst@gmail.com>
6352         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
6354         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
6356         * mini-ops.h: Argument and result types for OVF_CARRY ops.
6358         * decompose.c: PPC decompositions for various ops.
6360         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
6362 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
6364         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
6365         call the generic trampoline code using a call, instead of a jump, to
6366         remove some special casing from the generic trampoline code.
6368         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
6369         (mono_codegen): Ditto.
6371         * aot-compiler.c aot-runtime.c: Ditto.
6373         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
6375         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
6376         helper function to find the offset corresponding to a lazy fetch trampoline.
6378         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
6379         when doing generic sharing.
6381         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
6382         places.
6383         
6384         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
6385         mini-trampolines.c to be with the other trampoline creation functions.
6387         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
6388         as it is equal to method->signature in most cases, add a 
6389         mono_emit_method_call_full variant which takes a signature and an imt
6390         argument as well.
6392 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
6394         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
6395         to this function, since it could be computed easily from the method 
6396         argument.
6397         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
6398         more.
6400         * method-to-ir.c mini.c: Remove references to 
6401         compile_generic_method_wo_context.
6403         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
6404         generic method calls.
6405         
6406         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
6407         dimensional non-szarrays.
6409         * mini.c (mini_init): Register mono_array_new_1.
6411         * jit-icalls.c (mono_array_new_1): New jit icall.
6413         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
6414         pointing to the method.
6416         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
6417         method addresses belonging to METHOD_JUMP patches in the 
6418         jump_target_got_slot_hash.
6419         (mono_aot_load_method): Ditto.
6421         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
6422         METHOD_JUMP patches.
6424         * mini.c (mini_create_jit_domain_info): New helper function which 
6425         initializes/frees domain->runtime_info.
6426         (mini_free_jit_domain_info): Ditto.
6427         (mini_init): Install the domain hook functions with the runtime.
6429         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
6430         information maintained by the JIT.
6432         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
6433         insertion into jump_table_hash into mono_codegen (), also implement proper
6434         locking.
6436         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
6437         tail calls, it is already done by the aot code.
6438         
6439         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
6440         mechanism on amd64.
6442         * iltests.il.in: Make the jmp test a bit more complex.
6444         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
6445         generic instances which doesn't have a token.
6447         * aot-runtime.c (decode_method_ref): Ditto.
6448         
6449         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
6450         can handle this case now.
6451         (handle_box): Ditto.
6453 2008-08-15  Geoff Norton  <gnorton@novell.com>
6455         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
6456         debugging check.
6458 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
6460         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
6461         calling generic methods.
6463         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
6465         * aot-runtime.c (decode_patch_info): Ditto.
6467         * mini.c (mono_resolve_patch_target): Ditto.
6468         
6469         * patch-info.h: Add METHOD_RGCTX.
6471         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
6473 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
6475         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
6476         arguments in registers.
6478         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
6479         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
6481         * mini.c (mini_method_compile): Abort aot compilation for generic
6482         methods if generic sharing is disabled.
6483         
6484         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
6485         an mrgctx.
6487         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
6488         requiring an mrgctx.
6490         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
6491         store instructions when converting a vcall to a normal call.
6493         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
6494         mono_arch_find_jit_info.
6496 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
6498         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
6499         avoid calling mono_method_full_name () for every method even if the
6500         env var is not set.
6501         (check_inline_caller_method_name_limit): Ditto.
6503 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
6505         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
6506         assemblies in one run.
6508         * aot-compiler.c (mono_compile_assembly): Only print out a count of
6509         skipped methods if it is not 0.
6511         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
6513 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
6515         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
6516           MONO_ARCH_HAVE_UNWIND_TABLE.
6518         Contributed under MIT/X11 license.
6520 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
6522         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
6523           from default optimizaton list on Winx64.
6525         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
6527         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
6528           the LMF from the MonoJitTlsData structure.
6530         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
6532         Contributed under MIT/X11 license.
6534 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
6536         * mini.c (sigsegv_signal_handler): Fix the build.
6538         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
6539         assembly->aot_module.
6541         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
6542         hash table. This simplifies and speeds up a lot of code, and fixes support
6543         for .netmodules.
6545         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
6546         with the runtime.
6548         * mini-exceptions.c: Ditto.
6549         
6550         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
6551         'native_offset' argument, since these are computed in the 
6552         mono_find_jit_info () function.
6554         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
6555         is used by exceptions-ppc.c.
6557         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
6558         mono_arch_find_jit_info ().
6559         
6560         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
6561         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
6562         generic code in mini-exceptions.c.
6564 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
6566         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
6568         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
6569         
6570         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
6571         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
6572         called while holding the loader lock. Fixes #415608.
6573         (mono_aot_get_method_from_token_inner): Ditto.
6575 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
6577         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
6578         to reduce differences between this and the generic implementation in
6579         mini-exceptions.c.
6580         (ves_icall_get_frame_info): Ditto.
6582         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
6584         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
6585         longer neccesarry.
6587         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
6588         mono_arch_get_call_filter () and make it non-static, for consistency with the
6589         other architectures.
6591 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
6593         * mini.c:
6594         * local-propagation.c:
6595         * mini-x86.c: Correct the name of arch defines.
6597 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
6599         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
6600         NO_EMULATE_LONG_SHIFT_OPS define.
6602 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
6604         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
6605         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
6607         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
6608         MACH fixes. Merged from the 2.0 branch.
6610         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
6612         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
6613         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
6615         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
6617         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
6618         mono_marshal_get_native_wrapper () signature changes.
6620 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
6622         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
6623         conversion bug under arm.
6625 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
6627         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
6629         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
6630         with overflow checking.
6632 2008-08-05  Marek Habersack  <mhabersack@novell.com>
6634         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
6635         to the genmdesc.pl file
6637 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
6639         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
6640         arg_array in the soft-float versions of the LOAD/STORE macros.
6642         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
6643         implementation.
6645         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
6647 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
6649         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
6650         a float HFA. Fixes #413621.
6652 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
6654         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
6655         frame_size to args_size. Fixes build.
6657 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
6659         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
6660         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
6662         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
6663         the stack are not unaligned. Fixes #413247.
6664         
6665 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
6667         * mini.c: update jitted methods performance counters.
6669 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
6671         * mini-exceptions.c: increase the exceptions thrown performance
6672         counter in mono_handle_exception ().
6674 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
6676         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
6677         can work with netmodules.
6679 2008-07-28  Geoff Norton  <gnorton@novell.com>
6681         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
6682         regression tests.
6684 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
6686         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
6687         correct place.
6689 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
6691         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
6692           The float param registers and other param registers must be the 
6693           same index on Windows x64.
6695         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
6696           ArgValuetypeAddrInIReg argument case.  Setting the argument
6697           op to OP_VTARG_ADDR (OP_REGOFFSET)).
6699         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
6700           variable computed above as the copy length for arguments of storage
6701           type ArgValuetypeAddrInIReg.
6703         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
6704           ArgValuetypeAddrInIReg argument case.  This case will rely on
6705           mono_arch_emit_outarg_vt to emit the correct code later in the process.
6707         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
6708           a 32 byte stack allocation for all calls.  We will omit the adjustment for
6709           jump and tail call instructoins as they do not follow the typical call behavior.
6711         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
6712           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
6713           local variable and pass the local variable by reference to the called method.
6715         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
6716           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
6717           of a struct is passed in a register it must be saved with the other
6718           volatile argument on the stack.
6720         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
6721           frame pointer the stack adjustment value must be saved to the unwind 
6722           info structure.
6724         Contributed under MIT/X11 license.
6726 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
6728         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
6729         which got lost in the merge.
6731 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
6733         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
6734         build.
6736         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
6737         
6738         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
6739         icalls, since they won't be patched.
6741         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
6742         different code sequence when running under valgrind to prevent some valgrind
6743         errors.
6745         * iltests.il.in: Add new regression test.
6747         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
6748         end with a throw.
6750         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
6751         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
6753         * iltests.il.in: Add new test.
6755         * aot-compiler.c: Fix some warnings.
6757         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
6758         Fixes #412494.
6760 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
6762         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
6763         (mini_usage_jitdeveloper): Add a missing --wapi option.
6765 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
6767         * mini-codegen.c: Simplify the is_fp macros.
6768         (free_up_ireg): Remove, use free_up_reg instead.
6769         (free_up_reg): Fix the fp case.
6771 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
6773         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
6774         lowered earlier.
6776         * exceptions-x86.c: Merge some changes which seemed to have got lost
6777         in the linear-ir merge.
6779         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
6781         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
6782         long vreg volatile even if the variable was already created.
6784         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
6785         volatile variables.
6787 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
6789         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
6791         * mini.c (mono_jit_compile_method_inner): Add support for 
6792         MONO_EXCEPTION_BAD_IMAGE.
6794         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
6795         mini_method_get_context () returns NULL. Fixes #356531.
6797         * mini.c (mono_method_to_ir): Ditto.
6798         
6799         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
6800         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
6802 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
6804         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
6805         in the LDFTN implementation.
6807 2008-07-25  Mark Probst  <mark.probst@gmail.com>
6809         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
6810         code, patch calls to icalls, too, even if they're not in the
6811         shared generic code hash.  Fixes #411962.
6813 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
6815         * cpu-x86.md: Increase the length of the fcall opcodes.
6817         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
6818         calls returning floats.
6820         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
6821         on NEWARR.
6822         
6823         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
6824         missed earlier.
6826         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
6827         into the domain->method_code_hash.
6829         * aot-compiler.c: Fix win32 build.
6831         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
6832         
6833         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
6834         gshared NEWARR implementation.
6836         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
6838         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
6839         can be used outside of method_to_ir.
6841         * mini.h (MonoCompile): Add arg_types field.
6843         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
6844         
6845         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
6846         the values of the local arg_array and param_types array.
6848 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
6850         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
6851         got accesses might only get generated later when NEWOBJ is decomposed.
6852         
6853         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
6854         looking up the native code of the target method when a delegate is called
6855         for the first time.
6857         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
6858         optimization.
6860         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
6862         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
6863         AOT work on platforms without a working dlsym implementation.
6865         * mini.h: Bump AOT image format version.
6866         
6867 2008-07-24  Mark Probst  <mark.probst@gmail.com>
6869         * mini-exceptions.c: Free a MonoType with
6870         mono_metadata_free_type() instead of g_free().
6872         * aot-runtime.c: Free a MonoType.
6874 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
6876         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
6877         optimization.
6879         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
6880         fp stack on x86.
6882 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
6883         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
6884         profiler hook.
6886 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
6888         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
6889         NEWOBJ calls on valuetypes.
6891         * iltests.il.in: Add new test.
6893         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
6895 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
6897         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
6898         is no longer needed.
6900         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
6901         non register sized integer arguments.
6902         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
6903         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
6904         emit_memcpy2 ().
6906         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
6907         CEE_MONO_RETOBJ.
6908         
6909         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
6910         two a binop with different sized arguments is emitted.
6912         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
6913         instruction in the ins==NULL case.
6915 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
6917         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
6919         * mini-x86.c: Fix osx build.
6921         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
6922         opcodes as well.
6924         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
6925         instruction for non int sized variables.
6927         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
6928         implementation.
6930 2008-07-23  Robert Jordan  <robertj@gmx.net>
6932         * method-to-ir.c: Fix MSVC build.
6934 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
6936         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
6937         a non int sized type, widen it to an int since newer versions of gcc seem to
6938         generate code which needs this.
6940         * ssa2.c abcremoval2.c: Fix warnings.
6942         * *: Merge the Linear IR branch.
6944         The original branch is at trunk/branches/vargaz/mini-linear-il, and
6945         the ChangeLog file there describes all the changes done over the years. 
6946         Further documentation can be found at www.mono-project.com/Linear_IL.
6948 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
6950         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
6951           The float param registers and other param registers must be the 
6952           same index on Windows x64.
6954         Contributed under MIT/X11 license.
6956 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
6958         * mini.c: Make the previous fix GC safe.
6960 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
6962         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
6964 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
6966         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
6967           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
6968           ArgValuetypeAddrInIReg instead.
6970         Contributed under MIT/X11 license.
6972 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
6974         * mini-codegen.c (get_register_spilling): Fix a warning.
6976 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
6978         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
6979         for types which the initialization fails. Raises the provided exception
6980         at the right stop after cleanup.
6982 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
6984         * aot-compiler.c: Free most of the memory allocated during compilation.
6986         * mini.c (mini_parse_debug_options): Fix a leak.
6987         
6988         * mini.c (mini_method_compile): Don't add the method to the jit info tables
6989         during aot compilation.
6991 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
6993         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
6994         it has too much register pressure.
6996 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
6998         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
7000 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
7002         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
7003         on x86.
7005         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
7006         on amd64 similar to the way it is done on arm.
7008         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7010         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
7011         consistency, normalize error messages, avoid loading aot-only modules in
7012         normal mode.
7014         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
7015         for consistency.
7017         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
7019 2008-07-11  Martin Baulig  <martin@ximian.com>
7021         * debug-debugger.h
7022         (MonoDebuggerInfo): Add `interruption_request'.
7024 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
7026         * aot-compiler.c (emit_plt): Remove some dead code.
7028         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
7030         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
7031         return the plt info offset belonging to a given plt entry.
7033         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
7034         mono_aot_get_plt_info_offset.
7035         
7036         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
7037         similar to the amd64 code by makeing jumps through a separate jump table 
7038         instead of embedding the jump addresses into the code.
7040 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
7042         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
7043         method.
7045 2008-07-10  Martin Baulig  <martin@ximian.com>
7047         * mini.c (mini_method_compile): Disable generics sharing when
7048         running in the debugger.
7050 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
7052         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
7054         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
7055         the local register allocator from running out of registers on x86 when 
7056         using aot.
7058 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
7060         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
7061         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
7062         C4146.
7064         Contributed under MIT/X11 license.
7066 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
7068         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
7069         speed up the assembler.
7071 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
7073         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
7074         support.
7076         * mini.c: Move the soft float handling macros a bit earlier, add 
7077         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
7078         place.
7080         * mini.h: Add prototype for mono_arch_fixup_jinfo.
7082         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
7083         read-only to help catch code allocation requests.
7084         
7085         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
7086         and turn it off when using --aot-only or when compiling with --aot=full.
7088         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
7089         jump table for switches from the normal domain mempool, not the code
7090         manager.
7092         * mini-trampolines.c (get_unbox_trampoline): New function to return an
7093         unbox trampoline which handles aot-only mode too.
7095         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
7096         an AOTed unbox trampoline.
7098         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
7100 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
7102         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
7103         ""
7105         Contributed under MIT/X11 license.
7107 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
7109         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
7110           the unwind information for the method at the end of the allocated block.
7111           
7112         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
7113           MonoCompileArch to hold the unwind info for SEH on Winx64
7114         
7115         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
7116           frame pointer info for the method being compiled.
7117           
7118         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
7119           the call to mono_exception_from_token.
7120           
7121         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
7122           storing the method prolog information in a format that the Winx64 SEH can understand.  This
7123           information is stored a the end of the method block because it is all 32-bit offset based.
7125         Contributed under MIT/X11 license.
7127 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
7129         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
7131         * wapihandles.c: Fix warnings.
7133         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
7134         mode.
7136         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
7137         mono_jit_compile_method in aot-only mode since that calls the type 
7138         initializer.
7139         
7140         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
7141         get_delegate_invoke_impl in aot-only mode.
7143         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
7145 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
7147         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
7149         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
7150         is on by default.
7152         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
7154         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
7155         init trampoline from the AOT file as well.
7157         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
7158         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
7159         code.
7161         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
7162         mono_init.
7164         * exceptions-amd64.c: Add _full variants for the remaining exception code
7165         creation functions as well, allow emission of relocatable code, remove
7166         caching since that is now done by the caller.
7168         * mini-exceptions.c: Add _full variants for the remaining exception code
7169         creation functions as well, add aot-only support.
7171         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
7172         if we can determine a proper token for them.
7173         (add_wrappers): Add a few more wrappers.
7174         (emit_method_code): Remove some dead code.
7175         (emit_trampolines): Emit exception code too.
7177         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
7179         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
7180         mono_array_new_va which avoids varargs.
7182         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
7184         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
7185         mono_arch_create_specific_trampoline () in all places.
7187         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
7188         a bit so it can be used for other things as well.
7189         
7190         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
7191         on demand as well.
7193         * exceptions-amd64.c: Rename the caching from the exception code creation
7194         functions, it is done by the caller instead.
7195         
7196         * exceptions-amd64.c: Change the signature of the exception code creation 
7197         functions to allow the creation of relocatable code later.
7199         * mini-exceptions.c: Add a set of functions to query the various 
7200         runtime-generated exception functions.
7202         * mini.c mini-exceptions.c: Use the newly added functions instead of the
7203         mono_arch_.. () functions.
7204         
7205 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
7207         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
7209         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
7211         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
7212         (mini_get_vtable_trampoline): Ditto.
7214         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
7215         code in the AOT case by returning the code size and a list of relocations to
7216         the caller.
7218         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
7220 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
7222         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
7223           clean the stack.
7225         Contributed under MIT/X11 license.
7227 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
7229         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
7230         so the buffer size can be computed correctly. Fixes #404735.
7232         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
7233         normally as cfg->debug_info is already freed.
7235 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
7237         * mini-amd64.c: For calls returning vtypes in registers, don't store
7238         the return address on the stack, instead allocate a separate local for
7239         it. Fixes #404729.
7241 2008-07-05  Mark Probst  <mark.probst@gmail.com>
7243         * mini-trampolines.c, mini.h: Add an argument to
7244         mono_create_jit_trampoline_in_domain() for turning off the adding
7245         of the sync wrapper.
7247         * mini.c: Use the JIT trampoline without sync instead of
7248         ldftn_nosync in static RGCTX invoke wrappers so that the call can
7249         be patched.
7251 2008-07-04  Mark Probst  <mark.probst@gmail.com>
7253         * driver.c: Turn on GSHARED optimization by default.
7255 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
7257         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
7258         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
7260         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
7261         create a variant of the generic trampoline code callable from AOTed trampolines.
7263         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
7264         trampoline code callable from AOTed trampolines.
7266         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
7268 2008-07-04  Mark Probst  <mark.probst@gmail.com>
7270         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
7271         pass-through manner.
7273         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
7274         and don't fail sharing for them anymore.
7276         * mini-exceptions.c: Handle exceptions in shared generic methods.
7278         * generic-sharing.c: When checking the context of a generic
7279         method, also check its class's context.  Don't treat wrappers as
7280         sharable.
7282         * mini-trampolines.c: Some code factored out to
7283         metadata/generic-sharing.c.  Handle the MRGCTX case.
7285         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
7286         we must deal with the method being of another instantiation of the
7287         class.  Add static rgctx invoke wrappers to generic methods.
7289 2008-07-04  Mark Probst  <mark.probst@gmail.com>
7291         * mini.c: Provide all jit infos of generic shared methods with a
7292         generic jit info.
7294         * mini-exceptions.c: Handle the new situation that a generic info
7295         might be available, but not info about the this/vtable/mrgctx
7296         variable.
7298 2008-07-03  Mark Probst  <mark.probst@gmail.com>
7300         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
7301         generic methods.
7303 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
7305         * dominators.c (check_dominance_frontier): Fix a warning.
7307         * mini.h: Add some missing prototypes.
7309         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
7311         * driver.c (mono_jit_init_version): Correct the comments since the first
7312         argument should be the name of the root domain, not a filename.
7314         * aot-runtime.c (make_writable): Error out if this is called while running
7315         with --aot-only.
7316         (load_aot_module): Ditto.
7318         * aot-compiler.c: Really fix the computation of method indexes.
7320         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
7321         optimizations as this is no longer called frequently.
7323         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
7324         method and the invoke impl code and pass it to the delegate trampoline instead of
7325         just the delegate class.
7327 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
7329         * aot-compiler.c: Fixup the computation of method indexes.
7330         (add_wrappers): Create the base methods of the runtime invoke wrappers using
7331         the method builder infrastructure.
7333         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
7334         has no header.
7336         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
7337         mode, load the method right away instead of creating a trampoline.
7339         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
7341         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
7342         some checks a bit.
7344 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
7346         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
7347         (mono_aot_load_method): Use method_index instead of method->token.
7349         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
7350         can handle icalls etc. properly.
7352         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7354         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
7356         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
7357         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
7358         JIT_ICALL_ADDR patch type.
7360         * patch-info.h: Add JIT_ICALL_ADDR patch type.
7362         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
7363         request flag.
7364         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
7366         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
7368 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
7370         * mini.c: Use domain->jit_code_hash_lock for controlling access to
7371         domain->jit_code_hash.
7373 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
7375         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
7377 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
7379         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
7380         get_this_arg_from_call, let it compute it when needed.
7382         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
7383         gsctx from code only when needed.
7385         * mini-trampolines.c (get_generic_context): Rename this to 
7386         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
7387         it can be called by the arch backends.
7389         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
7391 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
7393         * driver.c (mono_main): Add experimental --aot-only command line option.
7395         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
7396         set.
7398 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
7400         * driver.c (DllMain): Remove mono_module_handle.
7402         Contributed under MIT/X11 license.
7404 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
7406         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
7407         for emitting methods which are not in the source assembly. Detect and report
7408         failure of assembling+linking.
7409         
7410         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
7412         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
7414 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
7416         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
7418 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
7420         * mini.h: Remove some obsolete prototypes.
7422         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
7424 2008-06-24  Mark Probst  <mark.probst@gmail.com>
7426         * mini.c (get_object_generic_inst): Variable-sized arrays are not
7427         supported by Visual Studio, so use alloca().
7429 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
7431         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
7432         Fixes #402585.
7434 2008-06-23  Mark Probst  <mark.probst@gmail.com>
7436         * mini.c: Fail sharing of a generic method if it contains an open
7437         catch clause (because we don't pass MRGCTXs yet).
7439 2008-06-23  Mark Probst  <mark.probst@gmail.com>
7441         * mini.c: When compiling a method with generic sharing, insert the
7442         method instantiated with an all-Object generic context into the
7443         jit info table, instead of the context of the first instantiation
7444         of the method we happen to compile.
7446 2008-06-18  Martin Baulig  <martin@ximian.com>
7448         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
7449         `major_version' and `minor_version'.
7451 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7453         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
7454         mono_method_is_generic_sharable_impl() takes an additional
7455         argument specifying whether to treat type variables as reference
7456         types.
7458 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7460         * mini.h: Removed obsolete prototypes.
7462 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7464         * mini.c: Don't fail generic sharing for initobj and sizeof - we
7465         already handle them.
7467 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7469         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
7470         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
7471         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
7472         tramp-x86.c: Added a MonoGenericContext* argument to
7473         mono_arch_get_unbox_trampoline() so that it can call other
7474         functions which require it.
7476 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7478         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
7479         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
7480         mono_arch_get_this_arg_from_call() takes a
7481         MonoGenericSharingContext* as well.
7483 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7485         * mini.c: Factor out code for emitting unbox into emit_unbox() and
7486         implement generic sharing of unbox.
7488 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7490         * mini.c: Don't compute the vtable to determine whether a field is
7491         special static, because it might not work for open types.
7493 2008-06-17  Mark Probst  <mark.probst@gmail.com>
7495         * mini.c: Removed the unused token_type and token_source arguments
7496         from get_runtime_generic_context_ptr().
7498 2008-06-17  Marek Habersack  <mhabersack@novell.com>
7500         * mini.c (ADD_BINOP): fix the build
7502 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
7504         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
7505         a widening op.
7507 2008-06-16  Mark Probst  <mark.probst@gmail.com>
7509         * mini.h: Removed class relations enum that's not used anymore.
7511 2008-06-16  Mark Probst  <mark.probst@gmail.com>
7513         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
7515         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
7516         the lazy fetch trampoline access code.
7518 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
7520         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
7522 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
7524         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
7526         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
7528         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
7530 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
7532         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
7533         intrinsics.
7535         * mini-ops.h: Add MIN/MAX_UN opcodes.
7537         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
7538         intrinsics.
7540         * basic-math.cs: Add more min/max tests.
7542         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
7544 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7546         * mini.c: Small fix in the prologue of emit_castclass.
7548 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
7550         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
7552         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
7553         do not work even for unsigned types. Fixes #400014.
7555         * basic-math.cs: Add regression tests for unsigned Min/Max.
7557 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7559         * mini.c: Added additional context_used argument to several
7560         functions, which will be needed for sharing generic methods.  Use
7561         GET_RGCTX macro wherever appropriate.  Declare only one
7562         context_used in mono_method_to_ir().
7564 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7566         * mini.c, generic-sharing.c: Removed generic class relations.
7568         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
7569         functions due to MRGCTX changes.
7571 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7573         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
7574         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
7575         with calculated IMT.
7577         * mini.c: Generic sharing of calls via generic interfaces.
7579         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
7580         generic method with non-constant MonoGenericContext*.  Instead,
7581         the context is taken out of the method itself.
7583 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7585         * mini.c: Generic sharing of ldvirtftn.
7587 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7589         * mini.c: Generic sharing of ldftn.
7591 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7593         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
7595 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7597         * mini.c: Generic sharing of the special case of ldtoken followed
7598         by a call to GetTypeFromHandle.
7600 2008-06-13  Mark Probst  <mark.probst@gmail.com>
7602         * mini.c: Generic sharing of box for nullable types.
7604 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
7606         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
7607         are passed on the stack. Fixes #324807.
7609 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
7611         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
7612         for the ArgValuetypeAddrInIReg case.
7614         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
7615         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
7617         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
7618         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
7619         local variable and pass the local variable by reference to the called method.
7620           
7621         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
7622         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
7624         Contributed under MIT/X11 license.
7626 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
7628         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
7630         * debug-mini.c (mono_debug_print_vars): Release memory after printing
7631         everything.
7633 2008-06-10  Martin Baulig  <martin@ximian.com>
7635         * debug-mini.c
7636         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
7638 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
7640         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
7641         possible error when no arguments are passed.
7643         Contributed under MIT/X11 license.
7645 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
7647         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
7648         where the file name is NULL.
7650 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
7652         * mini.c: Fix s390 build.
7654 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
7656         * trace.c (mono_trace_parse_options): Fix warnings.
7658         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
7660 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
7662         * mini.c (remove_block_if_useless): Avoid printing the method name.
7663         
7664         * mini.c: Remove needless setting of ins->cil_code which is now done by 
7665         MONO_INST_NEW.
7667         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
7668         LMF. Not yet used.
7670         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
7671         translated code after it has been patched.
7673 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
7675         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
7676         avoid problems during code patching on SMP systems.
7677         (emit_call): Avoid adding a patch info which is already added by 
7678         emit_call_body.
7679         (mono_arch_emit_exceptions): Ditto.
7681 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
7683         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
7684         MONO_TYPE_ISSTRUCT already checks for it.
7686 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
7688         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
7689           structs with floats on Winx64 the float registers are not used.  
7690           The integer registers are always used..
7691         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
7692           only one register will be used and only if the size of the struct 
7693           is 1,2,4, or 8 bytes.
7695         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
7696           to work for Winx64.
7698         Contributed under MIT/X11 license.
7700 2008-06-05  Martin Baulig  <martin@ximian.com>
7702         * debug-debugger.c (debugger_lookup_class): Also call
7703         mono_class_setup_methods() here; we're only called from RTI.
7705 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
7707         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
7708         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
7709         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
7710         Post-process object files and add dtrace-generated object, if necessary.
7712         Contributed under MIT/X11 license.
7714 2008-06-04  Mark Probst  <mark.probst@gmail.com>
7716         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
7717         element class.
7719         * mini.c: Generic sharing for unbox.any and castclass.
7721 2008-06-04  Mark Probst  <mark.probst@gmail.com>
7723         * mini.c: Ignore tailcall prefix in shared generic code and when
7724         doing calls which require a vtable/rgctx argument.
7726 2008-06-04  Mark Probst  <mark.probst@gmail.com>
7728         * mini.c: Don't free the JIT info.
7730         * driver.c: Changes in the JIT info table testing code.
7732 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
7734         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
7735         interruption. Fix some warnings.
7737         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
7738         interruption_checkpoint.
7740 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
7742         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
7743         from embedding applications.
7745 2008-06-02  William Holmes  <billholmes54@gmail.com>
7747         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
7748           reserving 32 bytes on the stack when making calls. 
7750         Contributed under MIT/X11 license.
7752 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
7754         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
7755         the linear IL branch.
7757         * driver.c: Print out more information for --version on arm.
7759 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
7761         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
7762         bb_exit instead, since out of line bblocks might not actually be emitted
7763         out-of-line.
7764         
7765         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
7766         maximum epilog size for out of line bblocks if tracing is enabled.
7768         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
7770 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
7772         * arrays.cs: Regression tests for allocating arrays with negative sizes.
7774 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
7776         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
7777         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
7778         opcodes.
7780 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
7782         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
7783         the 'value' to store is a constant.
7785         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
7787         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
7788         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
7790 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
7792         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
7793         for accessing method->generic_container.
7795 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
7797         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
7798         
7799         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
7801         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
7803         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
7804         fails.
7806 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
7808         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
7810         * mini.c: Handle the case when mono_class_vtable () fails.
7812 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
7813         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
7814         the stat profiler.
7816 2008-05-22  Mark Probst  <mark.probst@gmail.com>
7818         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
7819         together with domain sharing.
7821 2008-05-22  Mark Probst  <mark.probst@gmail.com>
7823         * mini.c: Treat callvirts to final methods like non-virtual calls
7824         when doing generic sharing, i.e. look them up in the runtime
7825         generic context.
7827 2008-05-22  Mark Probst  <mark.probst@gmail.com>
7829         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
7830         with computed types (for generic sharing).
7832         * mini.c: Generic sharing for mkrefany and refanyval.
7834 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
7836         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
7837         possible.
7839         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
7840         the generic sharing code.
7841         
7842         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
7843         when needed.
7845 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
7847         * mini.h: Remove the declaration of mono_aot_init_vtable ().
7849 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
7851         * driver.c: updated copyright date
7853 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
7855         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
7856         needed.
7858 2008-05-19  Martin Baulig  <martin@ximian.com>
7860         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
7861         pointing to the new `_mono_debug_using_mono_debugger' variable.
7863         * driver.c
7864         (mono_main): Check mono_debug_using_mono_debugger() rather than
7865         the `MONO_INSIDE_MDB' environment variable to check whether we're
7866         inside the debugger.
7868 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
7870         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
7871         argument.
7873 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
7875         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
7877         * mini.c: Added mini_assembly_can_skip_verification. This
7878         function checks if the assembly requested to skip verification. 
7879         Fixes part of #387274.
7881 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
7883         * mini.c (mini_get_method): Disable the check for open generic classes when
7884         using generic sharing.
7886         * generics.cs: Add a test for #387034.
7888         * mini.c (mini_get_method): Check whenever the method class is an open generic
7889         type, and return NULL in that case, causing a verification error. Fixes
7890         #384123.
7892 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
7894         * driver.c (mono_main): Revert r102623. The right
7895         thing to do is to enable the verifier under verifiable
7896         unless a --security flag was passed.
7898         We need this non-trivial behavior for --verify-all otherwise
7899         mcs-compileall won't be able to use it. As it needs everything to
7900         be verified under validil.
7902 2008-05-06  Martin Baulig  <martin@ximian.com>
7904         Fix #383749.
7906         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
7907         (mono_debugger_thread_cleanup): Likewise.
7908         (mono_debugger_extended_notification): Likewise.
7910 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
7912         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
7913         against both inflated and non-inflated methods. We need to check against the
7914         generic definition for cases where the instantiated method is not visible.
7915         We need to check against the inflated types for cases where the instantiation
7916         changes any super type. This fixes #382986.
7918         Note that this doesn't need to be applied to other parts of mono_method_to_ir
7919         that check for visibiliy as generic params only appears as the type subject
7920         of tokens on call opcodes. Field manipulation and ldftn must always
7921         target an exact type.
7923 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
7925         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
7926         if no related --security flag is passed.
7928 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
7930         * mini-arch.h: Prepare support for ppc64.
7932         Contributed under MIT/X11 license.
7934 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
7936         * aot-runtime.c: Prepare support for ppc64.
7938         Contributed under MIT/X11 license.
7940 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
7942         * mini-ops.h: Prepare support for ppc64.
7944         Contributed under MIT/X11 license.
7946 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
7948         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
7950         Contributed under MIT/X11 license.
7952 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
7954         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
7955         assemblies, since aot_name is not a full path, causing us to load MS.NET 
7956         assemblies on windows.
7958 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
7960         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
7961         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
7962         * main.c: Use UTF-8 encoded command line instead of Windows default code
7963         page on Windows to support Unicode.
7964         * driver.c (DllMain): New function for mixed-mode assembly support.
7965         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
7966         export __stdcall functions without decoration.
7968         Contributed under MIT/X11 license.
7970 2008-04-28  Mark Probst  <mark.probst@gmail.com>
7972         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
7973         saving it very early.
7975 2008-04-28  Mark Probst  <mark.probst@gmail.com>
7977         * mini.h, mini.c: Lots of code for accessing the old RGCTX
7978         deleted.  The only way to access the new RGCTX is via the
7979         trampline.
7981         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
7982         vtable instead of the RGCTX to static methods.
7984         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
7985         accessing the new RGCTX.
7987         * generic-sharing.c: There is no separation between self, type
7988         arguments and other types in the RGCTX anymore.
7990 2008-04-25  Jonathan Chambers <joncham@gmail.com>
7992         * mini-amd64.c (add_general): Remove previous stack adjustment.
7993         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
7994         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
7995         for 32 bytes of stack space reserved for all calls.
7996         
7997         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
7998         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
7999         adjustment.
8000         
8001         Code contributed under MIT/X11 license.
8003 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
8005         * mini.c (mini_method_verify): Only verify non-inflated methods, check
8006         against the root definition, peeling out method and type instantiations.
8007         Cache verify success results, code that fails verification is still
8008         checked multiple times.
8010 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
8012         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
8014 2008-04-23  Jonathan Chambers <joncham@gmail.com>
8016         * mini-amd64.c (add_general): Always increment stack on Win64.
8017         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
8018         on Win64.
8019         
8020         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
8021         stack based argument handling on Win64.
8022         
8023         Code contributed under MIT/X11 license.
8025 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
8027         * Makefile.am (version.h): Add support for git-svn.
8029 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
8031         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
8032         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
8033         avoiding allocations and libc functions which might deadlock.
8034         
8035         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
8036         'no-gdb-backtrace' option is set.
8038         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
8040         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
8042 2008-04-21  Martin Baulig  <martin@ximian.com>
8044         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
8045         and `get_lmf_addr'; `notification_address' is no longer a pointer.
8047 2008-04-21  Martin Baulig  <martin@ximian.com>
8049         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
8050         `thread_vtable', `event_handler_ptr' and `event_handler'.
8052 2008-04-21  Martin Baulig  <martin@ximian.com>
8054         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
8055         allows delayed initialization of the `executable_code_buffer' when
8056         attaching.
8058 2008-04-21  Martin Baulig  <martin@ximian.com>
8060         * mini.h (mono_debugger_create_notification_function): Removed.
8061         * tramp-*.c (mono_debugger_create_notification_function): Removed.
8063         * mdb-debug-info64.s
8064         (MONO_DEBUGGER__notification_function): Added this in the .text section.
8066         * mdb-debug-info32.s
8067         (MONO_DEBUGGER__notification_function): Added this in the .text section.
8069         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
8070         currently only works on x86 and x86_64, so don't create it on ppc.
8072 2008-04-21  Martin Baulig  <martin@ximian.com>
8074         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
8076         * mini.c
8077         (mini_method_compile): In the fp elimination check, check
8078         `debug_options.mdb_optimizations' in addition to
8079         mono_debug_using_mono_debugger().       
8081         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
8082         disable some JIT optimizations which are only disabled when
8083         running inside the debugger.
8084         Added `--help-debug' option to describe the debugging options.
8085         (parse_debug_options): New static function to parse the `--debug'
8086         options, so we can easily add more stuff in future.
8088 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
8090         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
8091         the method has no body.
8093 2008-04-19  Jonathan Chambers <joncham@gmail.com>
8095         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
8096         assembly is not allowed in MSVC 64-bit compiler. 
8097         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
8098         as we get floating point exceptions everywhere.
8099         
8100         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
8101         correctly align arguments for call to throw_exception.
8102         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
8103         
8104         Code contributed under MIT/X11 license.
8106 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
8108         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
8110 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
8112         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
8114         * mini-amd64.c (NEW_INS): Set cil_code.
8116         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
8117         from mini-amd64.c so all debugger related logic is in one place.
8119         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
8120         later won't have a random ip assigned to them.
8122 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
8124         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
8125         the arch specific function initializes code_size.
8126         (mono_create_delegate_trampoline): Ditto.
8128         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
8129         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
8130         platforms.
8132         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
8133         running under the debugger.
8135         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
8136         debugger.
8138         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
8139         debugger. Also move the disabling of optimizations here from driver.c.
8140         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
8141         debugger.
8143         * mini.h (MonoCompile): Add a few new flags.
8145 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
8147         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
8148         so the cil_code field of created MonoInst's is properly set.
8149         (mini_select_instructions): Ditto.
8151         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
8152         (MONO_INST_NEW_CALL): Ditto.
8154         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
8155         in many places so the ins->cil_code field is properly initialized.
8157         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
8158         place.
8160 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
8162         * mini.c (mini_method_compile): Print a different message when compiling a 
8163         shared method.
8164         
8165         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
8166         > 1.
8168 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
8170         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
8171         SSE2 instructions.
8173         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
8174         
8175 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
8177         * mini.c (handle_stack_args): Make this return void since its return value was
8178         never used. Also set cfg->unverifiable for invalid IL instead of calling
8179         G_BREAKPOINT ().
8181 2008-04-10  Mark Probst  <mark.probst@gmail.com>
8183         * mini.c: Make sure "this" is live in catch clauses with type
8184         variables in shared generic code.
8186 2008-04-08  Mark Probst  <mark.probst@gmail.com>
8188         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
8189         generic_class_is_reference_type() to ensure the proper behaviour
8190         when sharing generic code and the type in question is a type
8191         argument.
8193 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
8195         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
8196         race conditions when printing thread dumps. Fixes #377738.
8198 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
8199         
8200         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
8201         shows up when both MonoInst arguments can cause aliasig.
8202         There is likely no way in the current JIT to trigger this problem, but
8203         it showed up in the development of generics sharing, when in a new
8204         opcode both args of an OP_GROUP can be aliases (addresses of a local).
8205         When the generics sharing code will be committed, its tests will be
8206         valid also for this bug.
8208 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
8210         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
8211         PATCH_INFO_METHOD.
8213         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
8214         NULL.
8216 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
8218         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
8219         use a more detailed exception message for InvalidCastException.
8221         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
8223         * driver.c (mono_main): Add --debug=casts option to turn on better 
8224         InvalidCastException message details.
8226         * mini.c (mini_get_debug_options): New helper function to return the address of
8227         the debug_options variable.
8229         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
8230         the jit_tls TLS variable.
8232         * mini.c (mono_jit_tls): New TLS variable.
8234         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
8235         option is used.
8237 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
8239         * mini.h: Removed verifer related stuff. This code was moved to verify.c
8241         * mini.c: Removed verifer related stuff, code moved to verify.c.
8243         * driver.c: Using code from verify.c instead of mini.c.
8245 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
8247         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
8248         longer valid.
8250 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
8252         * mini.c (check_for_method_verify): Enabling verification of
8253         corlib if mono_verify_all is set. Bugs in the verifier preventing that
8254         have been fixed.
8256 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
8258         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
8259         caller saved registers as well.
8260         
8261         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
8262         saved registers as well.
8264 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
8266         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
8268         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
8269         code.
8271 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
8273         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
8274         to get_call_info.
8275         (get_call_info): Take a gsctx argument instead of 'cfg'.
8277 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
8279         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
8280         mono_verify_all is set.
8282         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
8284         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
8286 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
8288         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
8289         an exception.
8291         * driver.c mini.c mini.h: Add a --verify-all development option to test the
8292         verifier and the code generated by the compiler.
8294 2008-03-25  Mark Probst  <mark.probst@gmail.com>
8296         * mini.c: Generic sharing of the non-nullable case of the box
8297         instruction.
8299 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
8301         * inssel.brg: Fix the build.
8303         * iltests.il.in: Add a test for lconv.ovf.u8.un.
8305 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
8307         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
8308         Array:Address. Fixes #372410.
8310         * iltests.il.in: New tests for readonly prefix.
8312 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
8314         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
8315         mini-trampolines.c.
8317         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
8318         mini-exceptions.c.
8320         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
8321         
8322         * mini.c (mono_decompose_op_imm): New helper function.
8324         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
8325         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
8326         return value.
8328         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
8329         mono_arch_output_basic_block. Fix warnings.
8331         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
8332         for now.
8334 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
8336         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
8337         since the extra frame is now detected automatically inside the loop.
8339         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
8340         opts which are now in mono_peephole_ins ().
8341         
8342         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
8344         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
8345         frames and skip duplicate managed-to-native frames. Fixes #367665.
8347         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
8348         opts which are now in mono_peephole_ins ().
8349         (mono_arch_peephole_pass_2): Ditto.
8351         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
8353         * mini-codegen.c (mono_peephole_ins): New helper function containing the
8354         arch independent peephole optimizations.
8356         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
8357         opts which are now in mono_peephole_ins ().
8359         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
8360         
8361         * mini-s390.c (mono_arch_output_basic_block): Fix build.
8363         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
8364         pattern.
8366         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
8367         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
8368         opcode. 
8370 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
8372         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
8373         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
8374         return value.
8376         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
8377         mono_arch_output_basic_block. Fix warnings.
8379 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
8381         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
8382         conv.ovf.u.un.
8384 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
8386         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
8387         conv.ovf.u.un.
8389         * iltests.il: Add new tests.
8391 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
8393         * mini.c: Removed Windows version macros.
8395 2008-03-20  Mark Probst  <mark.probst@gmail.com>
8397         * generic-sharing.c: Put reflection types in the extensible part
8398         of the runtime generic context.
8400         * mini.c: Generic sharing of the GetTypeHandle special case of the
8401         ldtoken instruction.
8403 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
8405         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
8407         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
8408         
8409         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
8410         consistency with the other version on the linear IR branch.
8412         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
8414         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
8416         * iltests.il.in: Add new tests.
8418 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
8420         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
8422         * iltests.il.in: Add new tests.
8424 2008-03-19  Mark Probst  <mark.probst@gmail.com>
8426         * mini.c: Two variables with the same name were declared in
8427         nesting contexts and one wasn't initialized.  Fixed.
8429 2008-03-19  Mark Probst  <mark.probst@gmail.com>
8431         * mini.c: Generic sharing of the initobj instruction.
8433 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
8435         * mini.c: make the test to optimize ldtoken from typeof() more
8436         precise.
8438 2008-03-18  Mark Probst  <mark.probst@gmail.com>
8440         * mini.c: Generic sharing of the initobj instruction for reference
8441         types.
8443 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
8445         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
8446         the mono_breakpoint_clean_code() code to perform bound checks.
8448 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
8450         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
8451         mono_arch_patch_callsite() to include the start of the managed method
8452         to be able to perform bound checks.
8454 2008-03-17  Mark Probst  <mark.probst@gmail.com>
8456         * mini.c: Generic sharing for the isinst instruction.
8458 2008-03-17  Mark Probst  <mark.probst@gmail.com>
8460         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
8461         inssel-long32-mips.brg: Added opcodes for doing indirect calls
8462         with the runtime generic context argument.
8464         * mini.c: Share calls to several types of unsharable methods by
8465         putting the address of the method code in the runtime generic
8466         context and doing an indirect call.
8468         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
8469         to switches.
8471 2008-03-16  Mark Probst  <mark.probst@gmail.com>
8473         * generic-sharing.c: Change due to a change in the runtime genric
8474         context API.
8476 2008-03-15  Martin Baulig  <martin@ximian.com>
8478         * tramp-x86.c
8479         (mono_arch_nullify_class_init_trampoline): Add call to
8480         mono_breakpoint_clean_code() to make things work when running
8481         inside the debugger.
8483         * tramp-amd64.c
8484         (mono_arch_nullify_class_init_trampoline): Add call to
8485         mono_breakpoint_clean_code() to make things work when running
8486         inside the debugger.
8488 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
8490         * inssel-long.brg (reg): Fix 64 bit build.
8492 2008-03-14  Mark Probst  <mark.probst@gmail.com>
8494         * mini.c, mini.h: Share static generic code by passing it an
8495         implicit argument pointing to the runtime generic context.
8497         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
8498         inssel-long32-mips.brg: New opcodes for calling shared static,
8499         which need to be passed the runtime generic context.
8501         * mini-amd64.c, mini-x86.c: Save the runtime generic context
8502         argument on the stack in the prologue if needed.  New function for
8503         finding the runtime generic context argument from the registers
8504         saved by the trampoline.
8506         * mini-amd64.h, mini-x86.h: Specify which register to use for the
8507         runtime generic context argument.
8509         * tramp-amd64.c: Also restore the register used for the runtime
8510         generic context argument.
8512         * mini-trampoline.c: Resolve shared static calls by consulting the
8513         runtime generic context via the new argument.
8515         * generic-sharing.c: Add an argument to sharability-checking
8516         functions that specifies whether type variables should be treated
8517         as sharable type arguments.
8519         * inssel-x86.brg: Removed a superfluous, buggy rule.
8521         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
8522         to switches.
8524 2008-03-14  Martin Baulig  <martin@ximian.com>
8526         * debug-debugger.c (main_thread_handler): Call
8527         mono_runtime_run_main() without sending any notifications.
8529         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
8531 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
8533         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
8535 2008-03-14  Mark Probst  <mark.probst@gmail.com>
8537         * tramp-x86.c: Fixed register restore offsets in the trampoline
8538         code for ECX and EDX.
8540 2008-03-12  Geoff Norton  <gnorton@novell.com>
8542         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
8543         different ucontext_t implementations.
8544         * exceptions-arm.c: Use the above defines to get exceptions working on 
8545         iPhone (based on a patch by Luke Howard lukeh@padl.com)
8546         * mini-arm.c: Implement iPhone icache support (based on a patch by
8547         Luke Howard lukeh@padl.com)
8549 2008-03-12  Mark Probst  <mark.probst@gmail.com>
8551         * mini.c: Enable generic sharing of calls to non-static
8552         non-interface non-generic non-value-type methods.
8554         * mini-trampolines.c: Resolve calls from shared generic code.
8556 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
8558         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
8560         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
8562 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
8564         * mini.c: some fixes for the AOT compiler.
8566 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
8568         * cpu-amd64.md: Add clob:1 to some float opcodes.
8570 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
8572         * mini.h: Added MiniVerifierMode enumeration.
8574         * mini.c: Added mini_verifier_set_mode to control
8575         the usage of the new verifier.
8577         * mini.c (mono_method): Integrated the new verifier.
8579         * driver.c: Extended --security option with validil and
8580         verifiable options to activate the new verifier.
8582 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
8584         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
8585         optimization to ctors taking 0 or 2 arguments too.
8587         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
8588         a bit.
8590         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
8592         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
8594 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
8596         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
8597         non-aot case as well.
8599         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
8601         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
8602         changes.
8604         * aot-compiler.c (encode_patch): Ditto.
8606         * mini.h (G_MININT32): Fix the definition of this.
8608 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
8610         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
8612         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
8614 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
8616         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
8617         methods returning vtypes in registers.
8618         (mono_arch_allocate_vars): Ditto.
8620         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
8622         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
8624         * generics.cs: Add a test from the linear IR branch.
8626         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
8628         * mini.c (inline_method): Cache failed inline attempts.
8630 2008-03-04  Mark Probst  <mark.probst@gmail.com>
8632         * mini.c: For shared methods of generic classes put the location
8633         of "this" into the MonoGenericJitInfo.
8635         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
8636         register out of a MonoContext by register number.  Add the generic
8637         sharing context as an argument to mono_arch_find_this_argument().
8639         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
8640         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
8641         for new arch function.
8643         * mini-exception.c: Handle open exception clauses in shared
8644         generic code.
8646         * mini-trampolines.c: Supply additional argument to
8647         mono_arch_find_this_argument().
8649 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
8651         * Makefile.am (regtests): Run the bench.exe tests last.
8653 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
8655         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
8656         a bit.
8658 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
8660         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
8661         with MS.
8663         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
8664         
8665         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
8667         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
8668         whose class has no cctor.
8670         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
8672 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
8674         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
8675         unverified.
8677 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
8679         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
8680         to be in sync with the code on the linear IR branch.
8682         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
8684         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
8686 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
8688         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
8690         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
8692         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
8694         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
8696         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
8697         
8698         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
8699         body.
8701 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
8703         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
8704         OP_LOADR4_MEMBASE emission.
8706         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
8707         (mono_spillvar_offset_float): Ditto.
8709         * mini-mips.c (mono_arch_emit_prolog): Ditto.
8711         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
8712         emission.
8714         * basic-long.cs: Add regression tests for them.
8716         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
8717         use.
8718         (mono_arch_allocate_vars): Fix representation of single-precision float
8719         argument.
8720         (mono_arch_output_basic_block): Ditto.
8722         * inssel-mips.brg: Ditto, remove duplicate items.
8724         * mini-mips.c (emit_load_volatile_arguments): New function to handle
8725         arguments of tail calls as on other platforms.
8726         (mono_arch_output_basic_block): Handle tail calls.
8728         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
8729         register.
8731         * objects.cs (test_5_pass_static_struct): Add test for it.
8733         Contributed under MIT/X11 license.
8735 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
8737         * Makefile.am: Use gmcs for compiling the regression tests.
8739         * *.2.cs *.2.il: Rename to *.cs and *.il.
8741 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
8743         * regalloc.h: Make the vassign array smaller.
8745         * mini.c (mini_method_compile): Remove an unused field in cfg.
8747         * mini-codegen.c: Add a bunch of micro optimizations.
8749 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
8751         * regalloc.h: Remove some unused fields.
8753 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
8755         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
8757         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
8759 2008-02-22  Mark Probst  <mark.probst@gmail.com>
8761         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
8763         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
8764         trampoline: Fetch an entry from the runtime generic context.  If
8765         it's NULL, jump to the actual trampoline to fill the runtime
8766         generic context.  Otherwise, return it.
8768         * mini.c: Call the lazy fetch trampoline to get entries out of the
8769         runtime generic context.
8771         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
8772         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
8773         tramp-sparc.c: Stubs for the lazy fetch trampoline.
8775 2008-02-21  Mark Probst  <mark.probst@gmail.com>
8777         * mini.c: Fetch data out of the extensible part of the runtime
8778         generic context instead of calling a helper function.
8780         * generic-sharing.c: Some functions moved into
8781         metadata/generic-sharing.c.  Helper function for fetching other
8782         types now checks and asserts against extensible rgctx (just for
8783         debugging purposes - the helper function isn't called anymore
8784         unless for debugging).
8786 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
8788         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
8789         for tail calls up to the point that the tests in iltests.exe run. Also add a
8790         dummy CKFINITE implementation.
8791         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
8792         needed for trampoline LMF frames.
8794         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
8795         trampoline LMF frames.
8797 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
8799         * mini.c (inline_method): clean any pending loader error when inlining fail.
8800         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
8802 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
8804         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
8806         * aot-runtime.c (decode_patch_info): Ditto.
8808         * mini.c (mono_resolve_patch_target): Ditto.
8809         
8810         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
8811         icall wrappers.
8813         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
8814         
8815         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
8816         if it references an icall address.
8818 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
8820         * cpu-s390x.md: Remove some more unused opcodes.
8821         
8822         * cpu-s390x.md: Remove some unused opcodes.
8824         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
8825         mono_op_imm_to_op ().
8827         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
8828         instead of a switch statement.
8829         
8830         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
8831         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
8833         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
8834         
8835         * mini-codegen.c: Remove unused mono_regstate2_... functions.
8837         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
8838         -1.
8840 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
8842         * driver.c (mono_main): Improve error reporting when an assembly cannot be
8843         opened. Fixes #362607.
8845         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
8847         * iltests.il.in: Add a test for static methods in interfaces.
8849 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
8851         * genmdesc.c (build_table): Fix a crash on older glib versions.
8853         * cpu-sparc.md: Remove some unused opcodes.
8854         
8855         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
8856         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
8858         * cpu-amd64.md: Remove some unused opcodes.
8860         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
8861         like the other opcodes.
8863 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
8865         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
8867         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
8869         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
8870         variables 'cfg' instead of 'm' for consistency.
8872         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
8874         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
8875         argument holding the vtype return address, to avoid the ambigious use of
8876         cfg->ret for this purpose.
8878         * mini.c (NEW_RETLOADA): Use vret_addr if set.
8880         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
8881         
8882         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
8883         new mono_print_ins () function which only takes one argument.
8885 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
8887         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
8888         macro arguments.
8890 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
8892         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
8894         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
8896         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
8897         opcodes and other small changes.
8899         * mini-ops.h: Add some new opcodes from the linear IR branch.
8901         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
8903         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
8904         opcodes, use the REG_MEMBASE opcodes instead.
8905         
8906         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
8907         opcodes, use the REG_MEMBASE opcodes instead.
8908         
8909         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
8910         linear IR branch.
8912         * mini.c (mono_op_imm_to_op): New helper function.
8914         * mini-ops.h: Add some opcodes from linear IR branch.
8916 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
8918         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
8919         <tsv@solvo.ru>.
8921 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
8923         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
8924         OP_ICONV_TO_R4/R8.
8926         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
8928 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
8930         * aot-compiler.c (emit_method_code): Add an assert.
8932         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
8933         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
8934         methods.
8936 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
8938         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
8939         some load/store opcodes so they are consistent. 
8940         (mono_arch_emit_prolog): Simplify some code.
8942         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
8944         * objects.cs: Add tests for large argument offsets on ARM.
8946         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
8947         stack offsets. Fixes #359651.
8949         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
8951         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
8953         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
8955         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
8957         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
8959         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
8960         rid of CEE_CONV_R_UN.
8962         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
8964 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
8966         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
8968         * mini.c (mono_normalize_opcodes): Add some more opcodes.
8970         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
8972         * cpu-amd64.md: Remove some unused opcodes.
8974         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
8976         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
8978         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
8979         arch specific functions for its parts. Call the peephole pass after local
8980         regalloc so the prolog can compute a more accurate max_offset.
8981         
8982         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
8983         the corresponding OP_I/OP_L opcodes.
8985         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
8987         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
8989 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
8991         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
8992         as they are handled in mini.c.
8994         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
8995         
8996         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
8997         case since it is handled in mini.c.
8999         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
9001         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
9003         * *.c: Use the new opcodes in the IR and back end code.
9005         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
9007         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
9009 2008-02-06  Mark Probst  <mark.probst@gmail.com>
9011         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
9012         an assert because it has a race condition.
9014 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
9016         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
9018         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
9020         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
9022         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
9023         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
9025 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
9027         * cpu-amd64.md (move): Correct the maximum size of move.
9029 2008-02-05  Mark Probst  <mark.probst@gmail.com>
9031         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
9032         the generic class init trampoline to return quickly if the class
9033         is already inited.
9035 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
9037         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
9038         issues where an 32 bit callsite cannot be patched by a 64 bit address.
9040 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
9042         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
9043         branch.
9045 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
9047         * objects.cs: Add some soft-float tests.
9049         * mini.c: Fix a couple more soft-float issues.
9051         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
9053         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
9054         avoid a REX prefix.
9056 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
9058         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
9059         exception happens while compiling a virtual method.
9061 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
9063         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
9064         
9065         * mini-sparc.c: Fix build.
9067         * mini-sparc.c (get_call_info): Add support for generic sharing.
9069         * mini-exceptions.c: Add a FIXME.
9071 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
9073         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
9074         altstack handling code.
9076         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
9077         
9078         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
9080         * mini-s390.c: Add support for generic sharing.
9082         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
9083         Fix CAS on s390.
9084         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
9086         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
9088         * mini-s390x.c: Add support for generic sharing.
9089         
9090         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
9091         Fix CAS on ia64.
9092         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
9094         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
9095         can be used since it takes a 16 bit signed immediate.
9097         * inssel-s390x.brg: Fix OP_SETRET.
9099         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
9101         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
9103         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
9105         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
9107         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
9108         in one place.
9110         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
9111         stuff.
9113         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
9114         of the unused mono_arch_patch_delegate_trampoline stuff.
9116 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
9118         * basic-long.cs: Move the fp related tests to basic-float.cs.
9120         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
9122         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
9124         * basic-calls.cs: Add a test for proper float argument passing.
9126         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
9127         if the context corresponds to an exception received through a signal.
9129         * exceptions.cs: Add a test for nullref handling at the start of a try
9130         clause.
9132         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
9134         * jit-icalls.c (mono_break): New JIT icall.
9136         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
9138         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
9140 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
9142         * cpu-*.md: Get rid of unused opcodes.
9144         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
9146         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
9147         by all platforms.
9149         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
9150         define.
9152         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
9153         the arch independent trampoline code in mini-trampolines.c.
9155         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
9157         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
9159         * mini-s390.h: Remove an unused define.
9160         
9161         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
9162         the arch independent trampoline code in mini-trampolines.c.
9164         * mini-arm.c (mono_arch_emit_prolog): Fix build.
9166 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
9168         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
9170         * mini-s390.c (mono_arch_emit_prolog): Fix build.
9172         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
9174         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
9176         * cpu-amd64.md: Use smaller sizes for int opcodes.
9178         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
9180         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
9181         objects.cs.
9183         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
9184         debugging.
9186         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
9187         instead of though a pointer to save an indirection when accessing elements of
9188         the array.
9190         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
9191         some typos.
9192         (NOT_IMPLEMENTED): New helper macro.
9193         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
9194         of a bb.
9196         * *.c: Use the new helper macro.
9198 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
9200         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
9202 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
9204         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
9205         stack slots.
9207 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
9209         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
9210         profiling is enabled.
9211         
9212         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
9213         the end.
9214         (mono_arch_emit_prolog): Add more first bblock optimizations.
9216         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
9217         in order if possible.
9218         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
9219         bblock, since the arguments are still in their original registers.
9221         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
9223 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
9225         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
9226         as well.
9228         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
9229         offset 0.
9231         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
9233         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
9234         process async exceptions received while in unmanaged code.
9236         * mini.c (mini_init): Install a callback with the runtime which will be called
9237         when a thread receives an async exception while in unmanaged code.
9239         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
9241         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
9243 2008-01-16  Wade Berrier  <wberrier@novell.com>
9245         * cpu-g4.md:
9246         * cpu-arm.md:
9247         * cpu-s390x.md:
9248         fix build
9250 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
9252         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
9253         compilation with sun cc.
9255         * cpu-*.md: Fix the build.
9257         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
9259         * mini-amd64.h: Add some comments to the MonoLMF structure.
9261         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
9262         
9263         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
9264         in the LMF structure if possible. This saves two instructions in the
9265         managed->native wrappers.
9267         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
9269 2008-01-16  Mark Probst  <mark.probst@gmail.com>
9271         * generic-sharing.c: New type argument lookup code which uses the
9272         runtime generic context template.
9274 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
9276         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
9278         * mini-arm.c (add_general): Fix arm eabi parameter passing.
9279         (mono_arch_output_basic_block): Fix localloc implementation.
9281         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
9283         * mini-ia64.c (peephole_pass): Fix ia64 build.
9285         * mini-amd64.c (peephole_pass): Fix a warning.
9286         
9287         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
9288         at a constant offset from sp/fp.
9290         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
9291         instead of obtaining it from *lmf in the managed method case.
9293 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
9295         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
9297 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
9299         * mini.h (MonoInstList): New type.
9300         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
9301         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
9302         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
9303         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
9304         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
9305         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
9306         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
9307         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
9308         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
9309         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
9310         MONO_INST_LIST_FOR_EACH_ENTRY,
9311         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
9312         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
9313         mono_inst_list_first, mono_inst_list_last,
9314         mono_inst_list_next, mono_inst_list_prev): New instruction
9315         list handling interfaces.
9316         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
9317         list head 'ins_list'.
9318         (MonoInst): Replace next pointer with list head 'node'.
9319         (MonoCallInst): Make 'out_args' a MonoInstList.
9320         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
9321         (MonoCompile): Delete reverse_inst_list and
9322         reverse_inst_list_len.
9323         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
9324         mono_arch_lowering_pass, mono_arch_local_regalloc,
9325         mono_arch_output_basic_block, mono_arch_emit_prolog):
9326         Convert to new instruction lists.
9327         (insert_after_ins): Delete.
9328         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
9329         instruction lists.
9330         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
9331         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
9332         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
9333         mono_emulate_opcode, mono_emit_load_got_addr,
9334         inline_method, mono_method_to_ir, mono_print_bb_code,
9335         print_dfn, decompose_pass, nullify_basic_block,
9336         replace_out_block_in_code, remove_block_if_useless,
9337         merge_basic_blocks, move_basic_block_to_end,
9338         try_unsigned_compare, optimize_branches, mono_print_code,
9339         mini_select_instructions, remove_critical_edges): Likewise.
9340         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
9341         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
9342         mono_arch_output_basic_block, mono_arch_emit_prolog):
9343         Likewise.
9344         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
9345         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
9346         mono_arch_output_basic_block): Likewise.
9347         (inst_list_prepend, insert_after_ins): Delete.
9348         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
9349         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
9350         instruction lists.
9351         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
9352         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
9353         mono_arch_emit_prolog): Likewise.
9354         * cfold.c (mono_constant_fold): Likewise.
9355         * liveness.c (visit_bb, mono_analyze_liveness,
9356         optimize_initlocals): Likewise.
9357         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
9358         * graph.c (mono_draw_code_cfg): Likewise.
9359         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
9360         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
9361         mono_ssa_cprop): Likewise.
9362         * abcremoval (get_relations_from_previous_bb, process_block):
9363         Likewise.
9364         * local-propagation (mono_cprop_invalidate_values,
9365         mono_local_cprop_bb): Likewise.
9366         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
9367         peephole_pass, mono_arch_output_basic_block,
9368         mono_arch_emit_prolog): Likewise.
9369         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
9370         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
9371         mono_arch_emit_prolog): Likewise.
9372         (insert_after_ins): Delete.
9373         * aliasing.c (print_code_with_aliasing_information,
9374         mono_build_aliasing_information, mono_aliasing_deadce):
9375         Convert to new instruction lists.
9376         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
9377         peephole_pass, NEW_INS, mono_arch_lowering_pass,
9378         mono_arch_local_regalloc, mono_arch_output_basic_block):
9379         Likewise.
9380         (insert_after_ins): Delete.
9381         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
9382         peephole_pass, mono_arch_output_basic_block): Convert to
9383         new instruction lists.
9384         * mini-codegen (InstList, inst_list_prepend,
9385         insert_after_ins): Delete.
9386         (insert_before_ins, get_register_force_spilling,
9387         get_register_spilling, free_up_ireg, free_up_reg,
9388         create_copy_ins, create_spilled_store, alloc_int_reg,
9389         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
9390         to new instruction lists.
9391         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
9392         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
9393         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
9394         (insert_after_ins): Delete.
9395         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
9396         mono_arch_local_regalloc, mono_arch_output_basic_block,
9397         mono_arch_call_opcode): Convert to new instruction lists.
9398         (insert_after_ins): Delete.
9399         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
9400         peephole_pass, mono_arch_output_basic_block,
9401         mono_arch_emit_prolog): Convert to new instruction lists.
9403 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
9405         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
9407         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
9408         Fixes #353182.
9410         * Makefile.am (version.h): Make this work with non-bash shells.
9412 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
9414         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
9416 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
9418         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
9419         the InitializeArray optimization.
9421 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
9423         * mini.c driver.c: Don't include os/gc_wrapper.h.
9425 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
9427         * mini.c (print_jit_stats): Print GC statistics if available.
9429 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
9431         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
9433 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
9435         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
9437 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
9439         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
9440         
9441         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
9443         * driver.c (mono_main): Ditto.
9445 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
9447         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
9449         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
9450         in the vtable can't be encoded.
9451         (compile_method): Ditto.
9453 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
9455         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
9456         defined.
9458         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
9459         lmf->rbp.
9461         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
9462         the top LMF entry belongs to the current method.
9464         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
9466 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
9468         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
9469         
9470         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
9472         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
9474         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
9476         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
9478         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
9479         implementation.
9481         * basic-float.cs: Add an ulong->double cast test.
9483 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
9485         * mini.c (mono_method_to_ir): Fix a warning.
9487 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
9489         * mini-ops.h: Add OP_SWITCH.
9491         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
9492         CEE_SWITCH in back-end code, use OP_SWITCH instead.
9494 2007-12-11  Geoff Norton  <gnorton@novell.com>
9496         * mini-s390x.c: Minor change to the MAX() define to allow
9497         it to compile with other gcc versions.
9499 2007-12-11  Geoff Norton  <gnorton@novell.com>
9501         * cpu-s390x.md:
9502         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
9504 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
9506         exceptions-arm.c (mono_arch_get_restore_context): Restore
9507         the frame pointer.
9509         exceptions-arm.c (throw_exception): Save the frame pointer.
9510         This is a partial fix for #323747. Only the client side is
9511         fixed.
9513 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
9515         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
9516         was using an unrelated variable to log the class which
9517         needed the cctor to be called. This was crashing on arm.
9519 2007-12-09  Robert Jordan  <robertj@gmx.net>
9521         * mini-x86.c (mono_arch_emit_epilog):
9522         Consider all kinds of 64-bit types. Fixes #323114.
9524 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
9526         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
9528 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
9530         * mini-amd64.c (peephole_pass): Add a missing instruction check.
9532 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9534         * mini.c: run type ctor before allocating an object, not only
9535         when running it's constructor method (fixes at least part of bug #342507).
9537 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
9538         
9539         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
9540         
9541         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
9542         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
9543         function.
9545         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
9546         mono_generic_class_init_trampoline () the same as it is done with the other
9547         trampolines.
9549         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
9550         aot-runtime.c aot-compiler.c: Implement AOT support.    
9552 2007-12-07  Mark Probst  <mark.probst@gmail.com>
9554         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
9555         build for archs which don't have the vtable trampoline defined
9556         yet.
9558 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
9560         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
9562         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
9564         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
9566         * tramp-<ARCH>.c: Use the new helper function.
9568 2007-12-07  Mark Probst  <mark.probst@gmail.com>
9570         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
9571         trampoline call, which takes a vtable argument.
9573         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
9574         OP_TRAMPCALL_VTABLEs like other calls.
9576         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
9577         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
9578         call.  Implemented a support function which fetches the vtable
9579         from a register set.
9581         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
9582         Implemented a generic class init trampoline, using the
9583         OP_TRAMPCALL_VTABLE opcode.
9585         * mini.c: Implemented static field access when sharing generic
9586         code.  This implies initing the class using the new
9587         OP_TRAMPCALL_VTABLE call.
9589 2007-12-07  Mark Probst  <mark.probst@gmail.com>
9591         * mini.c: Don't compile methods with sharing enabled if their
9592         classes are disabled for sharing.
9594 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
9596         * inssel.brg: Add a missing sign extension to the GETCHR and array access
9597         opcodes. Fixes #346563.
9599         * objects.cs: Add a new test.
9601         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
9603         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
9604         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
9606 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
9608         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
9610 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
9612         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
9613         code stream.
9615 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
9617         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
9619         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
9620         optimization in the AOT case.
9621         
9622 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
9624         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
9625         
9626         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
9628         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
9630         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
9632         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
9633         is created by the inlined delegate ctor.
9635         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
9637         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
9639 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
9641         * cpu-x86.md: Fix the length of ckfinite.
9643 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
9645         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
9646         
9647         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
9648         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
9650         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
9652         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
9653         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
9655 2007-11-28  Martin Baulig  <martin@ximian.com>
9657         * mini-x86.c
9658         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
9659         after creating the trampoline.
9661 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
9663         * aot-runtime.c (load_aot_module): Check runtime version if needed.
9665         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
9666         the same version.
9668         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
9669         instead of the calling method to help AOT.
9671         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
9673 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
9675         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
9676         is defined.
9678 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
9680         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
9681         
9682         * aot-compiler.c (compile_method): Correct check for generic method definitions.
9683         (encode_method_ref): No need to handle generic method definitions specially.
9685         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
9687         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
9688         decode_klass_info.
9690         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
9691         encode_klass_info.
9692         (compile_method): Enable generic sharing.
9694 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
9696         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
9697         (mini_method_compile): Add preliminary support for AOTing shared generic code.
9699         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
9700         generic code.
9702         * mini-trampolines.c: Fix a warning.
9704         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
9705         NEW_PCONST.
9706         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
9707         (generic_class_is_reference_type): Remove unused function.
9709         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
9710         in the generic vtable trampoline case.
9712         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
9713         
9714         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
9715         return an AOT method based on a vtable slot.
9717         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
9719         * mini.c (mini_get_vtable_trampoline): Export this.
9721 2007-11-22  Martin Baulig  <martin@ximian.com>
9723         * debug-debugger.h
9724         (MonoDebuggerInfo): Move `debugger_version' up.
9726 2007-11-22  Martin Baulig  <martin@ximian.com>
9728         * mini-amd64.c
9729         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
9731         * mini-trampolines.c
9732         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
9733         after compiling the method.
9735 2007-11-20  Martin Baulig  <martin@ximian.com>
9737         * debug-mini.c
9738         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
9739         (mono_debugger_remove_breakpoint): Likewise.
9740         (mono_debugger_check_breakpoints): Likewise.
9742         * debug-debugger.c: Implement the new breakpoint interface here.
9744 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
9746         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
9747         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
9749         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
9751 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
9753         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
9755         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
9756         mini.c.
9758         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
9759         mini.c.
9761         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
9762         returning a vtype in a register.
9764         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
9765         here from the arch specific code.
9767         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
9768         mini.c.
9770         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
9771         (mono_arch_emit_prolog): Increment maximum prolog size.
9773         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
9774         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
9776         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
9777         MonoGenericSharingContext.
9779         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
9780         MonoGenericSharingContext. Allocate memory from the cfg mempool.
9782 2007-11-15  Mark Probst  <mark.probst@gmail.com>
9784         * mini.c, mini.h, generic-sharing.c: Functions for producing code
9785         which extract fields out of the runtime generic context.  Full
9786         sharing of the NEWARR opcode.
9788 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
9790         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
9791         --enable-minimal=ssa.
9793 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
9795         * mini-trampolines.c (mono_delegate_trampoline): Update after 
9796         mono_marshal_get_delegate_invoke () signature change.
9798 2007-11-13  Mark Probst  <mark.probst@gmail.com>
9800         * mini.c: Removed the shared context in favor of the generic
9801         sharing context.  Allocate the MonoJitInfo structure with room for
9802         the generic sharing context if it's needed.
9804         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
9805         domain-internals.h now.
9807         * mini-x86.c: Pass the generic sharing context to get_call_info ().
9809         * generic-sharing.c: Several changes for working without a shared
9810         context and instead operating on open types instead.
9812 2007-11-12  David S. Miller  <davem@davemloft.net>
9814        * inssel-sparc.brg: Fix double instruction emit.
9816 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
9818         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
9819         Get/Set/Address methods.
9820         
9821         * mini.c debug-debugger.c mini-trampolines.c: Update after 
9822         mono_marshal_get_delegate_invoke signature change.
9824 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
9826         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
9827         This can happens with dynamic methods. Fixes the other bug in #322722.
9829 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
9831         * tramp-arm.c (mono_arch_patch_callsite): Support patching
9832         BX call sequence.
9834         * mini-arm.c (arm_patch): Implement patching of BX call
9835         sequence. Fixes one of the bugs in #322722.
9837 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
9839        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
9840        under Linux.  We only need to flush every 32-byte cache line.    
9842 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
9844         * mini.c:
9845         move_basic_block_to_end: Add branches when needed, eventually creating
9846         a new BB.
9847         optimize_branches: added a parameter that tells if it's ok to create
9848         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
9849         and avoid calling move_basic_block_to_end when it's not ok.
9850         Fixes bug 318677.
9852 2007-11-07  Mark Probst  <mark.probst@gmail.com>
9854         * mini.c: Abort inlining call to InitializeArray if something
9855         looks wrong.  Let the icall handle it, which now has proper safety
9856         checks.
9858 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
9860         * mini.c (mono_spill_call): add support for soft-float.
9862         * mini.c (mono_method_to_ir): add support for soft-float
9863         to inlined functions that return float.
9865         * mini.c (mono_method_to_ir): add support for soft-float
9866         to cee_stsfld opcode on float fields.
9868 2007-11-05  Geoff Norton  <gnorton@novell.com>
9870         * mini-x86.h: Fix the structure access for X86 Leopard.
9873 2007-11-05  Martin Baulig  <martin@ximian.com>
9875         * mini-trampolines.c
9876         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
9877         after compiling the method to notify the debugger.
9879 2007-11-05  Martin Baulig  <martin@ximian.com>
9881         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
9883 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
9885         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
9886         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
9888 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
9890         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
9891         native-to-managed wrappers.
9892         
9893 2007-11-01  Geoff Norton  <gnorton@novell.com>
9895         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
9896         members.
9898 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9900         * mini.c, mini-x86.c: when getting back from unmanaged code
9901         to managed via a marshaled delegate we also need to set the
9902         right domain.
9904 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9906         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
9907         for amd64.
9909 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
9911         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
9912         let the debugger or other external agents to tell the JIT when
9913         a sw breakpoint has been inserted in the code that the JIT needs
9914         to be able to inspect.
9916 2007-10-31  Martin Baulig  <martin@ximian.com>
9918         * debug-debugger.h
9919         (MonoDebuggerInfo): Remove `runtime_class_init'.
9921 2007-10-30  Martin Baulig  <martin@ximian.com>
9923         * debug-mini.h
9924         (mono_debugger_thread_created): Added `MonoThread *' argument.
9925         (mono_debugger_extended_notification): New public method.
9926         (mono_debugger_trampoline_compiled): New public method.
9928         * debug-mini.c
9929         (MonoDebuggerThreadInfo): Added `thread' and
9930         `extended_notifications' fields.
9932         * debug-debugger.c
9933         (debugger_executable_code_buffer): New static variable.
9935         * debug-debugger.h
9936         (MonoDebuggerInfo): Added `executable_code_buffer',
9937         `executable_code_buffer_size', `breakpoint_info_area',
9938         `breakpoint_table' and `breakpoint_table_size'.
9940 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
9942         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
9943         that IP  either is an unused value or the vtable pointer. IMT 
9944         calls use vtable + offset now. Reduced by almost half the size
9945         of IMT entries.
9947 2007-10-26  Jonathan Chambers <joncham@gmail.com>
9949         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
9950         defines to access param registers. Replace long usage with
9951         gsize as sizeof(long) != sizeof(void*) on Win64.
9953         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
9954         on Win64. Fix intrinsic, use _AddressOfReturnAddress
9955         instead of non-existant _GetAddressOfReturnAddress.
9957         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
9958         param registers. Save/restore %rdi and %rsi in MonoLMF.
9960         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
9961         param registers. Modify (throw_exception) signature to take 
9962         %rdi and %rsi on Win64. 
9964         Code is contributed under MIT/X11 license.
9966 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
9968         * helpers.c: unlink debugging output files.
9970 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
9972         * mini.c: Move mono_create_ftnptr () to object.c.
9974 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
9976         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
9977         optional. This function can now be used to disassemble code generated
9978         outside the JIT such as trampolines and IMT thunks.
9980         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
9982         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
9983         vtable pointer from a ldr instruction.
9985         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
9986         new IMT call sequence.
9988         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
9989         call sequence for interface invocations.
9991         * mini-arm.c (mono_arch_emit_imt_argument): added, required
9992         for imt support. This function is empty since IMT on ARM requires no
9993         special handling on the IR side.
9995         * mini-arm.c (mono_arch_find_imt_method): added, required for
9996         imt support.
9998         * mini-arm.c (mono_arch_find_this_argument): added, required
9999         for imt support.
10001         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
10002         a ldr instruction to load a value stored in the code stream.
10004         * mini-arm.c (mono_arch_build_imt_thunk):added, required
10005         for imt support.
10008 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
10010         * mini.c (mini_init): Install the jump trampoline callback.
10012 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10014         * mini-trampolines.c: handle synchronized methods with the common
10015         vtable trampoline (bug #335601).
10017 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
10019         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
10021         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
10022         64 bit platforms.
10024         * mini-ia64.h mini-ia64.c: Add support for IMT.
10026         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
10027         prolog. Fixes #331958.
10029 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
10031         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
10033 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10035         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
10036         trampoline.
10038 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
10040         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
10041         trampoline.
10043 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
10045         * mini-x86.c, mini-x86.h: x86 support for the common vtable
10046         trampoline.
10048 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
10050         * mini-trampolines.c: changed the magic rampoline to understand
10051         the common vtable trampoline method: the method to invoke is
10052         determined by the vtable displacement of the call.
10054 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
10056         * mini.c, mini.h: register the common vtable trampoline if the
10057         architecture supports it.
10059 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10061         * cpu-amd64.md: use the correct max length for tls_get.
10063 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
10065         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
10066         CEE_STELEM_ANY. Fixes #333696.
10068 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
10070         * exceptions-x86.c: provide more graceful handling of the case where
10071         we followed a bogus function pointer from managed code (bug #332866).
10073 2007-10-11  Mark Probst  <mark.probst@gmail.com>
10075         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
10076         replaces the generic_shared flag and will carry more information
10077         in the future.
10079         * generic-sharing.c: Added mini_type_stack_size() which allows
10080         allows open types if given a generic sharing context.
10081         mini_get_basic_type_from_generic() takes a
10082         MonoGenericSharingContext* instead of a MonoCompile* now.
10084         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
10085         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
10086         mini-sparc.c, mini-x86.c: Trivial changes required by the two
10087         changes above.  Just passing arguments through to the right
10088         places.
10090 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
10092         * mini-arm.c: unify the call emission to emit_code_seq().
10094 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
10096         * tramp-arm.c: reduced the trampoline size.
10098 2007-10-10  Mark Probst  <mark.probst@gmail.com>
10100         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
10101         variable handling out of arch-specific code.
10103 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
10105         * mini-arm.c: implemented fast delegate dispatch.
10107 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
10109         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
10110         that fp elimination is turned off if the space required by locals is too
10111         big. Fixes #331958.
10113 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
10115         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
10116         ARM to the new style trampoline.
10118 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
10120         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
10122         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
10124 2007-10-09  Martin Baulig  <martin@ximian.com>
10126         * debug-debugger.h
10127         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
10128         `field_info_offset_offset'.     
10130 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
10132         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
10133         removed more internal usage of the r11 register and made it available
10134         to the register allocator.
10136 2007-10-08  Mark Probst  <mark.probst@gmail.com>
10138         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
10139         when sharing generics and treat type variables as references.
10141 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
10143         * mini-ppc.c: started removing the internal uses of register r11
10144         to eventually allow the register allocator to manage it as an
10145         additional available register.
10147 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
10149         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
10151 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
10153         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
10154         specific trampolines as they are not performance critical as a jump
10155         target (maybe align as before only for AOT code?). This saves about
10156         200 KB of native code on x86 for monodevelop startup.
10158 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
10160         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
10161         monodevelop startup.
10163 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
10165         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
10167         * mini-sparc.h mini-sparc.c: Implement IMT support.
10169         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
10170         its smaller and doesn't clobber sparc_g1.
10172         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
10174 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10176         * mini-ppc.c: optimized the size of the IMT thunks a bit.
10178 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
10180         * mini-ppc.c: implemented fast delegate invocation.
10182 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
10184         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
10186 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
10188         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
10189         code to the new style trampoline in preparation for IMT support.
10191 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
10193         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
10194         systems already. This also reduces the specific trampiline sizes and
10195         prepares for the use of r12 as the IMT identifier register.
10197 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
10199         * mini-mips.h: endianess fix (simplified from a patch by
10200         Thomas Kunze <thommy@tabao.de>, bug #323737).
10202 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
10204         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
10205         to access ucontext fields and enable netbsd support
10206         (partially from Magnus Henoch <mange@freemail.hu>).
10208 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
10210         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
10211         use the preprocessor from the CPP env var if it is set.
10213 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
10215         * mini-trampolines.c: fixed an assertion and moved it earlier in the
10216         code, before interface_offset gets used.
10218 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
10220         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
10221         mono_class_setup_vtable () before accessing klass->vtable.
10223 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
10225         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
10226         hackish.
10228 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
10230         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
10231         IMT slots (this saves hundreds of KB of memory in programs like
10232         IronPython and Monodevelop).
10234 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
10236         * mini.c: print the delegate counter.
10238 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
10240         * mini-x86.c: make it easier to enable the debugging code for IMT
10241         slots.
10243 2007-09-28  Martin Baulig  <martin@ximian.com>
10245         * debug-debugger.h
10246         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
10247         `mono_method_klass_offset' and `mono_method_token_offset'.
10249 2007-09-20  Mark Probst  <mark.probst@gmail.com>
10251         * mini.c: First generics sharing implementation.  Can only share
10252         in very simple cases.  If sharing doesn't work it falls back to
10253         dedicated compilation.
10255         * mini.h: Flag in MonoCompile to specify whether generic
10256         compilation is shared.  Flags enum for marking which generic inst
10257         of a context is used.  Prototypes for helper functions.
10259         * generic-sharing.c: Helper functions for generic method sharing.
10261         * optflags-def.h: Optimization flag (gshared) for enabling generic
10262         method sharing added.
10264         * Makefile.am: generic-sharing.c added.
10266 2007-09-19 Daniel Nauck <dna@mono-project.de>
10268         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
10270 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
10271         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
10272         fixes bug 325507.
10274 2007-09-19  Martin Baulig  <martin@ximian.com>
10276         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
10277         mono_debug_cleanup() is now part of mono_cleanup().
10279 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
10281         * driver.c (mono_main): Fix a warning.
10283 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
10285         * aot-compiler.c: Optimize various parts when processing large assemblies.
10286         Fixes ##325568.
10288         * mini.c (mono_patch_info_hash): Improve hash function.
10290 2007-09-14  Jonathan Chambers <joncham@gmail.com>
10292         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
10293         
10294         Code is contributed under MIT/X11 license.
10296 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
10298         * mini.c (mini_init): Fix a leak.
10300         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
10302 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
10304         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
10306 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
10308         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
10310 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
10312         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
10313         variance tests.
10315         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
10317         * mini.c (handle_alloc): Enable managed allocators in AOT code.
10319         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
10321         * aot-runtime.c (decode_patch_info): Ditto.
10323 2007-09-12  Jonathan Chambers <joncham@gmail.com>
10325         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
10326         static case. Cache delegates in architecture specific code, 
10327         based on number of parameters.
10328         
10329         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
10330         in architecture specific code, based on number of parameters.
10331         
10332         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
10333         caching happen in architecture specific code now.
10334         
10335         Code is contributed under MIT/X11 license.
10337 2007-09-12  Jonathan Chambers <joncham@gmail.com>
10339         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
10340         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
10341         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
10343         Code is contributed under MIT/X11 license.
10345 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
10346         * mini.c: (mono_thread_abort) Fixed bug #82416.
10348 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
10350         * mini.: hook the new managed GC allocation feature into the JIT.
10352 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
10354         * mini.c: implementation for the new runtime tls opcode.
10356 2007-09-11  Martin Baulig  <martin@ximian.com>
10358         * debug-debugger.h
10359         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
10360         `mono_method_inflated_offset'.
10362 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
10364         * driver.c mini.h mini.c: Add a new devel command line option for injecting
10365         async exceptions into a method.
10367         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
10368         purpose of testing whenever the unwinder works at every instruction.
10370 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
10372         * mini.c: check accessibility of method used in ldftn (fixes
10373         bug #82635).
10375 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
10377         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
10379         * inssel.brg: Fix a warning.
10381 2007-09-03  Martin Baulig  <martin@ximian.com>
10383         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
10384         now takes the `main_method' as argument.
10386 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
10388         * cpu-sparc.md (endfilter): Add missing src1:i argument.
10390 2007-08-30  Jonathan Chambers <joncham@gmail.com>
10392         * driver.c: include the cil-coff.h header on Windows.
10393         
10394         Code is contributed under MIT/X11 license.
10396 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
10398         * mini.c, driver.c: don't include the cil-coff.h header.
10400 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
10402         * mini.c: flag places that needs fixes fo soft-float support.
10404 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
10406         * mini.h, inssel-float.brg: fix soft-float constant loads on big
10407         endian systems (partially from Dean Jenkins, bug #81924).
10409 2007-08-28  Mark Probst  <mark.probst@gmail.com>
10411         * mini.c (check_linkdemand): Remove embedded reference object in
10412         call to LinkDemandSecurityException.
10413         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
10414         with an IntPtr instead of a reference object.
10416 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
10418         * mini.c (handle_initobj): Handle alignment properly.
10420         * inssel.brg (mini_emit_memset): Ditto. 
10422         * inssel.brg (mini_emit_memcpy): Ditto. 
10424         * inssel-sparc.brg: Ditto.              
10426         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
10428 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
10430         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
10431         exceptions raised in unmanaged code. Fixes part of #82594.
10433 2007-08-24  Mark Probst  <mark.probst@gmail.com>
10435         * mini.c (mono_method_to_ir), declsec.c
10436         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
10438 2007-08-22  Martin Baulig  <martin@ximian.com>
10440         * debug-mini.h
10441         (MonoDebuggerThreadInfo): New typedef.
10442         (mono_debugger_thread_table): New global variable.
10443         (mono_debugger_thread_created): New public function.
10444         (mono_debugger_thread_cleanup): New public function.
10446         * debug-debugger.h
10447         (MonoDebuggerInfo):
10448         - removed `get_current_thread' and `lookup_assembly'.
10449         - removed `data_table'.
10450         - added `thread_table'.
10452         * mini.c
10453         (mono_thread_start_cb): Call mono_debugger_thread_created().
10454         (mono_thread_attach_cb): Likewise.
10455         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
10456         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
10457         initial domain.
10459         * driver.c (mono_main): Move mono_debug_init() up, before calling
10460         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
10462 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
10464         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
10465         together when passing several arguments of type double (gives a small
10466         speedup and saves a few bytes of generated code).
10468 2007-08-20  Jb Evain  <jbevain@novell.com>
10470         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
10472 2007-08-20  Jb Evain  <jbevain@novell.com>
10474         * mini.c (mono_method_to_ir): throw MethodAccessException
10475         and FieldAccessException instead of InvalidProgramException.
10477 2007-08-20  Mark Probst  <mark.probst@gmail.com>
10479         * mini.c: CoreCLR security checks.
10481         * mini.h: Removed MonoSecurityMode (moved to
10482         metadata/security-manager.h) and mono_security_mode global var
10483         (replaced by set/get functions in security-manager.h).
10485         * driver.c: Added "core-clr-test" security mode for testing.  Used
10486         set-function for setting security mode.
10488 2007-08-17  Mark Probst  <mark.probst@gmail.com>
10490         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
10491         the new jit_info_table.
10493         * driver.c: Test code for the new jit_info_table (enabled by the
10494         define MONO_JIT_INFO_TABLE_TEST).
10496 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
10498         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10499         detection of call <REG> instruction sequence. Fixes build on freebsd.
10501 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
10503         * mini-exceptions.c: Fix a warning.
10505 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
10507         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
10508         stack overflow handling code on amd64 too.
10510         * mini-exceptions.c (mono_setup_altstack): Make this use 
10511         mono_thread_get_stack_bounds ().
10513         * mini-x86.h: Disable sigaltstack on solaris x86.
10515 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
10517         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
10519 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
10521         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
10523 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
10525         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
10527         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
10529 2007-08-03  Neale Ferguson <neale@sinenomine.net>
10531         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
10532         due to alignment.
10534 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
10536         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
10537         to be emitted (bug #82281).
10539 2007-08-01  Martin Baulig  <martin@ximian.com>
10541         Merged the `debugger-dublin' branch.
10543         * debug-debugger.h (MonoDebuggerInfo):
10544         Removed the `old_*' compatibility entries.
10545         Added `debugger_version' and `data_table'.
10546         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
10547         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
10549         * debug-mini.c
10550         (MiniDebugMethodBreakpointInfo): Add `address_list'.
10551         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
10552         instead of a `gconstpointer'.
10553         (mono_debugger_insert_method_breakpoint): Return a
10554         `MonoDebugMethodAddressList *'.
10556 2007-06-28  Martin Baulig  <martin@ximian.com>
10558         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
10560 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
10562         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
10563         __builtin_frame_address () since it is broken on older gcc versions.
10565 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
10567         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
10568         on the stack overflow handling and made the managed stack overflows
10569         catchable in most cases using soft guard pages.
10570         * exceptions-x86.c: added code to restore the protection in the soft
10571         guard pages at the end of exception handling.
10573 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
10575         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
10577 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
10579         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
10580         exception handling.
10582 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
10584         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
10585         signal handling support until it has been ported to the new mechanism.
10586         * mini.c: fixed stack overflow detection and use the new
10587         architecture code  to handle signals on the altstack.
10589 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
10591         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
10592         stack overflows on the alt stack.
10594 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
10596         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
10597         stack overflows on the alt stack.
10599 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
10601         * exceptions-ppc.c: cleanup preparing for altstack support.
10603 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
10605         * exceptions-arm.c: cleanup preparing for altstack support.
10607 2007-07-27  Mark Probst  <mark.probst@gmail.com>
10609         * mini.c (print_jit_stats): Output hazard pointer stats.
10611 2007-07-26  Mark Probst  <mark.probst@gmail.com>
10613         * driver.c, mini.c: Replaced security mode flags with a single
10614         enum variable.
10616 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
10618         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
10620 2007-07-25  Mark Probst  <mark.probst@gmail.com>
10622         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
10623         (which doesn't do anything yet) for activating Core CLR
10624         (Silverlight) security.
10626 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
10628         * mini-codegen.c: work around a possible gcc bug on arm.
10630 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
10632         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
10633         message for platforms that don't support AOT compilation.
10635 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
10637         * mini.h, mini.c, driver.c: temporary smcs hack.
10639 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
10641         * mini-arm.h, mini-arm.c: arm EABI fixes.
10643 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
10645         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
10646         case.
10648         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
10649         trampolines taking a method argument.
10651         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
10653         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
10654         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
10656         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
10657         JIT compilation throws an exception. Fixes #82050.
10659 2007-07-19  Mark Probst  <mark.probst@gmail.com>
10661         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
10662         with the MONO_EXCEPTION_ defines.
10664 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
10666         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
10667         #82117.
10668         
10669         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
10670         the cause of an assertion.
10672 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
10674         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
10675         removed.
10677 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
10679         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
10680         assert. Should fix #82103.
10682 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
10684         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
10685         here too. Fixes #82095.
10687         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
10688         addresses.
10690         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
10692         * mini-amd64.h: Enable IMT for amd64.
10693         
10694         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
10696 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
10698         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
10700 2007-07-12  Mark Probst  <mark.probst@gmail.com>
10702         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
10703         as soon as check_linkdemand sets an exception_type.
10705 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
10707         * mini-x86.c: fixed offsets for IMT call sequence.
10708         * mini-x86.h: enable IMT again.
10710 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
10712         * trace.c (mono_trace_enter_method): Decode MonoType too.
10714         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
10716         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
10718         * mini-amd64.c: Add preliminary IMT implementation.
10719         
10720 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
10722         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
10723         understand the new IMT-base interface invocation (thanks to
10724         Daniel Nauck for the report and the remote debugging session).
10726 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
10728         * mini-x86.c: size and speed optimizations for the IMT bsearch.
10730 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
10732         * Makefile.am (aotcheck): Make this actually use the AOTed code.
10734 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
10736         * mini-trampolines.c: implement AOT IMT support.
10737         * mini-x86.h: enable IMT support for wider testing.
10739 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
10741         * inssel.brg (emit_imt_argument): Add aot support here.
10743         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
10745 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10747         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
10748         of the IMT implementation, partially from massi, with my
10749         implementation of the bsearch sequence. Disabled by default until
10750         the AOT code is implemented.
10752 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
10754         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
10756         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
10758 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
10760         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
10761         arch-independent IMT JIT code from Massimiliano
10762         Mantione (massi@ximian.com) with small cleanups from me.
10764 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
10766         * Makefile.am: fix svn invocation to get the svn revision to be
10767         independent of the local language (build fix).
10769 2007-07-09  Mark Probst  <mark.probst@gmail.com>
10771         * mini.c (inline_method): Reset cfg->exception_type if the
10772         inlining is aborted.  Fixes: 82049.
10774 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
10776         * mini.c: remove assert from exception handling code when exception_ptr
10777         is not set.
10779 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
10781         * mini.c (mono_codegen): Add an assert.
10783         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
10784         enter and leave code.
10785         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
10787 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10789         * mini-ppc.c: fixed memory corruption for localloc(0)
10790         (bug #81852).
10792 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
10793         
10794         * mini.c: Fix warnings.
10796 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
10798         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
10799         to emit better double->int conversions.
10801 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
10803         * mini.c: the provided Min/Max optimizations are valid for unisgned
10804         ints.
10806 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
10808         * 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
10810 2007-06-28  Miguel de Icaza  <miguel@novell.com>
10812         * mini.c (mono_running_on_valgrind): Add support for reporting the
10813         method and  its boundaries to valgrind.
10815 2007-06-28  Martin Baulig  <martin@ximian.com>
10817         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
10819 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
10821         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
10823         * generic.2.cs: Add new test case.
10825 2007-06-25  Martin Baulig  <martin@ximian.com>
10827         Merged the `debugger-dublin' branch.
10829         * debug-mini.c
10830         (mono_debugger_insert_method_breakpoint): New public method.
10831         (mono_debugger_remove_method_breakpoint): Likewise.
10832         (mono_debugger_check_breakpoints): New static method.
10833         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
10835         * debug-debugger.h (MonoDebuggerInfo):
10836         Renamed (to keep backward compatibility in the vtable):
10837         `insert_breakpoint' -> `old_insert_breakpoint'.
10838         `remove_breakpoint' -> `old_remove_breakpoint'.
10839         `create_string' -> `old_create_string'.
10840         `lookup_class' -> `old_lookup_class'.
10841         `lookup_type' -> removed; changed into a dummy field.
10842         `lookup_assembly' -> `old_lookup_assembly'.
10843         Added (same functionality, but different signature):
10844         `create_string', `lookup_class', `lookup_assembly'
10845         Added new:
10846         `get_method_addr_or_bpt', `remove_method_breakpoint',
10847         `runtime_class_init'.
10849         * debug-debugger.c: Merged the `debugger-dublin' branch.
10851 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
10853         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
10854         well.
10855         (peephole_pass): Likewise.
10857 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
10859         * driver.c: hopefully make setaffinity work also for ancient
10860         versions of linux.
10862 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
10864         * driver.c : win32 build fix.
10866 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
10868         * driver.c: check for the MONO_NO_SMP env var and bind to a single
10869         processor if it is set.
10871 2007-06-21  Martin Baulig  <martin@ximian.com>
10873         * debug-mini.h: New file.
10875         * debug-mini.c
10876         (mono_debugger_insert_breakpoint_full): Moved here from
10877         ../metadata/mono-debug-debugger.c.
10878         (mono_debugger_remove_breakpoint): Likewise.
10879         (mono_debugger_breakpoint_callback): Likewise.
10881 2007-06-15  Raja R Harinath  <rharinath@novell.com>
10883         * jit-icalls.c (mono_helper_compile_generic_method): Update to
10884         changes in MonoGenericClass.
10886 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
10888         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
10890 2007-06-14  Raja R Harinath  <rharinath@novell.com>
10892         * jit-icalls.c (mono_helper_compile_generic_method): Update to
10893         removal of MonoGenericMethod.
10895 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
10897         * mini-exceptions.c: hooks for the exception events profiling API.
10899 2007-06-14  Randolph Chung  <tausq@debian.org>
10901         * Makefile.ma: Add hppa target.
10902         * mini-arch.h: Include mini-hppa.h
10903         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
10904         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
10905         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10907 2007-06-14  Randolph Chung  <tausq@debian.org>
10909         * inssel.brg: Add rules for "chained" compare-branch operations so that
10910         a single compare op can affect multiple branches.  Adjust cost for
10911         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
10912         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
10913         cost for some rules so that they can more easily be overridden by
10914         per-arch rules (with fixes from lupus).
10915         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10917 2007-06-13  Randolph Chung  <tausq@debian.org>
10919         * mini-ops.h: Reorder branch ops so that they match the order of the
10920         corresponding CEE_* ops.  The code expects them this way.
10921         Add new ops for HPPA target.
10922         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10924 2007-06-13  Randolph Chung  <tausq@debian.org>
10926         * mini-exceptions.c: Handle cases where the stack grows towards
10927         larger addresses.
10928         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
10930 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
10932         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
10933         counter.
10934         * driver.c: explain where a non-matching corlib is found.
10936 2007-06-13  Mark Probst  <mark.probst@gmail.com>
10938         * mini.c (print_jit_stats): Output dynamic code allocation stats.
10940 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
10942         * mini-exceptions.c: Generate a method profile leave event during
10943         an exception to ensure that the profiler gets notified.
10945 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
10947         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
10948         branch.
10950         * cpu-amd64.md: Add long_and/or/xor opcodes.
10952 2007-06-06  Wade Berrier  <wberrier@novell.com>
10954         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
10955         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
10956         length of instruction shr_imm (expected 8, got 10)
10958 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
10960         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
10962 2007-06-06  Mark Probst  <mark.probst@gmail.com>
10964         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
10965         MonoInternalHashTable again (fixed bug in the internal hash table
10966         code).
10968 2007-06-06  Mark Probst  <mark.probst@gmail.com>
10970         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
10971         Have to figure out what makes it crash the SWF regression.
10973 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
10975         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
10977 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
10979         * mini.c: optimize out the type check when storing null in a
10980         reference array.
10982 2007-06-04  Mark Probst  <mark.probst@gmail.com>
10984         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
10985         MonoInternalHashTable.
10987 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
10989         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
10990         signed integer methods.
10992 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
10994         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
10995         permanently since the current approach doesn't work.
10997 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
10999         * inssel.brg (stmt): Only call delegate->invoke_impl if 
11000         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
11002 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
11004         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
11005         the sreg2==rdx case.
11006         
11007         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
11008         account if it contains a rex prefix.
11009         (peephole_pass): Handle OP_FMOVE as well.
11011 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
11013         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
11014         as it causes regressions.
11016 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
11018         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
11019         static case as well.
11021         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
11023         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
11024         (mono_arch_get_this_arg_from_call): Ditto.
11026         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
11028         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
11029         invoke_impl field.
11031         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
11032         (mono_arch_get_this_arg_from_call): Ditto.
11034         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
11035         
11036         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
11037         try to create optimized invoke code and use that for further invocations. 
11038         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
11040         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
11042 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
11044         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
11045         sealed classes or methods.
11046         *devirtualization.cs: tests for the new optimization
11048 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
11050         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
11051         by the update_volatile () function.
11053 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
11055         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
11056         require it.
11058         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
11060 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
11062         * mini.c: Add configure checks for header files.
11063         * mini-x86.c: Add configure checks for header files.
11064         * trace.c: Add configure checks for header files.
11065         * aot-runtime.c: Add configure checks for header files.
11066         * aot-compiler.c: Add configure checks for header files.
11067         * driver.c: Add configure checks for header files.
11068         * mini-codegen.c: Add configure checks for header files.
11069         
11070         Code is contributed under MIT/X11 license.
11072 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
11074         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
11075         icompare_imm -128 + op_iclt. Fixes #81703.
11077 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
11079         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
11081 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
11083         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
11084         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
11085         so that all isinst checks now use "interface_bitmap".
11087 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
11089         * cpu-amd64.md (jmp): Fix a warning.
11091         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
11093         * basic.cs: Add new regression test.
11095         * basic.cs: Remove test which is now in basic-long.cs.
11097         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
11099         * basic-long.cs: Add new test.
11100         
11101 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
11103         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
11105 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
11107         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
11109         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
11110         places.
11111         
11112         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
11113         throwing code a bit.
11115         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
11116         the exception throwing code a bit.
11118         * mini-x86.c (get_call_info): Allocate result from a mempool.
11120 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
11122         * aot-compiler.c (find_typespec_for_class): Fix the assert.
11124         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11126         * mini.h (MonoCompile): Add 'token_info_hash' field.
11128         * mini.c: Save token->method associations during compilation so the AOT 
11129         compiler can use it.
11130         
11131         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
11132         which reference generic classes and methods.
11134 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
11136         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
11138         * aot-compiler.c (compile_method): Fix a typo in a comment.
11140         * aot-runtime.c (decode_cached_class_info): Skip generic types.
11142         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
11143         everything generic.
11145         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
11147 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
11149         * mini.h (MonoCompile): Add 'args' field.
11151         * mini.c (mono_compile_create_vars): Store variables representing the arguments
11152         into cfg->args.
11154         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
11156 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
11158         * mini.c (mono_compile_get_interface_var): Remove this unused function.
11160         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
11162         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
11163         opcodes for some opcodes.
11165         * mini.h *.brg *.c: Use the new opcodes.
11167 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
11169         * mini.h: Bumped aot revision.
11171         * inssel.brg: modified code generation of type checks for interfaces
11172         to use the new "MonoClass.interface_bitmap" instead of the old
11173         "MonoClass.interface_offsets".
11175 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
11177         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
11179 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
11181         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
11182         64 bit platforms.
11184 2007-04-27  Neale Ferguson <neale@sinenomine.net>
11186         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
11188 2007-04-27  Wade Berrier  <wberrier@novell.com>
11190         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
11191         mini.h) to fix build.
11193 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
11195         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
11196         
11197         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
11198         causes the corlib unit tests to fail.
11200 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
11202         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
11204         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
11206         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
11207         opcodes to the comparison relations.
11209         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
11210         opcodes to their types.
11211         
11212         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
11214         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
11215         it in cfg->arch.cinfo.
11217         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
11219         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
11220         cfg->cil_offset_to_bb.
11222 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
11224         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
11225         created becase of initlocals.
11227 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
11229         * mini-alpha.c cpu-alpha.md: More alpha port work from 
11230         Sergey Tikhonov <tsv@solvo.ru>.
11232 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
11234         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
11236 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
11238         * cpu-s390.md (break): Correct the length of break instruction.
11240 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11242         * mini.c: fix a couple of soft-float issues and comments.
11244 2007-04-15  Miguel de Icaza  <miguel@novell.com>
11246         * trace.c (is_filenamechar): - is also a filename char.
11248 2007-04-15  Neale Ferguson <neale@sinenomine.net>
11250         * mini-s390.c: Correct checking for enum type in return value processing.
11252 2007-04-14  Raja R Harinath  <rharinath@novell.com>
11254         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
11255         (version.h): Makefile is in the build directory.
11257 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
11259         * mini-amd64.h: fix for assertion failure on Solaris/amd64
11261 2007-04-11  Martin Baulig  <martin@ximian.com>
11263         * mini.c (can_access_member): Fix handling of generic classes;
11264         fixes #81259.
11266 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
11268         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
11270 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
11272         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
11274 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
11276         * mini-codegen.c: make sure the right spill amount is
11277         used for fp or integer registers (fixes the float_sub_spill() on ppc).
11279 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
11281         * mini-ppc.c: fixes for the fp_branch_nan test.
11283 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
11285         * basic.cs: Comment out new test which still fails on ia64.
11287 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
11289         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
11291 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
11293         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
11295 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
11297         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
11298         on 64 bit machines. Fixes part of #80738.
11300         * basic.cs: Add regression test.
11302 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
11304         * inssel.brg basic.cs: Revert previous change to fix build.
11306         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
11307         platforms.
11308         
11309         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
11311         * basic.cs: Add new regression test.
11313 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
11315         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
11316         many arguments.
11318 2007-03-16  Neale Ferguson <neale@sinenomine.net>
11320         * cpu-s390x.md: Correct length of break instruction.
11322 2007-03-16  Neale Ferguson <neale@sinenomine.net>
11324         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
11325         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
11327 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
11329         * *.c: Begin WIN64 port.
11330         * mini.c:  Use correct register in profiler.
11331         * mini-amd64.c: No inline assembly on Win64.
11332         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
11333         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
11334         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
11335         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
11336         mono_arch_ip_from_context for Win64.
11337         
11338         Contributed under MIT/X11 license.
11340 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
11342         * exceptions-amd64.c (seh_handler): Ditto.
11344         * exceptions-x86.c (seh_handler): Fix a memory leak.
11346 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
11348         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
11349         mini-s390x.c: fixed peephole optimizations to deal
11350         correctly with 1 and 2 byte reload avoidance.
11352 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
11354         * cpu-s390.md, cpu-s390x.md: update localloc length.
11356 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
11358         * cpu-g4.md: added missing descriptions.
11360 2007-03-14  Miguel de Icaza  <miguel@novell.com>
11362         *  Makefile.am: Add support so the tail tests are not executed on
11363         PowerPC as that is a known limitation of the PowerPC port.
11365 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
11367         * runmdesc.bat:  Move to msvc directory.
11368         
11369 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
11371         * runmdesc.bat:  Run executable that was produced by the current
11372         target and sent via an argument.
11373         
11374 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
11376         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
11377         #81102.
11379         * generics.2.cs: Add regression test.
11381 2007-03-09  Wade berrier  <wberrier@novell.com>
11383         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
11385 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
11387         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
11388         AOT code depends on this.
11390 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
11392         * mini.c: more precise tracking of types in the eval stack
11393         (part of fix for bug #81044).
11395 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
11397         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
11399         * aot-compiler.c (encode_patch): Remove an obsolete comment.
11401 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
11403         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
11405         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
11407 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
11409         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
11410         a pointer on 64 bit systems. Fixes #80190.
11412         * iltests.il: Add new regression test.
11414 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
11416         * mini.c: inline a constant for Environment.IsRunningOnWindows.
11418 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
11420         * trace.c: Remove an erroneous alignemnt check when tracing.
11421           Fixes --trace on OSX86.
11423 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
11425         * mini-$(arch).h: initialize SP in context for all the archs.
11427 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
11429         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
11430         regressions in the thread tests.
11432 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
11434         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
11435         - fixed implementation of LOCALLOC opcode
11436         - implemented non-un compare for floats
11437         - code cleanup
11438         - implementation of FDIV and CKFINITE opcodes
11439         - fixes for latest mono updates
11440         - additional arch opcodes
11442 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
11444         * Makefile.am: simplify and merge rules for cross-compilation.
11446 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
11448         * local-propagation.c: Actually *apply* the fix for bug 80591...
11450 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
11452         * mini-exceptions.c: backuot part of the last change
11453         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
11455 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
11456         * inssel.brg: Fix bug 59286.
11459 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
11461         * mini-exceptions.c: patch from Zoltan to correctly check for
11462         stack boundaries (using the stack register, not the frame register),
11463         fixes bugs #80724, #79717.
11465 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
11467         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
11468         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
11470         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
11471         presence of frame pointer elimination.
11473 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
11474         
11475         * mini-x86.h: NetBSD UCONTEX_REG defines.
11477 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
11479         * inssel-amd64.brg: Fix amd64 build.
11481 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
11483         * mini.h: remove extern to workaround what looks likes gcc bug 26905
11484         on amd64.
11486 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
11488         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
11489         ends.
11491         * mini-<ARCH>.c: Use mono_is_regsize_var ().
11493 2007-01-30 Mark Mason <mason@broadcom.com>
11495            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
11496            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
11497            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
11498            beginning support for CEE_JMP [not quite working yet]
11499            * tramp-mips.c: LMF handling now works
11500         
11501 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
11503         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
11505         * mini.h (NULLIFY_INS): New macro.
11507 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
11509         * mini.c: statistical profiler fix for windows, patch
11510         from Tor Lillqvist (tml@novell.com).
11512 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
11513         * local-propagation.c: Fix bug 80591.
11515 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
11517         * Makefile.am: put back the --export-dynamic option as with
11518         the previous gmodule flags (thanks to Robert Jordan).
11520 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
11522         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
11524         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
11525         simplify and speed up the local register allocator. Also rename some fields
11526         like iassign->vassign.
11527         
11528         * regalloc.c: Remove some functions which are no longer used since their
11529         inlined version is in mini-codegen.c.
11530         
11531         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
11533         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
11535 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
11537         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
11538         narrowing. Fixes #80622.
11540         * iltests.il: Add new regresssion test. 
11542 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
11544         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
11545         debug-debugger.c, debug-debugger.h: warning fixes.
11546         * driver.c: updated copyright year and made it fit in one line.
11548 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
11550         * aot-runtime.c: updated to use mono-dl instead of gmodule.
11552 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
11554         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
11556         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
11558         * iltests.il: Add new test for bug #80507.
11560 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
11562         * mini-arm.h: use soft-float also on vfp for now.
11564 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
11566         * mini.c: fix some more soft-float issues.
11568 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
11570         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
11572 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
11573         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
11574         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
11575         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
11577 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
11579         * mini-arm.c: typo fix.
11581 2007-01-23  Neale Ferguson <neale@sinenomine.net>
11583         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
11585 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
11587         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
11588         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
11590         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
11592         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
11594         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
11595         
11596         * inssel.brg: Fix a warning.
11598         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
11600         * abcremoval.c ssa.c ssapre.c: Update after this change.
11601         
11602         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
11604         * dominators.c (df_set): Use mono_bitset_union_fast.    
11606 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
11608         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
11609         mini-codegen.c: reduce relocations and memory usage for the cpu
11610         description.
11612 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
11614         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
11616         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
11617         to reduce their size.
11619 2007-01-19 Mark Mason <mason@broadcom.com>
11621         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
11622         * mini-mips.c: more configuration macros, support long conditional branches, additional
11623         asserts, fix epilog instrumentation.
11624         * mini-mips.h: use standard stack walk
11625         * cpu-mips.md: increase size of div, rem and conditional branches
11626         
11627 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
11629         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
11630         to cpu spec data.
11632 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
11634         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
11635         (compile_method): Ditto.
11637         * aot-runtime.c (decode_klass_info): Ditto.
11639         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
11640         needed by the code generated by inssel.brg. Also fix a warning.
11642 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
11644         * mini.c: deal with enums that become genericinsts by
11645         being nested in a generic class (bug #79956).
11647 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
11649         * mini.c: match the generic definition to check for
11650         private access with generic types (bug #78431).
11652 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
11654         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
11655         to make life easier for people cross-compiling that insist on not
11656         using scratchbox.
11658 2007-01-17 Mark Mason <mason@broadcom.com>
11660         * inssel-long.brg: patch to deal with mips missing flags
11661         * inssel-long32-mips.brg: implement overflow checks
11662         * insset-mips.brg: implement overflow checks
11663         * mini-mips.h: implement conditional exception handling
11664         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
11665           Remove unused code, minor cleanups.
11666         * exceptions-mips.c: minor cleanups
11667         * mini-ops.h: add mips conditional exception ops
11668         * cpu-mips.md: add mips conditional exception ops
11670         
11671 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
11673         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
11674         to deal with mips missing of flags.
11676 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
11678         * exceptions-ppc.c: execute fault handlers.
11680 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
11682         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
11684 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
11686         * mini.c: handle also floating point values in initialize_array.
11688 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
11690         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
11691         array initialization and make it conditional on the intrins option.
11693 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
11695         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
11696         relocations and put the patch info names close to the enum definition.
11698 2007-01-15 Mark Mason <mason@broadcom.com>
11700         * basic.cs, exceptions.cs: break up large tests to increase debugability.
11702 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
11704         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
11706 2007-01-12  Raja R Harinath  <rharinath@novell.com>
11708         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
11710 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
11712         * Makefile.am: distribute the mips sources.
11714 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
11716         * mini-codegen.h: handle bug #80489 here, by excluding ecx
11717         directly.
11719 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
11721         * cpu-x86.md: back out for now as this triggers other regressions.
11723 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
11725         * cpu-x86.md: force src1 and dest regpair for long shift instructions
11726         to eax:edx, so ecx can't get allocated to them (bug #80489).
11728 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
11730         * mini.c, mini-exceptions.c: enabled running fault handlers
11731         (bug #80469).
11733 2007-01-03  Miguel de Icaza  <miguel@novell.com>
11735         * driver.c: If nothing fail, do not use the string "failed",
11736         because it makes it very annoying to view test result logs on the
11737         web. 
11739 2006-12-30  Miguel de Icaza  <miguel@novell.com>
11741         * debug-debugger.c (mono_debugger_main): Rename "main" to
11742         "main_method" to prevent a warning.
11744         Remove a warning for unused field.
11746 2006-12-28  Martin Baulig  <martin@ximian.com>
11748         * debug-debugger.c
11749         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
11751 2006-12-22  Martin Baulig  <martin@ximian.com>
11753         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
11754         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
11755         seperate `.mdb_debug_info' section, so we can access it from the
11756         debugger even if the binary is stripped.
11758         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
11759         from the `.mdb_debug_info' here to prevent the linker from
11760         removing that section.
11762         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
11763         mdb-debug-info64.s.
11765 2006-12-19  Robert Jordan  <robertj@gmx.net>
11767         * mini-x86: enable the code to return small structures in
11768         registers for FreeBSD as well. Fixes bug #80278.
11769         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
11771 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11773         * mini-x86.c: align the stack when calling the profiler
11774         function instrumenting the prolog (on OSX).
11776 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
11778         * mini.c: emit a break opcode where Debugger.Break () is called.
11780 2006-12-13  Miguel de Icaza  <miguel@novell.com>
11782         * mini.c (mono_method_to_ir): Provide useful information on this
11783         assert, to prevent others from debugging like I did.
11785 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
11787         * mini.c: enable code which was incorrectly commented
11788         (bug #80235).
11790 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
11792         * mini-x86.c: enable on OSX, too, the code to return small
11793         structures in registers.
11795 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11797         * mini-x86.c: remove the use of the dynamic code manager here, too.
11799 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11801         * mini.h, debug-debugger.c, tramp-*.c: fixed 
11802         mono_debugger_create_notification_function() to use
11803         mono_global_codeman_reserve () instead of a dynamic code manager.
11805 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
11807         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
11808         ves_array_element_address() jit icall and use a generated
11809         managed method instead (which is about 4 times faster for a rank 3
11810         array access).
11812 2006-11-29  Mark Mason  <mason@broadcom.com>
11814         * basic-calls.cs: additional tests for passing
11815         structures as function arguments.
11817 2006-11-29  Mark Mason  <mason@broadcom.com>
11819         * mini-mips.h: disable custom exception handling
11820         * mini-mips.c: throw/rethrow should use jalr to call
11821         exception stubs.  Fixed bug with passing structures
11822         by value. More support for tracing floating point
11823         functions.
11825 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11827         * mini.c: fixed typo in the soft-float ldind.r4 handling
11828         (bug #80086).
11830 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
11832         * mini.c, mini.h, driver.c: added --runtime command line
11833         option to select a different runtime than the autodetected one.
11834         * jit.h: added API for embedders to initialize with a specific
11835         runtime version.
11837 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11839         * mini.c: handle also boxing of r4 values (bug #80024).
11841 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11843         * mini-ppc.c: force indirect calls until we reserve
11844         enough address space for all the generated code.
11846 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
11848         * exceptions-arm.c: workaround bugs in the libc definition
11849         of struct ucontext.
11851 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
11853         * inssel.brg: fixes from me and Mark Mason.
11855 2006-11-23  Dick Porter  <dick@ximian.com>
11857         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
11858         semaphore display now we've fixed the initial value
11860 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
11862         * inssel.brg: partially revert the last change to fix the build.
11864 2006-11-21  Mark Mason  <mason@broadcom.com>
11866         * inssel.brg: Add and use compare-and-branch macros to support
11867         architectures that do not have condition code registers (ie. MIPS).
11868         * *-mips.{c,brg,md}: Fix copyright statements
11870 2006-11-20  Mark Mason  <mason@broadcom.com>
11872         * Makefile.am: remove mini-codegen.c from list of MIPS sources
11873         * mini.c: Allow GET_CONTEXT to be specified by the arch port
11874         * mini.h: Added declaration for mono_print_ins()
11875         * mini-codegen.c: added ins_spec initializer for MIPS
11876         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
11877         vreg to be virtual and hreg to be non-virtual.
11878         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
11879         is not yet working/implemented correctly.
11880         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
11881         non-static, fixup calls to print_ins() from other parts in the file.
11883 2006-11-20  Mark Mason  <mason@broadcom.com>
11885         * basic-calls.cs: added tests for passing structures as arguments
11886         to calls.
11888 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
11890         * inssel-long32.brg: optimize signed division by power of two.
11892 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
11894         * mini-arm.c: added support for interworking with thumb code
11895         (mono must be still be built using the ARM instruction encoding).
11897 2006-11-19  Miguel de Icaza  <miguel@novell.com>
11899         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
11900         verifier has different rules for it.   Fixes a few verifier issues
11901         in the test suite.
11903         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
11904         at the end, so people know what happened.
11906 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
11908         * brach-opts.c: in optimize_exception_target() make sure we
11909         are in a catch clause (fixes bug #79871).
11911 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
11913         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
11914         more soft-float support fixes.
11916 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
11918         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
11919         that are passed half on the stack and half in registers.
11921 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
11923         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
11924         more mips integration work from Mark E Mason 
11925         <mark.e.mason@broadcom.com>.
11927 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
11929         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
11930         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
11931         tramp-mips.c: added sources for the mips port, not
11932         integrated in the build yet. Contributed by
11933         Mark E Mason <mark.e.mason@broadcom.com>.
11935 2006-11-14  Neale Ferguson <neale@sinenomine.net>
11937         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
11939 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
11941         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
11942         put the soft-float rules in its own file since it seems to
11943         break s390 compilation.
11945 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
11947         * mini-arm.c: fixed wrnings.
11949 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
11951         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
11952         inssel-arm.brg: ARM support for soft-float.
11954 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
11956         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
11957         loads and stores of 32 bit fp values.
11959 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
11961         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
11963         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
11964         works. Fixes #79852 and #79463.
11966 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
11968         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
11969         more soft-float support WIP and fixes.
11971 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
11973         * mini-arm.c: some VFP updates.
11975 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11977         * mini-exceptions.c: 0 is a valid local var offset in some
11978         architectures, don't assert (bug #78508).
11980 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
11982         * exceptions-arm.c: fixed off by one error in stack walk code.
11984 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
11986         * mini.h, mini.c: more precise tracking of type load exceptions.
11988 2006-11-03  Robert Jordan  <robertj@gmx.net>
11990         * Makefile.am: [WIN32] Add monow.exe target.
11991         * driver.c: [WIN32] Don't detach the console when debugging.
11992         Fixes bug #79797.
11993         
11994 2006-10-30  Miguel de Icaza  <miguel@novell.com>
11996         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
11998 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
12000         * aot-compiler.c (emit_method_info): Add a case missed earlier.
12002         * driver.c (mini_regression): Fix --regression with AOT.
12004         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
12006 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
12008         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
12010         * mini-sparc.h: Don't use sigaction on sparc/linux.
12012         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
12014         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
12016         * mini-exceptions.c: Add proper include files for getpid ().
12018 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
12020         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
12021         address instead of a MonoJitInfo* to avoid decoding the exception info for the
12022         method.
12024         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
12025         name cache to reduce its size.
12027         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
12029 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
12031         * mini-x86.c: Save/restore the current LMF structure more efficiently using
12032         the mono_lmf TLS variable.
12034         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
12035         trampoline lmf frames.  
12037         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
12039 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
12041         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
12042         the mono_lmf TLS variable.
12044         * mini-exceptions.c: Access the LMF structure through accessors.
12046         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
12047         variable instead of in jit_tls->lmf.
12049         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
12050         
12051         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
12052         trampoline lmf frames.
12054         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
12056 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
12058        * mini.c trace.c mini-x86.c: Revert these too.
12059         
12060        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
12061        signature change.
12063 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
12065         * genmdesc.c: removed now dead code.
12067 2006-10-09  Robert Jordan <robertj@gmx.net>
12069         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
12071 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
12073         * mini.h: do not leave gaps in the opcode values.
12075 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
12077         * jit-icalls.h: flag functions as internal here, too.
12079 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
12081         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
12082         functions with the internal attribute.
12084 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
12086         * aot-compiler.c: fclose the file descriptor in the profile read loop.
12088 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
12090         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
12091         for soft-float.
12093 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
12095         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
12096         tail calls as on other platforms.
12098         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
12100         * iltests.il: Add a few tailcall tests.
12102 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
12104         * driver.c: fix loop for old compilers (bug #79521).
12106 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
12108         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
12110         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
12112         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
12113         metadata without any code.
12115         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
12116         more precise debugging information using gdb.
12118 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
12120         * inssel-ia64.brg: Make the helper methods static.
12122 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
12124         * inssel-x86.brg: make the helper methods static.
12126 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
12128         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
12130 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
12132         * mini.c: updates for monoburg changes.
12133         * inssel.brg: make a few helper functions static as they should.
12135 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
12137         * Makefile.am: Move mini-codegen.c to common_sources.
12139 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
12141         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
12142         instructions.
12143         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
12144         mini-ppc.h: port to use the common local register allocator.
12146 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
12148         * mini.h: Remove the comment too then.
12150 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
12152         * mini.h: put back backend.data which is to be used shortly and
12153         doesn't increase the size of MonoInst. If any 64 bit arch aligned
12154         pointers on 4 byte boundaries it'd have much bigger issues running
12155         and you can ifdef it out anyway.
12157 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
12159         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
12160         MonoInst size by 4 bytes on 64 bit machines.
12162 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
12164         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
12165         replacement with more meaningful field names. Arch maintainers, please
12166         check the assigned names are good enough for your arch.
12168 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
12170         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
12171         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
12173 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
12175         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
12176         relocations and memory requirements, put the optimization flags
12177         definitions in their own file.
12179 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
12181         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
12183         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
12185 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
12187         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
12189 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
12191         * inssel.brg: use the correct function to get the size of an item
12192         in an array, given an element class.
12193         * aot-compiler.c: do not access class->class_size directly.
12195 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
12197         * mini.h, debug-mini.c: added a debugging function to print
12198         info about local variables and arguments in a jitted method.
12200 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
12202         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
12204         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
12206 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
12208         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
12209         inner and outer loops when passing vtypes.
12211 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
12213         * mini-ppc.c: take into account the cpu errata for cache flushing
12214         which caused some random errors (bug #79381).
12216 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
12218         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
12219         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
12221 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
12223         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
12224         loaded.
12226         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
12227         freebsd ports tree.
12229         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
12230         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
12232         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
12233         displacement.
12235 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
12237         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
12239 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
12241         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
12242         macro does not have to be changed during debugging.
12244         * 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>.
12246         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
12248         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
12249         
12250         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
12251         MONO_ARCH_NO_EMULATE_MUL is defined.
12253         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
12255         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
12257         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
12259         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
12260         
12261 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
12263         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
12264         stuff to mini-exceptions.c where it is used.
12266         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
12267         setup code, the real one is in mini-exceptions.c.
12269         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
12270         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
12271         some changes from the freebsd ports tree.
12273         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
12274         constants.
12275         
12276         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
12278 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
12280         * mini.c: on Linux, check for /proc to be mounted
12281         (bug# 79351, novell bug#201204).
12283 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
12285         * mini.c: handle cases where pthread_attr_getstack() behaves
12286         incorrectly (bug #78096).
12288 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
12290         * mini-arm.c: support larger stack frames (bug #79272).
12292 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
12294         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
12296         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
12297         tokens.
12299         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
12300         mono_class_from_name () to find a class from its name.
12302         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
12304 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
12306         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
12308 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
12310         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
12312 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
12314         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
12315         callinfo->trampoline.
12317         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
12318         fixes #79271.
12319         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
12320         future.
12322 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
12324         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
12326 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
12328         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
12329         stats.method_trampolines, it is already done by the generic trampoline code.
12331         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
12332         
12333 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
12335         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
12337         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
12339         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
12341         * mini.c (print_jit_stats): Print mscorlib mempool size too.
12342         
12343         * mini.c (print_jit_stats): Print new stats.
12345         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
12347 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
12349         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
12350         Address on two dimensional arrays. Fixes #78729.
12352         * mini.h (MonoCompile): Add a 'skip_visibility' field.
12354         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
12355         a method.
12357         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
12359         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
12360         #79130.
12361         
12362         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
12363         a race condition.
12364         (mini_get_ldelema_ins): Ditto.
12366 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
12368         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
12369         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
12370         Fixes #79213.
12372 2006-08-29 Neale Ferguson <neale@sinenomine.net>
12374         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
12375         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
12377         * exceptions-s390x.c: Cosmetic change.
12379         * tramp-s390.c: Fix warning.
12381         * cpu-s390.md: Correct length of mul_imm.
12383 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
12385         * aot-compiler.c: added binary writer with ELF backend
12386         implementation (only on Linux/x86 for now).
12388 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
12390         * Makefile.am: Don't run net 2.0 AOT tests.
12392         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
12393         (mono_compile_assembly): Skip net 2.0 assemblies as well.
12395         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
12397 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
12399         * aot-compiler.c: simplified and refactored the asm-writing code
12400         to allow different backends.
12402 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
12404         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
12406         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
12407         little. Share patches of type TYPE_FROM_HANDLE as well.
12409         * mini.c (mono_patch_info_equal): New helper function.
12410         (mono_patch_info_hash): Ditto.
12412         * aot-compiler.c (emit_method_code): Fix s390 build.
12414         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
12415         is not handled because it is stored as a flag and not as a type ctor. Fixes
12416         #79016.
12418 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
12420         * aot-compiler.c: Fix computation of GOT slot statistics.
12421         
12422         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
12423         Also remove support for not PIC AOT.
12425         * mini.h: Bump AOT file format version.
12427         * objects.cs: Add a test for #78990.
12429         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
12430         (peter.dettman@iinet.net.au). Fixes #79087.
12432         * basic-long.cs: Add a test for the above.
12434 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
12436         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
12437         
12438         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
12439         code somewhat.
12441 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
12443         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
12444         exceptions.
12446 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
12448         * mini.c: Don't verify COM proxy invoke calls
12449         
12451 2006-08-10  Dick Porter  <dick@ximian.com>
12453         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
12454         which process is holding semaphores locked.
12456 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
12458         * mini-ia64.c mini-amd64.c: Fix #79027.
12460         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
12462         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
12464         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
12465         implicit arguments in a vararg call. Fixes #79027.
12467 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
12469         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
12470         (mono_get_array_new_va_signature): Ditto.
12472 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
12474         * aot-runtime.c: Call init_plt lazily.
12476         * inssel-long.brg: Fix unsigned long->int conversion.
12478         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
12480         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
12481         that most data is now in the .rss/.data section.
12483 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
12485         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
12487         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
12489         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
12491         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
12493         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
12494         virtual call. Fixes #79010.
12496         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
12497         and use the result as the this argument in the real call.
12499         * generics.2.cs: Add a new test for #79010.
12500         
12501 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
12503         * mini-x86.c: Fix a warning.
12505         * aot-compiler.c: Add a bunch of statistics.
12507         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
12509 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
12511         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
12513 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
12515         * 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>.
12517 2006-07-13  Miguel de Icaza  <miguel@novell.com>
12519         * mini.c (mono_method_to_ir): Obtain the original method in the
12520         CIL stream and use this to perform validation.
12522         Fixed: #78816
12524 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
12526         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
12527         (mono_arch_call_opcode): Ditto.
12529         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
12530         #78826.
12532         * mini.c (mono_patch_info_dup_mp): New helper function.
12533         
12534         * aot-compiler.c (compile_method): Fix some of the memory allocated during
12535         compilation. Fixes #78827.
12537 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
12539         * declsec.c: Use original security informations for
12540           MONO_WRAPPER_MANAGED_TO_MANAGED.
12542 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
12544         * mini.c: Allow Com Interop methods/classes and
12545         don't verify COM wrapper calls
12546         
12548 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
12550         * inssel-long32.brg: Fix long->i4 checked conversion.
12552         * exceptions.cs: Add a test for the above.
12554 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
12556         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
12558         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
12559         leaks.
12561         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
12562         #78775.
12564 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
12566         * mini.c: Fix solaris/x86 exception handling.
12568         * Makefile.am: Get rid of $(ICU_LIBS).
12570 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
12572         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
12573         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
12574         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
12576         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
12578         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
12579         this function causes a SIGSEGV.
12581 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
12583         * mini.c: Remove unused solaris/x86 includes.
12585 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
12587         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
12589 2006-06-20  Jb Evain  <jbevain@gmail.com>
12591         * cpu-g4.md: fix max length of start_handler instruction.
12593 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
12594         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
12596 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
12597         * ssa.c: Fixed bug 78653 for SSA based deadce.
12598         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
12599         MonoInst.flags, used in SSA based deadce.
12600         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
12601         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
12603 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
12605         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
12606         it can end up using non executable memory on ppc64 systems
12607         running ppc32 userspace (fix from Johannes Berg).
12609 2006-06-14  Dick Porter  <dick@ximian.com>
12611         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
12612         4.1.1
12614 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
12615         * mini.c: Made so that inline is locally disabled if it would
12616         trigger a .cctor, because too many apps depend on this behavior
12617         (which seems to be also the one of the MS CLR).
12619 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
12621         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
12622         No idea why this worked before.
12624         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
12625         which branch to outer exception clauses since they could skip the
12626         inner finally clauses. Fixes #78633.
12628         * exceptions.cs: Add a test for the above.
12630         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
12631         Fixes #78629.
12633         * iltests.il: Add a test for the above.
12635 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
12637         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
12638         after the end of a try bblock, to prevent asserts in mini_method_compile ().
12640         * iltests.il: Add a test for the above.
12642 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
12644         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
12645         
12646         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
12647         methods as instrinsics.
12649 2006-06-09  Wade Berrier <wberrier@novell.com>
12651         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
12652         (simple-cee-ops.h ssapre-mini-ops.h)
12654 2006-06-09  Neale Ferguson <neale@sinenomine.net>
12656         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
12657         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
12658         instruction).
12659         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
12660         * cpu-s390x.md: Fix max. length values for a couple of instructions.
12662 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
12664         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
12666 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
12668         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
12669         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
12670         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
12671         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
12672         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
12673         of opcodes, so that bug 78549 should not happen again.
12674         * ssapre.c: Updated to use the renamed files.
12676 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
12678         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
12679         in OP_ATOMIC_EXCHANGE_I4.
12681 2006-06-07  Wade Berrier <wberrier@novell.com>
12683         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
12684         in mono_debugger_create_notification_function)
12686 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
12688         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
12689         
12690         * mini.c (type_from_stack_type): Disable some changes which do not
12691         seem to work.
12693         * driver.c: Reenable opts.
12695         * mini.h (MonoStackSlot): New structure to keep track of the verification state
12696         of the evaluation stack.
12697         
12698         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
12699         evaluation stack trace at entry to the bblock.
12701         * mini.c (merge_stacks): New function to perform verification of stack merges.
12702         Turned off by default.
12704         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
12705         STACK_MP.
12706         
12707 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
12709         * local-propagation.c: Fixed bug 78549.
12711 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
12713         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
12715 2006-06-02  Miguel de Icaza  <miguel@novell.com>
12717         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
12718         tramp-arm.c, tramp-ia64.c
12719         (mono_debugger_create_notification_function): Update signature to
12720         new signature and use new protocol for creating the notification
12721         function.  
12723         Should fix the build.
12725 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
12727         * exceptions-ppc.c (mono_jit_walk_stack)
12728         (ves_icall_get_frame_info): Fix the build
12730 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
12732         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
12734 2006-05-31  Raja R Harinath  <rharinath@novell.com>
12736         * il2tests.2.il: New file for generics CIL tests.  Add test for
12737         #78019.
12738         * Makefile.am: Update.
12740         Fix #78019
12741         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
12742         to nullable types.
12744 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
12746         * aliasing.c: Fixed bug 78311.
12748 2006-05-29  Martin Baulig  <martin@ximian.com>
12750         * mini-exceptions.c (mono_find_jit_info): When computing the
12751         native offset, check whether we're actually inside the method's
12752         code; call mono_debug_print_stack_frame() to format the frame.
12753         (ves_icall_System_Exception_get_trace): Call
12754         mono_debug_print_stack_frame() to format the stack frame.
12755         (ves_icall_get_trace): Update to the new debugging API.
12756         (mono_jit_walk_stack_from_ctx): Likewise.
12757         (ves_icall_get_frame_info): Likewise.
12759         * mini.c (get_method_from_ip): Use the new debugging API.
12760         (mono_print_method_from_ip): Likewise.
12762         * exceptions-ppc.c
12763         (mono_jit_walk_stack): Use the new debugging API.
12764         (ves_icall_get_frame_info): Likewise.   
12766 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
12768         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
12770 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
12772         * mini.c: Added "limitator" to inline for debugging.
12774 2006-05-24  Martin Baulig  <martin@ximian.com>
12776         * debug-debugger.c (mono_debugger_init): Create a private,
12777         malloc()-based code manager for the notification function and
12778         intentionally leak it on exit.  This fixes the crash-on-exit race
12779         condition.
12781         * tramp-amd64.c
12782         (mono_debugger_create_notification_function): Added
12783         `MonoCodeManager *' argument.
12785         * tramp-x86.c
12786         (mono_debugger_create_notification_function): Added
12787         `MonoCodeManager *' argument.
12789 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
12791         * aliasing.c: Fixed 64 bit issue.
12792         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
12793         default since all known bugs are fixed (one more time!).
12795 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
12797         * mini.c: write barrier support.
12799 2006-05-23  Martin Baulig  <martin@ximian.com>
12801         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
12802         check at the top of the file.
12804 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
12806         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
12807         reverting changes without reason and without changelog entries.
12809 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
12811         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
12812         to a few opcodes. Fixes #78439.
12814         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
12815         consistency with other archs.
12817         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
12819 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
12821         * debug-debugger.c: fix the build.
12823 2006-05-17  Martin Baulig  <martin@ximian.com>
12825         * debug-debugger.c
12826         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
12827         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
12828         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
12829         (debugger_attach): Call GC_mono_debugger_add_all_threads().
12831 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
12833         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
12835 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
12837         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
12838         MONO_TYPE_GENERICINST.
12839         
12840         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
12841         MONO_TYPE_GENERICINST.
12843 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
12845         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
12846         #78325.
12848 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
12850         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
12851         mempool.
12852         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
12854 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
12856         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
12857         mono_trace_cleanup ().
12859         * iltests.il: Fix problem with the newly added test.
12861         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
12862         due to register constraints, free up the previous hreg. Fixes #78314.
12864         * iltests.il: Add new test for #78314.  
12866         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
12867         Interlocked.Add. Fixes #78312.
12869         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
12870         
12871 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
12873         * inssel.brg (mini_emit_virtual_call): Fix a warning.
12875 2006-05-05  Martin Baulig  <martin@ximian.com>
12877         * debug-mini.c (mono_debug_open_block): New method.
12879         * mini-amd64.c
12880         (mono_arch_output_basic_block): Call mono_debug_open_block() at
12881         the beginning of each basic block.
12883         * mini-x86.c
12884         (mono_arch_output_basic_block): Call mono_debug_open_block() at
12885         the beginning of each basic block.
12887 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
12889         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
12890         default until I understand why they break the build on amd64.
12892 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
12894         * mini.c (mini_cleanup): Call mono_cleanup ().
12896         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
12897         errors.
12899 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
12901         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
12902         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
12903         default since all known bugs are fixed, and I cannot reproduce bug
12904         77944... I'm asking Matt Hargett to test again after this commit.
12906 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
12908         * mini-codegen.c: Fixed typo that thrashed inline.
12910 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
12912         * dominators.c (compute_dominators): Avoid using a worklist since
12913         it is not correct in some cases. Instead, iterate over all bblocks as
12914         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
12916 2006-04-28  Miguel de Icaza  <miguel@novell.com>
12918         * mini.c (mono_jit_compile_method_inner): Use
12919         mono_prepare_exception_from_error that resets the value
12920         internally.
12922 2006-04-27  Miguel de Icaza  <miguel@novell.com>
12924         * mini.c: Move the mini_loader_error_to_exception to metadata. 
12925         
12926 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
12928         * aliasing.c: Fixed bug 78210.
12930 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
12932         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
12933         default until all their problems (or the ones they trigger) are fixed.
12935 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
12937         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
12938         
12939         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
12940         as loaded only after resolving patches since that could invoke the same method.
12942         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
12944         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
12945         functions.
12947         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
12948         AOT loader.
12950         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
12951         stack.
12953         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
12954         made from AOT code through the PLT table.
12956         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
12957         holding the plt offset when a call is made to the aot plt trampoline.
12958         
12959 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
12961         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
12962         amd64 AOT support.
12964         * Makefile.am (common_sources): Fix build breakage.
12966         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
12967         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
12968         intra-assembly calls if possible.
12969         
12970         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
12972         * mini-trampolines.c: Handle PLT entries.
12974         * mini.c: Avoid creating a GOT var for calls.
12976         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
12977         from mscorlib code.
12979         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
12980         from mscorlib code.
12982         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
12983         AOT code.       
12985         * mini.h: Bump AOT file format version.
12986         
12987         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
12988         covers more cases.
12990 2006-04-25  Martin Baulig  <martin@ximian.com>
12992         * driver.c: Disable copyprop, consprop and inline when running
12993         inside the debugger.
12995 2006-04-25  Martin Baulig  <martin@ximian.com>
12997         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
12998         with `get_current_thread' and added `detach'.
12999         (MonoDebuggerMetadataInfo): Added `thread_size',
13000         `thread_tid_offset', `thread_stack_ptr_offset' and
13001         `thread_end_stack_offset'.
13003 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
13005         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
13006         aot-runtime.c.
13008         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
13009         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
13011         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
13013         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
13015         * aot.c: Add support for ADJUSTED_IID.  
13017 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
13019         * aot.c (emit_method_order): Don't align method_order_end.
13021         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
13022         the interface ID changes.
13024 2006-04-21  Dick Porter  <dick@ximian.com>
13026         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
13027         cleaning up a thread.  Fixes the new part of bug 77470.
13029 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
13031         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
13032         to managed wrapper.
13033                      
13034 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
13036         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
13037         
13038         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
13039         SIGSEGV. Fixes #78072.
13041         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
13042         unregister our SIGABRT handler.
13044 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
13046         * mini.c: Disabled inline where it can alter the call stack in a
13047         way visible from managed code.
13048         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
13049         default.
13051 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
13053         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
13054         on other platforms. Fixes #78089.
13056 2006-04-13  Martin Baulig  <martin@ximian.com>
13058         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
13059         determine whether we're inside the debugger.
13061         * debug-debugger.h
13062         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
13064 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
13066         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
13067         handler clauses. Fixes #78024.
13069         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
13070         in the CALL_MEMBASE opcodes. Fixes #78088.
13071         (mono_arch_get_vcall_slot_addr): Ditto.
13073 2006-04-10  Martin Baulig  <martin@ximian.com>
13075         * debug-debugger.c: The thread handling code has now been moved
13076         into ../metadata/threads.c.
13078 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
13080         * driver.c (mono_main): Fix --with-gc=none build.
13082         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
13083         (mono_spillvar_offset_float): Ditto.
13084         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
13085         hreg, not when its !global, since on ia64, there is a third category: stacked
13086         registers.      
13088 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
13090         * mini.c: set MonoInst->klass for load field address and a few other
13091         places.
13093 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
13095         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
13097 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
13099         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
13100         the branch opt changes.
13102 2006-04-06  Dick Porter  <dick@ximian.com>
13104         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
13105         
13106         * wapihandles.c (mini_wapi_seminfo): 
13107         * driver.c (mono_main): Add semaphore info option
13109 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
13111         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
13112         branch optimization changes. Fixes #78009.
13114 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
13116         * mini.c: ignore accessibility of methods in managed->native wrappers.
13118 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
13120         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
13121         
13122         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
13124 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
13126         * mini.c: Modify the branch optimizations to preserve the invariant that
13127         the entries inside the in_bb and out_bb arrays are unique.
13128         (mono_unlink_bblock): Avoid creation of new arrays.
13130 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
13132         * mini.c (mono_unlink_bblock): Fix regression caused by previous
13133         change (#77992).
13135 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
13137         * mini.c (optimize_branches): Remove the "optimizations" in
13138         the cbranch1/cbranch2 -> branch cases which were causing several
13139         problems in the past. Fixes #77986.
13141 2006-03-31  Chris Toshok  <toshok@ximian.com>
13143         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
13144         default optimizations :(
13146 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
13148         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
13149         branch.
13151 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
13153         * local-propagation.c: Added comments to structs and removed
13154         "Mono" prefixes from local tree mover types.
13156 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
13158         * Makefile.am (arch_sources): Define this for each architecture so 
13159         libmono_la_SOURCES is defined in one place.
13161 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
13163         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
13164         from handles/.
13166 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
13168         * driver.c: print the GC name supplied by configure.
13170 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
13172         * local-propagation.c: Added tree mover, and moved here all the
13173         local propagation code from mini.c
13174         * mini.c: Added support for treeprop, and moved all the local
13175         propagation code to local-propagation.c
13176         * mini.h: Added support for treeprop
13177         * driver.c: Added support for treeprop, enabled consprop, copyprop,
13178         treeprop, inline and deadce by default
13179         * Makefile.am: Added local-propagation.c
13181 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
13183         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
13185 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
13187         * debug-debugger.c: make it compile without the Boehm GC.
13189 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
13191         * mini.c: fixed issue with mismatch when an icall is registered
13192         with multiple names but same address.
13194 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
13196         * declsec.c, mini-exceptions.c: use write barrier to set reference
13197         fields of managed objects.
13199 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
13201         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
13202         (can_access_internals): Fix a warning.
13204         * mini.c (print_method_from_ip): Rename this to 
13205         mono_print_method_from_ip so it gets exported.
13207         * trace.c: Deal with strings inside StringBuilder's containing garbage
13208         and fix memory leaks. Fixes #77848.
13210 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
13212         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
13213         fixes #77787.
13215 2006-03-16 Neale Ferguson <neale@sinenomine.net>
13216         
13217         * mini-s390.c: Remove OP_X86_TEST_NULL.
13219 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
13221         * mini.c: use the correct GetHashCode() for the moving collector.
13223 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
13225         * liveness.c: Regalloc spill cost tuning.
13227 2006-03-15 Neale Ferguson <neale@sinenomine.net>
13228         
13229         * mini-s390x.h: Correct S390_LONG macro.
13231         * mini-s390x.c: Cleanup unused code.
13233 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
13235         * jit-icalls.h: New file.
13237         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
13238         icalls and include that instead of including jit-icalls.c.
13240         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
13241         OP_X86 opcodes.
13243 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
13245         * mini.c: when checking for member accessibility, also check for
13246         friend assemblies and for explicit interface implementations.
13248 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
13250         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
13252         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
13254         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
13255         common cases are done first.    
13257         * mini-ops.h: Only define platform specific opcodes on the given platform.
13259         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
13260         branch.
13261         
13262 2006-03-14  Martin Baulig  <martin@ximian.com>
13264         Revert Paolo's change from r57348:
13266         * mini.h: don't use gboolean for bitfields.
13267         * mini.c: verifier changes for fields and methods accessibility.
13269 2006-03-13  Neale Ferguson <neale@sinenomine.net>
13271         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
13273         * mini-s390x.c: Fix conv_r_un.
13275         * cpu-s390, cpu-s390x.md: Fix lengths.
13277 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
13279         * mini.c: nested types have access to all the nesting
13280         levels, not just the enclosing types.
13282 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
13284         * mini.c: added a few more verification checks.
13286 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
13288         * liveness.c: Merge optimizations from the linear-il branch.
13290 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
13292         * mini-ia64.c (emit_call): Add a comment.
13294         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
13296         * tramp-ia64.c: Fix some warnings.
13298 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
13300         * mini.h: don't use gboolean for bitfields.
13301         * mini.c: verifier changes for fields and methods accessibility.
13303 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
13305         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
13306         lazy icall wrapper changes.
13308         * dominators.c: Replace all the dominator algorithms with faster
13309         ones from the linear-il branch.
13311         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
13312         the mempool.
13314         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
13315         common cases are done first.
13317         * mini-amd64.c: Fix some warnings.
13319         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
13320         from the mempool.
13322         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
13323         added code.
13325         * mini.h: Add a missing prototype.
13327 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
13329         * mini.c: Compile icall wrappers lazily.
13331         * mini-codegen.c: Use printf instead of g_print since its much faster.
13333         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
13334         function.
13336         * mini.c (optimize_branches): Cache the negative result from 
13337         remove_block_if_useless ().
13339         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
13340         Also fix some bblock linking issues.
13342         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
13343         assembly files.
13345         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
13347         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
13348         accessed fields first, for better cache behavior.
13349         
13350 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
13352         * mini.c: speedup IList<T> array accesses.
13354 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
13356         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
13357         inline_costs counter. Fixes #77190.
13359 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
13361         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
13362         trace messages. Fixes #77706.
13364 2006-03-04  Martin Baulig  <martin@ximian.com>
13366         * tramp-amd64.c, tramp-x86.c
13367         (mono_debugger_create_notification_function): Use
13368         mono_global_codeman_reserve() to allocate a buffer at runtime and
13369         return it.
13371         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
13373         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
13374         notification function at runtime and then call `initialize' in the
13375         `MONO_DEBUGGER__debugger_info' vtable.
13377 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
13379         * iltests.il: Fix a visibility problem.
13381 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
13383         * driver.c, mini.c: add hooks for the counters API.
13385 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
13387         * driver.c: show disabled options.
13389 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
13391         * linear-scan.c: always use cost-driven selection.
13393 2006-02-28  Raja R Harinath  <rharinath@novell.com>
13395         * jit-icalls.c (helper_compile_generic_method): Revert change from
13396         2006-02-24.
13398 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
13400         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
13402 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
13404         * inssel.brg: style fixes, mostly to force the updated monoburg
13405         to run for people using svn.
13407 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
13409         * mini.c: match monoburg changes.
13411 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
13413         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
13414         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
13415         declaration in the header file.
13417 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
13419         * helpers.c: reduce relocations and mem usage.
13421 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
13423         * mini.h, mini-codegen.c: disable logging features if
13424         requested by configure.
13426 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
13428         * mini.c: tiny verifier changes.
13430 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
13432         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
13433         cpu-pentium.md: stack alignment changes for osx/x86,
13434         partially from Geoff Norton <gnorton@customerdna.com>.
13436 2006-02-24  Raja R Harinath  <harinath@gmail.com>
13438         * jit-icalls.c (helper_compile_generic_method): Update to changes
13439         in metadata/class.c.
13441 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
13442         
13443         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
13444         
13445         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
13446         interface calls with large offsets.
13448 2006-02-23  Raja R Harinath  <rharinath@novell.com>
13450         * jit-icalls.c (helper_compile_generic_method): Document the
13451         special-case we depend on so that we can inflate the method twice
13452         with the same context with no bad side-effects.
13454 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
13456         * mini-x86.c, mini-amd64.c: fix for case when xen support
13457         is disabled.
13459 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
13461         * mini-x86.c, mini-amd64.c: generate code to access tls items
13462         in a faster way for Xen systems.
13464 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
13466         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
13467         updates and compilation fixes for the OSX/x86 port, mostly from
13468         Geoff Norton <gnorton@customerdna.com>.
13470 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
13472         * inssel.brg: faster interface call implementation
13473         to sync with the interface_offsets MonoVTable changes.
13475 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
13477         * mini.c: more verification checks.
13479 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
13481         * mini.c: added a few more verification checks.
13483 2006-02-17      Neale Ferguson <neale@sinenomine.net>
13485         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
13486         facility on the processor and use it if available.
13488 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
13490         * driver.c, aot.c, mini.c: throw exception if the IL code is
13491         invalid or unverifiable.
13493 2006-02-17  Raja R Harinath  <rharinath@novell.com>
13495         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
13496         m.StructField.
13498 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
13500         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
13502 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
13504         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
13505         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
13506         handling of instantiated generic valuetypes.
13508 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
13510         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
13511         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
13512         instead.
13514         * generics.2.cs: Revert the nullable reftypes tests.
13516 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
13518         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
13519         using __builtin_frame_address (1) as it doesn't work in the presence
13520         of optimizations. Hopefully fixes #77273.
13522         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
13523         -> generics.cs change as it doesn't work with some automake versions.
13525 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13527         * mini.c: handle systems that sue a different way to
13528         retrieve the stack address of the current thread.
13530 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
13532         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
13533         it specially in the makefile.
13535         * generics.2.cs: Add tests for nullable reference types.
13537 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
13539         * mini.c: always handle the case when mono_jit_init()
13540         is called in a thread different from the main thread,
13541         confusing libgc (bug #77309).
13543 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
13545         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
13547 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
13549         * mini.c: change optimize_branches () to use a single loop
13550         and introduce a new optimization to simplify some range checks.
13552 2006-02-03  Martin Baulig  <martin@ximian.com>
13554         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
13555         and merged with debugger_thread_manager_add_thread().
13556         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
13557         inform the debugger about the main thread.
13559 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
13561         * basic.cs: Add test for div.un/rem.un constant folding.
13563 2006-02-03  Neale Ferguson <neale@sinenomine.net>
13565         * cpu-s390x.md: correct int_xor_imm length
13567 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
13569         * generics.2.cs: New test for #77442.
13571         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
13572         #77442.
13574 2006-02-02  Martin Baulig  <martin@ximian.com>
13576         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
13577         <mono/metadata/mono-debug-debugger.h>   
13579         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
13581 2006-02-02  Martin Baulig  <martin@ximian.com>
13583         * debug-debugger.h: New header file for debug-debugger.c.
13585         * debug-debugger.c: Big API cleanup; don't run the managed Main()
13586         function is a separate thread anymore; add support for attaching.
13588 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
13590         * tramp-x86.c: Fix a warning.
13592 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
13594         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
13595         on very large methods.
13597         * aot.c (load_patch_info): Fix a warning.
13599 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
13601         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
13602         mini-ops.h: alu membase optimizations.
13604 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
13606         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
13607         to speedup StringBuilder.
13609 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
13611         * dominators.c (mono_compute_natural_loops): Fix detection of
13612         loop body start blocks.
13614         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
13616 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
13618         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
13619         #75145.
13621 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
13623         * aliasing.c: Fixed aliasing issue on 64 bit archs.
13625 2006-01-25  Martin Baulig  <martin@ximian.com>
13627         * debug-debugger.c: Moved the `MonoDebuggerManager' and
13628         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
13629         started to cleanup this file a little bit.
13631 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
13633         * mini.c: optimize a codepath frequently happening in generics code.
13635 2006-01-23  Martin Baulig  <martin@ximian.com>
13637         * Makefile.am: Only compile debug-debugger.c on supported platforms.
13639         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
13640         functions directly.
13642         * driver.c: debug-debugger.c is only available if
13643         `MONO_DEBUGGER_SUPPORTED' is defined.   
13645 2006-01-23  Martin Baulig  <martin@ximian.com>
13647         * debug-debugger.c: Only enable this on platforms where the Mono
13648         Debugger is working (x86 and x86_64).
13650 2006-01-21  Martin Baulig  <martin@ximian.com>
13652         The Mono Debugger is now using the normal `mono' instead of the
13653         `mono-debugger-mini-wrapper' when executing managed code.
13655         * debug-debugger.c: New file; previously known as
13656         debugger/wrapper/wrapper.c.
13658         * debug-mini.c (mono_init_debugger): Removed.
13660         * driver.c (mono_main): Added new `--inside-mdb' command line
13661         argument which is used when running inside the debugger.
13663 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
13665         * liveness.c (mono_analyze_liveness): Remove some unused data
13666         structures.
13668 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
13670         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
13672 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
13674         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
13675         depends on implementation details of monobitset.
13677         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
13678         Fixes #77271.
13680 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
13682         * liveness.c: Update after monobitset changes.
13684 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
13686         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
13688 2006-01-11 Neale Ferguson <neale@sinenomine.net>
13690         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
13692         * mini-s390x.c: Remove warning messages.
13694 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
13696         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
13698 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
13700         * generics.2.cs: Add ldelem/stelem_any test.
13702 2006-01-10 Neale Ferguson <neale@sinenomine.net>
13704         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
13706 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
13708         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
13709         
13710 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
13712         * generics.2.cs: Reenable vtype tests.
13714         * inssel-x86.brg: Remove an icorrect valuetype rule.
13716 2006-01-06 Neale Ferguson <neale@sinenomine.net>
13718         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
13719         initial support for OP_ABS.
13721 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13723         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
13725 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13727         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
13728         conversion and implement LADD/LSUB.
13730         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
13731         architectures.
13733 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13735         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
13737         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
13738         architectures.
13740 2006-01-05 Neale Ferguson <neale@sinenomine.net>
13742         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
13743         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
13744         (stack walk problem).
13746 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
13748         * aot.c (mono_aot_load_method): Fix a warning.
13750 2006-01-03  Neale Ferguson <neale@sinenomine.net>
13752         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
13754 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
13756         * iltests.il: Add test for #77148.
13758         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
13759         #77148.
13761 2006-01-03  Neale Ferguson <neale@sinenomine.net>
13763         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
13765 2006-01-03  Neale Ferguson <neale@sinenomine.net>
13767         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
13768         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
13770         * basic-long.cs: Add lconv-to-r4/r8 tests.
13772 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
13774         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
13776         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
13777         here as on other archs.
13779 2005-12-29 Neale Ferguson <neale@sinenomine.net>
13781         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
13783 2005-12-29 Neale Ferguson <neale@sinenomine.net>
13785         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
13786         
13787         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
13789         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
13790         instrument_prolog; Add memory_barrier instruction.
13792 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
13794         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
13796 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
13798         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
13800         * aliasing.c inssel.brg: Fix warnings.
13802         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
13803         could skip initialization of some parts of memory.
13805         * mini.c mini-ia64.c: Fix warnings.
13807         * inssel-sparc.brg: Add an implementation of lneg which actually works.
13809 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
13811         * aliasing.c (mono_build_aliasing_information): Add a workaround for
13812         a crash seen on sparc.
13814         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
13815         
13816         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
13818 2005-12-21 Neale Ferguson <neale@sinenomine.net>
13820         * mini-ops.h: Add s390_backchain instruction
13822         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
13824         * cpu-s390.md: Add s390_backchain instruction
13826         * mini-s390.c: Significant ABI changes
13828         * mini-s390.h: Cater for zero length structures
13830 2005-12-20 Neale Ferguson <neale@sinenomine.net>
13832         * mini-s390.c: ABI fixes
13834         * inssel-s390.brg: Remove debug statements
13836         * cpu-s390.md: Fix length of ATOMIC_xx operations
13838 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
13840         * basic-float.cs: Add float<->long conversion tests.
13842 2005-12-16 Neale Ferguson <neale@sinenomine.net>
13844         * mini-s390.c: Fix LOCALLOC processing.
13846         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
13848 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
13850         * iltests.il: Add tests for some opcodes not covered by the other
13851         tests.
13853 2005-12-15 Neale Ferguson <neale@sinenomine.net>
13855         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
13856         register loading for Tail processing; Correct trace output.
13858         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
13860         * cpu-s390.md: Correct size of jmp instruction. 
13862 2005-12-13 Neale Ferguson <neale@sinenomine.net>
13864         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
13866 2005-12-13 Neale Ferguson <neale@sinenomine.net>
13868         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
13869           Bring s390 up to current level.
13871 2005-12-12  Zltan Varga  <vargaz@gmail.com>
13873         * generics.2.cs: Disable the newly added tests as they do not work yet.
13874         
13875         * generics.2.cs: Add valuetype tests.
13877 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
13879         * basic-long.cs: Add i4->u8 test.
13881         * objects.cs: Add tests for JIT intrinsic.
13883         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
13884         optimizations lost by a mistake.
13886 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
13888         * basic-long.cs: Remove a test moved to objects.cs.
13890         * arrays.cs: Add more array tests.
13892 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
13894         * arrays.cs: Add new tests for multi-dimensional arrays.
13896 2005-12-06  Raja R Harinath  <rharinath@novell.com>
13898         * Makefile.am (test_sources2): Add generics.2.cs.
13899         (EXTRA_DIST): Add test_sources2.
13901 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
13903         Support for boxing and unboxing nullable types as well as the
13904         isinst operation on nullables, per the CLI ammendment.
13906         * inssel.brg (CEE_ISINST): Special case for nullable
13908         * mini.c (handle_unbox_nullable): new method
13909         (handle_box): Special case for nullable types
13910         (mono_method_to_ir): Call handle_unbox_nullable in correct
13911         places.
13913         * generics.2.cs: New test suite
13915         * Makefile.am: Support for regression tests with generics.
13917 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
13919         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
13920         allocated to registers. Fixes #76800.
13922 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
13924         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
13926 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
13928         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
13929         of platforms.
13931 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
13933         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
13934         objects.cs.
13936         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
13937         
13938         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
13939 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
13941         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
13942         single precision before storing to a single precision location.
13944 2005-11-28  Raja R Harinath  <rharinath@novell.com>
13946         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
13948 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
13950         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
13951         correct files.
13953         * basic.cs: Remove test_0_byte_compares test which was moved to
13954         objects.cs a long time ago.
13956 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
13958         * aliasing.c: Fixed aliasing issue on 64 bit archs.
13960 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
13962         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
13963         handlers are called.
13965         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
13966         throwing code.
13968          * mini-ia64.c: Add support for the throw->branch exception 
13969         optimization.   
13971         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
13973 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
13975         * mini.c: Enabled "fastpath" deadce :-)
13976         
13977 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
13979         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
13980         alias analysis pass to support it.
13981         * mini.h: Likewise.
13982         * ssa.c: Likewise.
13983         * liveness.c: Likewise (liveness computation can use aliasing
13984         information to be more accurate).
13985         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
13986         moreover made so that "--compile-all" uses the given optimization
13987         flags and not the default ones.
13988         * aliasing.c: Alias analysis (new file).
13989         * aliasing.h: Likewise.
13990         * Makefile.am: added "aliasing.c" and "aliasing.h".
13991         
13992 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
13994         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
13995         OP_L opcodes.
13997 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
13999         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
14000         fp >= end_of_stack exit condition, as it is not needed, and it might
14001         become true for fp eliminated frames.
14003 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
14005         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
14006         coded offsets.
14008 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
14010         * mini-arm.c: fixed alignment of doubles/longs to match
14011         the C ABI (bug #76635).
14013 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
14015         * aot.c: fix compilation with --enable-minimal=aot.
14017 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
14019         * mini-arm.c: fixed compatibility with the new
14020         floating point emulator package for compares.
14022 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
14024         * mini.c : reverted sig->pinvoke changes (r51396-51397).
14026 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
14028         * mini-exceptions.c (print_stack_frame): Output to stderr.
14029         (mono_handle_native_sigsegv): Ditto.
14031 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
14033         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
14034         OP_LCONV_TO_OVF_I implementation.
14036         * mini-amd64.c: Add support for the throw->branch exception 
14037         optimization.
14039         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
14040         when the catch clause catches a more general exception, i.e. Object.
14042 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
14044         * cpu-ia64.md: Remove unused opcodes.
14046         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
14047         specific defines for architectures defining USE_SIGACTION.
14049         * mini-ia64.c: Fix some warnings.
14051         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
14052         version seemed to skip a frame.
14054 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
14056         * mini.c: Clean up the usage of sig->pinvoke flag. Now
14057         only calls which are made to native code use this flag.
14059 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
14061         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
14062         varargs methods as well.
14063         
14064         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
14065         which have save_lmf set. Reorganize methods prologs a bit.
14067         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
14068         debugger to the proper place.
14070 2005-10-29  Martin Baulig  <martin@ximian.com>
14072         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
14073         when running inside the debugger until the debugger has support
14074         for it.
14076 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
14078         * mini.h: Fix a warning.
14080 2005-10-24  Miguel de Icaza  <miguel@novell.com>
14082         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
14083         we expose publicly, this returns the string.
14085 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
14087         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
14088         with fp elimination.
14090 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
14092         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
14093         native stacktrace using the glibc 'backtrace' function if available.
14095 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
14097         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
14099         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
14100         handle SIGSEGVs received while in native code.
14102         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
14103         code, call mono_handle_native_sigsegv which will abort the runtime
14104         after printing some diagnostics, instead of converting it into a
14105         confusing NullReferenceException.
14107 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
14109         * cpu-pentium.md: Remove unused opcodes.
14111 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
14113         * mini-amd64.h (MonoLMF): Add rsp field.
14115         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
14116         the lmf too.
14118 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
14120         * mini-codegen.c (get_register_spilling): Fix some warnings.
14122 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
14124         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
14125         elimination during exception handling. Enable fp elimination by
14126         default.
14128         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
14129         elimination.
14131 2005-10-16  Martin Baulig  <martin@ximian.com>
14133         * mini-exceptions.c
14134         (mono_debugger_run_finally): New public method for the debugger.
14136 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
14138         * debug-mini.c (mono_debug_init_method): Fix warning.
14140         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
14141         the 'exname' parameter const to fix some warnings.
14143 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
14145         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
14146         introduced by the previous patch.
14148 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
14150         * basic-float.cs: Add test for precision of float arithmetic.
14152         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
14153         when loading/storing single values from/to memory.
14155         * mini.c (mono_jit_compile_method_with_opt): Create the function
14156         pointers in the correct domain.
14158 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
14160         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
14161         introduced by previous patch.
14162         
14163         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
14164         when out_filter_idx is NULL.
14166         * mini-exceptions.c: Don't run filter clauses twice during exception
14167         handling. Fixes #75755.
14169 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
14171         * aot.c: Add support for ldflda wrappers.
14173         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
14174         #75902.
14176 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
14178         * mini.c, mini.h: do not consider exception handlers blocks when
14179         setting up interface variables.
14181 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
14183         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
14185 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
14187         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
14188         causes a regression.
14190         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
14192 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
14194         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
14195         of the OP_P definitions.
14197         * TODO: Add a proposal for dealing with the CEE/OP mess.
14199         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
14200         optimizations from the x86 port.
14202         * cpu-amd64.md: Ditto.
14204         * basic.cs basic-long.cs: Add tests.
14206 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
14208         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
14209         Patrik Torstensson's implementation of my exception-handling
14210         optimization idea, when the exception object is not used
14211         (bug #62150).
14213 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
14215         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
14216         of the mul_imm optimizations from the old jit.
14218 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
14220         * mini.c, liveness.c: patch by Patrik Torstensson and
14221         Zoltan Varga to improve performance in methods with
14222         exception clauses.
14224 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
14226         * driver.c: Remove 'Globalization' entry from --version.
14228 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
14230         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
14231         there is a profiler interested in JIT events.
14233         * aot.c: Load profile files produced by the AOT profiling module, and
14234         reorder methods based on the profiling info. Add a 'method_order' table
14235         to the AOT file to make mono_aot_find_jit_info work with the reordered
14236         methods.
14238         * mini.h: Bump AOT file version info.
14240 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
14242         * mini-arm.h: work around what looks like a gcc bug when optimizations
14243         are enabled.
14245 2005-09-28  Raja R Harinath  <rharinath@novell.com>
14247         * Makefile.am (AM_CFLAGS): Don't use += to append inside
14248         conditionals.  Use ...
14249         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
14251 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
14253         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
14254         to determine the amount of memory to copy when passing valuetypes.
14256         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
14257         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
14259 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
14261         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
14262         information about aot.
14264 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
14266         * *.c: Replace the use of {Enter,Leave}CriticalSection with
14267         macros. This will allow a deadlock debugger to easily be plugged
14268         in.
14270 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
14272         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
14274 2005-09-27  Raja R Harinath  <rharinath@novell.com>
14276         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
14277         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
14278         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
14279         ($(arch_built)) [CROSS_COMPILING]: Error out.
14281 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
14283         * aot.c: Add support for the no_special_static flag for classes.
14285 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
14287         * Reapply reverted patches.
14289         * *: Revert r50174 as well.
14291         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
14293 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
14295         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
14297 2005-09-23  Miguel de Icaza  <miguel@novell.com>
14299         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
14300         part of the SIG_HANDLER_SIGNATURE.  
14302 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
14304         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
14305         statistics.
14307         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
14308         introduced by previous patch.
14310 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
14312         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
14313         saved registers too.
14315         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
14316         upon the information returned by get_call_info ().
14317         
14318         * mini-x86.c (add_float): Fix stack size calculation.
14319         (mono_arch_call_opcode): Rewrite this so it works based up the
14320         information returned by get_call_info ().
14321         (mono_arch_get_this_vret_args): Ditto.
14323 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
14325         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
14326         in cinfo to determine the registers which need to be used.
14328 2005-09-20  Miguel de Icaza  <miguel@novell.com>
14330         * driver.c (mono_main): Add --server and --desktop flags. 
14332 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
14334         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
14335         registers as global registers.
14337         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
14338         longer needed with the new register allocator.
14340         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
14342         * cpu-ia64.md: Remove unused opcodes.
14343         
14344         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
14345         
14346 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
14348         * cpu-amd64.md: Remove unused opcodes.
14350         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
14351         needed with the new register allocator.
14353         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
14354         reg-reg moves.
14356 2005-09-16  Raja R Harinath  <rharinath@novell.com>
14358         * Makefile.am (check-local): Don't invoke semdel-wrapper.
14360 2005-09-16  Martin Baulig  <martin@ximian.com>
14362         * exceptions-amd64.c
14363         (throw_exception): Don't call mono_debugger_throw_exception() if
14364         we're a rethrow - see the FIXME in the code.
14366 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
14368         * mini.c (mono_init_exceptions): This only works on some architectures.
14369         
14370 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
14372         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
14373         on ia64.
14375         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
14377         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
14378         now in mini-exceptions.c.
14380 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
14382         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
14383         now in mini-exceptions.c.
14385 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
14387         * exceptions-x86.c: Applied patch from Patrik Torstensson 
14388         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
14390         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
14391         code into mini-exceptions.c. Add some assertions to it.
14393 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
14395         * aot.c (emit_section_change): Applied patch from "The Software Team" 
14396         (<software@solmersa.com>). Fix as errors on windows.
14398 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
14400         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
14401         method info into the LMF.
14403 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
14404         
14405         * mini-ia64.c: Add proper unwind info for method epilogs.
14407         * exceptions-ia64.c: Add some code to help debugging.
14408         
14409         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
14411         * mini-exceptions.c: Fix warning.
14413 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
14415         * mini.c: Really fix build.
14417         * mini-x86.c mini-amd64.c: Fix build.
14419 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
14421         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
14423         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
14424         some Interlocked methods as intrinsics.
14426         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
14427         for Thread methods as well.
14429         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
14431         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
14433         * mini-ia64.c mini-x86.c mini-amd64.c 
14434         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
14435         OP_MEMORY_BARRIER.
14436         
14437         * mini.c (mono_init_exceptions): Fix build breakage.
14439 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
14441         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
14442         of instructions. Use the new ia64_unw_op macros for emitting unwind
14443         info.
14445         * mini.c (mono_init_exceptions): Initialize exception handling
14446         related trampolines at startup.
14448 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
14450         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
14452 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
14454         * mini.c: Handle type loading errors gracefully during compilation and
14455         throw the appropriate exception.
14457 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
14459         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
14460         for the mono binary.
14462 2005-09-09  Martin Baulig  <martin@ximian.com>
14464         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
14465         the release.
14467 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
14469         * mini-arm.h: use emulation for conv.r.un for the release.
14471 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
14473         * mini-arm.c, objects.cs: more fixes and tests for them.
14475 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
14477         * mini-arm.c: align structures to at least 4 bytes to be able
14478         to keep our current optimized memcpy.
14480 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
14482         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
14484 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14486         * mini.c: ignore SIGPIPE.
14488 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
14490         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
14492         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
14494 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
14496         * mini.h: Add prototype for mono_allocate_stack_slots_full.
14498 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
14500         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
14501         exception handling support.
14502         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
14503         patch by Brian Koropoff <briank@marakicorp.com>).
14505 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
14507         * mini.c: revert another 'optimization' which breaks when
14508         items on the eval stack need to be saved at a basic block end
14509         (bug #75940).
14511 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
14513         * jit-icalls.c: for arrays, ensure we always provide
14514         lower bounds.
14516 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
14518         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
14519         
14520         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
14522 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
14524         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
14525         arguments in their original register.
14527 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
14529         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
14530         memset/memcpy.
14532         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
14533         when ssapre is enabled.
14535         * inssel-long.brg: Fix bug in previous patch.
14537         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
14538         multiplication by a constant.
14540 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
14542         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
14543         icc.
14545         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
14546         saving registers.
14548 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
14550         * inssel-arm.brg: apply changes tested by Brian Koropoff
14551         <briank@marakicorp.com>.
14553 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
14555         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
14556         
14557 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
14559         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
14560         to the same register if dreg is just a base register.
14561         (print_ins): Improve printing of membase opcodes.
14563         * inssel-x86.brg: Add optimized ldind(reg) rules.
14565         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
14567 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
14569         * mini.c: when running under valgrind, set the stack bottom for
14570         the GC at the actual approximate stack for the app (fixes running
14571         mono with valgrind).
14573 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
14575         * mini.c: do no break at the first valuetype to init found
14576         (fixes bug #75791).
14578 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
14580         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
14582 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
14584         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
14586 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
14588         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
14590 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
14592         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
14594         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
14595         code.
14597         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
14598         code.
14600         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
14601         methods.
14603 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
14605         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
14607 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
14609         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
14610         in the tail recursion optimization.
14612         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
14613         debug info into the assembly file.
14615         * iltests.il: Add test for filter regions.
14617         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
14618         initial stack of filter regions. Fixes #75755.
14620 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
14622         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
14623         stack requirements.
14625 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
14627         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
14628         the check for an already compiled method on non-ia64 platforms.
14629         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
14630         proper domain.
14632         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
14634         * inssel-x86.brg: Add some optimized call rules.
14636 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
14638         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
14639         method here.
14641         * mini.h mini-trampolines.c: Pass the trampoline argument to 
14642         mono_arch_patch_delegate_trampoline.
14644         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
14646         * mini-trampolines.c: Fix build.
14648         * mini-amd64.h: Add delegate trampolines.
14650         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
14652         * inssel-amd64.brg: Add optimized call rules.
14653         
14654         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
14656         * inssel-ia64.brg: Add optimized ldind(reg) rules.
14658 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
14660         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
14661         change.
14663         * mini-ia64.c: Remove LMF fixmes.
14665         * mini-ia64.h: Remove most fields from LMF.
14667         * inssel-ia64.brg (stmt): Fix unaligned access errors.
14669         * mini-trampolines.c: Add support for IA64 function descriptors.
14671         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
14672         for IA64 function descriptors.
14674 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
14676         * tramp-arm.c: patch the vtable for virtual calls. Added
14677         support code to register/unregister the LMF.
14678         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
14679         more LMF work.
14681 2005-08-19  Dick Porter  <dick@ximian.com>
14683         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
14684         bit value if needed.
14686 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
14688         * mini.c (mini_get_method): Move handling of wrapper data here.
14690         * mini.c (mono_method_to_ir): Add support for dynamic methods.
14692         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
14693         virtual.
14695         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
14696         bblock->code does not remain empty.
14698 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
14700         * arrays.cs: Add regression test for #75832.
14702         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
14703         rules. Fixes #75832.
14705         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
14706         instruction scheduling.
14708 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
14710         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
14712 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
14714         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
14716         * mini-codegen.c: Fix VC build.
14718         * cpu-pentium.md: Increase length of atomic_exhange_i4.
14720 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14722         * mini.h: fix signature for mono_register_opcode_emulation.
14724 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
14726         * mini.c: Get rid of most of the helper_sig_... constants using
14727         mono_create_icall_signature ().
14729 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
14731         * jit-icalls.c (helper_ldstr): New helper function.
14733         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
14735         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
14736         throw, load the string using a helper call instead of creating a string object.
14738         * aot.c: Update after LDSTR changes.
14740         * mini.h: Bump AOT file version.
14741         
14742         * aot.c: Save class size info into the AOT file. Print more statistics during
14743         compilation.
14745         * mini.h: Bump AOT file version.
14747         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
14748         ordering of disasm cases. Fixes #74957.
14750 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
14752         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
14753         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
14754         the generic code needed for the ARM port.
14756 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
14758         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
14759         inssel-arm.brg: more ARM features and fixes.
14761 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
14763         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
14764         ARM port work in progress.
14766 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
14768         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
14770         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
14772         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
14774         * inssel.brg (mini_emit_memset): Add support for unaligned access.
14776         * *-ia64.*: Ongoing IA64 work.
14777         
14778         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
14780 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
14782         * TODO: Remove out-of-data todo stuff.
14784         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
14785         dead code.
14787         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
14789         * mini.h: Bump corlib version.
14791 2005-07-27  Martin Baulig  <martin@ximian.com>
14793         * mini-codegen.c
14794         (create_copy_ins): Added `const unsigned char *ip' argument; set
14795         `copy->cil_code' from it.
14797 2005-07-27  Martin Baulig  <martin@ximian.com>
14799         * mini-exceptions.c (mono_handle_exception): Don't call
14800         mono_debugger_handle_exception() for filters.
14802 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
14804         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
14805         as well.
14807 2005-07-26  Martin Baulig  <martin@ximian.com>
14809         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
14811         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
14812         helper_compile_generic_method() if the method is actually virtual
14813         and non-final.
14815 2005-07-26  Martin Baulig  <martin@ximian.com>
14817         * mini.c
14818         (trampoline_code): Renamed to `mono_trampoline_code' and made it
14819         public; this is now accessed directly by the debugger.
14820         (mono_generic_trampoline_code): Removed.
14822         * debug-mini.c
14823         (mono_debug_init_method): Also add interncalls and wrappers.
14825 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
14827         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
14829 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
14831         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
14833 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
14835         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
14837 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
14839         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
14840         getting TLS offsets on AMD64 too.
14842 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
14844         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
14846 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
14848         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
14849         inssel-arm.brg, mini-arm.h: ARM port work in progress.
14851 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
14853         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
14855         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
14856         to mini.c.
14858         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
14859         mono_sparc_is_virtual_call ().
14860         
14861         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
14863         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
14864         trampoline parameters.
14866         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
14867         
14868         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
14869         to mono_arch_get_vcall_slot_addr.
14871         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
14872         trampoline code.
14874         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
14876 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
14878         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
14880 2005-07-19  Martin Baulig  <martin@ximian.com>
14882         * exceptions-amd64.c (throw_exception): Call
14883         mono_debugger_throw_exception() here like we're doing it on i386.
14885 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
14887         * mini-ia64.c: Add optimized TLS access support.
14889 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
14891         * mini-exceptions.c: Ongoing IA64 work.
14893         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
14895         * mini.c: Use the default optimization set when embedding. Fixes
14896         #75194.
14898 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
14900         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
14901         of trampolines to a separate file.
14903         * mini-trampolines.c: New file.
14905         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
14906         separate file.
14907         
14908         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
14909         amd64/ia64 code.
14911         * mini-codegen.c: Fix cygwin build.
14913 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
14915         * mini.c: Add some minor changes needed by the IA64 port.
14917         * *-ia64.*: Ongoing IA64 work.
14919 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
14921         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
14922         trampolines into arch-independent and arch-dependent parts.
14924         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
14926 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
14928         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
14930         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
14931         the xp-regalloc-branch for amd64.
14933         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
14934         xp-regalloc-branch for x86.
14936 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
14938         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
14940 2005-07-06  Martin Baulig  <martin@ximian.com>
14942         * mini.c
14943         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
14944         (mono_jit_runtime_invoke): Likewise.
14946 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
14948         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
14949         on x86 too.
14950         
14951         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
14952         without loading their metadata. Reorganize the file format so exception handling+
14953         debug info is kept separate from normal method info. Create MonoJitInfo 
14954         structures for methods lazily.
14956         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
14957         loading metadata.
14958         (x86_class_init_trampoline): Patch AOT class init trampolines too.
14960         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
14962         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
14963         in AOT code.
14965         * mini.h: Bump AOT file version.
14967 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
14969         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
14971 2005-07-01  Raja R Harinath  <rharinath@novell.com>
14973         * Makefile.am (check-local): Call semdel-wrapper.
14975 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
14977         * mini-x86.c: Revert the last change as it seems to break the build..
14979 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
14981         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
14982         
14983         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
14985 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
14987         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
14988         outside of the macro, so strange stuff doesn't happen with gcc4
14989         (NEW_AOTCONST_TOKEN): Likewise.
14991 2005-06-28  Martin Baulig  <martin@ximian.com>
14993         * mini.c (mini_class_is_system_array): New static method; use this
14994         instead of `klass->parent == mono_defaults.array_class' everywhere
14995         since this also works for the new generic array class.
14997 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
14999         * inssel.brg: Remove warnings.
15001 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
15003         * mini-ia64.c: Ongoing IA64 work.
15005         * basic-float.cs: Add float->i1 conversion test.
15007         * iltests.il: Add conv.u4 test.
15009 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
15011         * inssel-long.brg: Fix bug caused by last change.
15013 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
15015         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
15016         BSDs.  Allows the x86 JIT to work on OSX86
15018 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
15020         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
15021         u4->i8 conversion.
15023         * mini-ia64.c: Ongoing IA64 work.
15025 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
15027         * mini-ia64.c: Ongoing IA64 work.
15029         * driver.c: Clean up jit_code_hash as well when using --regression.
15031         * inssel-long.brg: Fix long->i4/u4 conversion rules.
15033         * basic-long.cs: Add tests for long->u4 conversion.
15035 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
15037         * mini.c: Take mono_get_domainvar out of macros. This makes sure
15038         that we do not depend on undefined C behavior: the order stuff
15039         gets evaluated within an expression. Fixes mono when compiled on
15040         GCC 4.
15042 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
15044         * *-ia64.*: Ongoing IA64 work.
15046         * aot.c: Lower memory usage while loading AOT methods.
15048         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
15050         * mini.h: Bump AOT file format version.
15052 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
15054         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
15056 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
15058         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
15059         not on callee assembly). Fixed some comments.
15061 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
15063         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
15064         it gets proper disassembly.
15065         (emit_method_info): Remove some dead code.
15067         * mini.c (mini_method_compile): Allways allocate the GOT var in
15068         mono_method_to_ir for emulating opcodes.
15070 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
15072         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
15073         before freeing the code memory. Fixes #74990.
15075         * objects.cs: Add regression test for #74992.
15077         * liveness.c: Extend live ranges of arguments to the beginning of the
15078         method. Fixes #74992.
15080         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
15081         so it points into the faulting instruction.
15083 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
15085         * jit-icalls.c (mono_imul_ovf): Add exception handling.
15087         * *-ia64.*: Ongoing IA64 work.
15089         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
15091 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
15093         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
15095         * *-ia64.*: Ongoing IA64 work.
15097 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
15099         * basic-long.cs: Add tests for add/sub.ovf.
15101         * basic.cs: Add tests for sub.ovf.
15103         * *-ia64.*: Ongoing IA64 work.
15105 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
15107         * *-ia64.*: Ongoing IA64 work.
15109         * basic.cs: Add conv.ovf.i4.un test.
15111 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
15113         * mini.c: (remove_block_if_useless) Fixed bug 75061.
15114         
15115 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15117         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
15119 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
15121         * *-ia64.*: Ongoing IA64 work.
15123 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15125         * trace.[ch]:
15126         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
15128 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
15130         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
15132 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
15134         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
15136         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
15137         of a call is callable by a near call.
15139 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
15141         * mini-ia64.c: Ongoing IA64 work.
15143 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
15145         * genmdesc.c: Make the generated array non-static.
15147         * inssel-long.brg: Fix LSHR_IMM rule.
15149         * *-ia64.*: Ongoing IA64 work.
15151         * *-ia64.*: Ongoing IA64 work.
15153 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
15155         * *-ia64.*: Ongoing IA64 work.
15157         * *-ia64.*: Ongoing IA64 work.
15158         
15159         * mini-ia64.c: Ongoing IA64 work.
15161         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
15163 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
15165         * objects.cs basic-calls.cs: Move some tests to objects.cs.
15166         
15167         * objects.cs basic-long.cs: Move some tests to objects.cs.
15169 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
15171         * *-ia64.*: Ongoing IA64 work.
15173         * iltests.il: Add a new test.
15175         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
15176         newobj. Fixes #75042.
15178 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
15180         * *-ia64.*: Ongoing IA64 work.
15181         
15182         * *-ia64.*: Ongoing IA64 work.
15183         
15184         * *-ia64.*: Ongoing IA64 work.
15186         * basic.cs objects.cs: Move tests accessing static variables as well.
15188         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
15190 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
15192         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
15194         * driver.c: Always print failed tests.
15196         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
15197         frame pointer.
15199         * *ia64*: Ongoing IA64 work.
15201 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
15203         * basic.cs: Add tests for add.ovf. Fix warnings.
15205 2005-05-18  Miguel de Icaza  <miguel@novell.com>
15207         * driver.c (mono_main): Avoid crash if no argument is passed to
15208         --break;  Do not use g_error, but f_printf.   And fix all other
15209         ocurrences of the same crash.
15211 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
15213         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
15214         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
15215         Fixes #74742.
15217 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
15219         * *-ia64.*: Add beginnings of IA64 backend.
15221         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
15223 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
15225         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
15226         Fixes #74925.
15228         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
15230         * mini-amd64.c: Fix a warning.
15232 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
15234         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
15235         in float_neg. Fixes #74897.
15237         * mini-amd64.c (emit_call): Fix another near call bug.
15239 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
15241         * declsec.c: Keep the appdomain information in the structure. Added a 
15242         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
15243         value gets overwritten).
15244         * declsec.h: Set the default MonoArray for the the stack to 6. Added
15245         an MonoAppDomain member to MonoSecurityFrame.
15246         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
15247         used in the stack walk. Now use a MonoArray which grow (double) when
15248         it gets full.
15250 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
15252         * mini.c: Re-enabled runtime cleanup, since running threads should
15253         now properly stop when exiting.
15255 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
15257         * mini-codegen.c: New file contaning the arch-independent local
15258         register allocator. Not used by any architectures yet.
15260         * mini.h linear-scan.c: Merge some changes from the 
15261         mini-xp-local-regalloc branch.
15263 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
15265         * mini-amd64.c (emit_call): Fix calls to native functions when the
15266         runtime is compiled as a shared library. Fixes #74756.
15268         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
15269         on a literal field. Fixes #74751.
15271 2005-04-25  Raja R Harinath  <rharinath@novell.com>
15273         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
15275 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
15277         * objects.cs: Add missing null casting test.
15279 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
15281         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
15282         in wrapper methods. Also rename 'address' variable to 'offset'.
15284 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
15286         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
15287         warnings.
15288         
15289         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
15291         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
15292         work on windows.
15294 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
15296         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
15298 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
15300         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
15301         just the last bytes.
15303 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
15305         * aot.c (mono_compile_assembly): Fix warning.
15307         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
15308         by the _MSC_VER stuff.
15310 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
15312         * inssel-long.brg: Fix #74588.
15314         * cpu-amd64.md: Fix #74591.
15316         * iltests.il: Add new regression tests.
15318 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
15320         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
15321         valuetype.
15323 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
15325         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
15327         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
15328         from Bill Middleton <flashdict@gmail.com>.
15330 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
15332         * arrays.cs: Add new regression test. Fix warnings.
15334 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
15336         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
15337         and leakage in CKFINITE.
15339         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
15340         this to a null op since it is called on amd64 too.
15342         * exceptions-amd64.c (get_throw_trampoline): Align stack.
15344         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
15345         body since this is not used on amd64.
15346         
15347         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
15349         * mini-amd64.c: Remove obsolete fixmes.
15351         * mini.c (print_method_from_ip): Fix debugging support.
15353 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
15355         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
15356         so that expressions that don't give much gain are not reduced.
15357         * ssapre.h: Likewise.
15359 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
15361         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
15363         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
15365         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
15367 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
15369         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
15371         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
15373 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
15375         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
15376         stack touching.
15378         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
15380         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
15382         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
15384         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
15385         MONO_ARCH_USE_SIGACTION. Fixes #74252.
15387         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
15389         * mini-x86.c: Fix up stack overflow handling.   
15391         * exceptions.cs: Add new regression test.
15393 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
15395         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
15396         mono_jit_thread_attach.
15398         * mini.c (mono_method_to_ir): Verify called method is not abstract.
15400 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
15402         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
15403         avoid calling constructors using callvirt.
15405         * inssel.brg: Fix #74073.
15407 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
15409         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
15410         compilation with non-GCC compilers.
15411         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
15412         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
15414 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
15416         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
15417         klass->interface_offsets (will likely fix bug#74073).
15419 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
15421         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
15423 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
15425         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
15426         to amd64_div_reg_size ().
15427         
15428         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
15430 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
15432         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
15434 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
15436         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
15438 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
15440         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
15441         
15442         * mini.c (mono_precompile_assembly): Load and precompile referenced
15443         assemblies as well. Fixes #74015.
15445 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
15447         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
15449 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
15451         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
15452         a lot of checks and (anyway) permissions cannot work until corlib is 
15453         loaded.
15455 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
15457         * mini-ppc.c: fixed ABI issue on sysv/ppc.
15459 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
15461         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
15462         calls (fixes bug#72824).
15464 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
15466         * mini.c: fix tail recursion elimination (see test in bug#73936).
15468 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
15470         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
15471         some fp functions in sse2 mode.
15473 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
15475         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
15477 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
15479         * mini.h mini.c: Add mono_get_jit_tls_key ().
15481         * mini-x86.c: Enable fast TLS support on windows.
15483 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
15485         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
15486         * mini.c: Check for p/invoke method when generating code. If a
15487         p/invoke method, or it's class, isn't decorated with [Suppress
15488         UnmanagedCodeSecurity] then generate code to call System.Security.
15489         UnmanagedDemand (only if the security manager is active).
15491 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
15493         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
15494         last change as it seems to cause strange crashes.
15495         
15496 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
15498         * *.c: handle unsafe function pointers where needed.
15500 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
15502         * mini.c (mono_jit_free_method): Remove the fixme too.
15504 2005-03-15  Miguel de Icaza  <miguel@novell.com>
15506         * mini.c: As discussed, make the code actually free the delegate
15507         thunk now, to enable the debugging of delegate problems, use
15508         MONO_DEBUG=1 when running Mono. 
15510         This takes also care of parts of the leaks as seen by Joe.
15512 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
15514         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
15515         thread_tls_offset calculation.
15517 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
15519         * declsec.c: Reworked linkdemand checks for icall. The previous code
15520         was using the declaration code (untrusted) and didn't work as expected
15521         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
15522         specific case.
15524 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
15526         * iltests.il: Add new localloc test.
15528         * mini-amd64.c: Handle large stack allocations the same way as on
15529         windows if stack overflow handling is working.
15530         
15531         * mini-amd64.c: Allocate the signal stack using mmap.
15533         * mini.c (sigsegv_signal_handler): Fix reading of context.
15535         * mini-exceptions.c: Fix up stack overflow handling.
15537         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
15539         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
15541         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
15543         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
15545         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
15546         tramp_init functions as they are no longer needed.
15548 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
15550         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
15551         
15552         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
15554         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
15555         
15556         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
15557         support that now.
15559         * mini-ops.h: Add OP_LMUL_IMM.
15561         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
15562         long mul/div opcodes as intrinsic.
15564         * mini-amd64.c (emit_call): Handle the case when the callee might be
15565         an AOT method.
15567 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
15569         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
15570         extra safe.
15571         
15572         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
15574         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
15576 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
15578         * mini.c (mono_codegen): Don't leak here, to help people running
15579         monogrind.
15581 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
15583         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
15584         conversions in sse2 mode.
15586         * basic-float.cs: Add regression test.
15587         
15588         * mini-amd64.c: Reenable sse2.
15590 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
15592         * mini-amd64.c: Disable sse2 until some regressions are fixed.
15594 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
15596         * driver.c: Copyright text should include 2005.
15597         
15598 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
15600         * cpu-amd64.md (load_membase): Fix more max lengths.
15602 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
15604         * cpu-amd64.md (load_membase): Fix max length.
15606         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
15608         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
15610         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
15611         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
15613         * basic-float.cs: Add rounding regression test.
15615         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
15617 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
15619         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
15620         structures in registers for pinvoke wrappers.
15622 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
15624         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
15626 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
15628         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
15629         wrapper to mono_jit_thread_attach.
15631         * mini.c (mini_jit_thread_attach): New jit icall.
15633         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
15634         native->managed wrappers.
15636         * exceptions.cs: Add new regression test.
15638         * mini.c (optimize_branches): Check regions in the cbranch to throw
15639         block case as well. Fixes #73242.
15641 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
15643         * mini.c: thread safety fixes.
15645 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
15647         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
15648         patching stuff, since delegates use jump trampolines so there is
15649         no caller.
15651         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
15652         jump trampolines.
15653         
15654         * tramp-amd64.c: Fix build.
15656         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
15657         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
15659         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
15660         Rename this to mono_arch....
15661         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
15663         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
15665         * mini-amd64.c (emit_call): If both the caller and the callee is
15666         guaranteed to have 32 bit addresses, emit a normal call.
15668         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
15670         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
15671         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
15672         method_ptr inside delegates.
15674 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
15676         * mini.c (mono_jit_free_method): Free the method info even if the native code is
15677         invalidated. Fixes #73001.
15679         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
15681         * mini-x86.c: Only use stdcall for pinvokes on windows.
15683 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
15685         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
15686         * mini-x86.c: remove unreliable __thread var offset detection,
15687         use the correct accessors and enable by default.
15689 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
15691         * mini.c (mono_jit_free_method): Fix memory leak.
15693 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
15695         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
15697 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
15699         * cpu-amd64.md: Fix lengths of atomic opcodes.
15701 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
15703         * driver.c: try to not imply using ICU is any good.
15705 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
15707         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
15708         functions as inline ops.
15710         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
15711         some Interlocked functions as inline ops.
15713         * mini.c (move_basic_block_to_end): Fix bug in last patch.
15715         * mini.h (MonoBasicBlock): Reorganize fields a bit.
15717         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
15719         * mini.c: Add support for OP_NOT_TAKEN.
15721         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
15722         structures in registers for pinvoke wrappers.
15724         * mini-amd64.c: Fix warnings.
15726 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
15728         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
15730         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
15732         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
15733         address instead of loading the address from it.
15735         * mini-x86.c: Add support for returning small structs in registers
15736         on Win32. Fixes part of #70864.
15737         
15738 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
15740         * trace.c (get_token): Improve error checking.
15742 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
15744         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
15746 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
15748         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
15749         it can be reused for MonoClass.
15750         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
15751         _LINKDEMAND.
15753 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
15755         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
15756         instead of a MonoReflectionMethod. The method information wasn't used
15757         when displaying SecurityException details (but will be now).
15759 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
15761         * Makefile.am : windows build fix.
15763 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
15765         * iltests.il: Add new regression test.
15767         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
15768         #72522.
15770 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
15772         * mini.c: Moved linkdemand check into helper function check_linkdemand
15773         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
15774         LDFTN, LDVIRTFTN).
15776 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
15778         * declsec.c: Added statistics counter for different kinds of 
15779         LinkDemands.
15780         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
15781         (and commented) declaration.
15782         * mini.c: Added statistics counter for security Demand code 
15783         generation. Added display of security statistics.
15785 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
15787         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
15788         Fix compilation errors under gcc-2.95.
15790 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
15792         * mini.c, driver.c: Use the new jit trampoline hashtable
15794 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
15796         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
15798 2005-02-11  Martin Baulig  <martin@ximian.com>
15800         * debug-mini.c (mono_debug_close_method): Free the line number array.
15802 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
15804         * aot.c: Break up large methods into smaller ones. Share GOT slots for
15805         icalls.
15807         * mini.h: Bump AOT file format version. 
15809 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
15811         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
15812         APTC and P/Invoke.
15813         * declsec.h: Added macros to get/set lazyly initialized security 
15814         informations about assemblies. Added new enum for different type of
15815         possible LinkDemand violation. Added function to check LinkDemands.
15816         * mini.h: Added a field to MonoCompile to hold any security violation
15817         detected when JITting a method (so it can be thrown later).
15818         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
15819         and CEE_CALLVIRT. Added code to throw exception at the end of
15820         mini_method_compile (note: the exception is unhandled right now).
15822 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
15824         * mini.c, jit-icalls.c: use the managed implementation of
15825         memset for initobj and memset, to avoid managed <-> unmanaged
15826         transitions.
15828 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
15830         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
15831         optimization if it would need a GOT var.
15833         * basic.cs: Add tests for constant propagation and switch statements.
15835         * ssa.c: Fix out-of-range constant propagation and switch statements.
15837 2005-02-09    <vargaz@freemail.hu>
15839         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
15841 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
15843         * cpu-amd64.md (load_membase): Fix max length of load_membase.
15845 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
15847         * mini.c: update to new signature of mono_class_get_allocation_ftn().
15849 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
15851         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
15852         arithmetic operations.
15854 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
15856         * mini-ppc.c: add a workaround for broken user code that
15857         DllImports vararg functions with non-vararg signatures.
15859 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
15861         * mini.c (mono_jit_compile_method_inner): Add detection and a 
15862         meaningfull error message for assemblies written in Managed C++.
15864         * tramp-amd64.c mini-amd64.h: Add support for 
15865         create_trampoline_from_token ().
15867         * aot.c mini-x86.c abcremoval.c: Applied patch from
15868         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
15870 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
15872         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
15873         which takes a MonoImage/token as parameter instead of a MonoMethod.
15875         * aot.c: Use the new trampoline for initializing vtables.
15877         * aot.c: Add support for ldfld/stfld_remote wrappers.
15879         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
15880         rules for compare <MEM>, IMM.
15882         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
15884         * aot.c: Handle inherited finalizers correctly.
15886 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
15888         * inssel.brg (stmt): Add a missing _setup_... ().
15890         * aot.c: Save some parts of the class state to the AOT file and use it
15891         to recompute that state when a class is initialized.
15893         * mini.c: Install AOT hooks into the runtime.
15895         * mini.h: Bump AOT file format version.
15896         
15897         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
15898         Fixes #72148.
15900         * iltests.il: Add new test.
15902 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
15904         * mini.c: fix typo.
15906 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
15908         * mini.c: setup the statistical profiler in the thread attach
15909         callback to cope with the new single thread code.
15911 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
15913         * mini-ppc.c: ensure we have enough room for the profiler
15914         calls (fixed bug#72084).
15916 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
15918         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
15919         it.
15921 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
15923         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
15925 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
15927         * ssapre.c: Fixed an issue with down safety (this allows IronPython
15928         to succesfully execute parrotbench).
15929         * ssapre.h: Likewise.
15931 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
15933         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
15934         variable for stores to method arguments (fixes a SSAPRE issue).
15936 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
15938         * mini.c: handle value types in dup, fixes gen-112.cs.
15940 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
15942         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
15943         sequence for calls in dynamic methods to avoid thunks.
15945 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
15947         * mini.c: correctly remove dynamic methods from the hashtable.
15949 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
15951         * driver.c: Disabled SSAPRE until fix the bug that appears
15952         in IronPython's parrotbench.
15954 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
15956         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
15958         * mini.c (mono_method_to_ir): Revert the previous change.
15959         
15960         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
15961         when AOT compiling.
15963         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
15964         mono_jit_info_table_find () etc. when running under valgrind.
15966         * inssel.brg: Fix warnings.
15968         * mini-exceptions.c: Fix warnings.
15970 2005-01-31  Martin Baulig  <martin@ximian.com>
15972         * driver.c (compile_all_methods_thread_main): Don't try to compile
15973         generic methods or anything which has type parameters.
15975 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
15977         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
15979         * TestDriver.cs: Add --verbose flags.
15981         * graph.c ssa.c: Fix 64 bit warnings.
15982         
15983         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
15984         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
15985         Fix 64 bit warnings.
15987         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
15988         variable not spotted by gcc.
15989         
15990         * mini-amd64.c inssel-amd64.brg: Applied patch from  
15991         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
15992         X86_COMPARE_MEMBASE opcodes.
15994         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
15996 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
15998         * *: MonoMethod->signature might be NULL now. You *MUST* use
15999         mono_method_signature.
16001 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
16003         * driver.c (compile_all_methods_thread_main): Compile the methods
16004         without invoking cctors.
16006 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16008         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
16009         * basic-calls.cs: test for the above.
16011 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
16013         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
16014         MonoJitInfo changes.
16016 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
16018         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
16019         eagerly if it contains dynamic methods.
16020         
16021         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
16023         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
16024         trace, it is now computed by an icall from trace_ips.
16025         
16026         * mini-exceptions.c: Fix a warning.
16028 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
16030         * mini-exceptions.c: don't bother getting stack trace info if
16031         it's not going to be used.
16033 2005-01-27  Raja R Harinath  <rharinath@novell.com>
16035         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
16036         ssapre-mini-ops.h.
16038 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
16040         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
16042         * aot.c: Avoid calling mono_method_get_header () if not needed.
16044         * mini.h: Bump AOT file format version.
16045         
16046         * mini.c (mono_emit_native_call): Allocate a GOT var here.
16048         * mini.c (mono_print_tree): Print more info for calls.
16050 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
16052         * declsec.h: Remove warning by adding missing include for marshal.h
16054 2005-01-26  Martin Baulig  <martin@ximian.com>
16056         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
16057         `ip' twice.
16059 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
16061         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
16062         flags.
16064         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
16066         * aot.c (mono_compile_assembly): Fix a warning.
16068 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
16070         * declsec.c: Look for security attributes on the original MonoMethod 
16071         (and not the wrapped one). This fix permissions on icalls.
16073 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
16075         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
16077         * mini.c (mono_allocate_stack_slots): Add a fixme.
16079         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
16081 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16083         * inssel.brg: optimize casts of sealed types (more
16084         optimizations waiting for fixes in remoting).
16086 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
16088         * inssel.brg (stmt): Add another dummy rule.
16090         * driver.c: Fix warnings.
16092         * driver.c (mono_main): If running under valgrind, instruct glib to use
16093         the system allocation functions so valgrind can track the memory
16094         allocated by the g_... functions.
16096         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
16098         * mini-ops.h: Add OP_DUMMY_STORE opcode.
16100         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
16102         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
16103         variables in try regions.
16105         * mini.c (mini_method_compile): Don't disable optimizations on large
16106         methods when AOT compiling.
16108         * mini.c (mono_allocate_stack_slots): New arch independent method to 
16109         allocate stack slots. Not yet used.
16111 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
16113         * debug-mini.c (mono_debug_close_method): Plug some leaks.
16115 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
16117         * mini-ppc.c: make the branch info relative as the code
16118         buffer can be reallocated.
16120 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
16122         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
16123         * driver.c: Removed the AOT/security restriction. Now initialize the
16124         security manager (in metadata) if --security is used.
16125         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
16126         rather than the pointer to declarative security, when AOT is used.
16128 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
16130         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
16131         basic blocks, reduced intrinsic exception throwing code size.
16133 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
16135         * driver.c (mini_usage): Reorder the usage screen.
16137 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
16139         * mini.c (mono_resolve_patch_target): Fix warning.
16141 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
16143         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
16144         previous patch.
16146         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
16148         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
16149         breaks the amd64 build.
16151         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
16152         register allocation. Fixes #71454.
16154         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
16156         * arrays.cs: Add new regression test.   
16158 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
16160         * ssapre.c: Turned usage of snprintf to GString.
16161         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
16162         (I left it on by mistake in my previous commit).
16164 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
16166         * mini.c, cfold.c, basic-calls.cs: preserve side effects
16167         on cond branch optimization (fixes bug# 71515).
16169 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
16171         * abcremoval.c: Fixed bug 71062.
16172         * abcremoval.h: Likewise.
16174 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
16176         * mini.c: Added a new functionality to optimize_branches, the removal
16177         of useless basic blocks, and fixed some problem in the removal of
16178         critical edges; some utility functions added for both purposes.
16179         * ssapre.c: Added complex expression support, and fixed bug 70637.
16180         * ssapre.h: Likewise.
16181         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
16182         enabled in SSAPRE.
16183         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
16184         * driver.c: Re-enabled SSAPRE.
16186 2005-01-19  Martin Baulig  <martin@ximian.com>
16188         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
16189         the result of mono_get_method_constrained().
16191 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
16193         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
16194         manager.
16196 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
16198         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
16199         be detected.  Fixes #59296.
16201 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
16203         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
16204         which can happen. Fixes #71361.
16206 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
16208         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
16209         manager.
16211 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
16213         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
16214         appdomain-unload.exe to fail.
16215         
16216         * mini.c: Fix some memory leaks.
16218 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
16220         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
16221         Fixed bug and sped up some codepaths.
16223 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
16225         * mini.c: Fix some memory leaks.
16227         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
16228         conversion.
16230         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
16232         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
16233         #71320.
16235         * iltests.il: Add regression test for #71320.
16237 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
16239         * mini.c (mono_codegen): Fix installation of profiler hooks.
16241         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
16243 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
16245         * mini.h, mini.c, cfold.c: optimize access to enum
16246         readonly fields, too. Eval conditional branches if possible
16247         to perform unreachable code removal in more cases.
16249 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
16251         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
16253         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
16254         code manager.
16256         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
16257         WinXP DEP. Fixes #71244.
16259 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
16261         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
16263 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
16265         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
16267 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
16269         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
16270         changes.
16272         * mini.h: Bump AOT version.
16274         * mini.h (MonoCompile): Change exvar to a hash table.
16276         * mini.c: Allocate a separate exvar for each handler block.
16278         * mini.c: Get rid of the computation of filter_lengths, its not needed.
16280         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
16281         ex var with the pending exception and only throw if the two are equal.
16282         Fixes #68552.
16283         
16284         * exceptions.cs: Add tests for rethrow and nested catch clauses.
16286         * mini-x86.c: Fix warnings.
16288         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
16289         used by all the ports now.
16291         * aot.c: Add write-symbols and save-temps options.
16293 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
16295         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
16297 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
16299         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
16300         operations.
16302         * tramp-s390.c: Check vtable slot belongs to the domain.
16304         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
16305         as per other platforms.
16307         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
16309 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
16311         * driver.c: we don't run the Main() code in a subthread anymore.
16313 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
16315         * mini.c: added experimental rtc support in the statistical
16316         profiler: if the user has the permission, more accurate statistics
16317         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
16318         The MONO_RTC value must be restricted to what the linux rtc allows:
16319         power of two from 64 to 8192 Hz.
16321 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
16323         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
16325 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
16327         * mini-ppc.c: better icache flush for smp.
16329 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
16331         * mini-amd64.c (emit_move_return_value): Fix memory leak.
16333         * mini-x86.c (get_call_info): Add the get_call_info () code from the
16334         amd64 port, not yet used.
16336 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
16338         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
16339         a struct type.
16341 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
16343         * driver.c: Added --security option to activate the security manager.
16344         Right now this will allow code generation for declarative demands and
16345         is disabled when AOT is specified.
16346         * mini.c: Add code generation for declarative security demands.
16347         * mini.h: Add mono_use_security_manager as an extern gboolean.
16349 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
16351         * aot.c (mono_compile_assembly): Speed up compilation a bit by
16352         emitting more dense assembly code.
16354         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
16355         exception throwing stuff.
16357 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
16359         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
16360         dead code.
16362         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
16363         left in by mistake.
16365         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
16366         fixed.
16368         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
16370         * tramp-*.c: Only patch vtable slots if the object is in the current
16371         domain. Fixes appdomain-unload.exe.
16373         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
16374         
16375         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
16376         x86 branch.
16378 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
16380         * mini.c (reverse_branch_op): New helper function.
16382         * mini.c (optimize_branches): Run the new optimization only on 
16383         platforms which support it. Also reverse all kinds of branches.
16385         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
16387         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
16388         a throw statement.
16390         * mini.c (optimize_branches): Reverse not-equals branches if the false
16391         bblock is a throw. This happens a lot of time with argument checking in
16392         corlib.
16394         * mini.c (mono_codegen): Add support for placing basic blocks after
16395         the function epilogue.
16397         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
16398         function epilogue.
16399         
16400 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
16402         * mini.c (setup_stat_profiler): Only set this up if the platform
16403         supports ITIMER_PROF.
16405 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
16407         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
16408         previous patch.
16410         * inssel.brg: Fix a warning.
16412 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
16414         * mini.c: added support for statistical profiler 
16415         (run with: --profile=default:stat).
16417 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
16419         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
16421         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
16423         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
16424         related to global registers from the amd64 port.
16426 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
16428         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
16430         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
16431         with global registers.
16432         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
16434         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
16436 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
16438         * debug-mini.c (encode_value): Fix off-by-one.
16440         * aot.c (encode_value): Likewise.
16442         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
16444 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
16446         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
16447         AOT.
16449         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
16450         
16451         * aot.c (emit_method_info): Increase size of temp buffer.
16453         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
16454         the AOT case.
16456 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
16458         * aot.c (emit_method_info): Fix build.
16459         
16460         * aot.c: Further rework of the AOT file format to reduce the size of
16461         the method info data.
16463         * mini.h: Bump AOT file format version.
16465 2004-12-27  Martin Baulig  <martin@ximian.com>
16467         * mini.c (mini_get_method): New static method; call
16468         mono_get_method_full() and mono_get_inflated_method().
16469         (mono_method_to_ir): Use mini_get_method() instead of
16470         mono_get_method_full(). 
16472 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
16474         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
16476 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
16478         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
16480         * inssel-amd64.brg: Add some optimization rules.
16482 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
16484         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
16485         standard not GC'd stuff is fine.
16487 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
16489         * aot.c: Rework the AOT file format to get rid of most of the global
16490         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
16492         * mini.h: Bump AOT file format version.
16493         
16494 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
16496         * mini.h: Bump AOT file format version.
16498         * aot.c (mono_aot_is_got_entry): New function to determine if an 
16499         address is inside a GOT.
16501         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
16503         * cpu-pentium.md: Increase the maximum size of some instructions which
16504         might involve a got access.
16505         
16506         * mini.c (get_method_from_ip): Another debug helper function.
16508         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
16509         when got var accesses are created during the decompose phase.
16511         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
16513         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
16514         argument mini_compile_method and to MonoCompile, and use this to
16515         determine whenever a given method is compiled for AOT. This allows the
16516         other methods compiled during AOT compilation to be free of AOT stuff,
16517         so the backends does not need to add special support for them by
16518         creating a fake GOT etc.
16520         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
16521         longer needed.
16523 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
16525         * mini.c (mono_method_to_ir): It turns out that some of the
16526         x-appdomain wrappers are lax with types, so just ignore this for
16527         all wrappers.
16529         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
16530         at the vtable->klass. If it is non-shared code we can just use the
16531         vtable.
16533 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
16535         * mini-ppc.c: access MonoDomain from tls, too.
16537 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
16539         * declsec.c: Removed unused variable (and related warning ;-)
16541 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
16543         * iltests.il: New test for LDELEMA on an array of ref types.
16545         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
16546         all ldelema's on reftypes.
16547         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
16548         it was the wrong place to put it.
16550         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
16551         register to pop to make this cleaner, at the request of Paolo.
16553 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
16555         * mini-ops.h (OP_GETHASHCODE): New op.
16557         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
16559         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
16560         operation.
16562         For a microbenchmark, this reduces the cost of Hashtable.get_Item
16563         by 25%.
16564         
16565         * mini-x86.c (mono_arch_output_basic_block): Rather than
16567         add ebp, 4
16569         Emit
16571         pop edx
16573         The first is 3 bytes while the second is 1. This saves 36 kb on
16574         mscorlib, quite a big saving. When bootstraping mcs, I was able to
16575         see a small boost because of icache locality.
16577         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
16579 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
16581         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
16582         started code sharing with the generic code.
16584 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
16586         * mini-ppc.c, cpu-g4.md: added code for direct access to
16587         tls data slots.
16589 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
16591         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
16592          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
16593         to OP_TLS_GET.
16595 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
16597         * declsec.c|h: Added functions to cache the declarative stack modifiers
16598         in MonoJitInfo and to create a security frame from a MonoJitInfo 
16599         structure.
16600         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
16601         created. Register internal calls for System.Security.SecurityFrame::
16602         _GetSecurityFrame and _GetSecurityStack.
16603         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
16604         the definitions for the new stack walk/callback mechanism.
16605         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
16606         first security frame for LinkDemands and InheritanceDemands) and
16607         GetSecurityStack for Demands. Both use the new mono_walk_stack code
16608         from lupus.
16609         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
16610         walk initialization (lupus).
16612 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
16614         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
16615         idiom.
16616         (handle_loaded_temps): Do not create a temporary variable for
16617         things that we know are temps. They will never be modified.
16618         (mono_spill_call): Set MONO_INST_IS_TEMP
16619         (mono_emulate_opcode): ditto
16620         (emit_tree): ditto
16621         (mono_method_to_ir.CEE_DUP): ditto
16623 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
16625         * mini.c (type_to_eval_stack_type): Make this handle the void type
16626         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
16627         (emit_tree): use ip_in_bb to special case some common idioms
16628         Update all callers to pass in the IP.
16629         (mono_method_to_ir): Make CEE_CALL* do the above as well.
16631         This gives us a nice 2% speedup in mcs bootstrap.
16633         * mini-x86.c (peephole_pass): Peephole pass to make
16634         mov  [foo], eax
16635         push [foo]
16637         into
16639         mov [foo], eax
16640         push eax
16642         * mini.c (ip_in_bb): new method.
16643         (mono_method_to_ir): use this method rather than doing the hash
16644         lookup ourselves.
16646         * linear-scan.c (mono_linear_scan): When expiring actives, you
16647         don't need to keep around variables that expire on this
16648         instruction. This makes it so that:
16649              a = b + 1
16650         will turn into:
16651              store (ebx add (ebx, 1))
16652         which will become
16653              add ebx, 1
16655 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
16657         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
16658         combination to avoid doing two copies. Fix up problems with previous
16659         patch.
16661         * mini.c: Fix 64 bit warnings.
16663         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
16665 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
16667         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
16668         changes from the x86 code.
16670         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
16672 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
16674         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
16675         throwing code to reduce its size, unify the AOT and non-aot code and 
16676         get rid of relocations in the AOT case.
16678         * mini-x86.h mini.c exceptions-x86.c 
16679         (mono_arch_get_throw_corlib_exception): New arch specific function to 
16680         raise corlib exceptions which doesn't require relocations in the 
16681         caller.
16683         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
16685 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
16687         * mini.c (mono_emit_method_call): Only allocate the got var when it is
16688         needed.
16690         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
16691         in the AOT case.
16693 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
16695         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
16696         with add function when used from Inc/dec atomic 
16697         functions. Re-enabled optimization on x86.
16698         * mini-ops.h: renamed atomic_add functions to
16699         allow _add to match the Interlocked::Add and
16700         _add_next to match Interlocked::Inc/Dec.
16702 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
16704         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
16705         linking of BBs to the end BB, and enabled SSAPRE also with
16706         consprop and copyprop (which was prevented by that bug).
16708 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
16710         * mini-x86.c: disabling the Interlocked optimizing code. 
16712 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
16714         * aot.c (load_aot_module): Move reading of got_addr after the AOT
16715         file version check.
16716         
16717 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
16719         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
16720         interlocked optimization due lack of support on x86, rewrote 
16721         exchange to take into account that base may be in eax.
16722         
16723         xsp works again; activated Interlocked optimizing code.
16724         
16725 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
16727         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
16729 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
16731         * mini-ops.h: Add new opcodes.
16733         * mini.h: Add new patch types. Add got_var to MonoCompile.
16735         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
16736         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
16737         make it work with all kinds of patchable code.
16739         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
16740         address of the GOT, and referencing entries in the GOT.
16742         * mini.c: Add code to load the GOT address if needed by an opcode.
16744         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
16745         independent AOT code on the x86 using an elf-style Global Offset Table.
16747 2004-12-14  Raja R Harinath  <rharinath@novell.com>
16749         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
16751 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16753         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
16754         when running xsp.
16756 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
16758         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
16759         of Interlocked:Increment/Decrement/Add as inline ops.
16760         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
16762 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
16764         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
16765         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
16767 2004-12-12  Duncan Mak  <duncan@ximian.com>
16769         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
16770         again. `patch_info->table_size' is no longer valid after Zoltan's
16771         commit #37636.
16773 2004-12-12  Martin Baulig  <martin@ximian.com>
16775         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
16776         if we are the "real" method, ie. not an inlined method inside it.
16778 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
16780         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
16781         before we look in the special fields table. This fixes
16782         ../tests/thread-static-init.cs.
16784 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16786         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
16787         for Array get_Rank and get_Length. Fixes bug #70465.
16789 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
16791         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
16792         separate structure to reduce the size of MonoJumpInfo.
16794 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
16796         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
16798 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
16800         * mini.c (mini_get_inst_for_method): Changed to allow ports
16801         to return a MonoInst instead of opcode 
16802         (renamed mini_get_opcode_for_method to better reflect the new functionality)
16803         
16804         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
16805         Allow ports to return a created MonoInst instead of op-code, will enable
16806         new optimizations.
16807         (renamed mini_get_opcode_for_method to better reflected the functionality)
16809 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
16811         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
16813 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
16815         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
16816         Fixes #69985.
16818 2004-12-08  Martin Baulig  <martin@ximian.com>
16820         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
16821         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
16823 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
16825         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
16826         correctly.
16828         * exceptions.cs: Disable some tests which depend on properties of x86 fp
16829         arithmetic.
16831 2004-12-08  Raja R Harinath  <rharinath@novell.com>
16833         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
16835 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
16837         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
16838         bug introduced by the previous patch.
16840 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
16842         * mini-ppc.c, objectc.cs: handle large structs passed by value
16843         (fixes bug #69972).
16845 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
16847         * mini-ppc.c: OP_ARGLIST implementation from
16848         Geoff Norton  <gnorton@customerdna.com>.
16850 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
16852         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
16853         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
16855 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
16857         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
16859 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16861         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
16862         support.
16864 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
16866         * mini-sparc.c: Zero out localled-ed memory.
16868         * iltests.il: Add tests for zeroing out localloc-ed memory.
16870 2004-12-04  Martin Baulig  <martin@ximian.com>
16872         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
16873         mono_method_get_signature_full().       
16875 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
16877         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
16878         and some utility functions (always for SSAPRE), integrated SSAPRE.
16879         * mini.h: Likewise.
16880         * driver.c: Added ssapre option.
16881         * ssa.c: Small fix on OP_ARG handling.
16882         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
16883         * Makefile.am: Likewise.
16885 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
16887         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
16888         now in the xp code.
16890         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
16891         icall.
16893 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16895         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
16896         
16897         * cpu-s390.md : Increase instruction length of oparglist.
16899         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
16901 2004-11-30  Martin Baulig  <martin@ximian.com>
16903         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
16904         virtual generic methods.  We call a special helper_compile_generic_method()
16905         icall to retrieve the method from the vtable, inflate and compile
16906         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
16908         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
16910 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
16912         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
16914 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
16916         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
16917         Fixes #69929.
16919 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
16921         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
16922         platforms with PIC aot.
16924 2004-11-28  Martin Baulig  <martin@ximian.com>
16926         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
16927         Fixes gen-112.cs.
16929 2004-11-28  Martin Baulig  <martin@ximian.com>
16931         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
16932         the result of mono_type_get_underlying_type() to check whether
16933         we're byref.
16935 2004-11-26  Martin Baulig  <martin@ximian.com>
16937         * mini.c
16938         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
16939         in the g_assert().
16941 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
16943         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
16944         the same way as the other arguments so they won't get clobbered.
16946         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
16947         calls through R11 since it is clobbered by the trampoline code.
16949 2004-11-26  Raja R Harinath  <rharinath@novell.com>
16951         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
16952         pick up in-tree mscorlib.dll.
16954 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
16956         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
16958         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
16959         runtime data/code are now stored in a table similar to the GOT in ELF. 
16960         This allows the code itself to be position independent.
16962         * aot.c: Fix loading of referenced assemblies after the lazy assembly
16963         loading changes.
16965         * aot.c: Attach ELF type (object/function) directives to all global
16966         symbols.
16968         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
16970         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
16972         * mini-amd64.h: Turn on PIC AOT code.
16974         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
16975         returning the offset within an OP_AOTCONST instruction where the GOT
16976         offset needs to be added.
16978         * mini.h: Bump AOT file format version.
16980 2004-11-25  Martin Baulig  <martin@ximian.com>
16982         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
16983         uninflated generic methods.
16985 2004-11-25  Martin Baulig  <martin@ximian.com>
16987         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
16989 2004-11-24  Martin Baulig  <martin@ximian.com>
16991         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
16992         original klass (this only applies for generic instances).
16994 2004-11-24  Martin Baulig  <martin@ximian.com>
16996         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
16997         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
16998         that array).
17000 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
17002         * mini.c (mono_method_to_ir): Disable inlining for methods containing
17003         localloc. Fixes #69678.
17005         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
17006         
17007 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
17009         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
17010         used SSE registers on pinvoke calls. Fixes #69774.
17012 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
17014         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
17015         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
17017 2004-11-23  Raja R Harinath  <rharinath@novell.com>
17019         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
17020         Refer directly to the mcs/ tree.
17022 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17024         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
17025         Check if a trampoline for a synchronized method is required. 
17027 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
17029         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
17030         with localloc if needed. Throe arithmetric exception in
17031         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
17032         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
17034 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
17036         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
17037         types before switching on type.  Fixes #69622.
17039 2004-11-19  Raja R Harinath  <rharinath@novell.com>
17041         * Makefile.am (check-local): New.  Integrate into 'make check'.
17042         (MCS,RUNTIME): Define using in-tree mono and mcs.
17043         (ILASM): New.
17044         (%.exe): Use $(ILASM).
17046 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
17048         * mini-ppc.c: adjust initial prolog size (bug #69691).
17050 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
17052         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
17053         #69664.
17055 2004-11-17  Raja R Harinath  <rharinath@novell.com>
17057         * Makefile.am (clean-local): Rename from 'clean'.
17059 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17061         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
17062         to mono_arch_is_int_overflow. 
17063         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
17064         SIGFPE events.
17066 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
17068         * declsec.c|h: New files to support declarative security attributes.
17069         Added function to check if a method has (applicable) security.
17070         * mini.c|h: Add check for declarative security attributes in
17071         mono_method_check_inlining.
17072         * Makefile.am: Added declsec.c and declsec.h to the build.
17074 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
17076         * mini.c, mini.h: update to keep dynamic code info per-domain.
17078 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
17080         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
17081         (mini_init): Get rid of it from here too.
17083 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
17085         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
17086         implemented OP_RETHROW (patch by Geoff Norton
17087         <gnorton@customerdna.com>).
17089 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
17091         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
17092         between appdomains.  Fixes appdomain-unload on PPC.
17094 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
17096         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
17097         mini-exceptions.c: handle the new wrapper types.
17098         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
17099         token value as a MonoClass* when compiling a wrapper.
17100         mono_jit_create_remoting_trampoline now takes an additional
17101         MonoRemotingTarget parameter.
17102         
17103 2004-11-10  Martin Baulig  <martin@localhost>
17105         * mini.c (mono_method_to_ir): Use `generic_container->context'
17106         rather than creating a new one.
17108 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17110         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
17112         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
17114 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
17116         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
17117         the experimental aot cache stuff.
17119 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17121         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
17122         mini-exceptions.c: update to exception clause structure changes.
17124 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
17126         * exceptions-x86.c (throw_exception): Fix warnings.
17128         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
17129         for OP_RETHROW.
17131 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
17133         * exceptions-sparc.c (get_throw_exception): Really fix this.
17135 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
17137         * tramp-*.c: we no longer support icalls without wrappers, so
17138         a bit of code can be removed here
17140 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
17142         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
17143         patch.
17145         * cpu-sparc.md: Add op_rethrow.
17147         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
17149         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
17151         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
17152         * mini-ops.h: Add OP_RETHROW.
17154         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
17156         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
17158 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
17159         
17160         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
17161         Makes the output much easier to read
17163 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
17165         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
17166         prevents another huge leak when compiling with ssa. Secondly, the
17167         performance of doing this rather than freeing the lists is much
17168         better. GList does a lock every time you allocate a list link,
17169         so that it can use a memory pool. So, it is better to just use
17170         a memory pool of our own.
17171         
17172         * ssa.c, linear-scan.c: replace g_list_remove_link with
17173         g_list_delete.  The remove one does not free the GList, so we were
17174         leaking memory. On -O=all --compile-all with corlib, this cut down
17175         3 MB of allocations.
17177 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
17179         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
17181         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
17183         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
17184         into a new function mono_create_jit_trampoline ().
17186 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
17188         * trace.c (get_spec): Allow tracing of classes without a namespace.
17190 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
17192         * mini.c: Fix pointer overwrite in mini_method_compile.
17194 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
17196         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
17197         The darwin ABI needs some special handling for 1 and 2 byte structs
17198         Lets use lbz/lhz instead of lwz everywhere.
17199         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
17200         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
17201         Use stb/sth for the former, and put the latter always on stack instead of in
17202         argument registers.
17204 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
17206         * trace.c (is_filenamechar): Add '_'.
17208 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
17210         * mini-s390.c: Fix prolog length to allow for large trace requirements.
17212         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
17214 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
17216         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
17217         depends on libmonogc. Fixes #68805.
17219 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
17221         * mini.c (mono_jit_free_method): Provide extra information for
17222         this error.  Currently this leaks, but will be turned into a
17223         developer option in the future.
17225 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
17227         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
17229 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
17231         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
17232         boundary. Fixes reading of PATCH_INFO_R4 and R8.
17233         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
17235 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
17237         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
17238         trampolines for AOT code.
17240 2004-10-22    <vargaz@freemail.hu>
17242         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
17243         constructed types. Fixes #68136.
17245 2004-10-21  Martin Baulig  <martin@ximian.com>
17247         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
17248         if it returns true, unwind the stack to the call instruction.
17250 2004-10-21    <vargaz@freemail.hu>
17252         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
17254         * mini.h: Bump AOT version number.
17256         * objects.cs: Add another test for unbox trampolines.
17258         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
17259         valuetype methods.
17261 2004-10-20    <vargaz@freemail.hu>
17263         * driver.c: Add SHARED to the set of optimizations tested.
17265         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
17267         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
17268         used by CEE_NEWARR.
17270         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
17272 2004-10-20  Martin Baulig  <martin@ximian.com>
17274         * mini-exceptions.c (mono_handle_exception): Call
17275         mono_debugger_handle_exception() to tell the debugger about
17276         catch/finally clauses.
17278 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
17280         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
17282         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
17283         #68447.
17285 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
17287         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
17288         methods as their native size, fixed bug #57543, #57545.
17289         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
17290         This saves a temporary register and mullw call down into 1 (minor perf
17291         increase for cases like sum = sum * 5;  This use to translate into:
17292             li r11,5
17293             mullw r28,r28,r11
17294         It now translates to
17295             mulli r28,r28,5
17297 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
17299         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
17300         #68388.
17302 2004-10-11  Martin Baulig  <martin@ximian.com>
17304         * mini.c (mono_method_to_ir): If we're a generic method, get the
17305         MonoGenericContainer from our MonoMethodNormal and create a
17306         MonoGenericContext from it.
17308 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
17310         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
17312         * basic-long.cs: Add test for checked i8->i2 cast.
17314 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17316         * inssel-ppc.brg: added a couple of speedup rules.
17318 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
17320         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
17321         to speed up rebuilds.
17323 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17325         * mini-s390.c: Minor fix to OP_OR_IMM.
17327 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
17329         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
17330         better. Fixes appdomain-unload.exe on sparc.
17332 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
17334         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
17335         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
17336         see bug 67324.
17338 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
17340         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
17342 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
17344         * mini.c: Always generate a field read/write wrapper for members
17345         of the class MarshalByRefObject since the actual instance could
17346         be a CBO.
17348 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
17350         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
17352 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
17354         * driver.c mini.h trace.c: Move the setting of the main assembly into
17355         a separate function called mono_trace_set_assembly () and call it after
17356         actually loading the main assembly. Fixes #66872.
17358 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
17360         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
17361         using the code manager.
17363 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
17365         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
17367 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
17369         * cpu-amd64.md: Fix bug in previous patch.
17370         
17371         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
17372         #66650.
17374 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
17376         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
17377         mini-exceptions.c: updates for changed stack walk interface.
17379 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17381         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
17383 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
17385         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
17387 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
17389         * driver.c (mini_regression_list): Do not call mono_assembly_close 
17390         since assemblies can't be unloaded.
17391         
17392 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
17394         * cpu-amd64.md: Fix more instruction lengths.
17396         * cpu-amd64.md: Fix lengths of some instructions.
17398 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
17400         * inssel.brg: Make the array ldelema check aot friendly.
17402 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
17404         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
17406         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
17408 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
17410         * mini-x86.c: Fix build.
17412         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
17413         mono_type_get_underlying_type () helper function to simplify code.
17414         
17415 2004-09-09  Martin Baulig  <martin@ximian.com>
17417         * mini-amd64.c: Don't access `type->data.klass' directly, call
17418         mono_class_from_mono_type() instead since the type may be a
17419         generic instance.
17421 2004-09-09  Martin Baulig  <martin@ximian.com>
17423         * mini-amd64.c (get_call_info): Fix support for generic instances.
17424         (add_valuetype): Use mono_class_from_mono_type() to get the class
17425         since we can be a generic instance.
17427 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
17429         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
17431 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
17433         * liveness.c: reset spill costs on each scan: bug 62107
17435 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
17437         * exceptions-sparc.c (mono_arch_find_jit_info): remove
17438         unnecessary line that doesn't compile
17440 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
17442         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
17443         trampolines, make them call an error function so people can fix their
17444         code.
17446 2004-09-06  Martin Baulig  <martin@ximian.com>
17448         * mini.c (mono_method_to_ir): When initializing locals, handle a
17449         generic instances like a valuetype if it's a valuetype and like a
17450         class if it's a class.
17452 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
17454         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
17455         stack. Fixes #64674.
17457         * exceptions.cs: Add test for unwinding of call arguments.
17459 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
17461         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
17462         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
17463         set the carry/borrow flag). The sparc and s390 implementations
17464         can now use optimized versions (and simplify the code). ppc bugfixes.
17466 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
17468         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
17470 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
17472         * inssel-amd64.brg: Remove leftover 32 bit rule.
17474         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
17476 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
17478         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
17479         mono_arch_find_jit_info functions into a new function. Fix a memory
17480         leak.
17482         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
17483         refactored code.
17484         
17485 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
17487         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
17488         as well.
17489         
17490         * exceptions.cs: Add array size tests.
17492         * mini.c: Allocate a separate icall wrapper for each arity of 
17493         mono_array_new_va. Fixes #59509.
17495         * exceptions.cs: Add testcase for 64578.
17497         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
17499         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
17500         
17501 2004-09-02  Martin Baulig  <martin@ximian.com>
17503         * mini.c (mono_method_to_ir): When initializing the locals, call
17504         handle_initobj() on the generic instance itself, not its
17505         underlying type.
17507 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
17509         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
17510         MonoJitInfo for dynamic methods.
17512         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
17514         * mini.c: Add support for freeing JIT data for dynamic methods.
17515         
17516 2004-09-01  Martin Baulig  <martin@ximian.com>
17518         * mini-x86.c (is_regsize_var): Added support for generic
17519         instances.
17520         (mono_arch_emit_prolog): Make this compile again, use
17521         `x86_push_imm_template (code)'.
17523 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
17525         * mini-x86.c: make all push_imm instructions that get
17526         patched always emit the long form
17528 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
17530         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
17531         in a per-domain hash.
17533         * mini-amd64.c (merge_argument_class_from_type): Handle generic
17534         types.
17536 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
17538         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
17539         work.
17540         
17541         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
17542         work.
17544         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
17545         Beginnings of SSE2 support.
17547         * exceptions.cs: Add more tests for checked int<->uint casts.
17549 2004-08-28  Martin Baulig  <martin@ximian.com>
17551         * mini-x86.c (mono_arch_instrument_epilog): Added support for
17552         generic instances.
17554         * mini.c
17555         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
17556         Handle generic instances recursively.
17558 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
17560         * iltests.il: test for conv.u8 on a constant
17562 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
17564         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
17565         LCONV_x4 (shrun_32 (membase)).
17567 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
17569         * inssel-x86.brg: c&p rules for push/setret of long
17571 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
17573         * inssel-x86.brg: c&p rules for compare (base, regvar) and
17574         compare (regvar, base)
17576         * inssel-x86.brg: more burg love
17578         * inssel.brg: more cleanup
17580         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
17582 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
17584         * basic-long.cs, basic-calls.cs: new tests for optimization.
17586 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
17588         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
17589         patch.
17591 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
17593         * mini-amd64.c (read_tls_offset_from_method): Add another case.
17594         
17595 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
17597         * inssel.brg (mini_emit_memcpy): use 
17598         NO_UNALIGNED_ACCESS to disable memcpy optimization
17600 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
17602         * mini-amd64.c: Handle generic types in various places.
17604         * mini.c (mono_method_to_ir): Handle generic types in init locals.
17606 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
17608         * mini.c (handle_box): Fix warning.
17610         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
17612         * mini-amd64.h: Enable the emit_state optimization.
17614         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
17616         * mini-amd64.c: Add some new 64 bit peephole opts.
17618         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
17620         * cpu-amd64.md: sreg1 of div instructions must be %rax.
17622         * mini-amd64.c: Register allocator fixes.
17624         * mini.c: Add an optimization to emit_state to avoid allocation of new
17625         registers on some platforms.
17627 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
17629         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
17631         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
17632         allocation. Fixes #63085.
17634         * basic-long.cs: Add new regression test.
17636         * mini-amd64.c: Register allocator improvements.
17638 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
17640         * mini-amd64.c (read_tls_offset_from_method): Add another code
17641         sequence.
17643         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
17644         instruction sequence for nullifying class init trampolines.
17646         * objects.cs: Add new regalloc test.
17648         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
17650 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
17652         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
17653         
17654         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
17655         arguments.
17657         * driver.c: Fix profiling after TLS changes.
17658         
17659         * driver.c (mono_main): Set mono_stats.enabled if needed.
17661         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
17662         CEE_BOX.
17664 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
17666         * mini-x86.c: use a 1 op rather than a 2 op tls access
17667         instruction -> faster.
17669 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
17671         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
17672         x86 backend.
17674 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
17676         * exceptions-sparc.c (throw_exception): fix typo
17678 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
17680         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
17681         set tree->dreg correctly with tls. Allow any
17682         register to be used.
17684         * mini-x86.c (read_tls_offset_from_method): add new code
17685         generation pattern seen with GCC.
17688 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
17690         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
17691         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
17692         exceptions-sparc.c: fix some performance issues in exception
17693         handling and setting of the stack trace for exceptions that were
17694         already thrown.
17696 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
17698         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
17699         x86 backend.
17700         
17701         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
17702         registers.
17704 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
17706         This patch inlines tls access, when possible.
17707         
17708         * mini.h: new arch functions for TLS intrinsics.
17709         All platforms updated with a stub.
17711         * mini.c: use the new intrinsics
17713         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
17714         arch specific intrinsic for tls variables
17716 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
17718         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
17719         under windows.
17721 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
17723         * mini.c: thread local allocation
17725 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
17727         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
17729         * Makefile.am: Link against the static version of libmonogc.
17730         
17731         * Makefile.am: Link the static versions of the convenience libraries
17732         into the mono executable.
17734         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
17736 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
17738         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
17739         on integer overflow.
17741         * mini-amd64.c: Reorganize function call code.
17743         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
17745 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
17747         * inssel-x86.brg: use xor eax,eax.
17748         
17749         * basic.cs: new tests
17751 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
17753         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
17754         in exception throwing code.
17755         
17756 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
17758         * inssel-x86.brg: use xor esi,esi.
17760 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
17762         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
17763         can trace methods compiled during mini_init () too.
17765         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
17766         CEE_CONV_U4.
17768 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
17770         * Makefile.am: static link on x86 (r=zoltan)
17772 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
17774         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
17775         code since it causes some programs to fail.
17777 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
17779         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
17781 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
17783         * mini.c: ovfops_op_map - add STACK_OBJ case for
17784         CONV_I 
17785         * basic.cs: add test_0_pin_string as test
17786         case for above.
17788 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
17790         * Makefile.am: build C# if srcdir != builddir
17792 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
17794         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
17795         fall-through blocks.
17797 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17799         * driver.c: enable loop by default again and include abcrem in -O=all.
17801 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
17803         * iltests.il: Add some localloc tests.
17805         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
17807         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
17808         Fixes #62574.
17810         * inssel-amd64.brg: Add some optimizations.
17812         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
17813         for gcc-3.4.
17815         * Makefile.am: Statically link mono against libmono on AMD64.
17816         
17817         * mini-amd64.c inssel-amd64.brg: Optimizations.
17819 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
17821         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
17823         * tramp-amd64.c: Patch calling code in trampolines.
17825 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
17827         * mini-amd64.c: pinvoke struct passing fixes.
17829 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
17831         * mini-sparc.c: redo change, make mono_arch_cpu_init call
17832         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
17834 2004-08-05  Duncan Mak  <duncan@ximian.com>
17836         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
17837         CEE_LDELEM_ANY.
17839 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
17841         * mini-amd64.c (emit_move_return_value): Move return value for normal
17842         calls too.
17844 2004-08-05  Martin Baulig  <martin@ximian.com>
17846         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
17847         `type->type'; just modify `type' itself when dealing with enums
17848         and generic instances.
17849         (check_call_signature): Make `simple_type' a `MonoType *'.
17851 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
17853         * mini.c: Use OP_PADD to add offsets to addresses.
17855         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
17857 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
17859         * mini-sparc.c (mono_arch_emit_epilog): fix check
17860         for folding last op into restore instruction
17862 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
17864         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
17865         helper methods using the code manager.
17866         
17867         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
17869         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
17871 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17872         
17873         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
17874           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
17876         * mini-s390.c: fix tail processing
17878 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
17880         * mini-ppc.c: mul.ovf.un exception name fix.
17882 2004-08-03  Martin Baulig  <martin@ximian.com>
17884         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
17885         instances; before jumping to `handle_enum', also modify `ptype'.
17887 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
17889         * cpu-sparc.md: fcall maximal length too small.
17891 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
17893         * mini-amd64.c mini.h: Add initial support for passing/returning 
17894         structures to/from pinvoked methods.
17896 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
17898         * mini-ppc.c: reg allocator fix.
17900 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
17902         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
17904         * inssel.brg: Optimize memset on 64 bit machines.
17906         * mini-amd64.c: Fix some vararg cases.
17908 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17910         * mini-s390.c: Corrected macro in emit_float_to_int
17912         * s390-abi.cs: Tests to exercise the s390 ABI
17914 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
17916         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
17917         caller saved regs.
17919         * basic.cs: Add a test for add.ovf.un.
17921 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
17923         * mini-sparc.c: add case for OP_IDIV_UN
17925 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
17927         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
17928         
17929         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
17931 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
17933         * basic.cs: regression tests.
17935         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
17936         regressions.
17938 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
17940         * basic.cs: Add a new test.
17942         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
17943         and AOT. Various fixes and optimizations.
17945         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
17947 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
17949         * mini-ppc.c: make sure temp regs are not used for global reg
17950         allocation.
17952 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
17954         * cpu-sparc.md: conv_i8 fix for 64bits
17956         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
17958 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
17959         
17960         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
17961         add opcode for cmp BYTE PTR [eax], imm.
17963         * inssel.brg: Make memcpy and memset takes bases.
17965 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
17967         * *-amd64.*: More AMD64 work.
17968         
17969 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
17971         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
17972         add a compare-not-equal opcode.
17973         
17974 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
17976         * mini.c: Use mono_init_from_assembly instead of mono_init.
17977         
17978 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
17980         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
17982         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
17984         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
17986         * inssel.brg: 64 bit fixes.
17988         * mini.h (MonoCallInst): Add some AMD64 specific data.
17990         * mini.h: Add some OP_P opcodes.
17992 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
17994         * basic.cs: tests for 61797 and 61740
17996 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
17998         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
17999         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
18001 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
18003         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
18005         * *-amd64*.*: Ongoing AMD64 work.
18007 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
18009         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
18011         * *-amd64*: Ongoing AMD64 work.
18013         * mini-arch.h: Add AMD64 support.
18015         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
18017         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
18019         * mini-ops.h: Add new opcodes.
18021         * Makefile.am: Add AMD64 support.
18023         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
18024         rules into the inssel-long*.brg files.
18026         * *-amd64.*: Add beginnings of AMD64 backend.
18028 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
18030         * mini.c (print_dfn): commenting out the code that prints
18031         the cil. With -O=deadce, this makes -v -v crash.
18032         
18033         * cpu-pentium.md: make checkthis have a length of 2
18035 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
18037         * mini-sparc.h: fix implementations of __builtin
18038         functions for Sun compiler for V9.
18040 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
18042         * mini.c: use the new stelem.ref wrapper
18043         * exceptions.cs, arrays.cs: new stelem.ref tests
18045 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
18047         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
18048         new XSP should work with these changes).
18050 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
18051         
18052         * inssel-{long32,x86,}.brg: trivial optimizations.
18053         
18054 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
18056         * mini.c: load value when emitting box operation in
18057         constrained calls.
18059 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
18061         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
18062         is one byte shorter than cmp DWORD PTR [eax], 0.
18064 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
18066         * inssel-ppc.brg: arguments on the stack are always
18067         relative to the stack pointer (spotted by Neale Ferguson).
18069 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18071         * exceptions-x86.c: delay appending the method name to the trace until
18072         after mono_jit_info_table_find is called, as this gets the real
18073         MonoMethod.
18075 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
18077         * aot.c: register roots
18079 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
18081         * aot.c : I could just use PLATFORM_WIN32 flag.
18083 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
18085         * aot.c : Reverting the previous fix. This time it broke linux build.
18087 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
18089         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
18091 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
18093         * mini.c (handle_stack_args): Remove some more debugging code.
18094         
18095         * mini.c (handle_stack_args): Remove debug output left in by mistake.
18097         * driver.c mini.h aot.c: Allow additional options to be specified with
18098         --aot and pass them to mono_compile_assembly.
18100         * aot.c: Add experimental code to AOT compile all loaded assemblies
18101         on demand and save the code into a cache in the filesystem.
18103         * aot.c: Add support for more wrapper methods.
18104         
18105         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
18106         58863.
18108         * cpu-*.md: Remove removed opcodes.
18110         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
18111         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
18112         related icalls to marshal.c.
18114 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
18116         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
18118         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
18120         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
18122 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
18123         * liveness.c: If liveness is recomputated we need to reset the information
18124         for each variable. This way, if the liveness range has been narrowed
18125         by optimizations that happened after the last computation, we can return
18126         a smaller range.
18127         
18128         For example, if you have
18129         
18130         {
18131                 int i = 0;
18132                 
18133                 // Tons of code that does not affect i
18134                 
18135                 i = foo ();
18136                 ...
18137         }
18138         
18139         i = 0 is dead code and will be removed by SSA. However, when
18140         linear scan gets to the code, i will still appear to be live
18141         throughout the entire block. This prevents good register allocation.
18143 2004-07-06  Martin Baulig  <martin@ximian.com>
18145         * debug-mini.c (mono_debug_init_method): Allow
18146         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
18147         (mono_debug_add_icall_wrapper): New method.
18149         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
18151 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
18153         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
18154         optimization.
18156 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
18158         * aot.c (mono_aot_load_method): Fix loading of debug info.
18160 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
18162         * aot.c: Add logging support.
18164 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
18166         * mini.h: Add prototype for mono_print_method_from_ip.
18168         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
18170         * inssel.brg: 64 bit fixes.
18172         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
18173         inssel-long32.brg.
18175         * Makefile.am: Add SPARC64 support.
18177 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
18179         * aot.c: Fix alignment problems on 32 bit platforms.
18181 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
18183         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
18184         SPARC64.
18186         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
18187         problems.
18189         * mini.h: Bump AOT file version. Some 64 bit fixes.
18191 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
18193         * inssel-sparc.brg: Add new rule to avoid register moves.
18195         * inssel.brg: Add ldind_to_load_membase helper function.
18197 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
18199         * mini.c: OffsetToStringData intrinsic.
18200         
18201 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
18203         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
18205         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
18206         regression tests.
18208         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
18209 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
18211         * mini.c: reinstated mono_compile_get_interface_var()
18212         on x86, too, since the change breaks the Gtk# build there as well.
18214 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18216         * driver.c: remove loop from the default optimizations: it seems to
18217         interact badly with some of the other options (see bug #60613).
18219 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
18221         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
18222         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
18224 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
18226         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
18227         vararg-using methods.
18229 2004-06-21  Martin Baulig  <martin@ximian.com>
18231         * mini/mini-exceptions.c
18232         (mono_handle_exception): Added `gpointer original_ip' argument.
18233         After calling mono_unhandled_exception(), call
18234         mono_debugger_unhandled_exception() and if that returns true,
18235         restore the context and return.
18237 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
18239         * mini-ppc.c: prefer the use of relative branches so
18240         they won't need to be patched in aot code (patch from Patrick Beard).
18242 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
18244         * aot.c: patch from Patrick Beard to make the output assembly
18245         more correct for the MacOSX assembler. Small tweak to
18246         generate sane images on Linux/PPC, too.
18248 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18250         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
18251         case until bug #59509 is fixed (shows up in #60332).
18253 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
18255         * mini.c: make sure the needed wrappers are compiled, too, with
18256         precomp.
18258 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
18260         * driver.c: remove NPTL reference in --version output.
18262 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18264         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
18265         generate valid assembly for the Mach-O assembler.
18267 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
18269         * driver.c: don't include abcrem in the all optimization specifier
18270         since it slows down jit compilation too much for now.
18272 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
18274         * mini.c: use BIGMUL only if both operands have the same signage.
18275         * iltests.il: Test for bug 60056. (errors related to signage in
18276         BIGMUL).
18278         r=lupus.
18280 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
18282         * mini.c, aot.c: memory leak fixes.
18284 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
18286         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
18288 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
18290         * Makefile.am: remove the -static hack completely, it links in
18291         statically glib as well.
18293 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
18295         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
18296         * exceptions.cs: make it compile with new mcs/csc.
18298 2004-06-03 Massimiliano Mantione <massi@ximian.com>
18299         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
18300         and added relevant test case.
18302 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
18304         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
18305         regressions in gtk-sharp.
18307 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
18309         * exceptions.cs: New regression tests.
18311         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
18313 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
18315         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
18317 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
18319         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
18321         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
18323 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
18325         * mini.c (mono_jit_runtime_invoke): Init class in this
18326         method instead of trusting mono_jit_compile_method to
18327         do the work (because wrappers can be in object class)
18329 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
18331         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
18333         * basic-long.cs: New regression test.
18335 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
18337         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
18338         and div/rem checks.
18340 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
18342         * Makefile.am: fix miguel's change to build mono statically against
18343         libmono (track build dependencies).
18345 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
18347         * cfold.c: Some glib versions do not have G_MININT32.
18349 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
18351         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
18352         with precision of tan, atan, sin and cos, and implemented related
18353         regressions tests (fixes bug 54467, but one new problem appeared and
18354         is not fixed yet).
18356 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
18358         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
18360         * exceptions.cs: Add test for constant folding && division by zero.
18362         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
18363         since driver.c is in libmono too, so the optimization was useless.
18365         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
18366         variable to driver.c so the compiler can emit more efficient code to
18367         access them.
18369 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18371         * Makefile.am: don't distribute generated inssel.[ch] files.
18373 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
18375         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
18376         into the default appdomain. Fixes #58707.
18378         * jit-icalls.c: Remove the broken approximation for truncl, doing
18379         no conversion is better.
18381         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
18382         Fixes #58863.
18384 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
18386         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
18387         of the mcrxr instruction which is not available on some processors
18388         even if it's documented to be. Implement add and sub overflow correctly
18389         (still not complete for long unsigned). Speed up icalls a bit.
18391 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
18393         * mini.c (mono_jit_compile_method_with_opt): Make sure that
18394         we run .cctor in the current domain instead of target_domain.
18395         
18396         Fixes bug #58558, .cctor not being called in -O=shared.
18398 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
18400         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
18402 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
18404         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
18405         which can be done with an imm8, do it that way.
18406         (mono_arch_output_basic_block): ditto for a jmp
18407         (mono_arch_emit_prolog): Computate maximum offset of a label.
18409 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
18411         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
18412         now tries to allocate prefered physical reg's for virtual
18413         regs. This reduces the number of emited spills/loads with
18414         20-30% on our core assemblies.
18416 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
18418         * jit-icalls.c: truncl() is not needed and trunc() is
18419         the correct thing to do anyway (bug #58287).
18421 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
18423         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
18424         if available.
18426 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
18428         * driver.c: enable loop optimizations by default.
18430 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
18432         * mini-x86.c: fix calc of max loop size when aligning loops start.
18434 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
18436         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
18437         the stack.
18439 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
18441         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
18442         should set carry.
18444         * basic-long.cs: Add tests for add/subtract of immediates with carry.
18446         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
18447         
18448         * mini.c (inline_method): Allways inline some wrappers even if the cost
18449         is too large. Fixes #58785.
18451         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
18452         
18453 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
18455         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
18456         (crichton@gimp.org). Beginning of support for sparc/linux.
18458         * mini-sparc.c: Optimize retrieval of LMF address.
18460 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
18462         * exceptions-ppc.c:  handle alloca in methods with clauses.
18464 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
18466         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
18468 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
18470         * mini.c: Delegate most of the abort signal work to 
18471           mono_thread_request_interruption, which also handles Stop and Suspend
18472           states.
18474 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
18476         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
18477         supports the save/restore lmf opcodes.
18479 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
18481         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
18482         by gcc-3.4 as well.
18484         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
18486 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
18488         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
18489         methods which contain array accesses.
18491         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
18492         boundaries. Fixes #58537.
18494         * iltests.il: Add regression test for #58537.
18496 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
18498         * mini-x86.c (mono_arch_local_regalloc): Last part of
18499         fix for bug #58633 (releasing register to early).
18501 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
18503         * basic-long.cs: Add new regression test.
18505 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
18507         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
18508         register too early on the chain.
18510 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
18512         * mini.c (create_helper_signature): Use a helper function to reduce
18513         the code which needs to be written. Also set the calling convention of
18514         icalls on windows. Fixes #57840.
18516 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
18518         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
18519         exceptions-ppc.c: added helper function to get the instruction address
18520         from a signal handler context.
18522 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
18524         * helpers.c: use g_get_tmp_dir. Invokes happyness 
18525         from gonzalo.
18527 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
18529         * helpers.c: Add new env variable to pass args to objdump.
18530         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
18532 2004-05-17  Radek Doulik  <rodo@ximian.com>
18534         * Makefile.am (common_sources): added abcremoval.h so it get
18535         disted and daily mono packages on go-mono.com will build again
18537 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
18539         * abcremoval.c: Fixed coding style, added copyright header.
18541         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
18543         * mini.h: Added prototype for abc removal main function.
18545         * build_relations_propagation_table.pl: Added copyright header.
18547 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
18549         * basic-long.cs: reg test for complex ceq_long bug.
18551 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
18553         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
18554         reg in long and clob case (bug #58343). Fixed/added comments.
18556 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
18558         * mini.c (mono_jit_runtime_invoke): Follow new convention
18559         of calling the invoke method with an function pointer.
18561 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
18563         * ChangeLog: Fix author of memory leak patch.
18565 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
18567         * Makefile.am: fix make dist as well...
18570 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
18572         * cfold.c: Made so that conversions from pointer to int4 are no-ops
18573         on archs where pointers are 4 bytes long.
18575         * Makefile.am: Added abcremoval.c source file.
18577         * abcremoval.c: Added abcremoval.c.
18579         * abcremoval.h: Added abcremoval.h.
18581         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
18583         * inssel.brg: Enabled bounds check removal.
18585         * mini.c: Added support for abcrem optimization.
18587         * mini.h: Added abcrem optimization label.
18589         * driver.c: Added support for abcrem optimization.
18591         * propagated_relations_table.def: Added propagated_relations_table.def.
18593 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
18595         * mini.c, cfold.c: fix style.
18597 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18599         * mini.c: handle issue with the low-level implementation of
18600         some long opcodes (bug #54209).
18602 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
18604         * basic.cs: test for my new cmov stuff.
18606 2004-05-13      Patrik Torstensson
18608         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
18609         opt and added peephole documentation.
18611 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
18613         * tramp-ppc.c: rewrote the generic trampoline code.
18615 2004-05-11      Patrik Torstensson
18617         * mini-x86.c: optimize long shl/shr asm code (one less branch)
18619 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
18621         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
18623         * mini.h mini.c dominators.c: Applied patch from Derek Woo
18624         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
18626         * mini.c: Add new icalls for AsAny marshalling.
18628 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
18630         * tramp-ppc.c, mini-ppc.c: more cleanups.
18632 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18634         * mini.c: no warnings.
18636 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18638         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
18640 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
18642         * mini.c: In the thread abort signal handler, if the thread is in the
18643         process of being stoped, don't throw the Abort exception, just stop the
18644         thread.
18646 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
18648         * tramp-ppc.c: removed old code.
18650 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18652         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
18653         do some simple speed optimizations on ppc.
18655 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
18657         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
18658         and large offsets in load/store.
18660 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
18662         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
18663         it causes regressions.
18665 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
18667         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
18668         support.
18670 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
18672         * jit-icalls.c: remove warnings.
18673         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
18674         speedups for unsafe code.
18676 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
18678         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
18680 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
18682         * basic-calls.cs: Add new regression test.
18684         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
18685         more portable.
18687         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
18689         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
18690         is no longer used.
18692 2004-05-06      Patrik Torstensson
18694         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
18695         long reg allocation in any reg (not only eax:edx) and implemented 
18696         long shl/shr ops in asm instead of helpers.
18698 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
18700         * mini-sparc.h: Fix warnings.
18702         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
18703         stack.
18705         * mini-exceptions.c (mono_handle_exception): Call the filter in a
18706         separate statement for clarity.
18708         * mini-sparc.c: Update status.
18710 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
18712         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
18713         here.
18715 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
18717         * inssel-ppc.brg: another small pre-release workaround:
18718         we don't do overflow detection for long_sub_un.
18720 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18722         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
18723         (also works around a weird ppc bug: 57957).
18725 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
18727         * tramp-ppc.c: trampoline fixes.
18729 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
18731         * mini-ppc.c: fixed typos.
18733 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
18735         * mini-ppc.c, exceptions-ppc.c: more code saves registers
18736         at the top of the stack. Fixed typos. Use a frame registers
18737         for all the methods with exception clauses.
18739 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
18741         * exceptions-ppc.c: restore fp registers.
18743 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
18745         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
18746         order from the stack top (moved the stack room to save the
18747         return value for trace after the param area). Fixed corruption
18748         in restoring registers on unwind.
18750 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
18752         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
18754 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
18756         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
18757         and prolog/epilog for methods that use it. Allow
18758         enough param area room for varargs methods. Fix miguel's
18759         breakage in exception handling.
18761 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
18763         * Makefile.am: run genmdesc only on current arch.
18765 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18767         * exceptions-x86.c:
18768         * mini-x86.h: fix the build on windows.
18770 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
18772         * 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.
18774         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
18776         * mini-exceptions.c: New file.
18777         
18778         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
18779         Move some parts of the x86 exception handling code to an 
18780         arch-independent file so it can be shared with other ports.
18782 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
18784         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
18786 2004-04-26  David Waite  <mass@akuma.org>
18788         * driver.c: remove comma from end of enumeration declaration
18790 2004-04-26  Jackson Harper  <jackson@ximian.com>
18792         * driver.c: parse config file before loading first assembly. This
18793         allows the user gac to be enabled/disabled. 
18794         
18795 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
18797         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
18798         simpler mechanism: we do not care what is encoded initially
18799         (branch absolute or relative), we care about the code and its
18800         target.  I kept the old code for reference for now.
18802         The new code tries first to determine if the jump is anywhere in
18803         the -/+32 absolute meg range, if it succeeds, it encodes using the
18804         absolute branch;  If not, it tried to find something in the
18805         relative range, if not, it uses the handle_thunk code. 
18807 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
18809         * exceptions-ppc.c: use the correct ip register on macosx.
18811 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
18813         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
18815 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
18817         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
18818         Raise exception on integer divide by zero by hand since the hw
18819         doesn't support it. Handle NaNs in FP compares.
18821 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
18823         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
18824         code reducing duplication between the platforms and enabled
18825         signal exception handling (on linux for now).
18827 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
18829         * exceptions-ppc.c: more macosx support.
18831 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18833         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
18835 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
18837         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
18839 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
18841         * iltests.il: more tests.
18843 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
18845         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
18846         vars as well.
18848 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
18850         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
18852 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
18854         * liveness.c: Mark variables as volatile in all basic blocks reachable
18855         from exception clauses.
18857 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
18859         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
18860         inlining.
18862 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
18864         * iltests.il, basic.cs: more tests for regalloc.
18866 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
18868         * iltests.il: Some tests for register allocation modifications
18869         I have locally.
18871 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
18873         * exceptions.cs: Add regression test for bug #56782.
18875         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
18876         original stack trace if an exception is rethrown. Fixes #56782. Oh,
18877         the beauty of fixing the same thing in 5 different files...
18879 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
18881         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
18882         methods.
18884 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
18886         * mini.c: Add support for STRWLPARRAY marshalling convention.
18888 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
18890         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
18891         to init the context to setup the regs pointer).
18893 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
18895         * exceptions-ppc.c: more exceptions work.
18897 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18899         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
18900         not allowed.
18902 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
18904         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
18905         can use the memory directly.
18907         * cpu-pentium.md: Update documentation from a post from Zoltan. 
18909         add x86_add_membase, x86_sub_membase, x86_mul_membase
18911 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
18913         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
18914         GENERAL_REGS they were also hardcoded for all PPC ports.
18916         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
18918         Remove hard-coded limit for floating point registers, use
18919         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
18921         Notice that in MacOS X calling conventions you can fit a lot more
18922         floating point values in registers, so I should update the PInvoke
18923         test to excercise the passing of floating point values on the
18924         stack (currently broken).
18925         
18926 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
18928         * tramp-ppc.c (create_trampoline_code): Added
18929         JUMP_TRAMPOLINE_SIZE. 
18930         (ppc_magic_trampoline): Follow the pattern from
18931         x86_magic_trampoline: if code is set to zero, return. 
18932         (create_trampoline_code): Always pass MonoMethod to the jump
18933         trampoline, before it was passing a null.
18934         (mono_arch_create_jump_trampoline): Implement the jump stub, could
18935         share the code with mono_arch_create_jit_trampoline. 
18937         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
18938         implemented.
18939         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
18940         implemented.  
18942         * cpu-g4.md: Added length for jmp instruction, the worst case
18943         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
18944         for save_lmf).
18946 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
18948         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
18950 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
18952         * mini.c: Only set bblock->real_offset when adding a new bblock, and
18953         before each IL instruction.
18955         * mini.c (CEE_BOX): Fix warnings.
18957 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18959         * mini.c: removed a few unused vars and extra whitespace.
18961 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
18963         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
18964         checks.
18965         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
18966         index.
18967         (OP_GETCHR): use the above
18968         (CEE_LDELEMA): use the above.
18970         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
18971         version of the generic impl.
18972         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
18973         (CEE_LDELEMA): use the above.
18975 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
18977         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
18978         Fixes #56317.
18980         * iltests.il: Added new regression test for #56317.
18982 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
18984         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
18985         under NetBSD. Fixes #56450.
18987         * liveness.c (update_gen_kill_set): Fix previous patch.
18989 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18991         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
18993 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
18995         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
18996         ldsfld and ldsflda.
18998         * inssel-sparc.brg: Add more optimizations.
19000         * mini-sparc.c: Replace multiply/divide with shifts if possible.
19002 2004-04-01  Martin Baulig  <martin@ximian.com>
19004         * mini.c (handle_box): New static function; moved the
19005         implementation of CEE_BOX here.
19006         (mono_method_to_ir): Added `constrained_call' variable.
19007         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
19008         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
19009         mono_method_get_constrained() to get the method.
19011 2004-04-01  Martin Baulig  <martin@ximian.com>
19013         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
19014         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
19015         (mono_method_to_ir): We don't need these macros anymore since
19016         mono_class_get_full() already takes care of it. 
19018 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19020         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
19021         use @function (as doesn't accept #function here) and check the return
19022         value of system and stop if fails.
19024 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19026         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
19028 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
19030         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
19032         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
19034         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
19035         #56223.
19037         * basic-long.cs: Add test for negation of Int64.MinValue.
19039 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
19041         * mini-sparc.c: Update status.
19043         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
19045         * exceptions-sparc.c: Fix return value in filters.
19047         * inssel-sparc.brg: Fix register allocation in some rules.
19049 2004-03-28  Martin Baulig  <martin@ximian.com>
19051         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
19052         if neccessary.  
19054 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
19056         * mini-x86.c (mono_arch_patch_code): Fix warnings.
19057         
19058         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
19059         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
19060         remove unused conv_u4 opcode.
19062         * mini-x86.c: Remove valgrind workaround since it slows down things
19063         even when mono is not run under valgrind.
19065 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
19067         * mini-sparc.c: Update status.
19069         * inssel-sparc.brg: Add some optimizations.
19071         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
19072         future delay slot filling. Add support for varargs, tail calls and JMP.
19074         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
19075         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
19077         * inssel.brg: Fix register allocation in OP_ARGLIST.
19079         * inssel.brg: Fix warnings.
19081 2004-03-25  Martin Baulig  <martin@ximian.com>
19083         * mini.c (inflate_generic_field): Removed.
19084         (mini_get_method): Removed, use mono_get_method_full(),
19085         (mini_get_class): Removed, use mono_class_get_full().
19086         (mono_method_to_ir): Pass our generic context to
19087         mono_field_from_token().        
19089 2004-03-25  Martin Baulig  <martin@ximian.com>
19091         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
19092         of a `MonoMethod *'.
19093         (mini_get_method): Take a `MonoGenericContext *' instead
19094         of a `MonoMethod *'.
19095         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
19096         a new local variable called `generic_context' which holds the
19097         current `MonoGenericContext *'; use it to lookup things.
19099 2004-03-24  Martin Baulig  <martin@ximian.com>
19101         * mini.c (mini_get_class): New static method; if we're inside a
19102         generic instance, inflate the class if neccessary.
19103         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
19105 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
19107         * iltests.il: New regression test for #55976.
19109         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
19110         #55976.
19112 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
19114         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
19115         output.
19117 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
19119         * liveness.c: Consider SSA stores as well as loads when making vars
19120         volatile.
19122         * exceptions.cs: New regression tests for register allocation.
19123         
19124 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
19126         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
19127         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
19128           domain lock only to protect puntual access to data structures.
19129           Added access lock for sighash, jit_icall_hash_name, 
19130           jit_icall_hash_addr and domain->code_mp.
19132 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
19134         * driver.c: Print SIGSEGV handling method.
19136         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
19138         * mini.c (setup_jit_tls_data): Handle case when this is called
19139         multiple times for a thread.
19141         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
19142         is different from fbxx_un. Fixes #54303. Also use constants instead of
19143         magic numbers in a lot of places.
19145 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
19147         * exceptions.cs: Fix cctor test when --regression is used.
19149 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
19151         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
19152         for Linux/ppc.
19154 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
19156         * inssel-ppc.brg: fixed register assignments for some rules.
19158 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
19160         * exceptions.cs: Add test for exceptions in static constructors.
19162         * mini.c (mono_jit_compile_method_with_out): Move the calling of
19163         static constructors outside the domain lock. Fixes #55720.
19165 2004-03-17  Martin Baulig  <martin@ximian.com>
19167         * mini.c (get_generic_field_inst): Removed, this'll never happen.
19168         (inflate_generic_field): Take the `MonoMethod *' instead of the
19169         `MonoClass *' and added support for generic method.
19170         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
19171         have a `field->parent->gen_params', only inflate the field if it's
19172         an open constructed type.
19174 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
19176         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
19177         exception object instead of the preconstructed ones.
19179 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19181         * mini.c: reverted changed to sigsegv_signal_handler commited
19182         accidentally in the previous patch.
19184 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19186         * mini.c:
19187         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
19188         running --aot with an old assembly.
19190 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
19192         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
19193         point values.
19195         * mini-sparc.c: Add support for v9 branches with prediction.
19197 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
19199         * mini.c (mini_init): #warning is GNUC only
19201         * mini-sparc.h: implement __builtin_frame_address
19202         and __builtin_return_address for Sun C compiler
19204 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
19206         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
19208 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
19210         * basic-calls.cs: Add test for unaligned byref long argument passing.
19212         * mini-ops.h: Add sparcv9 compare and branch instructions.
19214         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
19215         v9 instructions if we have a v9 cpu.
19217         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
19218         registers for global allocation.
19220         * exceptions-sparc.c: Fixes.
19221         
19222 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
19224         * liveness.c (mono_analyze_liveness): Optimized version.
19226         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
19228         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
19229         sparc work.
19231         * basic-float.cs basic-calls.cs: New regression tests.
19233 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
19235         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
19236         sigaltstack implementation.
19238         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
19239         
19240         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
19241         stuff if SIGSEGV_ON_ALTSTACK is not defined.
19243 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
19245         * mini.c: Fix warnings.
19246         
19247         * mini.c (mono_resolve_patch_target): New function which contains the
19248         arch independent part of the patching process.
19250         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
19251         patching code to a separate function.
19253 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
19255         * mini.c (add_signal_handler): ifdef out on Windows
19257 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
19259         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
19260         cpu-sparc.md: Add exception handling support + other fixes.
19262         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
19263         typed GC detection in --version.
19265         * basic.cs exceptions.cs: New regression tests.
19267         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
19268         the arch specific code can store data during a compilation.
19270         * mini-ops.h: Add OP_SETFRET.
19272         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
19273         function, register a separate icall for each arity, so the icalls can
19274         get a wrapper.
19275         
19276         * mini.c (mono_print_tree): Print negative offsets in a more readable
19277         form.
19278         
19279         * mini.c: Make signal handling work on sparc.
19280         
19281         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
19283         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
19285         * jit-icalls.c: Emulate truncl by aintl on solaris.
19287         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
19289 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
19291         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
19293 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
19295         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
19296         a MarshalByRef type, inline a method that performs the check, taking into
19297         account that the object can be a proxy. Also implemented tow new opcodes:
19298         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
19299         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
19300         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
19302 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
19304         * mini-ppc.c: if a relative branch displacement is too big
19305         but it points to and area reachable with an absolute branch, 
19306         avoid the thunks.
19308 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
19310         * mini.c: optimize small copies in cpblk.
19312 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
19314         * basic-calls.cs basic-float.cs: New regression tests.
19316         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
19317         negative offsets from %fp. Implement localloc. Fix local register 
19318         allocation. Fix the case when the this argument needs to be saved to
19319         the stack. Implement some missing opcodes.
19321 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
19323         * mini.c (mini_method_compile): Reenable global regalloc in methods
19324         with exception handlers.
19326         * linear-scan.c (mono_varlist_sort): Fix warning.
19328         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
19330         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
19331         regalloc costs.
19333         * liveness.c: Make all variables uses in exception clauses volatile, to
19334         prevent them from being allocated to registers. Fixes #42136.
19336 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
19338         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
19339         causes regressions.
19341         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
19342         argument to mono_arch_regalloc_cost.
19344         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
19345         precisely.
19347 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
19349         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
19350         Make the cost of allocating a variable to a register arch dependent.
19352         * basic-calls.cs: Fix compilation of tests.
19353         
19354         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
19355         helper function to cut back on the number of #ifdefs needed.
19357         * mini-ppc.c: Fix compilation.
19359         * basic-calls.cs: New regression tests.
19361         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
19363         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
19364         of l0 since that is callee saved.
19366         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
19367         to virtual calls.
19369         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
19370         of delay instruction.
19372         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
19374         * mini.h (MonoCallInst): Add 'virtual' flag.
19376         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
19378 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
19380         * *.cs: New regression tests.
19382         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
19383         work.
19385         * mini.c (mono_runtime_install_handlers): Fix build.
19387         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
19388         'signal_stack_size' members.
19390         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
19391         alternate signal stack.
19393         * exceptions-x86.c: Add stack overflow handling.
19395         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
19396         functions to arch independent code.
19398         * mini.c (mono_print_tree): Print more detailed info for load_membase
19399         opcodes.
19400         
19401 2004-02-23  Martin Baulig  <martin@ximian.com>
19403         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
19405 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
19407         * mini-x86.c: fixed reg allocation for div/rem.
19409 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
19411         * driver.c (mono_main): Report some configuratio options on --version.
19413 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
19415         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
19416         low in the address space. Correctly flush memory in thunks where we
19417         output native code.
19419 2004-02-20  Martin Baulig  <martin@ximian.com>
19421         * mini.c (mini_get_method): New static method; inflate all generic
19422         methods and methods in open generic instances.
19423         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
19424         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
19426 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
19428         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
19430         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
19432 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
19434         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
19436         * mini-sparc.c (flushi mono_arch_output_basic_block): make
19437         it compile using Sun's compiler.
19439 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
19441         * 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.
19443         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
19445 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
19447         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
19448         code.
19449         * mini-ppc.c: handle calls outside of the allowed range with thunks
19450         allocated using the code manager.
19451         * tramp-ppc.c: use the code manager to hold generated native code.
19452         Fixed the magic trampoline to just patch vtable entries.
19454 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
19456         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
19457         independent file.
19459 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
19461         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
19462         PPC.
19464         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
19465         if we have a working __thread implementation.
19467         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
19468         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
19470 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
19472         * mini-x86.c: Fix compilation under gcc 2.
19473         
19474 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
19476         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
19477         contains a call to the wrapped function.
19479         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
19480         OP_<CALL>_IMM opcodes, and use them under X86.
19481         
19482         * mini.c (mono_jit_find_compiled_method): Fix warning.
19484         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
19486         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
19488         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
19489         functionality to mini.c.
19491         * mini.c (mono_create_jump_trampoline): New function to create a jump
19492         trampoline. Return a compiled method instead of a trampoline if it
19493         exists. Add a cache for jump trampolines.
19495         * mini.c (mono_jit_find_compiled_method): New function to return a
19496         compiled method if it exists.
19498         * mini-x86.c: Call mono_create_jump_trampoline instead of 
19499         mono_arch_create_jit_trampoline.
19501         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
19502         a jump trampoline. Fixes #52092.
19503         
19504 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
19506         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
19507         which is not up-to-date. Add check_corlib_version () instead.
19509         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
19510         have to call it.
19511         
19512         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
19513         since newer valgrind versions do not need it.
19515         * mini.c (mono_jit_compile_method_with_opt): New helper function to
19516         compile a method with a given set of optimizations.
19518         * mini.c: Compile icall wrappers on-demand instead of at startup.
19520         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
19521         wrapper for an icall.
19523 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
19525         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
19526         #54063.
19528         * iltests.il: Add test for non-empty stack before switch instruction.
19530 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
19532         * mini.c: Add support for new stringbuilder marshalling conventions.
19534         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
19536 2004-02-01  Martin Baulig  <martin@ximian.com>
19538         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
19539         in `ginst->mtype_argv'.
19541 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
19543         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
19544         facilitate grepping.
19546 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
19548         * mini.c: fixed buglet in initobj generic implementation for references.
19550 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
19552         * Makefile.am: make the version script conditional.
19553         * jit-icalls.c: handle missing truncl().
19555 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
19557         * exceptions.cs: Add more tests for double->int conversion.
19559         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
19560         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
19562 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
19564         * driver.c: make --verbose --version emit an error
19565         if the loaded corlib doesn't match the runtime version.
19567 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
19569         * mini-ppc.h: export ppc_patch().
19570         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
19571         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
19572         on par or better than on MacOSX.
19574 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
19576         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
19577         mono_lookup_pinvoke_call.
19579         * mini-x86.c: Under windows, the default pinvoke calling convention is
19580         stdcall. Fixes #52834.
19582         * mini.c (optimize_branches): Add an upper bound to the number of
19583         iterations to prevent infinite loops on strange loops. Fixes #53003.
19585 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
19587         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
19588         and ISINST. Fixes #52093.
19590         * objects.cs (test_0_vector_array_cast): New tests.
19591         
19592 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
19594         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
19595         checking in Array.Set ().
19597         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
19598         #52590.
19600         * object.cs (test_0_multi_array_cast): New regression test.
19602 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
19604         * exceptions-ppc.c: fix build on Linux/PPC.
19606 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
19608         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
19609         running under valgrind.
19610         (x86_magic_trampoline): Fix build bustage.
19612         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
19613         negative values as well. This is needed for the encoding of the line number
19614         info, since sometimes the line numbers are not in increasing order.
19616 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
19618         * cpu-pentium.md (localloc): Increase the size of the localloc 
19619         instruction since it is a loop under Win32.
19621         * debug-mini.c (record_line_number): Get rid of unneccesary memory
19622         allocation.
19624 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
19626         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
19627         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
19628         Max Horn (max@quendi.de). Fix file names in comments.
19630 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
19632         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
19633         avoid stack overflow.
19634         (replace_usage): Avoid uninitialized variable warnings.
19636         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
19637         and taking the address of valuetype variables.
19639 2004-01-03  Patrik Torstensson
19641         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
19642         for other purposes than FP later on.
19644 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
19646         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
19647         of tail calls.
19649 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
19651         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
19653 2003-12-30  Patrik Torstensson <p@rxc.se>
19655         * mini-x86.h: Decreased number of availiable fp regs.
19656         Solves corner cases with FP spilling.
19658 2003-12-23  Patrik Torstensson <p@rxc.se>
19660         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
19661         for floating point stack tracking / spilling on x86. 
19662         Fixes bug #49012.
19663         
19664         * basic-float.cs: added float mul overflow test.
19666 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
19668         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
19670 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19672         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
19673         supports for cond branches that overflow the immediate
19674         overflow offset. mcs can compile simple programs.
19676 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
19678         * exceptions-ppc.c: exception handling support wip:
19679         finally handlers get run on exception.
19681 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
19683         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
19684         profiling.
19686 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
19688         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
19689         initial support for stack walking and unwinding.
19691 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
19693         * driver.c (mono_main): Make corlib-out-of-sync message more 
19694         descriptive. Also remove verify_corlib call.
19696 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
19698         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
19699         not overlap with other call's arguments, too.
19701 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
19703         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
19704         move to arch-specific code the choice of arch-specific
19705         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
19706         * mini.c: ensure emulation calls will not interleave
19707         with other calls.
19709 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
19711         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
19712         the magic trampoline stack frame is dropped before executing
19713         the new method.
19715 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
19717         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
19718         and integer to fp conversions. Added support for overflowing
19719         arguments on the stack. Reserve a couple more registers as temps.
19720         Added support for aot compilation (as output still needs to be
19721         tweaked, though).
19723 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19725         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
19726         Don't overwrite return register in some corner cases.
19728 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
19730         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
19731         static constructors when AOT compiling.
19733         * driver.c (mono_main): Call mono_check_corlib_version.
19735 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
19737         * cpu-g4.md, basic.cs: fixed div target register.
19739 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
19741         * mini-ppc.c, basic.cs: shl_imm fix with test.
19743 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
19745         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
19746         structures by value. Misc fixes.
19747         * objects.cs: more tests.
19749 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
19751         * mini-ppc.c: lconv.ovf.i implemented.
19753 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19755         * mini.c:
19756         (mini_init): don't error out if someone already called g_thread_init.
19758 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
19760         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
19761         to be any type per the spec. Fix abnormal memory usage when
19762         the same object is repeatedly thrown.
19764 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
19766         * mini.c: check for overruns in IL code.
19768 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
19770         * TODO: Add/remove some todo entries.
19772 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
19774         * driver.c (mono_main): Call mono_verify_corlib.
19776 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
19778         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
19779         This has been moved to mini.c
19780         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
19781         type being casted is marshalbyref it could be a proxy, so instead of
19782         emitting the type check code, emit a call to a runtime method that will
19783         perform the check by calling CanCastTo if needed.
19785 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
19787         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
19788         methods with large stack frames under Win32.
19790 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
19792         * Makefile.am: Distribute regression tests.
19794         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
19795         at the end instead of inserting each variable into the sorted list.
19797         * linear-scan.c (mono_varlist_sort): New helper function.
19798         
19799 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
19801         * mini.c: ensure arguments and locals are within bounds.
19803 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
19805         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
19806         related fixes.
19808 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
19810         * mini.c (mono_cprop_copy_values): Fix crash.
19812         * aot.c: Set verbosity back to 0.
19813         
19814 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19816         * regalloc.c: complete memory leak fix by Laurent Morichetti
19817         (l_m@pacbell.net).
19819 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
19821         * driver.c (main_thread_handler): Revert the previous patch.
19823         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
19824         under valgrind.
19826         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
19827         memory from the memory pool.
19829         * driver.c (main_thread_handler): Turn on all optimizations when
19830         --aot is used.
19832         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
19833         an array for better performance.
19835         * regalloc.c (mono_regstate_assign): Fix memory leak.
19837         * debug-mini.c (mono_debug_serialize_debug_info): New function to
19838         serialize the debug info.
19840         * debug-mini.c (mono_debug_add_aot_method): New function to load the
19841         debug info from the serialized representation.
19843         * aot.c: Save debug info into the generated file and load it when 
19844         loading a method.
19846         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
19848 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
19850         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
19851         More FP-related fixes.
19853 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
19855         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
19856         and register allocation buglet. Hello world now runs.
19858 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
19860         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
19861         * tramp-ppc.c: fixed class init trampoline.
19862         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
19864 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
19866         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
19867         mini.c: more ppc changes/fixes.
19869 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
19871         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
19872         Also optimize the case when the arguments are the same in the caller 
19873         and in the callee.
19875         * iltests.il: Add tests for tail calls with valuetype arguments.
19877 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
19879         * mini-ppc.c: fixes for struct return type.
19881 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
19883         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
19884         mono_spillvar_offset() to arch-specific code.
19886 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
19888         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
19890 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
19892         * exceptions-x86.c: Fix stack space leaks.
19893         
19894         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
19895         registers from the lmf if the method has save_lmf set.
19897 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
19899         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
19900         of icall wrappers into InvokeInDomain, since these are now per-domain.
19902 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
19904         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
19905         make some opcode emulation and intrinsic ops enabled/disabled 
19906         according to the architecture. More fixes.
19908 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
19910         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
19912 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
19914         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
19915         arch-specific handling for 'this' and struct return type to
19916         arch-specific code.
19918 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19920         * aot.c: prevent divide by zero error when reporting (it happened with
19921         Accessibility.dll).
19923 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
19925         * mini.h (inst_switch): Remove unused macro.
19927 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19929         * aot.c:
19930         (load_aot_module): free 'info->methods' and 'info' properly. No more
19931         "free(): invalid pointer blah" messages when you have an old aot
19932         compiled assembly.
19934 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
19936         * jit-icalls.c, mini.c: Added support for context static fields.
19938 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
19940         * mini.c (mono_method_blittable): Methods which set LastError are not 
19941         blittable either. Fixes #51108.
19942         
19943 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
19945         * mini.c: flush icache.
19946         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
19948 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
19950         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
19952 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
19954         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
19955         safe on IA32.
19957         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
19958         vararg calls.
19960         * inssel.brg (CEE_MKREFANY): Fix AOT case.
19962 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
19964         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
19965         instruction when the result is discarded.
19967         * iltests.il (test_0_div_regalloc): New regression test.
19969         * arrays.cs: Fix compilation error.
19971 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
19973         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
19974         float rules to inssel-x86.brg: sane architectures with FP registers
19975         don't need to implement these rules.
19977 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
19979         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
19981 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
19983         * mini.h, inssel-long32.brg: fixed endianess issues in int64
19984         implementation of 32 bit systems.
19986 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
19988         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
19989         (Jeroen Zwartepoorte).
19991 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
19993         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
19994         the caller and the callee matches.
19995         
19996         * mini.c (mono_method_to_ir): Add comment.
19998         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
19999         signbit is missing on some platforms.
20001 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
20003         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
20005         * mini.c (setup_jit_tls_data): Call the new function.
20006         
20007         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
20009         * mini-x86.c: Add experimental support for fast access to the lmf
20010         structure under NPTL/Linux 2.6.x.
20012 2003-11-06  Martin Baulig  <martin@ximian.com>
20014         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
20015         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
20016         the debugger.
20018 2003-11-02  Martin Baulig  <martin@ximian.com>
20020         * mini.c (inflate_generic_field): New static method.
20021         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
20022         generic instance and the field is declared in a generic type, call
20023         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
20025 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
20027         * mini.h mini.c (mono_method_same_domain): New function to return
20028         whenever the caller and the callee are in the same domain.
20030         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
20032 2003-10-30  Martin Baulig  <martin@ximian.com>
20034         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
20035         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
20036         method parameters.
20037         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
20038         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
20040 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
20042         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
20043         propagation.
20045         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
20046         object here, so it is in the correct appdomain etc.
20048 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
20050         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
20051         already done.
20052         (mono_method_to_ir): Avoid freeing the type created returned from
20053         mono_type_create_from_typespec, since it is put into an internal cache
20054         by the function. Fixes pointer.exe.
20056         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
20057         trampolines for icalls and pinvokes as well. Fixes #33569.
20059 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
20061         * mini.c: Update after appdomain changes.
20063         * mini.c (mono_jit_compile_method_inner): Allways compile native
20064         method wrappers in the root domain, since there can only be one
20065         instance of them, whose address is stored in method->info.
20067 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
20069         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
20070         environment variable. Instead detect automatically whenever running
20071         under valgrind using the magic macro RUNNING_ON_VALGRIND from
20072         valgrind.h.
20074 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
20076         * trace.c, trace.h: New files that implement the new trace option
20077         parsing. 
20079         * driver.c: Document new --trace options.
20081         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
20082         mini-x86.c: Apply:
20084         -       if (mono_jit_trace_calls)
20085         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
20087         * mini.h: prototypes.
20088         
20089 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
20091         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
20093         * mini.c inssel.brg: Implement typedefbyref opcodes.
20095         * mini.c (mono_jit_compile_method): Remove unused local variable.
20097         * mini.c (mono_jit_compile_method_inner): Ditto.
20098         
20099 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
20101         * tramp-x86.c (x86_class_init_trampoline): Fix build.
20102         
20103         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
20105 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
20107         * mini.c (mono_no_aot): Remove unused global variable.
20109         * mini.c: Thread safety fixes.
20111 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
20113         * mini.c (mono_create_class_init_trampoline): Add a lock around
20114         class_init_hash_addr.
20116         * arrays.cs (test_0_newarr_emulation): Add new regression test for
20117         #30073.
20119         * mini.c: Decompose the NEWARR instruction before decomposing its
20120         arguments. Fixes #30073.
20122 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
20124         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
20125         convention.
20127 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
20129         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
20131         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
20133         * driver.c: Add support for compiling icall wrappers to --compile.
20135 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
20137         * inssel.brg: The empty value in class->interface_offsets is -1, not
20138         0. Fixes #49287.
20140 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
20142         * objects.cs: New test for 'is' operator on an array of interfaces.
20144 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
20146         * tramp-ppc.c: update trampoline code to support jumps
20147         and class initialization.
20149 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
20151         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
20153         * inssel.brg (OP_UNBOXCAST): Fix #46027.
20155         * inssel.brg (OP_UNBOX): Remove unused rule.
20157         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
20158         region instead of one for each method. Fixes #47813.
20160 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
20162         * exceptions.cs (test_0_nested_finally): New regression test for
20163         nested exception handlers.
20165         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
20167         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
20169         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
20170         inlining.
20172         * mini.c (mono_method_check_inlining): Make the inlining limit 
20173         configurable by an environment variable.
20174         
20175         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
20177         * mini.h: Bump AOT file version.
20179         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
20180         token, store the image along with the token, since the token might not 
20181         refer to the same image as the method containing the relocation, 
20182         because of inlining.
20184 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
20186         * mini.c (mono_precompile_assemblies): New function to compile
20187         all methods in all loaded assemblies.
20189         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
20191         * regalloc.h regalloc.c (MonoRegState): Change the type of 
20192         iassign and fassign to int*, since they can contain large negative
20193         values if the register is spilled. Also added some comments. Fixes
20194         #45817.
20196         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
20197         under Win32. Fixes #42964.
20199 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
20201         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
20203         * aot.c: Added support for AOT compiling methods which contain calls
20204         to wrappers. Currently, only remoting-invoke-with-check wrappers are
20205         handled.
20206         
20207         * driver.c (compile_all_methods): Run the compilation in a thread
20208         managed by mono. Fixes #44023.
20210         * mini.c (mono_codegen): Print full method name in verbose output.
20212         * mini-x86.c (mono_arch_patch_code): Fix warning.
20213         
20214         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
20215         jumps, since the method we are jumping to might be domain-specific.
20217         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
20219 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
20221         * inssel.brg: string chars are unsigned.
20223 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
20225         * TODO: New todo item.
20227         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
20228         which calls mono_runtime_class_init and patches the call site to
20229         avoid further calls.
20230         (mono_arch_create_class_init_trampoline): New arch specific function 
20231         to create a class init trampoline.
20232         (create_trampoline_code): Generalized so it can create
20233         class init trampolines as well.
20235         * mini.c (helper_sig_class_init_trampoline): New helper variable.
20236         (mono_create_class_init_trampoline): New function to create and cache
20237         class init trampolines.
20238         (mono_find_class_init_trampoline_by_addr): New function to lookup the
20239         vtable given the address of a class init trampoline. Used by the
20240         patching process.
20241         (mono_codegen): Generate a call to a trampoline instead of
20242         mono_runtime_class_init in LDSFLD[A].
20243         (mono_codegen): Add relocations for the new trampoline.
20244         
20245         * mini.h mini-x86.c aot.c: Added a new relocation type: 
20246         MONO_PATCH_INFO_CLASS_INIT.
20248         * mini.h: Bump AOT version number.
20250         * aot.c: Create a copy of the loaded code instead of using the original
20251         so methods which call each other will be close in memory, improving
20252         cache behaviour.
20253         
20254         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
20255         patch since it breaks the regression tests.
20256         
20257         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
20258         for the register saving instruction sequence since the 
20259         frame_state_for function in glibc 2.3.2 don't seem to detect it.
20261 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
20263         * TODO: Fix todo item && remove another.
20265 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
20267         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
20268         previous checkin.
20270         * aot.c: Moved the check for MONO_LASTAOT into the initialization
20271         function of the module.
20273         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
20274         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
20275         --no-aot command line option.
20277 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
20279         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
20280         by Bernie Solomon (bernard@ugsolutions.com).
20282         * inssel.brg: Refactor the interface offset table related code into
20283         its separate functions and add support for the AOT case.
20285 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
20287         * aot.c (mono_aot_get_method_inner): Fix memory leak.
20288         
20289         * aot.c: Added mono_aot_verbose variable and made all debugging
20290         output depend on the value of this variable.
20292         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
20293         method_label and info_label.
20295         * mini.h mini-x86.c aot.c: Added a new relocation type 
20296         MONO_PATCH_INFO_IID for klass->interface_id.
20298         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
20299         the MonoJitInfo structure.
20301         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
20302         a non-root appdomain in shared mode.
20304 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
20306         * aot.c: make aot loader less verbose. Remove free of unused variable.
20308 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
20310         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
20312         * .cvsignore: Added *.dll.
20314         * mini.c (mono_print_tree_nl): New function callable while debugging.
20316         * mini.c (mono_print_code): Export this.
20318         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
20319         patched code.
20321 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
20323         * mini.h (MonoCompile): Added 'jit_info' field.
20325         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
20326         the cfg structure, since it is needed by the AOT compiler.
20328         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
20330         * aot.c: A major rewrite. Changes include:
20331         - save exception tables for methods which have them.
20332         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
20333         to g_module_symbol.
20334         - reworked the file format so it is now much smaller and needs
20335         fewer relocation entries.
20336         
20337 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
20339         * aot.c (load_aot_module): Fix build bustage on platforms without
20340         Boehm GC.
20342 2003-09-04  Martin Baulig  <martin@ximian.com>
20344         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
20346 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
20348         * TODO: Some new optimization ideas.
20350         * aot.c: Move AOT module loading logic here from mono_assembly_open.
20352         * aot.c: Save the optimization flags used to compile the code into
20353         the AOT module.
20355         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
20356         support emitting domain specific code.
20357         
20358         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
20359         no longer domain neutral. It can be made domain neutral by compiling 
20360         with --optimize=shared.
20362         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
20363         between appdomains.
20365         * driver.c mini.h mini.c: New --no-aot debugging option which disables
20366         loading of AOT code.
20368         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
20369         
20370         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
20371         if there is no domain neutrality information.
20373 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
20375         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
20376         format version into the generated library.
20378         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
20379         callee method into the caller since one of them could be shared.
20381         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
20382         system exceptions from AOT code now works.
20384         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
20385         method if it is domain neutral and the callee is not.
20387         * graph.c (cfg_emit_one_loop_level): Fix warning.
20389 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
20391         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
20392         last checkin.
20394 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
20396         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
20397         is needed  by code which is executed before mono_runtime_init ().
20398         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
20399         
20400         * mini.c (mono_thread_abort): Fix warning.
20401         (mono_jit_compile_method): Call static constructor in the AOT case too.
20403         * aot.c (mono_compile_assembly): Fix warning.
20405 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20407         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
20409 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
20411         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
20413         * cpu-pentium.md: Fix the length of call opcodes so they include the
20414         ESP restoring instruction. Fixes #47968.
20416 2003-08-28  Martin Baulig  <martin@ximian.com>
20418         * mini-x86.c (mono_arch_call_opcode): Added support for
20419         MONO_TYPE_GENERICINST.
20421         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
20423 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
20425         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
20426         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
20428         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
20429         metadata_section.
20431 2003-08-26  Martin Baulig  <martin@ximian.com>
20433         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
20434         when reporting an error, set this to the actual error location.
20435         (mono_method_to_ir): Report the correct error location if
20436         get_basic_blocks() returned an error.
20438 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
20440         * mini.c (mono_type_blittable): OBJECT is not blittable.
20441         (mono_method_blittable): Methods which have marshalling descriptors
20442         are not blittable either. Fixes #47842.
20444 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
20446         * driver.c mini.c: Use an environment variable instead of a global 
20447         variable. Also fix the build.
20449         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
20450         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
20451         reporting this. 
20453         * driver.c mini.c: Added --with-valgrind option to turn off some
20454         code which prevents mono from running under valgrind.
20456         * mini.c (mono_emit_call_args): Fixed warning.
20458         * mini.c (mono_emulate_opcode): Fixed warning.
20460 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
20462         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
20463         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
20464         regalloc.c, regalloc.h: specify available registers in arch-specific
20465         code and support floats in the regallocator (patch by Laurent Morichetti 
20466         <l_m@pacbell.net>)
20468 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
20470         * mini.c: mono_thread_current() can be called only after
20471         mono_runtime_init(): rearrange code to not call it early on.
20473 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
20475         * mini.c: allocate jump tables in the code mempools.
20477 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20479         * mini.c, mini.h: make sure per-thread data allocated by the jit is
20480         freed.
20482 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
20484         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
20485         12 to 16.  This fixes bug #47453.
20488 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
20490         * mini-ppc.c: fixed indexed load and unsigned compares.
20492 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
20494         * mini.c: reenabled installation of handler for
20495           thread abort signal.
20497 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
20499         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
20500         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
20501         until it's fixed and actually useful.
20503 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
20505         * inssel-long32.brg: couple more opcodes implemented.
20507 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
20508         
20509         * mini-sparc.c: Even more opcodes implemeted.
20511 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
20513         * mini-sparc.c: More opcodes implemented.
20515 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
20517         * mini-sparc.c: More opcodes implemented.
20519 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
20521         * inssel-sparc.brg: Add some needed rules.  Direct
20522         copy from PPC.
20523         * Makefile.am: Use inssel-sparc.brg
20524         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
20525         an assert happy for now.
20527 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
20529         * mini-sparc.c: Fixed compile errors.
20530         * exceptions-sparc.c: Same.  We now produce a mono binary 
20531         on sparc-linux.  Yea.
20533 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
20535         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
20536         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
20537         They compile, but do not work.
20539 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
20541         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
20542         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
20543         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
20544         (ct@gentoo.org).
20546 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
20548         * mini.c: more opcodes implemented and better support for generics.
20550 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
20552         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
20553         * mini.c, mini.h: first cut at generics support: some new instructions 
20554         added and changed the behaviour of some of the existing ones.
20556 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
20558         * mini.c: Removed definition of metadata_shared mutex here.
20560 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
20562         * mini-x86.c: make vararg calls work for instance methods.
20564 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
20566         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
20567         returns the arguments in a separte list, now.
20569 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
20571         * aot.c, mini.c: updates for array type representation changes.
20573 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
20575         * mini.c: register function to perform jit shutdown.
20577 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
20579         * mini.c: use a faster allocator if possible.
20581 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
20583         * aot.c: some cleanups and portability changes.
20585 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
20587         * mini.c: use faster allocation for CEE_BOX if possible.
20589 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
20591         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
20592         Moved inlined mempcy code to its own function so that is can be
20593         reused. Added an inline memset function as well (optimized initobj).
20594         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
20596 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
20598         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
20600 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
20602         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
20603         arch code can setup the cpu for CLR execution, if needed.
20604         We use it on x86 to set the precision of FP operations.
20606 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
20608         * mini.c: disable some optimizations if we can guess they'll cost too
20609         much for a given method.
20611 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
20613         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
20614         
20615 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
20616         * mini.h mini.c mini-x86.c: Added instruction level coverage 
20617         info collection support.
20619 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
20621         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
20622         is now implemented in the profiling API. Get rid of a couple of
20623         unnecessary global variables.
20625 2003-06-15  Nick Drochak <ndrochak@gol.com>
20627         * basic-long.cs: tests for negative values for bigmul, and unsigned.
20628         * cpu-g4.md: add op_bigmul and op_bigmul_un
20629         * cpu_pentium.md: add op_bigmul_un
20630         * inssel-long32.brg: add rule for unsigned bigmul
20631         * mini-ops.h: define OP_BIGMUL_UN
20632         * mini-x86.c: THE BUG: handle (un)signed properly
20633         * mini.c: choose unsigned opcode if needed.
20634         This set of patches fixes bug #44291
20636 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
20638         * mini.c (optimize_branches): improved to handle all kinds of
20639         conditional branches.
20641 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
20643         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
20644         don't raise exceptions.
20646 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
20648         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
20649         to arch-specific files.
20651 2003-06-09  Martin Baulig  <martin@ximian.com>
20653         * Makefile.am (libs): Added $(LIBGC_LIBS).
20655 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
20657         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
20658         and OP_ATAN (fixes bug#44293).
20660 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
20662         * Makefile.am, mini-x86.c: rename cpu description array to
20663         pentium_desc, since some compilers define the 'pentium' preprocessor
20664         symbol.
20666 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
20668         * mini.c (mini_select_instructions): add explicit branch if the
20669         following block is not the false target of a conditional branch -
20670         we need this with any optimization that reorder or remove bblocks
20672         * mini.c (optimize_branches): bug fixes
20674 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
20676         * mini.c (mono_method_to_ir): inline static readonly fields
20678         * ssa.c (fold_tree): start cfold support for long (very simple
20679         cases only)
20681         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
20683 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
20685         * inssel.brg: fixed memcpy (bug #44219).
20687 2003-06-05  Dick Porter  <dick@ximian.com>
20689         * driver.c: Set the glib log levels to not abort if g_message
20690         recurses.
20692         g_set_prgname() has to happen before mini_init() so that the
20693         process handle gets the info.
20694         
20695 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
20697         * driver.c: add intrins to the default optimizations to get wider
20698         exposure.
20700 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20702         * mini.h: some large basic blocks will overflow a 16-bit
20703         integers for symbolic registers.
20705 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
20707         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
20708         (mono_arch_output_basic_block): fix bug 43499 
20710 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
20712         * mini.c: kill duplicated definition of mono_debug_format.
20714 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
20716         * mini-x86.c, arrays.cs: fixed register allocation bug.
20718 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
20720         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
20722         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
20724 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20726         * mini.c:
20727         (print_method_from_ip): also print source location information if
20728         available.
20730 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
20732         * mini.c (mono_find_block_region): bug fix in region code
20733         (mini_method_compile): enable removing unreachable code again, but
20734         only in methods without exception clauses.
20736 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
20738         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
20739         Implemented arglist opcode and handling of TypedReference type.
20740         Fixed x86 call convention when a structure is returned.
20741         Minimal support for calling static vararg methods.
20743 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
20745         * mini.c (mini_method_compile):  always remove unreachable code,
20746         because the code in them may be inconsistent  (access to dead
20747         variables for example).
20749 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
20751         * driver.c, debug-mini.c: warning fixes.
20753 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
20755         * Makefile.am, jit.h, mini.h: install header for embedding mono.
20757 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
20759         * mini.c: thread-static fields are registered in mono_class_vtable(),
20760         so ensure the function is called before checking for them.
20762 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
20764         * mini.c (optimize_branches): fix for bug 43586
20766         * jit-icalls.c (mono_llmult_ovf): added an additional check for
20767         overflow (fixes Bug #43639)
20769 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20771         * mini.c, objects.cs: allow the use of stobj for primitive types.
20773 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20775         * mini.c: be less strict about argument checking until we support
20776         running the verifier.
20778 2003-05-27  Nick Drochak <ndrochak@gol.com>
20780         * basic-long.cs: tests for (ulong)int * (ulong)int also
20781         * mini.c: use the same trick for (ulong)int * (ulong)int
20783 2003-05-27  Nick Drochak <ndrochak@gol.com>
20785         * basic-long.cs: add regression test for (long)int * (long)int
20786         * cpu-pentium.md: add op_bigmul specification
20787         * inssel-long32.brg: add OP_BIGMUL rule
20788         * mini-ops.h: add OP_BIGMUL
20789         * mini-x86.c: register allocator: handle case where src1 needs to be
20790         in EAX.
20791         * mini.c: substitute special BIGMUL opcode in the tree for 
20792         (long)int * (long)int
20794 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
20796         * jit-icalls.c: call the type ctor on field access if needed.
20798 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
20800         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
20801         to a method (including results of ldelema, bug#43207).
20803 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
20805         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
20806         colors to show exception handler blocks.
20808         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
20809         (fix for pinvoke7.cs).
20811 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20813         * mini.h, mini.c: ensure correct initialization order for types that
20814         require it. Prepare for lazy compilation of jit icall wrappers.
20815         Provide a name for opcode emulation to reduce unneeded mallocing.
20817 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
20819         * mini-x86.c: better register restoring code and profiling
20820         support for tail calls.
20822 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
20824         * mini.h, driver.c: prepare for leaf methods optimization.
20826 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
20828         * mini.c: get targets of branches before converting a method.
20830 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
20832         * mini.c (optimize_branches): added some experimental code (disbaled) 
20834 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
20836         * mini.c (optimize_branches): fix branch to branch optimization 
20838         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
20840         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
20842         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
20844         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
20845         if needed.
20847 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
20849         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
20850         enable use of interface variables again.
20852         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
20853         I1 to registers because there is no simply way to sign extend 8bit
20854         quantities in caller saved registers on x86.
20856         * inssel-float.brg: set costs of some rules to 2 so
20857         that monobure always select the arch. specific ones if supplied,
20858         regardless of the order we pass the files to monoburg.
20860 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
20862         * mini.c, mini-x86.c: since the magic trampoline for jumps
20863         can't patch the code directly, we do it as soon as the
20864         method gets compiled.
20866 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
20868         * mini-x86.c, mini.h: introduce a new patching method
20869         to support CEE_JMP and tail calls.
20870         * mini.c: obey tail.call. Don't precompile methods target
20871         of CEE_JMP.
20872         * tramp-x86.c: new trampoline code to handle methods
20873         reached through a jump.
20875 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
20877         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
20878         bit values to registers
20880 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
20882         * mini.c (mono_compile_get_interface_var): share interface
20883         variables if possible.
20885 2003-05-16  Martin Baulig  <martin@ximian.com>
20887         * debug-mini.c (mono_init_debugger): New function to initialize
20888         the debugger.  This is not in the debugger since it needs to
20889         access some of mini's internals.
20891 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
20893         * mini.c (mono_method_to_ir): inlining fixes/cleanups
20895 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
20897         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
20898         for value type handling.
20900 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
20902         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
20903         (mono_method_check_inlining): enable inlining of all kinds of wrappers
20905 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
20907         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
20908           the constructor through a proxy.
20910 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
20912         * jit-icalls.c, inssel.brg: fixes to array element address
20913         calculations.
20915 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
20917         * mini-x86.c (is_regsize_var): allocate pointer to registers
20919 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
20921         * driver.c: fixed typo, added intrins to the set of optimizations
20922         tested with regressions.
20924 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
20926         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
20927         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
20928         test case.
20930 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
20932         * inssel.brg: remove some common pop instructions without side effects
20934 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
20936         * inssel-x86.brg: fixed thinko in int to double conversions.
20938 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
20940         * mini.c, jit-icalls.c: added runtime thread-static variable support.
20942 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
20944         * inssel-long32.brg: two more missing instructions.
20946 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
20948         * mini.c (mono_emit_call_args): set the cil_code for all arguments
20949         if not already set.
20951 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
20953         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
20954         correctly.
20956         * basic-float.cs: Added tests for negative zero.
20958 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
20960         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
20961         a couple of missing operations for long casts, with test cases.
20963 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20965         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
20967 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
20969         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
20970         code size estimation.
20972 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
20974         * mini.c (mono_jit_create_remoting_trampoline): make it work with
20975         abstract methods (fix bug 42542)
20977         * aot.c: add ability to handle array types
20978         
20979 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
20981         * mini.c: Call the _specific versions of the object allocation
20982         functions if possible.
20984 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
20986         * driver.c: call setlocale ().
20988 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
20990         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
20991         windows build.
20993 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
20995         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
20997         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
20998         wrappers (fix bug 42122)
21000 2003-05-04  Martin Baulig  <martin@ximian.com>
21002         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
21004         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
21005         s/mini_set_defaults/mono_set_defaults/g.
21007 2003-05-04  Martin Baulig  <martin@ximian.com>
21009         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
21011 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21013         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
21014         (reported by Don Roberts).
21016 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
21018         * mini.c: temporarily work around two bugs for this release.
21020 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21022         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
21023         that contains -export-dynamic and it makes using the ld script
21024         useless.
21025         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
21027 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
21029         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
21030         specific cpu.
21032 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
21034         * mini.c: make sure leave calls all the needed finally blocks,
21035         even when the target jumps out of multiple exception clauses.
21037 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
21039         * ldscript, Makefile.am: add linker script to reduce the number of
21040         exported symbols (should also fix the issues with libwine defining
21041         some of the same symbols in io-layer).
21043 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
21045         * driver.c (mini_main): Avoid assertion when no file name is given on 
21046         the command line.
21048 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
21050         * driver.c: added --version/-V command line option.
21051         Added the inline optimization in the regression tests.
21053 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21055         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
21056         to the type in the method signature (fixes bug#42134).
21058 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
21060         * mini.c: when inlining, check this is not null only when needed (bug #42135).
21062 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
21064         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
21066 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21068         * driver.c: fixed bug #42100.
21070 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
21072         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
21074 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
21076         * mini.c: moved most of the code required to do inlining to its own
21077         function so it can be reused. Inline also ctors if appropriate.
21079 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
21081         * Makefile.am: Link with -export-dynamic so shared libs loaded by
21082         the runtime can call mono API functions.
21084 2003-04-27  Martin Baulig  <martin@ximian.com>
21086         * debug-mini.c (mono_debug_init_method): Added
21087         `guint32 breakpoint_id' argument; if the method has a breakpoint,
21088         send a notification to the debugger.
21090         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
21091         running in the Mono Debugger, just pass the breakpoint number to
21092         mono_debug_init_method().
21094         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
21096 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
21098         * mini.c: allow some more unsafe compares.
21100 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21102         * mini-x86.c, Makefile.am: make distcheck works (partially from
21103         a patch by Richard Lee <r.h.lee@attbi.com>).
21104         * regset.c, regset.h: removed, they are unused.
21106 2003-04-25  Dick Porter  <dick@ximian.com>
21108         * driver.c: Usage reports the name as 'mono' not 'mini'
21109         * exceptions-x86.c: Build and run on freebsd
21111 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
21113         * Makefile.am: install the program with the 'mono' name and
21114         the library as libmono instead of mini and libmini.
21116 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
21118         * driver.c: provide the APIs for the embedding interface of the old jit.
21120 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
21122         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
21124 2003-04-23  Martin Baulig  <martin@ximian.com>
21126         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
21128         * driver.c: Added `--debug' command line argument to enable
21129         debugging support.
21131 2003-04-23  Martin Baulig  <martin@ximian.com>
21133         * debug.[ch]: Removed.  The code is now in
21134         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
21136         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
21137         last six months.
21139 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
21141         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
21143 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21145         * mini.c:
21146         (mini_cleanup): moved mono_runtime_cleanup call after the call to
21147         mono_domain_finalize.
21148         (mini_method_compile): use mono_method_profile* if the the option is
21149         enabled.
21151 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
21153         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
21154         methods with their wrapper.
21156         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
21157         methods with their wrapper.
21159         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
21160         their wrapper.
21162         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
21163         wrapper.
21165         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
21166         methods.
21168 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
21170         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
21172 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
21174         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
21175         of the mempool. This is slightly faster and uses less memory
21177 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21179         * mini.c: avoid O(n) allocation for variables.
21181 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21183         * mini.c: handle items on the stack after inlining methods.
21185 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
21187         * mini.c: make the method->opcode optimization dependent
21188         on MONO_OPT_INSTRINS and do it lazily.
21190 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
21192         * driver.c: print overall results at the end of regression run.
21194 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
21196         * inssel.brg: don't overwrite symbolic registers.
21198 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
21200         * inssel-x86.brg: fix conversion from long to float.
21202 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
21204         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
21206 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
21208         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
21210         * driver.c: Added --print-vtable option as in the old JIT.
21212 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
21214         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
21216 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
21218         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
21220 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
21222         * mini.c regalloc.c regalloc.h: Fix memory leak.
21224 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
21226         * aot.c (mono_aot_get_method): register all used strings
21228 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21230         * mini.c: always intern strings references with ldstr at compile time.
21232 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
21234         * Makefile.am: add BUILT_SOURCES.
21236 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
21238         * driver.c: give a better error message when the assembly to execute
21239         doesn't have an entry point.
21241 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
21243         * Makefile.am: added hack for automake
21245         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
21246         correct sematics.
21248         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
21250 22003-04-07  Martin Baulig  <martin@ximian.com>
21252         * Makefile.am: Added Makefile.am.
21254         * debugger-main.c: Removed, this is now in the debugger where it
21255         belongs.
21257         * mini.pc.in: Call this package `mini' for the moment.