2010-06-21 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / mini / ChangeLog
blob352dd678a5e092b10c7c4201fe9c89aa12c2aed9
1 2010-06-19  Zoltan Varga  <vargaz@gmail.com>
3         * tramp-amd64.c (mono_arch_create_generic_trampoline): Increase the buf len a little,
4         to avoid an assert.
6 2010-06-18  Zoltan Varga  <vargaz@gmail.com>
8         * aot-compiler.c (emit_klass_info): Mark unloadable classes properly.
10         * aot-compiler.c aot-runtime.c: Fix LLVM support.
12         * mini-llvm.c: When emitting OP_CALL_HANDLER, avoid branching directly to the landing
13         pad, branch to a new bblock instead.
15         * aot-compiler.c (emit_method_code): Use cfg->header instead of the header of
16         orig_method.
18         * exceptions-amd64.c (mono_arch_exceptions_init): Fix fullaot support.
20         * mini-llvm.c (process_bb): Add support for OP_SQRT when using the LLVM mono branch.
22 2010-06-17  Geoff Norton  <gnorton@novell.com>
24         * mini-arm.h:
25         * exceptions-arm.c: Move the UCONTEXT macros to mono-sigcontext.h so they
26         can be used by sgen.
28 2010-06-17  Zoltan Varga  <vargaz@gmail.com>
30         * aot-compiler.c (emit_klass_info): Handle type load exceptions.
32         * method-to-ir.c (mono_method_to_ir): Avoid a crash if mono_method_get_header ()
33         fails.
35         * exceptions-x86.c (mono_x86_throw_corlib_exception): Negate the decrement of
36         the ip done by throw_exception (), it is not needed for corlib exceptions.
38 2010-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
40         * method-to-ir.c (mono_emit_wb_aware_memcpy): Simplify this function.
41         Call new jit icall mono_gc_wbarrier_value_copy_bitmap for vt wbarrier
42         of size > 5 words. This support fast barriers for value types up to
43         256/512 bytes which     beyond that the copying itself is the major issue.
45         * method-to-ir.c (mini_emit_stobj): The intrinsic version is safe
46         for gsharing, so use it.
48         This eliminate all calls to mono_value_copy from managed code in
49         gmcs, fsharp and ipy.
51         This gives a 2% perf boost on ipy and 1% on gmcs over previous patches.
53         Even thou a lot of mono_value_copy calls were eliminated from fsharp,
54         performance kept
56         * mini.c (mini_init): Register new icall.
58 2010-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
60         * method-to-ir.c (mono_emit_wb_aware_memcpy): Handle nested valuetypes.
61         This eliminates 2% of mono_value_copy calls on ipy and 12% on fsharp.
63 2010-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
65         * method-to-ir.c (mini_emit_stobj): Don't call mono_value_copy for small
66         value types as the overhead is huge. Manually expand it up to 5 words to
67         avoid code bloat.
69         This improves gmcs times by 5% and unmodified binary-tree by 78%. The later
70         is an exception that performance is dominated by mono_value_copy.
72         This puts sgen about 5% ahead of boehm in terms of wall-clock on a Core2Quad.
74 2010-06-17  Zoltan Varga  <vargaz@gmail.com>
76         * mini-llvm.c (process_call): Disable LLVM for calls to generic class init
77         trampolines on x86, since those have their own cconv.
79         * exceptions-x86.c (mono_arch_exceptions_init): Implement the llvm throw corlib
80         exception trampolines.
82         * tramp-x86.c: Add xdebug info for a few trampolines.
84         * mini-llvm.c: Set the name of the arguments.
86         * mini-llvm.c (emit_cond_system_exception): Pass the ip of to throw_corlib_trampoline
87         using a block address if using the LLVM mono branch.
89         * exceptions-amd64.c (mono_arch_exceptions_init): Add new LLVM throw corlib exception
90         trampolines.
92 2010-06-15  Zoltan Varga  <vargaz@gmail.com>
94         * mini-ppc.c (mono_arch_get_cie_program): Define this for powerpc too.
96         * mini-llvm.c (process_bb): Add a missing CHECK_FAILURE.
98         * mini.c (mini_init): Remove some of the llvm restrictions, they are no longer needed.
100         * method-to-ir.c (mono_method_to_ir): Enable fast virtual calls when using llvm.
102         * mini-trampolines.c (mono_llvm_vcall_trampoline): Rewrite this to use one vtable
103         trampoline per vtable slot index. The slot, along with the 'this' argument is enough
104         to identify the vtable slot address plus the method which needs to be compiled.
106         * mini.c (mini_get_vtable_trampoline): Use one vtable trampoline per vtable slot when
107         using llvm.
109         * mini-x86.c (get_call_info_internal): Change the managed calling convention so
110         'this' is always passed as the first argument, before the vtype ret arg. This
111         simplifies get_this_arg_reg () and LLVM integration.
113         * mini-amd64.c (get_call_info): Fix the handling of MONO_TYPE_TYPEDBYREF after
114         the latest changes.
116         * tramp-x86.c (mono_arch_create_generic_trampoline): Emit unwind info for
117         these trampolines.
119         * mini-x86.c (mono_arch_get_cie_program): Implement this for x86.
121         * mini-llvm.c: Fix compilation with llvm 2.6.
123         * mini-amd64.c (CallInfo): Fix the position of the vret_arg_index field.
125         * mini-llvm.c (mono_llvm_emit_method): Fix the build if LLVM_MONO_BRANCH is not
126         defined.
128         * mini-amd64.c (get_call_info): Change the managed calling convention so 'this'
129         is always passed as the first argument, before the vtype ret arg. This simplifies
130         get_this_arg_reg () and LLVM integration.
132 2010-06-14 Rodrigo Kumpera  <rkumpera@novell.com>
134         * method-to-ir.c (mono_method_to_ir): Add support for .ctor intrinsics.
136         * method-to-ir.c (mini_emit_inst_for_ctor): New function for .ctor intrinsics.
137         For now just call simd intrinsics. This makes "x[0] = new Vector4f (10)" 
138         translate into much nicer code.
140 2010-06-14  Zoltan Varga  <vargaz@gmail.com>
142         * mini-llvm.c (sig_to_llvm_sig_full): Add a 'sinfo' out argument which returns
143         parameter index information. Use this to simplify a lot of code.
145         * unwind.c (mono_unwind_decode_fde): Handle augmentions using a loop.
147 2010-06-12  Zoltan Varga  <vargaz@gmail.com>
149         * aot-compiler.c (compile_method): Add a 'depth' parameter to add_generic_class too
150         to fix infinite generic recursion. Fixes #612702.
152 2010-06-11  Zoltan Varga  <vargaz@gmail.com>
154         * object.c: Use a callback to create IMT trampolines, allowing the usage of one
155         imt trampoline per imt slot when using LLVM.
157 2010-06-10  Jonathan Pryor  <jpryor@novell.com>
159         * mini.c (mini_cleanup): Call mono_runtime_shutdown(). Fixes #438454.
161 2010-06-09  Levi Bard  <levi@unity3d.com>
163         * debugger-agent.c: Clear unloaded types on appdomain unload.
165 2010-06-08  Zoltan Varga  <vargaz@gmail.com>
167         * liveness.c (visit_bb): Make the component vregs of long vars volatile as well.
168         Fixes #612206.
170         * exceptions.cs: Add a test.
172 2010-06-06  Zoltan Varga  <vargaz@gmail.com>
174         * mini-llvm.c (mono_llvm_check_method_supported): Only disable llvm for nested clauses.
176         * mini.c (mini_method_compile): Move the LLVM checks to a function in mini-llvm.c.
178         * mini.c (mono_jit_runtime_invoke): Initialize *exc to NULL before calling the wrapper,
179         so it doesn't have to do it.
181         * helpers.c (mono_disassemble_code): Flush stdout, so the output from the spawned
182         process does not mix with ours.
184         * mini-llvm.c (mono_llvm_emit_method): Refactor this giant function into smaller
185         ones.
187         * mini-llvm.c method-to-ir.c ir-emit.h: When using the llvm mono branch, allow
188         loads/stores which can throw exceptions inside clauses.
190 2010-06-05  Zoltan Varga  <vargaz@gmail.com>
192         * mini-llvm.c (mono_llvm_emit_method): Fix support for finally clauses with more than
193         one ENDFINALLY.
195         * mini.c (mini_init): Register mono_resume_unwind as an icall.
197 2010-06-03  Zoltan Varga  <vargaz@gmail.com>
199         * dwarfwriter.c: Update after the mono_debug_lookup_locals () changes.
201         * debugger-agent.c (method_commands_internal): Ditto. Return scope information for
202         locals.
204 2010-06-03  Zoltan Varga  <vargaz@gmail.com>
206         * debugger-agent.c (appdomain_unload): Clear all breakpoint instances in the dying
207         appdomain.
209 2010-06-02  Zoltan Varga  <vargaz@gmail.com>
211         * method-to-ir.c (set_rgctx_arg): New helper function to remove some duplicate code.
212         Use a separate generic class init trampoline for llvm, since it needs a different
213         signature.
215         * unwind.c (mono_unwind_decode_fde): Make this decode the mono specific LSDA which
216         includes the location of this/rgctx.
218         * mini-llvm.c aot-runtime.c: Enable generic sharing for llvm if using the LLVM mono
219         branch.
221 2010-06-01  Zoltan Varga  <vargaz@gmail.com>
223         * mini.c (mini_method_compile): Enable llvm+exceptions on LLVM SVN.
225         * mini-llvm.c (emit_cond_system_exception): Disable llvm when this occurs in a
226         clause.
228 2010-05-31  Zoltan Varga  <vargaz@gmail.com>
230         * unwind.c (mono_unwind_decode_fde): The FDE only has an augmention if the CIE
231         says so.
233         * aot-runtime.c (decode_eh_frame): Fix an assert condition.
235         * aot-compiler.c (patch_to_string): New debugging helper function.
237 2010-05-30  Zoltan Varga  <vargaz@gmail.com>
239         * exceptions-amd64.c (get_throw_trampoline): Fix the xdebug name of the corlib
240         trampoline.
242         * exceptions-x86.c (mono_arch_exceptions_init): Create an llvm rethrow trampoline too.
244         * mini-llvm.c (mono_llvm_emit_method): Implement OP_RETHROW.
246         * method-to-ir.c (mono_method_to_ir): Emit a OP_NOT_REACHED after a rethrow.
248         * mini-llvm.c (emit_call): Compute the containing try clause correctly for nested
249         clauses.
251         * mini.c (create_jit_info): Print EH clause info for LLVM too.
253 2010-05-28  Mark Probst  <mark.probst@gmail.com>
255         * method-to-ir.c (mono_method_to_ir): Emit a write barrier for
256         cpobj with reference types.
258 2010-05-28  Mark Probst  <mark.probst@gmail.com>
260         * method-to-ir.c (mono_method_to_ir): Only explicitly add the
261         write barrier for reference types.
263 2010-05-27  Zoltan Varga  <vargaz@gmail.com>
265         * mini-s390x.c (mono_arch_output_basic_block): Applied patch from Aurelien Minvielle
266         . Fix OP_ATOMIC_EXCHANGE_I4 on s390x. Fixes #609023.
268 2010-05-31  Martin Baulig  <martin@ximian.com>
270         Fix #608271.
272         * debugger-agent.c (breakpoints_cleanup): Iterate over `event_requests', call
273         clear_breakpoint() on all breakpoint events and remove them from the list.
275 2010-05-27  Martin Baulig  <martin@ximian.com>
277         Fix #605698.
279         * debugger-agent.c (method_commands, type_commands): Temporarily
280         set the appdomain while executing this method; do all metadata
281         calls in the debuggee's appdomain where user assemblies are loaded.
283 2010-05-27  Zoltan Varga  <vargaz@gmail.com>
285         * mini-s390x.c (mono_arch_get_delegate_invoke_impls): Fix the s390x build.
287 2010-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
289         * method-to-ir.c (mono_method_to_ir): Add missing write barrier to stobj.
291 2010-05-26  Zoltan Varga  <vargaz@gmail.com>
293         * method-to-ir.c: Instead of freeing method headers immediately, save them in a list in
294         MonoCompile, and free them in mono_destroy_compile (), since the MonoType's in them could
295         be referenced even after the header is freed.
297         * aot-runtime.c: Remove the half finished support for decoding the .arm_exidx
298         section.
300 2010-05-25  Zoltan Varga  <vargaz@gmail.com>
302 2010-05-25  Bill Holmes  <billholmes54@gmail.com>
304         * genmdesc.c (main): Fixing the detection of the nacl switch.
306         Code is contributed under MIT/X11 license.
308 2010-05-25  Zoltan Varga  <vargaz@gmail.com>
310         * exceptions-amd64.c (mono_arch_find_jit_info_ext): Adjust the ip for LMF frames too.
312         * mini-llvm.c aot-compiler.c: More LLVM 2.8 updates.
314         * mini.h (LLVM_CHECK_VERSION): New helper macro.
316 2010-05-25  Miguel de Icaza  <miguel@novell.com>
318         * genmdesc.pl (build_spec): Add support for nacl: keyword also to
319         the Perl program
321         * genmdesc.c: Added support for nacl: key on the machine
322         description files to support the extra space required by Google
323         Native Client.
325 2010-05-23  Zoltan Varga  <vargaz@gmail.com>
327         * mini.c (mono_jit_compile_method_inner): Propagate exceptions in one more place.
329 2010-05-23  Zoltan Varga  <vargaz@gmail.com>
331         * mini.c (mono_jit_compile_method_inner): Propagate exceptions from
332         mono_runtime_class_init_full ().
333         (mono_jit_runtime_invoke): Ditto. Fixes #608073.
335 2010-05-22  Zoltan Varga  <vargaz@gmail.com>
337         * mini-llvm.c mini-llvm-cpp.cpp: Update after LLVM 2.8 changes.
339 2010-05-21  Zoltan Varga  <vargaz@gmail.com>
341         * mini-ppc.c (mono_arch_output_basic_block): Use ins->inst_c1 instead of p1, the
342         two are not the same on ilp32.
344 2010-05-21  Zoltan Varga  <vargaz@gmail.com>
346         * mini.c (mono_jit_compile_method_inner): Remove a DISABLE_JIT block which was
347         added by mistake.
349         * mini-ppc.c: Fix the DISABLE_JIT build.
351 2010-05-20  Zoltan Varga  <vargaz@gmail.com>
353         * aot-runtime.c (decode_resolve_method_ref): Rename this from decode_method_ref_2.
354         (make_writable): Remove this unused function.
356 2010-05-20  Zoltan Varga  <vargaz@gmail.com>
358         * aot-compiler.c: Collect all information about a PLT entry into a separate MonoPltEntry
359         structure. Make the labels to plt entries local symbols instead of assembler local
360         labels, since tha latter causes problems for the iphone linker.
362 2010-05-19  Zoltan Varga  <vargaz@gmail.com>
364         * mini-ppc.c (mono_ppc_is_direct_call_sequence): Handle one more case with ilp32.
366 2010-05-17  Zoltan Varga  <vargaz@gmail.com>
368         * mini-ppc.c (mono_ppc_is_direct_call_sequence): Handle ilp32.
369         (ppc_patch_full): Ditto.
371         * mini-arm.c (mono_arch_build_imt_thunk): Fix the fail_tramp case.
373         * method-to-ir.c (mono_method_to_ir): Use fast generic virtual method invocation
374         if gshared is enabled, to avoid asserts in the trampoline code.
376         * mini-ia64.c (mono_arch_build_imt_thunk): Implement generalized imt thunks
377         on ia64.
379 2010-05-15  Geoff Norton  <gnorton@novell.com>
381         * dwarfwriter.c, xdebug.c: Fix a pretty large leak when running in 
382         xdebug mode.
384 2010-05-14  Geoff Norton  <gnorton@novell.com>
386         * exceptions-x86.c: Fix the alignment of this trampoline so we dont get a 
387         misaligned stack on darwin.
389 2010-05-14  Zoltan Varga  <vargaz@gmail.com>
391         * mini-arm.c aot-compiler.c: Implement support for generalized imt thunks on
392         arm.
394 2010-05-14  Zoltan Varga  <vargaz@gmail.com>
396         * xdebug.c: Fix ARM support.
398 2010-05-13  Zoltan Varga  <vargaz@gmail.com>
400         * exceptions-x86.c (mono_arch_handle_exception): Resume from the signal handler
401         and do most of the work on the normal stack.
402         (mono_x86_get_signal_exception_trampoline): New x86 specific trampoline function.
404 2010-05-13  Zoltan Varga  <vargaz@gmail.com>
406         * aot-compiler.c: Put non-code data into the .rodata section on linux.
408 2010-05-13  Zoltan Varga  <vargaz@gmail.com>
410         * exceptions-arm.c (mono_arch_handle_exception): Fix the cross-compile case.
412 2010-05-13  Zoltan Varga  <vargaz@gmail.com>
414         * exceptions-arm.c (mono_arch_handle_exception): Resume from the signal handler
415         and do most of the work on the normal stack.
417 2010-05-13  Zoltan Varga  <vargaz@gmail.com>
419         * exceptions-amd64.c (mono_arch_handle_exception): Resume from the signal handler
420         and do most of the work on the normal stack even if sigaltstack is disabled.
422 2010-05-12  Zoltan Varga  <vargaz@gmail.com>
424         * exceptions-amd64.c (mono_arch_sigctx_to_monoctx): Simplify this now that
425         UCONTEXT_REG_ constants are available on linux as well.
426         (mono_arch_monoctx_to_sigctx): Ditto.
427         (mono_arch_ip_from_context): Ditto.
429 2010-05-12  Zoltan Varga  <vargaz@gmail.com>
431         * debugger-agent.c (set_breakpoint): Fix setting of pending breakpoints in
432         other domains.
434 2010-05-11  Zoltan Varga  <vargaz@gmail.com>
436         * aot-compiler.c (emit_plt): Don't align the plt to a pagesize on x86, it is
437         no longer needed.
439 2010-05-10  Zoltan Varga  <vargaz@gmail.com>
441         * debugger-agent.c (insert_breakpoint): Print a more descriptive error message
442         if a breakpoint cannot be inserted.
444 2010-05-08  Zoltan Varga  <vargaz@gmail.com>
446         * aot-compiler.c (emit_and_reloc_code): Fix a warning.
448 2010-05-07  Zoltan Varga  <vargaz@gmail.com>
450         * debugger-agent.c (frame_commands): Return an error instead of asserting if
451         no JIT info is found for the method.
453 2010-05-05 Jonathan Chambers  <joncham@gmail.com>
455         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Protect against a NULL sigctx
456         in debug printf.
458 2010-05-05  Zoltan Varga  <vargaz@gmail.com>
460         * mini-amd64.c (mono_arch_get_trampolines): New arch specific function returning
461         a list of arch specific trampolines.
463         * aot-compiler.c (emit_trampolines): Use it.
465 2010-05-05  Zoltan Varga  <vargaz@gmail.com>
467         * tramp-<ARCH>.c exceptions-<ARCH>.c mini-trampolines.c mini-exceptions.c
468         aot-compiler.c: Use the _full trampoline creation functions on all platforms,
469         get rid of the _full from their name.
471 2010-05-05  Zoltan Varga  <vargaz@gmail.com>
473         * tramp-x86.c (mono_arch_create_generic_trampoline): Call
474         get_nullified_class_init_trampoline to remove some code duplication.
476 2010-05-03  Zoltan Varga  <vargaz@gmail.com>
478         * mini-x86.c (mono_arch_emit_prolog): Fix full-aot support for thread
479         attach.
481 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
483         * mini-amd64.c (mono_arch_emit_load_aotconst): New arch-specific function.
485         * tramp-amd64.c: Use emit_load_aotconst to remove some code duplication.
487         * aot-runtime.c (init_plt): Make the default entries point to the AOT trampoline,
488         there is no need to jump through the first plt entry.
490         * aot-runtime.c (mono_aot_get_named_code): Rename to mono_aot_get_trampoline.
492         * aot-runtime.c (mono_aot_get_plt_entry): Move the arch specific parts to an
493         arch-specific function.
494         (mono_aot_get_plt_info_offset): Ditto.
496         * aot-runtime.c (mono_aot_register_jit_icall): New helper function called from
497         mono_arch_init () to register jit icalls called from full-aot trampolines.
498         (load_function): Get rid of the arch specific #ifdefs, move the relevant code
499         to mini-<ARCH>.c.
501         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception_full): Get rid of
502         the specialized throw corlib exception trampoline, use a variant of the normal
503         trampoline along with a new C function which does the call to
504         mono_exception_from_token (), just like on x86.
506 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
508         * mini-trampolines.c aot-compiler.c tramp-<ARCH>.c exceptions-<ARCH>.c:
509         Reorganize the full aot trampoline creation functions, instead of taking a bunch
510         of out arguments, they will now take a MonoTrampInfo** out argument. Simplify
511         some code in aot-compiler.c because of this. Remove the non-full aot trampoline
512         creation functions on architectures which have the full-aot ones.
514 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
516         * mini-ppc.c (mono_arch_decompose_long_opts): Fix LNEG.
518 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
520         * mini-ppc.c (mono_arch_emit_exceptions): Initialize exc_throw_pos/found
521         explicitly, this seems to be required by some gcc versions at -O2.
523         * mini-arm.c: Ditto.
525 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
527         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Fix full-aot support for
528         has_target delegate invokes.
530 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
532         * mini.h (MonoAotTrampInfo): Rename this to MonoTrampInfo, add patches/unwind
533         info fields.
535         * aot-compiler.c (mono_aot_tramp_info_create): Rename to mono_tramp_info_create,
536         add patches/unwind info arguments, move to mini.c.
538         * mini-<ARCH>.c aot-compiler.c: Update after the above changes.
540 2010-04-30  Zoltan Varga  <vargaz@gmail.com>
542         * debugger-agent.c (type_commands): Add a new CMD_TYPE_GET_SOURCE_FILES_2
543         command which returns full path names.
545 2010-04-29  Zoltan Varga  <vargaz@gmail.com>
547         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline_full): Set the
548         code_size output variable.
550         * mini-x86.c (mono_arch_emit_prolog): Compute the GOT addr before calling
551         mono_get_lmf_addr.
552         
553 2010-04-29  Zoltan Varga  <vargaz@gmail.com>
555         * mini-x86.c (mono_arch_emit_prolog): Remove a disable_aot which is not needed.
556         (mono_arch_cpu_optimizazions): Make this a no-op when running with full aot.
557         (mono_arch_cpu_enumerate_simd_versions): Ditto.
559 2010-04-29  Zoltan Varga  <vargaz@gmail.com>
561         * image-writer.c (asm_writer_emit_alignment): Use ilog2 for alignments for the
562         apple assembler.
564 2010-04-29  Zoltan Varga  <vargaz@gmail.com>
566         * mini-x86.c (mono_arch_emit_prolog): Avoid an assert in full-aot mode.
568 2010-04-29  Zoltan Varga  <vargaz@gmail.com>
570         * aot-runtime.c (load_function): Use TARGET_X86 instead of __i386__.
572 2010-04-28  Zoltan Varga  <vargaz@gmail.com>
574         * aot-compiler.c (emit_got_info): Double the buffer size to avoid an assert.
576 2010-04-27  Zoltan Varga  <vargaz@gmail.com>
578         * dwarfwriter.c (emit_line_number_info): Get rid of the usage of GArray, so
579         line number support works with eglib.
581 2010-04-27  Miguel de Icaza  <miguel@novell.com>
583         * driver.c, mini.c: Since linking with LLVM makes the default Mono
584         dirty an extra 70kb pages on startup we are now going to choose a
585         different strategy: ship mono and mono-llvm binaries, with the
586         second being the one that links with LLVM and defaults to LLVM
587         being enabled.
589 2010-04-27  Zoltan Varga  <vargaz@gmail.com>
591         * tramp-x86.c exceptions-x86.c mini-x86.c aot-compiler.c aot-runtime.c: 
592         Implement full-aot support on x86.
594         * method-to-ir.c: Always use a got var on x86 too, just like on ppc, because the
595         trampolines depend on it. Use MONO_ARCH_GOT_REG as the got register, instead of
596         the first register returned by get_global_int_regs ().
598         * cpu-x86.md: Fix the length of insertx_u1_slow.
600         * iltests.il.in: Disable tail call tests when running with full-aot.
602 2010-04-26  Zoltan Varga  <vargaz@gmail.com>
604         * method-to-ir.c (mono_op_to_op_imm_noemul): Fix a warning.
606 2010-04-24  Mark Probst  <mark.probst@gmail.com>
608         * mini.c, driver.c: Initialize mono_use_llvm in mono_main(), not
609         in the initializer, because it's non-constant.
611 2010-04-23  Miguel de Icaza  <miguel@novell.com>
613         * mini.c: Use MONO_USE_LLVM as an environment flag to turn the use
614         of LLVM on by default.   Used for buildbots and other setups.
616 2010-04-24  Zoltan Varga  <vargaz@gmail.com>
618         * mini.c: Set mono_use_llvm to FALSE even if mono is compiled with LLVM.
620 2010-04-23  Kornel Pal  <kornelpal@gmail.com>
622         * method-to-ir.c (mono_method_to_ir): Enable inlining of pointer-sized unmanaged
623         initonly static fields when using moving GC.
625         Contributed under MIT/X11 license.
627 2010-04-23  Geoff Norton  <gnorton@novell.com>
629         * mini-amd64.h: Darwin x86_64 support.
631 2010-04-20  Jonathan Pryor  <jpryor@novell.com>
633         * exceptions-arm.c: Remove platform checks in favor of configure checks.
635 2010-04-19  Jonathan Pryor  <jpryor@novell.com>
637         * exceptions-arm.c: Add Android support for sigcontext structure.
639 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
641         * mini.c (mono_jit_compile_method_inner): Implement the check for native func
642         wrappers correctly now that their wrapper info is NULL.
644 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
646         * mini.c (mono_jit_compile_method_inner): Avoid calling
647         mono_marshal_method_from_wrapper () for native func wrappers. Fixes #597189.
649 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
651         * genmdesc.c (inst_name): Define this as a copy of mono_inst_name in helpers.c,
652         so the latter can be #ifndef DISABLE_JIT-ed.
654         * helpers.c: Comment out the opstr array if DISABLE_JIT is set.
656 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
658         * method-to-ir.c driver.c: Disable a few more things when DISABLE_JIT is set.
660 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
662         * mini-llvm.c (emit_entry_bb): Fix support for simd arguments passed on the
663         stack.
665 2010-04-15  Zoltan Varga  <vargaz@gmail.com>
667         * debugger-agent.c (type_commands): Call mono_class_setup_methods () before
668         calling mono_class_num_methods (). Fixes #592244.
670 2010-04-14  Zoltan Varga  <vargaz@gmail.com>
672         * mini-x86.c (mono_arch_get_llvm_call_info): Handle empty structures correctly.
674         * mini-llvm.c: Disable LLVM for calls with non-default calling conventions.
676 2010-04-14  Zoltan Varga  <vargaz@gmail.com>
678         * method-to-ir.c (handle_box_inst): Merge into handle_box, simplify the merged
679         version.
680         * (handle_alloc): Ditto.
681         (mono_method_to_ir): Remove the constrained call restriction added by a previous
682         change, its not needed anymore.
684 2010-04-12  Zoltan Varga   Kumpera  <rkumpera@novell.com>
686         * mini-posix.c (sigusr1_signal_handler): Fix build on
687         non x86/amd64 systems.
689 2010-04-13  Zoltan Varga  <vargaz@gmail.com>
691         * method-to-ir.c (mono_method_to_ir): Disable generic sharing for constrained
692         calls where the constrained class needs a context. Fixes #595863.
694         * iltests.il.in: Add a test.
696 2010-04-13  Zoltan Varga  <vargaz@gmail.com>
698         * mini.c (mini_method_compile): Disable llvm+methods with clauses again, llvm
699         2.6/SVN seems to have broken support for them.
701 2010-04-13  Zoltan Varga  <vargaz@gmail.com>
703         * mini-llvm.c: Fix support for LLVM 2.6.
705 2010-04-10  Zoltan Varga  <vargaz@gmail.com>
707         * debugger-agent.c (thread_commands): Add a GET_ID command to get the
708         MonoInternalThread belonging to the thread.
710 Fri Apr 9 15:28:01 CEST 2010 Paolo Molaro <lupus@ximian.com>
712         * driver.c, optflags-def.h, ir-emit.h: introduce an unsupported
713         unsafe optimization that will remove bound checks.
715 2010-04-08  Kornel Pal  <kornelpal@gmail.com>
717         * method-to-ir.c (mini_emit_inst_for_method): Fix a typo that caused
718         CompareExchange not to be inlined for I8.
720         Contributed under MIT/X11 license.
722 2010-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
724         * array.cs: Add tests for cast between primitive array types.
726 2010-04-07 Andreia Gaita  <avidigal@novell.com>
728         * Makefile.am: create a convenience library for moon to link with
730 2010-04-07 Paolo Molaro <lupus@ximian.com>
732         * method-to-ir.c: optimize array accesses from generic interfaces.
734 2010-04-06  Zoltan Varga  <vargaz@gmail.com>
736         * mini-llvm.c: Update after the memset/memcpy intrinsics changes in LLVM SVN.
738 2010-04-05 Rodrigo Kumpera  <rkumpera@novell.com>
740         * method-to-ir.c (mono_method_to_ir): Handle call to virtual final methods
741         of marshalbyref classes.
743         Fixes #515884.
745 2010-04-05 Rodrigo Kumpera  <rkumpera@novell.com>
747         * aot-compiler.c (emit_exception_debug_info): Encode try holes
748         information.
750         * aot-runtime.c (decode_exception_debug_info): Decode try holes
751         information.
753         * mini.h: Increase AOT version.
755 2010-04-04  Andreas Faerber  <andreas.faerber@web.de>
757         * mini-x86.h: Only enable soft debugger when using sigaction or on
758         Windows. Fixes build on Haiku (lacks siginfo_t).
760         Code is contributed under MIT/X11 license.
762 2010-04-02  Andreas Faerber  <andreas.faerber@web.de>
764         * mini.h, mini-x86.h: Suppress sigaction for Haiku, add support for
765         BeOS-style signal handlers.
767         Code is contributed under MIT/X11 license.
768         
769 2010-04-02  Zoltan Varga  <vargaz@gmail.com>
771         * mini-posix.c (sigusr1_signal_handler): Fix openbsd support.
773 2010-04-01 Rodrigo Kumpera  <rkumpera@novell.com>
775         * mini-exceptions.c: Fix win32 build.
777 2010-04-01  Mark Probst  <mark.probst@gmail.com>
779         * mini.c, driver.c: Call mono_gc_base_init() before
780         mono_debug_init().
782 2010-04-01  Sebastien Pouliot  <sebastien@ximian.com>
784         * method-to-ir.c (ensure_method_is_allowed_to_[access_field|
785         call_method]): Delegate the actual work in security-core-clr.c
786         to ease code sharing.
788 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
790         * decompose.c (mono_decompose_opcode): Set the cfg exception if the unsupported
791         float conv.ovf.un opcodes are encountered, instead of asserting later.
792         Fixes #566296.
794 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
796         * decompose.c (mono_decompose_opcode): Add OP_ICONV_TO_U4_UN as a no-op.
798         * iltests.il.in: Add a test.
800 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
802         * mini-amd64.c (mono_arch_emit_call): Fail compilation if an argument is too
803         large. Fixes #567040.
805         * method-to-ir.c: Call CHECK_CFG_EXCEPTION after emitting a call.
807 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
809         * method-to-ir.c (handle_ccastclass): Call save_cast_details (). Fixes
810         #592711.
812 2010-03-31 Rolf Bjarne Kvinge <RKvinge@novell.com>
814         * mini-trampolines.c: Surround mono_handler_block_guard_trampoline and
815         mono_create_handler_block_trampoline with the proper #ifdef so that it
816         compiles on amd64.
818 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
820         * mini-exceptions.c: Introduce mono_walk_stack_full, which
821         allows to select if it's new or old context that is passed to 
822         the callback.
824         * mini-exceptions.c (mono_handle_exception_internal): Handle the
825         case when executing a guarded handler from the EH machinery.
827         * mini-exceptions.c (mono_install_handler_block_guard): New function
828         responsible for checking for handler blocks, installing the guard and
829         clearing abort state.
831         * mini-posix.c (sigusr1_signal_handler): Call mono_install_handler_block_guard
832         to check for handler blocks and skip interruption logic if one was found.
834         * mini-trampolines.c (mono_handler_block_guard_trampoline): Function called
835         by the handler block guard trampoline. Resumes interruption by raising the
836         pending ThreadAbortException.
838         * mini.c (create_jit_info): Calculate the end address of a finally block.
840         * mini-x86.c (mono_arch_install_handler_block_guard): Patch the return address
841         of a finally block to a specified address and return the old one.
843         * tramp-x86.c (mono_arch_create_handler_block_trampoline): The handler block
844         trampoline patches the original return address and calls the trampoline function.
846 2010-03-30  Zoltan Varga  <vargaz@gmail.com>
848         * mini-trampolines.c (mono_aot_trampoline): Remove some dead code.
850         * aot-runtime.c (mono_aot_patch_plt_entry): New helper function, which only
851         does the patching if the callee is in the same domain.
853         * aot-runtime.c mini-trampolines.c: Call mono_aot_patch_plt_entry instead
854         of mono_arch_patch_plt_entry ().
856 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
858         * mini.c (create_jit_info): Fix try block hole length encoding.
860 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
862         * mini.c (create_jit_info): Emit saner debug spew. Now it doesn't
863         duplicate information and print offsets instead of absolute addresses.
865 2010-03-29  Zoltan Varga  <vargaz@gmail.com>
867         * debugger-agent.c (jit_end): Send type loads for types loaded before the VMStart
868         event is sent. Fixes #591733.
870 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
872         * mini-posix.c (SIG_HANDLER_SIGNATURE): Handle the case when ctx is NULL on
873         OpenBSD.
875 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
877         * debugger-agent.c (mono_debugger_agent_init): Set the GC type of the
878         thread_to_tls hash table.
880         * image-writer.c (bin_writer_emit_writeout): Fix the size of the got.plt
881         section. Fixes #591000.
883 2010-03-26  Andreas Faerber  <andreas.faerber@web.de>
885         * Makefile.am (version.h): Check for pure .git directory only,
886         fixes SVN revision when using git without git-svn.
888         Contributed under MIT/X11 license.
890 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
892         * aot-runtime.c: Apply some openbsd changes from openbsd ports.
894 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
896         * basic-simd.cs: Test for vector x scalar binary operators.
898 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
900         * simd-intrincs.c (simd_intrinsic_emit_binary): Support binary
901         intrinsics with expanded scalar arguments.
903 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
905         * mini-exceptions.c (get_exception_catch_class): Non catch clauses
906         don't have an exception class, so don't decode it. This would crash
907         with filter clauses.
909 2010-03-24  U-anarquia\miguel  <miguel@anarquia>
911         Make sure that trunk builds with DISABLE_JIT, an update to the
912         PlayStation 3 port.
913         
914         * mini.c (mini_get_shared_method): this code seems to be necessary
915         regardless of whether DISABLE_JIT has been defined.
917         (mono_jit_compile_method_inner): it seems that this method is
918         required even in full AOT mode, so ifdef out only the pieces that
919         try to genrate code (the body of code that applies patches to the
920         code).  
922         (mini_method_compile): do not compile when using DISABLE_JIT.
924         * mini-ppc.c (mono_arch_get_allocatable_int_vars)
925         (mono_arch_output_basic_block, mono-arch_emit_exceptions): Do not
926         compile when DISABLE_JIT is set.
928 2010-03-24  Mark Probst  <mark.probst@gmail.com>
930         * mini.c (mono_create_tls_get): Only create a TLS operation if the
931         arch really supports it.
933 2010-03-24  Mark Probst  <mark.probst@gmail.com>
935         * mini-x86.c, mini-x86.h, mini.c: CEE_MONO_TLS support for Darwin/x86.
937 2010-03-23  Neale Ferguson <neale@sinenomine.net>
939         * exceptions-s390x.c: Add support for
940         mono_arch_get_throw_corlib_exception and fix throw by name.
942         * mini-s390x.c: Add IMT support; Fix stack parameter passing
943         logic (especially for varargs); Correct localloc sizing; Add
944         mono_arch_get_this_arg_from_call and
945         mono_arch_get_this_arg_from_call.
947         * mini-s390x.h: Add support for facility list extraction;
948         Correct/update MONO_ARCH_xxx settings.
950         * mini-s390.c: Minor corrections to instruction output for
951         varargs. No IMT implementation - I think it's time to deprecate
952         s390 and just leave s390x.
954         * tramp-s390x.c: Correct creation of trampoline instruction
957         * cpu-s390x.md: Update some instruction lengths
959 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
961         * mini-generic-sharing.c (fill_in_rgctx_template_slot): Remove an assert which
962         can be hit with partial sharing.
964         * mini-generic-sharing.c (get_shared_class): Handle partially shared methods
965         in non-shared classes correctly.
966         (generic_inst_is_sharable): Allow all primitive types in partial sharing.
967         Turn on partial sharing.
969 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
971         * mini-amd64.h: Put back MONO_ARCH_NOMAP32BIT for OpenBSD which was removed
972         by mistake.
974 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
976         * method-to-ir.c (mono_method_to_ir): Handle the failure of
977         mono_method_signature ().
979         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
981         * mini.c (mini_method_compile): Get the signature of cfg->method early with
982         error checking, so later calls do not need error checking.
984 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
986         * exceptions-amd64.c: Add support for OpenBSD which has no UCONTEXT_GREGS.
988         * mini-amd64.h: Enable MONO_ARCH_USE_SIGACTION on OpenBSD as well.
990 2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>
992         * mini-exceptions.c (mono_handle_exception_internal): Don't
993         check try_end for archs different than s390. 
995         * mini.c (create_jit_info): Don't crash if the finallt block is the
996         last one.
998 2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>
1000         * driver.c (mono_main): Don't free global codeman under linux since
1001         glic now peeks at code on stack for more archs than just amd64.
1003 Mon Mar 22 18:09:09 CET 2010 Paolo Molaro <lupus@ximian.com>
1005         * mini.c, method-to-ir.c: changes to support compressed interface
1006         bitmaps.
1008 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
1010         * mini-x86.h: Applied patch from Robert Nagy (Robert@openbsd.org).
1011         Use sigaction on OpenBSD too.
1013 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
1015         * debugger-agent.c (event_req_matches_assembly): Handle request modifiers too.
1017 2010-03-21  Andreas Faerber  <andreas.faerber@web.de>
1019         * debugger-agent.c: #include sys/select.h for fd_set.
1021         Code is contributed under MIT/X11 license.
1023 2010-03-21  Zoltan Varga  <vargaz@gmail.com>
1025         * mini.c (SIG_HANDLER_SIGNATURE): Fix the build on platforms without sigaction
1026         (openbsd+amd64 ?).
1028 2010-03-21  Zoltan Varga  <vargaz@gmail.com>
1030         * mini-ppc.c (mono_arch_emit_exceptions): Avoid an assert in ppc_patch () for
1031         some large methods with lots of exception handlers. Fixes #440924.
1033 Sat Mar 20 11:56:24 CET 2010 Paolo Molaro <lupus@ximian.com>
1035         * method-to-ir.c: remove code duplication for interface checks.
1037 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
1039         * debugger-agent.c (clear_event_requests_for_assembly): New helper function.
1040         (assembly_unload): Clear all event requests referencing the to-be unloaded
1041         assembly.
1044 Fri Mar 19 16:45:20 CET 2010 Paolo Molaro <lupus@ximian.com>
1046         * mini.h, mini-exceptions.c: restore the state of the stack
1047         guard page permissions.
1049 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
1051         * mini-trampolines.c (common_call_trampoline): Remove the condition guarding the
1052         call site patching code, it doesn't appear to be needed.
1054 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
1056         * mini-generic-sharing.c: Add infrastructure for partial sharing, ie.
1057         sharing generic methods whose type arguments are a mix of reference and
1058         non-reference types. Not yet turned on.
1060         * mini.c (mini_get_shared_method): New helper function to return
1061         the method which will be compiled/registered in the JIT tables when doing
1062         generic sharing.
1063         (mono_domain_lookup_shared_generic): Moved to mini.c from mini-generic-sharing.c,
1064         use mini_get_shared_method ().
1066         * mini.c (mini_method_compile): Register the same method which is compiled when
1067         doing generic sharing.
1069         * mini.c aot-compiler.c aot-runtime.c: Add support for partial sharing.
1071         * generics.cs: Add partial sharing tests.
1073 2010-03-17 Jerry Maine  <crashfourit@gmail.com>
1075         * mini.h : Changed the SIMD_VERSION* enum values to match those in Mono.Simd.AccelMode.
1076                    Add an enum value that or's all possable values together. Add an enum value
1077                    that marks the end of the used bit indexes.
1079         * mini-amd64.c : Make changes to match the changes in mini.h 
1081         * mini-x86.c : Make changes to match the changes in mini.h
1083         * simd-intrinsics.c : Reorder the SimdIntrinsc struct to add more bits to
1084                    simd_version to support more simd versions. Changed the name of
1085                    simd_version to simd_version_flags to make it more intuitive that
1086                    it now contains bit flags. Reordered the *_intrinsics arrays to
1087                    match the changes above. Changed emit_intrinsics() to use the new
1088                    setup mentioned above.
1090         Code is contributed under MIT/X11 license.
1092 2010-03-17 Rodrigo Kumpera  <rkumpera@novell.com>
1094         * mini-*.c (mono_arch_output_basic_block): Record try block holes on all
1095         remaining archs. Alpha and hppa maintainers, please stand up.
1097 2010-03-17  Zoltan Varga  <vargaz@gmail.com>
1099         * mini-ppc.c (mono_arch_build_imt_thunk): Always save and restore r11 since it
1100         is needed even when fail_tramp!=NULL.
1102 2010-03-17  Zoltan Varga  <vargaz@gmail.com>
1104         * debugger-agent.c (insert_breakpoint): Write a log message.
1106 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
1108         * iltests.il.in: Add a few tests for LEAVE going over multiple
1109         finally clauses.
1111 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
1113          * mini-x86.c (mono_arch_output_basic_block): Record try block holes.
1115 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
1117         * mini.h (MonoBasicBlock): Add native_length field.
1118         * mini.h (MonoCompile): Add try_block_holes field.
1119         * mini.h (MonoInst): Add exception_clause pointer to
1120         the data union.
1122         * mini.c (mono_codegen): Calculate MonoBasicBlock::native_length.
1123         * mini.c (mono_cfg_add_try_hole): New function to register possible
1124         holes in try blocks.
1125         * mini.c (create_jit_info): Fill in the holes information.
1127         * mini-exceptions.c: Verify for holes when checking if an IP is covered
1128         by a try block.
1130         * method-to-ir.c: Add the EH clause to the CALL_HANDLE instruction.
1132 Tue Mar 16 13:16:16 CET 2010 Paolo Molaro <lupus@ximian.com>
1134         * jit-icalls.c: adjusted for the array API changes.
1136 2010-03-16  Zoltan Varga  <vargaz@gmail.com>
1138         * iltests.il.in: Disable the fconv_to_i test on sparc too.
1140 2010-03-16  Zoltan Varga  <vargaz@gmail.com>
1142         * debugger-agent.c: Simplify the way breakpoints are processed by removing
1143         the 'pending' flag. This fixes support for appdomains too.
1146 Mon Mar 15 18:25:49 CET 2010 Paolo Molaro <lupus@ximian.com>
1148         * mini-amd64.c, mini-ia64.c: remove direct access to method->header.
1150 2010-03-12  Zoltan Varga  <vargaz@gmail.com>
1152         * simd-intrinsics.c (simd_intrinsic_emit_getter): Don't emit shuffle opcodes
1153         when using LLVM, LLVM generates it itself when needed.
1155         * mini-llvm-cpp.cpp (mono_llvm_build_aligned_load): New helper function.
1157         * mini-llvm.c: Use an unaligned load for OP_LOADX_MEMBASE. Add zero extension
1158         to some OP_EXTRACT_ opcodes. Fix the naming of some sse intrinsics. Fix
1159         OP_ANDNPS/OP_ANDNPD.
1161 2010-03-11  Zoltan Varga  <vargaz@gmail.com>
1163         * tramp-x86.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code' for
1164         the pc instead of 'buf'. Fix the call to mono_arch_flush_icache ().
1165         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
1167 2010-03-11  Martin Baulig  <martin@ximian.com>
1169         * debugger-agent.c (type_commands): Add NULL check to
1170         `CMD_TYPE_GET_SOURCE_FILES'.
1172 2010-03-09  Zoltan Varga  <vargaz@gmail.com>
1174         * mini-ppc.c (mono_arch_decompose_opts): Fix OP_ICONV_TO_R_UN when cross-compiling.
1176 2010-03-09  Zoltan Varga  <vargaz@gmail.com>
1178         * mini-codegen.c (mono_peephole_ins): Fix the OP_FMOVE optimization. Fixes
1179         #586664.
1181         * iltests.il.in: Add a test.
1183 2010-03-05  Martin Baulig  <martin@ximian.com>
1185         Add support for aborting invocations.
1187         * debugger-agent.c
1188         (InvokeData): Added `InvokeData *last_invoke'.
1189         (DebuggerTlsData): Renamed `invoke' into `pending_invoke' and
1190         added a new `invoke' field to keep the `InvokeData *' throughout
1191         the invocation.
1192         (ErrorCode): Added `ERR_NO_INVOCATION'.
1193         (CmdVM): Added `CMD_VM_ABORT_INVOKE'.
1194         (mono_debugger_agent_handle_exception): Don't report any exception
1195         if an abort was requested.
1196         (invoke_method): Store the `InvokeData *' in `tls->invoke'; reset
1197         a thread abort if necessary.
1198         (vm_commands): Implement `CMD_VM_ABORT_INVOKE'.
1200 2010-03-08  Rodrigo Kumpera  <rkumpera@novell.com>
1202         * method-to-ir.c: Store the initial basic block returned by mono_basic_block_split
1203         so we can release the whole list and not just the first one. Free
1204         it in more places as well.
1206 2010-03-08  Rodrigo Kumpera  <rkumpera@novell.com>
1208         * method-to-ir.c: Revert r153222 as it doesn't belong here.
1210 Mon Mar 8 17:58:26 CET 2010 Paolo Molaro <lupus@ximian.com>
1212         * mini.h, *.c: prepare for MonoMethodHeader to become a transient entity.
1214 Mon Mar 8 17:35:26 CET 2010 Paolo Molaro <lupus@ximian.com>
1216         * driver.c: report also other misc build options.
1218 2010-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
1220         * method-to-ir.c: Generate better code for the NewObject
1221         intrinsic.
1222         
1223 2010-03-07  Zoltan Varga  <vargaz@gmail.com>
1225         * branch-opts.c (mono_if_conversion): Disable one of the cases when deadce
1226         is disabled. Fixes #582322.
1228         * iltests.il.in: Add a test.
1230 2010-03-06  Zoltan Varga  <vargaz@gmail.com>
1232         * tramp-amd64.c (mono_arch_create_monitor_exit_trampoline_full): Delegate
1233         the handling of obj->synchronization == null and owner != current thread to
1234         mono_monitor_exit ().
1236         * tramp-x86.c (mono_arch_create_monitor_exit_trampoline_full): Ditto.
1239 Sat Mar 6 18:14:15 CET 2010 Paolo Molaro <lupus@ximian.com>
1241         * mini.c: change the way emulated opcode info is stored and save about
1242         4 KB of runtime memory.
1244 2010-03-04  David S. Miller  <davem@davemloft.net>
1246        * mini-sparc.h: Always use MONO_ARCH_USE_SIGACTION.  Linux kernels
1247        that don't provide the siginfo in the second signal handler argument
1248        are buggy, and this has been fixed for years.
1249        * mini.h (GET_CONTEXT): Remove __sparc__ special case.
1250        (SIG_HANDLER_SIGNATURE, SIG_HANDLER_PARMS): Likewise.
1252 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
1254         * aot-runtime.c (find_symbol): Fix a leak.
1255         (decode_patch): Ditto.
1257 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
1259         * mini.h (MONO_INST_IS_TEMP): Kill this unused define.
1261 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
1263         * mini.c (mono_resolve_patch_target): Fix an uninitialized variable.
1265 Wed Mar 3 19:19:21 CET 2010 Paolo Molaro <lupus@ximian.com>
1267         * method-to-ir.c: MONO_PROFILE_STRING_ALLOC is dead.
1269 2010-03-03  Rodrigo Kumpera  <rkumpera@novell.com>
1271         * method-to-ir.c (mono_method_to_ir): Don't create a runtime vtable
1272         to check for errors, it's enough to create the metadata open.
1274         Fixes #562150
1276 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
1278         * trace.c|h:
1279         * mini-exceptions.c: Add support for printing stack traces when handling
1280         exceptions, and when printing exceptions thrown while tracing also print
1281         the exception message.
1283 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
1285         * trace.c: We need to parse exclude tokens ('-') before string tokens,
1286         since the exclude token is a valid string character.
1288 2010-03-02  Levi Bard  <levi@unity3d.com>
1290         * debugger-agent.c: Invalidate thread stacks on domain unload.
1292 2010-03-02  Mark Probst  <mark.probst@gmail.com>
1294         * method-to-ir.c: Emit dummy_use for stored reference after write
1295         barriers to make sure the object is pinned if the GC interrupts
1296         before the write barrier is done.
1298 2010-03-02  Zoltan Varga  <vargaz@gmail.com>
1300         * cpu-<ARCH>.md: dummy_use was missing src1:i.
1302 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
1304         * debugger-agent.c: Add a log message printing the protocol version.
1306 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
1308         * debugger-agent.c: Add a new command to communicate the protocol version used
1309         by the client. This could be used to allow newer runtimes to communicate with
1310         older clients.
1312 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
1314         * debugger-agent.c (domain_commands): Add a new command to create a boxed value.
1316 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
1318         * debugger-agent.c (type_commands): Fix the setting of fields with a reference
1319         type.
1321 Mon Mar 1 15:20:44 CET 2010 Paolo Molaro <lupus@ximian.com>
1323         * mini-arm.c: make the arm cpu arch configurable with the
1324         MONO_CPU_ARCH env var (for example: "armv4 thumb").
1325         Bug #584198.
1327 Mon Mar 1 14:48:35 CET 2010 Paolo Molaro <lupus@ximian.com>
1329         * mini.c, mini.h, driver.c: added the --jitmap option to enable
1330         support for the perf tool on Linux.
1332 Mon Mar 1 14:43:55 CET 2010 Paolo Molaro <lupus@ximian.com>
1334         * method-to-ir.c: make string.InsertenalSetChar() specialization
1335         effective.
1337 2010-03-01  Robert Jordan  <robertj@gmx.net>
1339         * Makefile.am: fix the non-static build.
1341 2010-02-26  Zoltan Varga  <vargaz@gmail.com>
1343         * mini-generic-sharing.c: Move the contents of ../metadata/generic-sharing.c
1344         here.
1346 2010-02-26  Robert Jordan  <robertj@gmx.net>
1348         * tasklets.c (continuation_store): Return from an error condition
1349         immediately.
1351 2010-02-26  Martin Baulig  <martin@ximian.com>
1353         * debug-debugger.c (MonoDebuggerInfo): Added `abort_runtime_invoke'.
1355         * debug-mini.c
1356         (MonoDebuggerThreadInfo): Added `internal_flags'.
1357         (MonoDebuggerInternalThreadFlags): New enum.
1358         (_mono_debugger_throw_exception): Don't signal the debugger if a
1359         type abort was requested.
1360         (_mono_debugger_unhandled_exception): Likewise.
1361         (mono_debugger_abort_runtime_invoke): New method to abort an invocation.
1362         (mono_debugger_runtime_invoke): If the debugger requested a thread
1363         abort during the invocation, reset it here.
1365 2010-02-26  Martin Baulig  <martin@ximian.com>
1367         * debug-mini.c (MonoDebuggerThreadInfo): Use `MonoInternalThread *'
1368         instead of `MonoThread *'.
1370 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
1372         * aot-runtime.c (mono_aot_find_jit_info): Use a merge sort for sorting the
1373         code offsets table, as it is mostly sorted.
1375 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
1377         * debugger-agent.c (do_invoke_method): Fix invoking of static methods on vtypes.
1378         Fixes #582991.
1380 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
1382         * driver.c (mono_main): Get rid of mono_setup_vtable_in_class_init.
1384 Wed Feb 24 15:58:03 CET 2010 Paolo Molaro <lupus@ximian.com>
1386         * Makefile.am: build the new ABI version of the libmono library.
1387         * debugger-agent.c, mini.c: fix warnings with the new API.
1388         * jit.h: don't depend on glib.h being included.
1390 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
1392         * method-to-ir.c (mono_method_to_ir): Implement AOT support for fast TLS access.
1394 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
1396         * method-to-ir.c (mono_method_to_ir): Implement support for fast access to
1397         ThreadStatic variables.
1399 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
1401         * debugger-agent.c (notify_thread): Skip terminated threads, since their tls
1402         data is not freed yet. Fixes #582460.
1404 2010-02-23  Zoltan Varga  <vargaz@gmail.com>
1406         * debugger-agent.c: Add support for the caught/uncaught flags on exception
1407         event requests. Bump protocol minor version.
1409 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
1411         * decompose.c (mono_decompose_long_opts): Handle OP_LCONV_TO_OVF_I8 here too.
1413 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
1415         * decompose.c (mono_decompose_opcode): Handle OP_LCONV_TO_OVF_I8. Fixes
1416         #581950.
1418         * iltests.il.in: Add a test.
1420 2010-02-22  Rodrigo Kumpera  <rkumpera@novell.com>
1422         * mini.c (inline_method): Check for loader errors.
1424 2010-02-22  Rodrigo Kumpera  <rkumpera@novell.com>
1426         * mini.c (mono_method_check_inlining): Use !mono_method_get_header_summary
1427         instead of mono_method_get_header as it doesn't decode locals
1428         so the called method can have unresolved dependencies that will only
1429         be satisfied after the current method is JIT'd.
1431         Fixes #550968.
1433 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
1435         * basic.cs (test_0_div_opt): Speed this up a bit.
1437 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
1439         * mini-amd64.c: Fix DISABLE_JIT support after the latest changes.
1441         * mini.c (mono_jit_create_remoting_trampoline): Call
1442         mono_create_specific_trampoline () instead of
1443         mono_arch_create_specific_trampoline ().
1445         * mini-trampolines.c tramp-arm.c: Disable more stuff when DISABLE_JIT is set.
1447 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
1449         * unwind.c (mono_unwind_get_cie_program): New function, moved here from
1450         aot-compiler.c, so it can be found even if DISABLE_JIT is set.
1452         * aot-compiler.c xdebug.c: Update callers of mono_arch_unwind_get_cie_program ().
1454         * mini-amd64.c: Fix DISABLE_JIT support.
1456 2010-02-20  Geoff Norton  <gnorton@novell.com>
1458         * aot-runtime.c: Ensure we dont leak a held lock when unwinding exceptions.
1460 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
1462         * debugger-agent.c (mono_debugger_agent_handle_exception): Receive two contexts,
1463         one for the throw and one for the catch. Mark uncaught exceptions by a NULL
1464         CATCH_TXT. Send normal exception events for unhandled exceptions too.
1465         (mono_debugger_agent_handle_unhandled_exception): Remove this, merged into
1466         handle_exception.
1468 2010-02-18  Zoltan Varga  <vargaz@gmail.com>
1470         * exceptions-x86.c (mono_arch_get_restore_context): Changes this so it restores
1471         edx/ecx too. This is needed to support OP_SEQ_POINT.
1473 2010-02-18  Zoltan Varga  <vargaz@gmail.com>
1475         * exceptions-amd64.c (get_throw_trampoline): Add xdebug info.
1477         * method-to-ir.c (mono_method_to_ir): Fix SIZEOF in dynamic methods.
1479 2010-02-16  Zoltan Varga  <vargaz@gmail.com>
1481         * mini-llvm.c aot-compiler.c aot-runtime.c unwind.c: Finish support
1482         LLVM+AOT+exceptions, not enabled yet.
1484 2010-02-15  Zoltan Varga  <vargaz@gmail.com>
1486         * mini.c (SIG_HANDLER_SIGNATURE): Fix the windows build.
1488 2010-02-15  Zoltan Varga  <vargaz@gmail.com>
1490         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Emit
1491         xdebug info for these.
1493         * mini-trampolines.c (common_call_trampoline): Use mini_jit_info_table_find ()
1494         in a few places.
1496         * mini.c (mini_get_vtable_trampoline): Make this take a 'slot_index' argument,
1497         not used yet.
1499 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
1501         * aot-compiler.c (load_profile_files): Update after the profiler changes.
1503 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
1505         * mini.c (mono_jit_compile_method_inner): Avoid passing icall wrappers to
1506         mono_profiler_method_end_jit, since the profiler has no way to process wrappers.
1508         * aot-runtime.c mini.c: Resurrect the aot pagefault profiling stuff, it is useful
1509         for mtouch.
1511 2010-02-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
1513         * debugger-agent.c: handle incomplete reads and EINTR in
1514         recv()/send(). This could have been causing random
1515         disconnections.
1517 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
1519         * aot-runtime.c (decode_exception_debug_info): Fix aot support for sequence
1520         points.
1522         * mini-arm.c (mono_arch_allocate_vars): Allocate the seq point related vars first
1523         so they have small offsets. Fixes #566311.
1525 2010-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
1527         * method-to-ir.c (mono_method_check_inlining): Check for loader errors.
1529 2010-02-11  Zoltan Varga  <vargaz@gmail.com>
1531         * mini-amd64.c: Remove the special casing of byref in a few places now that
1532         mini_type_get_underlying_type () handles it.
1534         * mini-generic-sharing.c (mini_type_get_underlying_type): Handle byref as well
1535         by returning native int. Fixes #577984.
1537 2010-02-11  Zoltan Varga  <vargaz@gmail.com>
1539         * method-to-ir.c (handle_isinst): Factor out the is_complex_isinst check into
1540         a macro.
1542         * mini-llvm.c (exception_cb): Put the clause index into the type info instead
1543         of putting the clause itself.
1545         * mini-arm.c mini.c linear-scan.c: Disable more stuff when DISABLE_JIT is used.
1547 2010-02-09  Zoltan Varga  <vargaz@gmail.com>
1549         * unwind.c (mono_unwind_frame): Use read32 for reading a 32 bit value, since it
1550         might be unaligned.
1552 2010-02-10  Geoff Norton  <gnorton@novell.com>
1554         * aot-compiler.c: Make the number of IMT trampolines configurable as well.
1556 2010-02-08  Zoltan Varga  <vargaz@gmail.com>
1558         * aot-compiler.c (emit_code): Create the ut trampolines here, so they work for
1559         llvm methods too.
1561         * aot-compiler.c (emit_code): Don't add the llvm label prefix to 'methods', since
1562         it is not an LLVM generated symbol.
1564         * mini-llvm.c (emit_entry_bb): Fix the handling of simd types.
1566         * method-to-ir.c (handle_castclass): Turn off the more efficient isinst/castclass
1567         implementation in gshared mode because it causes regressions.
1569         * mini-trampolines.c: Add a stat for the number of calls to trampolines.
1571         * image-writer.c (asm_writer_emit_global): Don't prepend the global prefix, it
1572         should be done by the caller.
1574         * mini-llvm.c (mono_llvm_emit_method): Don't make the debug symbols global.
1576         * aot-compiler.c (emit_code): Add the llvm label prefix before 'methods'.
1578         * mini-exceptions.c (mini_jit_info_table_find): Search the root domain as well,
1579         since mono_jit_info_table_find () doesn't do it anymore.
1581         * mini-generic-sharing.c debugger-agent.c: Call mini_jit_info_table_find ()
1582         instead of mono_jit_info_table_find ().
1584 2010-02-07  Zoltan Varga  <vargaz@gmail.com>
1586         * aot-compiler.c aot-runtime.c: Add support for MONO_WRAPPER_WRITE_BARRIER.
1588         * aot-compiler.c (encode_method_ref): Update after the removal of
1589         mono_gc_get_managed_allocator_type ().
1591         * method-to-ir.c (mono_method_to_ir): Place a seq point just before a RET.
1592         Fixes #564538.
1594 2010-02-06  Zoltan Varga  <vargaz@gmail.com>
1596         * method-to-ir.c (handle_castclass): Use the icall for classes with variant
1597         generic params as well.
1598         (handle_isinst): Ditto.
1600         * method-to-ir.c: Make isninst/castclass checks in gshared code more efficient
1601         instead of always calling an icall.
1603         * aot-compiler.c (emit_llvm_file): Take into account trampolines etc when
1604         computing the size of the got.
1606         * aot-compiler.c (emit_code): Change the way the 'methods' symbol is emitted
1607         when using LLVM. Instead of emitting it as an LLVM method, emit it using
1608         the assembly directive '.set' so it points to the first LLVM emitted method.
1610 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
1612         * mini.c (mini_method_verify): Report the method which failed to verify.
1614 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
1616         * method-to-ir.c (mono_method_to_ir): Use the new basic block formation pass
1617         to avoid JIT'ng dead basic blocks. This is the same behavior as the
1618         runtime MS verifier.
1620 2010-02-04  Zoltan Varga  <vargaz@gmail.com>
1622         * debugger-agent.c (decode_value): Fix decoding of vtype instances. Fixes
1623         #561962.
1625 2010-02-04  Zoltan Varga  <vargaz@gmail.com>
1627         * mini-llvm.c: Init the jit module only when first JITting.
1629         * aot-compiler.c (emit_plt): Fix the naming of plt entries of llvm+darwin.
1631         * mini-llvm.c (get_plt_entry): Make the plt entries have hidden visibility.
1633         * mini-llvm.c (mono_llvm_emit_aot_module): Remove the dummy got after it is
1634         replaced with the real got.
1636         * debugger-agent.c (type_commands): Return the enumness if the type as well.
1638         * image-writer.c: Reduce the amount of #ifdefs a bit.
1640         * aot-compiler.c: Reduce the amount of #ifdefs. Add beginnings of support for
1641         llvm on darwin/arm.
1643         * aot-compiler.c (mono_compile_assembly): Handle asmonly+llvm mode.
1645         * mini-llvm.c (mono_llvm_emit_method): Don't make the 'type_info' symbols
1646         global.
1648 2010-02-02  Zoltan Varga  <vargaz@gmail.com>
1650         * mini-llvm.c (mono_llvm_emit_method): Add support for unaligned loads.
1651         (mono_llvm_emit_method): Fix unaligned stores too.
1653         * mini-amd64.c (mono_arch_emit_prolog): Initialize lmf->rsp in the prolog too
1654         so async stack walks don't crash.
1656 2010-02-02  Zoltan Varga  <vargaz@gmail.com>
1658         * mini-trampolines.c (common_call_trampoline): Fix a problem where the callsite
1659         was not patched if the callee needed an rgctx trampoline.
1661 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1663         * mini-ppc.c (mono_arch_get_global_int_regs): Reserve r29 for holding the
1664         vtable address in AOT code.
1666 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1668         * mini-codegen.c: Remove support for CEE_ opcodes which cannot occur in
1669         MonoInst's.
1671 Mon Feb 1 16:29:10 CET 2010 Paolo Molaro <lupus@ximian.com>
1673         * genmdesc.pl: remove dependency on external cpp.
1675 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1677         * method-to-ir.c (mini_emit_ldelema_1_ins): Avoid emitting an OP_SEXT_I4 when
1678         using LLVM, its not needed, and abcrem can't handle it.
1680 Mon Feb 1 14:29:43 CET 2010 Paolo Molaro <lupus@ximian.com>
1682         * genmdesc.c, genmdesc.pl, cpu-x86.md: introduced templates to make
1683         it easier to group instructions and reduce duplication.
1685 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1687         * decompose.c: Move the array/soft float decompose routines here from
1688         method-to-ir.c.
1690         * method-to-ir.c: Export a few functions so they can be used from decompose.c.
1692 2010-01-31  Zoltan Varga  <vargaz@gmail.com>
1694         * mini-llvm.c (mono_llvm_emit_method): Add a call to llvm.invariant.start
1695         to tell LLVM that the got is constant, not used yet.
1697         * aot-compiler.c: Pass more optimization flags to llvm's 'opt'.
1699 2010-01-30  Zoltan Varga  <vargaz@gmail.com>
1701         * mini-ppc.c (mono_arch_emit_prolog): Fix full aot support for native to
1702         managed wrappers.
1704 2010-01-30  Zoltan Varga  <vargaz@gmail.com>
1706         * aot-compiler.c (add_wrappers): Commit the hack which generates
1707         native-to-managed wrappers for methods decorated with the MonoPInvokeCallback
1708         custom attribute.
1710 2010-01-29  Zoltan Varga  <vargaz@gmail.com>
1712         * mini.h (MONO_INST_FAULT): New instruction flag for loads which can cause
1713         a fault, only used by the LLVM backend.
1715         * ir-emit.h: Add _FAULT variants of the LOAD_MEMBASE macros. Mark
1716         OP_CHECK_THIS with OP_IMPLICIT_EXCEPTION.
1718         * method-to-ir.c: Use the new LOAD_MEMBASE_FAULT opcodes, get rid of the
1719         calls to MONO_EMIT_NULL_CHECK which is automatically done by the new macros.
1721         * mini-llvm.c: Only generate volatile loads from load instructions which have
1722         the MONO_INST_FAULT flag set.
1724 2010-01-29  Zoltan Varga  <vargaz@gmail.com>
1726         * unwind.c (mono_unwind_decode_fde): Fix the decoding of the LSDA offset on
1727         64 bit platforms.
1729 2010-01-28  Zoltan Varga  <vargaz@gmail.com>
1731         * mini.c (mono_save_seq_point_info): Fix the handling of bblocks without
1732         sequence points. Fixes #571236.
1734 2010-01-28  Zoltan Varga  <vargaz@gmail.com>
1736         * debugger-agent.c (mono_debugger_agent_init): Call appdomain_unload at the
1737         end of the appdomain unload process, after assemblies have been unloaded.
1738         Fixes #574842.
1740 2010-01-27  Zoltan Varga  <vargaz@gmail.com>
1742         * abcremoval.c (process_block): Fix the if (region) check so abcrem actually
1743         works.
1745         * mini-amd64.c: Make the soft debugger work on platforms without MAP_32BIT.
1746         Fixes #573988.
1748 2010-01-26  Zoltan Varga  <vargaz@gmail.com>
1750         * dwarfwriter.c (emit_type): Treat MONO_TYPE_PTR as 'I' not 'I4'.
1752 2010-01-26  Geoff Norton  <gnorton@novell.com>
1754         * aot-compiler.c: Fix a logic error introduced when guarding against enums
1755         with struct marshalability.
1757 2010-01-24  Zoltan Varga  <vargaz@gmail.com>
1759         * mini.c (mini_method_compile): Improve the processing MONO_VERBOSE_METHOD so
1760         it supports class names as well.
1762         * mini.h (MonoCompile): Add a few flags to control JIT behavior which are
1763         needed by the GC map code.
1765         * mini.c (mini_method_compile): Call a function in mini-gc.c to set the new
1766         flags if needed.
1768         * method-to-ir.c (mono_method_to_ir): Emit initialization code for ref variables
1769         if cfg->init_ref_vars is set.
1771         * liveness.c (optimize_initlocals): Disable the initlocals opt for ref vars if
1772         cfg->disable_initlocals_op_refs is set.
1774         * method-to-ir.c (mono_spill_global_vars): Compute more precise live ranges
1775         using liveness info if cfg->compute_precise_live_ranges is set.
1777         * mini-gc.c: Ongoing work. Improve logging and debugging support. Handle
1778         volatile variables correctly. Add comments about the live ranges. Not enabled
1779         yet.
1781 2010-01-24  Zoltan Varga  <vargaz@gmail.com>
1783         * mini.h (MonoDebugOptions): Add an option to init stack frames by writing
1784         0x2a into them in method prologs.
1786         * mini-amd64.c (mono_arch_emit_prolog): Implement it.
1788 2010-01-22  Zoltan Varga  <vargaz@gmail.com>
1790         * mini-llvm-cpp.cpp: Remove uses of dynamic_cast, it no longer works with llvm
1791         classes, since llvm is compiled with -fno-rtti.
1793         * mini.h (COMPILE_SOFT_FLOAT): New macro, similar to COMPILE_LLVM.
1795         * method-to-ir.c ir-emit.h: Use if (COMPILE_SOFT_FLOAT) in a few places since
1796         llvm does not require it.
1798         * aot-runtime.c (load_method): Print the full name of the last aot method.
1800 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1802         * exceptions-amd64.c (mono_arch_notify_pending_exc): Avoid a crash if the
1803         thread has not fully started yet.
1805 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1807         * aot-compiler.c (can_marshal_struct): Allow marshalling enums.
1809 2010-01-21  Miguel de Icaza  <miguel@novell.com>
1811         * driver.c: Do not abort if LLVM is not supported, print a
1812         warning and add the information to the Mono JIT information.
1814 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1816         * ir-emit.h (MONO_EMIT_NULL_CHECK): Don't emit an OP_IMPLICIT_EXCEPTION when
1817         using explicit null checks.
1819 2010-01-20  Zoltan Varga  <vargaz@gmail.com>
1821         * xdebug.c: New file extracted from aot-compiler.c, containing the XDEBUG
1822         related code.
1824         * aot-compiler.c (encode_method_ref): Use mono_marshal_wrapper_info_from_wrapper
1825         () in one place.
1826         (mono_aot_wrapper_name): Remove the special handling of delegate invoke wrappers,
1827         its no longer needed.
1829         * method-to-ir.c (mono_method_to_ir): Fix a warning.
1831         * exceptions-<ARCH>.c: Introduce a MONO_ARCH_HAVE_THROW_EXCEPTION_BY_NAME
1832         define for platforms still using it (s390). Get rid of the
1833         mono_arch_get_throw_exception_by_name () routines on all other platforms.
1835         * exceptions-x86.c: Rework the throw trampolines so there is only one function
1836         which can generate throw/rethrow/corlib trampolines for llvm/not llvm code.
1838         * exceptions-x86.c: Add LLVM specific throw trampolines which doesn't assume
1839         the caller pushed the arguments.
1841         * mini-llvm.c: Enable throwing exceptions on x86.
1843         * mini-posix.c (SIG_HANDLER_SIGNATURE): Avoid
1844         "Thread (nil) may have been prematurely finalized" messages if this is called
1845         on a thread not registered with the runtime.
1847         * mini-exceptions.c (mono_handle_native_sigsegv): Ditto.
1849 2010-01-19  Zoltan Varga  <vargaz@gmail.com>
1851         * jit-icalls.c (mono_array_new_3): New jit icall.
1853         * aot-compiler.c aot-runtime.c: Add support for ElementAddr wrappers.
1855         * arrays.cs: Add a test for 3 dimensional arrays.
1857 2010-01-19  Zoltan Varga  <vargaz@gmail.com>
1859         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Emit xdebug info.
1860         (mono_arch_find_jit_info_ext): Disable the popping of arguments when LLVM is
1861         used.
1863         * mini-llvm.c (emit_cond_system_exception): Abort when an implicit exception is
1864         thrown on x86.
1866         * unwind.c (mono_unwind_decode_fde): Fix an assert on x86.
1868         * mini-x86.h (MONO_CONTEXT_SET_LLVM_EXC_REG): Define this for x86.
1870         * mini-llvm.c: Disable OP_THROW on x86, it doesn't work yet.
1872 2010-01-18  Bill Holmes  <billholmes54@gmail.com>
1874         * debugger-agent.c : Changing the PLATFORM_WIN32 preprocessor check to
1875           HOST_WIN32.  Also including winsock2. to define struct in_addr.
1877         * mini-amd64.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
1879         * mini-x86.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
1881         Code is contributed under MIT/X11 license.
1883 2010-01-18  Zoltan Varga  <vargaz@gmail.com>
1885         * mini.h (MonoCompile): Add 'disable_out_of_line_bblocks' flag.
1887         * branch-opts.c (mono_optimize_branches): Honor the new flag.
1889         * mini.c (mini_method_compile): Set the new flag when running under the
1890         debugger.
1892 2010-01-18  Zoltan Varga  <vargaz@gmail.com>
1894         * mini-gc.c: Change the GC map to use a ref/noref/pin value instead of just
1895         a ref/noref value + a global pin flag, so parts of stack frames can still be
1896         precisely marked even if they include stuff which needs pinning. Improve logging.
1897         Fix many bugs. Not enabled yet.
1899         * gc-test.cs: Add a few tests.
1901         * liveness.c (mono_analyze_liveness): Make the debug output controllable by
1902         the normal -v options. Avoid propagating liveness information through bblocks
1903         which end with a NOT_REACHED opcode.
1905         * mini.c (mono_jit_compile_method_inner): Avoid reading cfg->prof_options
1906         after cfg has been freed.
1908 2010-01-17  Zoltan Varga  <vargaz@gmail.com>
1910         * branch-opts.c (mono_branch_optimize_exception_target): Stop the optimization
1911         if a clause is skipped because it uses the exception object, since it could
1912         have caught the exception.
1914         * exceptions.cs: Add a test.
1916 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1918        * mini-trampolines.c (mono_create_static_rgctx_trampoline): Add an assert.
1920         * aot-runtime.c (mono_aot_get_method): Handle ftnptr's correctly for the
1921         ICollection<T> wrappers.
1923 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1925         * debugger-agent.c (decode_value): Fix the decoding of I/U/PTR.
1927 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1929         * mini-amd64.c (emit_call_body): Always use near calls when AOTing even if
1930         NOMAP32BIT or optimize_for_xen is set.
1932 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
1934         * aot-compiler.c aot-runtime.c: Get rid of mono_aot_str_hash (), use
1935         mono_metadata_str_hash () instead.
1937 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
1939         * ir-emit.h (MONO_EMIT_NEW_ICOMPARE_IMM): Use sizeof (mgreg_t) instead of
1940         sizeof (void*).
1942         * unwind.c (mono_unwind_frame): Use mgreg_t instead of gssize.
1944 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
1946         * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): Emit an explicit null check if the
1947         flag is set.
1949         * mini-ppc.c (mono_arch_emit_exceptions): Compute the size of the exception
1950         throwing code correctly.
1952         * mini.h (MONO_AOT_FILE_VERSION): Bump this because of the IMT hashing changes.
1954 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
1956         * aot-runtime.c (mono_aot_plt_resolve): Reenable the previous assert for
1957         ftnptrs created by us, handle RGCTX_FETCH correctly.
1958         (mono_aot_get_lazy_fetch_trampoline): Add an ftnptr.
1960         * mini-trampolines.c (mono_create_generic_class_init_trampoline): Remove the
1961         ftnptr added by mono_aot_get_named_code ().
1963 2010-01-14  Zoltan Varga  <vargaz@gmail.com>
1965         * mini-arm.c: Fix a few LLVM problems.
1967         * mini-llvm.c (simd_class_to_llvm_type): Fix compilation on !x86/amd64.
1969 2010-01-13  Mark Probst  <mark.probst@gmail.com>
1971         * method-to-ir.c (mini_emit_stobj): Use EMIT_NEW_CLASSCONST when
1972         AOT compiling.
1974 Wed Jan 13 15:54:53 CET 2010 Paolo Molaro <lupus@ximian.com>
1976         * jit.h, method-to-ir.c: added ability to set the policy for
1977         inserting breakpoints from the break IL instruction or the
1978         Debugger.Break () API call.
1980 2010-01-13  Zoltan Varga  <vargaz@gmail.com>
1982         * aot-runtime.c (load_aot_module): Add more comments to explain why referenced
1983         assemblies need to be eagerly loaded.
1985 2010-01-12  Zoltan Varga  <vargaz@gmail.com>
1987         * dwarfwriter.c (emit_line_number_info): Fix the eglib case so it doesn't crash.
1989 2010-01-11  Zoltan Varga  <vargaz@gmail.com>
1991         * debugger-agent.c (mono_debugger_agent_parse_options): Allow onthrow without
1992         an argument which matches any exception.
1994 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
1996         * method-to-ir.c (mono_emit_method_call_full): Avoid the virt->nonvirt
1997         optimization if the called method is gshared and marshalbyref, since gshared
1998         methods can' have wrappers. Fixes #569390.
2000         * generics.cs: Add a test.
2002 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
2004         * mini-exceptions.c (mono_print_thread_dump_from_ctx): New helper function
2005         callable from gdb.
2007 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
2009         * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
2011 2010-01-09  Zoltan Varga  <vargaz@gmail.com>
2013         * debugger-agent.c (transport_connect): comment out freeaddrinfo calls under win32,
2014         since it is not supported in win2000.
2016 2010-01-08  Zoltan Varga  <vargaz@gmail.com>
2018         * aot-runtime.c (load_image): Add a SET_ERROR argument to set the loader
2019         error if loading an assembly fails.
2020         (mono_aot_plt_resolve): Return NULL instead of asserting if loading fails.
2022         * mini-trampolines.c (mono_aot_plt_trampoline): Throw a pending loader error
2023         if exists.
2025         * aot-runtime.c (decode_exception_debug_info): Set jinfo->from_llvm for LLVM
2026         compiled methods.
2028         * mini-llvm-cpp.cpp: Remove the unused ctx variable.
2030         * mini-llvm.c (mono_llvm_emit_method): Add some comments about why aot+clauses
2031         is not supported yet.
2033         * unwind.c (DW_EH_PE_absptr): Add more DW_EH_PE_ constants.
2035 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
2037         * method-to-ir.c: All types with variant arguments must fallback to the
2038         slow path. This makes cast of variant delegates work.
2040         * mini-trampolines.c (mono_get_vcall_slot_addr): Add new variance_used out
2041         argument that is set to TRUE is the returned vtable slot is for a variant
2042         interface. Changed a g_print + g_assert_not_reached to a g_error.
2044         * mini-trampilines.c (common_call_trampoline): Handle variant interfaces in
2045         a similar fashion of generic virtual methods.
2047 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
2049         * helpers.c (mono_disassemble_code): Fix a g_hash_table warning
2050         when cfg is null.
2052         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Convert a given
2053         method using a variance aware function.
2055         * mini-x86.c: Add support for dumping IMT thunks if DEBUG_IMT is defined.
2057 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
2059         * method-to-ir.c (mono_method_to_ir): Casts to variant interfaces
2060         do an icall for now.
2062 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
2064         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add an ugly hack to fix #564695.
2065         If LLVM decides to set the code model to Large, reset it to Default.
2067 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
2069         * aot-compiler.c (mono_xdebug_flush): Export it so it is present in
2070         stripped binaries as well.
2072 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
2074         * mini-trampolines.c (common_call_trampoline): Add an rgctx trampoline if a shared
2075         method is called from LLVM compiled code, as that code can't pass an rgctx arg.
2077         * mini-llvm.c (mono_llvm_emit_method): Enable calls to methods needing an rgctx
2078         reg.
2080 2010-01-06  Zoltan Varga  <vargaz@gmail.com>
2082         * mini.c (mini_method_compile): Extract the JIT info creation code into a
2083         separate function.
2085         * mini-llvm.c (mono_llvm_emit_method): Pass the info in MonoExceptionClause
2086         as the type info to llvm.eh.selector.
2087         (exception_cb): Use the type info for filling out some fields of
2088         MonoJitExceptionInfo like the flags and the exception class. This is needed
2089         because the LLVM produced exception handling clauses might not match the original
2090         IL clauses, i.e. there might be more than one LLVM clause for one IL clause.
2092         * unwind.c (mono_unwind_decode_fde): Extract the LSDA decoding code into a
2093         separate function. Add an extra argument which returns the type infos
2094         corresponding to the exception clauses.
2096         * mini.c (mini_method_compile): Enable LLVM compilation of methods having
2097         exception handling clauses.
2099 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
2101         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
2102         mono_method_get_vtable_slot () instead of accessing imt_method->slot directly,
2103         to fix an AOT case.
2105 2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2107         * mini.c (mono_compile_is_broken): Skip methods from serialization's
2108         internal assembly.
2110 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
2112         * mini.c (mini_method_compile): Fix a few memory leaks introduced by the
2113         llvm code.
2115 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2117         * mini.c (mini_method_compile): Verify the method before calling
2118         mono_compile_create_vars as this might crash since it uses method
2119         information.
2121         Fixes #560196.
2123 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
2125         * method-to-ir.c (mono_method_to_ir): Avoid calling mono_class_vtable () in
2126         one case if AOTing, since the class might not be a concrete class.
2128 2010-01-03  Zoltan Varga  <vargaz@gmail.com>
2130         * mini-codegen.c abcremoval.c: Remove the duplicate g_slist_append_mempool
2131         functions which are now defined in mempool-internals.h.
2133         * mini.c (mini_free_jit_domain_info): Free the seq point hash tables.
2135         * mini-llvm.c (mono_llvm_emit_method): Handle OP_ABS.
2137 2009-12-30  Rodrigo Kumpera  <rkumpera@novell.com>
2139         * mini.c:
2140         * method-to.ir.c:
2141         * mini-*.c: Properly handle generic enums.
2143         Fixes #566294
2145 2009-12-28  Zoltan Varga  <vargaz@gmail.com>
2147         * method-to-ir.c (mono_method_to_ir): Handle the failure of mono_class_vtable ()
2148         in a few more places.
2150 2009-12-27  Zoltan Varga  <vargaz@gmail.com>
2152         * aot-compiler.c (add_wrappers): Don't use dyn runtime invoke for methods with
2153         nullable parameters. Fixes #567351.
2155 2009-12-26  Rodrigo Kumpera  <rkumpera@novell.com>
2157         * mini-trampolines.c (common_call_trampoline): Add assert for NULL resolved generic method.
2159 2009-12-26  Zoltan Varga  <vargaz@gmail.com>
2161         * mini-trampolines.c: Use mono_arch_get_this_arg_from_call () to avoid the slow
2162         mono_get_generic_context_from_code () call.
2164         * mini-<ARCH>.c: Get rid of mono_arch_find_this_arg (), it is no longer used.
2166 2009-12-25  Zoltan Varga  <vargaz@gmail.com>
2168         * aot-runtime.c (decode_klass_ref): Don't call mono_class_init (), its not
2169         needed.
2171 2009-12-24  Sebastien Pouliot  <sebastien@ximian.com>
2173         * method-to-ir.c (mono_method_to_ir): Avoid SIGSEGV when
2174         mono_method_get_signature returns NULL. Fix #567084
2176 2009-12-25  Zoltan Varga  <vargaz@gmail.com>
2178         * aot-runtime.c (find_extra_method): Call mono_aot_wrapper_name only once,
2179         instead of once for each module.
2181 2009-12-22  Zoltan Varga  <vargaz@gmail.com>
2183         * debugger-agent.c (ss_start): Implement step over for the last sequence
2184         point in methods.
2186         * mini.c (mono_save_seq_point_info): Don't link sequence points which don't
2187         have the STEP_LOC flag set.
2189         * aot-runtime.c (decode_klass_ref): Avoid a crash if a decode_klass_ref () call
2190         fails. Fixes #566689.
2192 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
2194         * mini.c (mono_add_seq_point): New helper function.
2195         (mono_save_seq_point_info): New function to save sequence point info, extracted
2196         from mini_method_compile ().
2198         * mini-<ARCH>.c: Call mono_add_seq_point to remember sequence points.
2200         * mini.h (MonoSeqPointInfo): New structure containing information about
2201         the sequence points of a JITted method.
2202         (MonoBasicBlock): Add 'seq_points' and 'last_seq_point' fields. Remove unused
2203         'bucket' field.
2205         * mini.c debugger-agent.c aot-compiler.c aot-runtime.c: Change the way sequence
2206         point information is stored, use a MonoSeqPointInfo structure instead of a
2207         GPtrArray. For each seq point, compute a list of successor seq points.
2209         * debugger-agent.c: Use the successor list to implement step-over more
2210         efficiently: instead of single stepping until a different line/IL offset is
2211         reached, place breakpoints into all successor seq points.
2213         * mini.h: Bump AOT file format version.
2215 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
2217         * Makefile.am (AM_CFLAGS): Include LLVM_CFLAGS.
2219         * mini-llvm.c: Avoid defining the __STDC_... macros if already defined.
2221 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
2223         * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): Fix the cross-compiler
2224         build.
2226 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
2228         * mini-x86.c (mono_arch_get_argument_info): Allocate memory for CallInfo using
2229         alloca as g_malloc is not signal safe.
2231 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
2233         * tramp-x86.c (mono_arch_patch_callsite): Fix the call to
2234         VALGRIND_DISCARD_TRANSLATIONS.
2236         * *.c: Include mono/utils/memcheck.h, and remove #ifdef HAVE_VALGRIND_MEMCHECK_H
2237         checks, they are no longer needed.
2239         * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): New helper function to set
2240         a function into a sigctx which can handle function pointers.
2242         * mini-ppc.c: Implement soft debugger support on ppc64.
2244         * mini-ppc.c: Implement soft debugger support.
2246 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
2248         * mini-llvm.c: Handle OP_LADD_OVF_UN. Place all alloca's into the entry bb.
2250 2009-12-17  Marek Habersack  <mhabersack@novell.com>
2252         * mini.c (mono_get_runtime_build_info): include Mono version in
2253         the returned value.
2255         * driver.c (mono_main): VERSION is now included in the string
2256         returned from mono_get_runtime_build_info()
2258 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
2260         * method-to-ir.c (mono_method_to_ir): Add support for CALLI with unmanaged
2261         signatures. Fixes #565143.
2263         * jit-icalls.c (mono_get_native_calli_wrapper): New JIT icall.
2265 2009-12-16  Zoltan Varga  <vargaz@gmail.com>
2267         * aot-compiler.c (arch_emit_autoreg): Align code to 4 in the ppc case.
2269 2009-12-16 Rodrigo Kumpera  <rkumpera@novell.com>
2271         * mini-x86.h: Forgot to add a 0x to MONO_ARCH_MAX_FRAME_SIZE define
2272         making max stack 10x smaller.
2274 2009-12-16  Zoltan Varga  <vargaz@gmail.com>
2276         * mini.c (mono_resolve_patch_target): Comment out an assert which could be hit.
2278 2009-12-15 Rodrigo Kumpera  <rkumpera@novell.com>
2280         * method-to-ir.c (mini_emit_memcpy): Assert if size is too big.
2282 2009-12-15 Rodrigo Kumpera  <rkumpera@novell.com>
2284         * mini-x86.c (mono_arch_allocate_vars): Fail compilation if the frame size is
2285         bigger than MONO_ARCH_MAX_FRAME_SIZE.
2287         * mini-x86.c (mono_arch_emit_prolog): Handle huge frames.
2289         * mini-x86.h: Define MONO_ARCH_MAX_FRAME_SIZE to be 1Mb.
2291         * mini-amd64.c / mini-amd64.h: Same fixes as of above.
2293         * mini.c (mini_method_compile): Check if mono_arch_allocate_vars failed
2294         the compilation.
2296 2009-12-14  Miguel de Icaza  <miguel@novell.com>
2298         * method-to-ir.c (mono_method_to_ir): CEE_UNUSUED opcodes now
2299         raise an invalid program exception.   
2301         For other opcodes that we might not handle use a g_warning and
2302         raise the exception.   Beats termination.
2304         Fixes #561724
2306 2009-12-14  Zoltan Varga  <vargaz@gmail.com>
2308         * method-to-ir.c (mono_emit_rgctx_method_call_full): Fix a warning.
2310         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix the LLVM support
2311         by merging the LLVM and !MAP_32BIT cases.
2313 2009-12-13 Jonathan Chambers <joncham@gmail.com>
2315         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Handle a NULL
2316         sigctx being passed in, as we have no CONTEXT available in the APC.
2318         (mono_debugger_agent_cleanup): Use explicit cond wait implementation
2319         for now.
2321         Code contributed under MIT/X11 license.
2323 2009-12-13  Zoltan Varga  <vargaz@gmail.com>
2325         * method-to-ir.c mini-llvm.c: Fix support for monitor enter/exit trampolines
2326         in the LLVM backend on AMD64.
2328         * aot-runtime.c (decode_eh_frame): Initialize the clauses from the info in the
2329         FDE.
2331         * unwind.c (mono_unwind_decode_fde): Implement decoding of a couple more formats.
2333         * mini-llvm.c: Export mono_personality for AOT.
2335         * mini.c (mini_method_compile): Fix some problems with llvm+aot+clauses.
2337         * mini-ops.h (OP_IMPLICIT_EXCEPTION): New opcode marking the place where an
2338         implicit exception can occur.
2340         * ir-emit.h (MONO_EMIT_NEW_IMPLICIT_EXCEPTION): New macro to emit an
2341         OP_IMPLICIT_EXCEPTION instruction.
2343         * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): New macro.
2345         * method-to-ir.c: Use MONO_EMIT_NEW_CHECK_THIS in a few places.
2347         * mini-llvm.c: Handle OP_IMPLICIT_EXCEPTION by disabling llvm if it occurs
2348         inside a protected block.
2350         * mini-llvm.c: Revert the last change, the signature of monitor entry/exit
2351         trampolines doesn't include the argument.
2353         * mini-llvm.c (mono_llvm_emit_method): Enable calls to monitor entry/exit
2354         trampolines on amd64.
2356         * mini-amd64.h (MONO_ARCH_MONITOR_OBJECT_REG): Use MONO_AMD64_ARG_REG1 instead
2357         of RDI.
2359         * mini.c (mini_method_compile): Add some comments as to why LLVM is currently
2360         disabled for methods with clauses.
2362         * mini-llvm.c: Enable support for catch clauses.
2364         * mini-exceptions.c (mono_resume_unwind): New function to resume unwinding at the
2365         end of an LLVM compiled finally clause.
2366         (mono_handle_exception_internal): Save the exception handling state in TLS
2367         before calling an LLVM compiled finally clause, so mono_resume_unwind () can
2368         resume unwinding from that point.
2370         * unwind.c (mono_unwind_get_ops_from_fde): Rename this to
2371         mono_unwind_decode_fde, decode the Language Specific Data Area (LSDA) too,
2372         to obtain the addresses of the exception handling regions.
2374         * mini-llvm.c: Add beginnings of support for exception handling, currently only
2375         finally clauses are supported.
2377         * mini.c (mini_method_compile): Add support for LLVM code with exception
2378         handlers.
2380 2009-12-12  Zoltan Varga  <vargaz@gmail.com>
2382         * mini-llvm.c (mono_llvm_emit_method): Allocate the 'pindexes' array with the
2383         proper size.
2385 2009-12-12  Zoltan Varga  <vargaz@gmail.com>
2387         * debugger-agent.c: Encode the this argument of vtype methods as a struct, not
2388         as a primitive type.
2390 2009-12-11  Zoltan Varga  <vargaz@gmail.com>
2392         * driver.c: Applied patch from Matt McClellan (matt@mc-c.net). Add a check
2393         for 2 parameter sched_setaffinity in older glibc versions. Fixes
2394         #564000.
2396 2009-12-11  Marek Habersack  <mhabersack@novell.com>
2398         * method-to-ir.c (mini_redirect_call): do not redirect the
2399         InternalAllocateStr internal call if string profiling is enabled.
2401 2009-12-10  Zoltan Varga  <vargaz@gmail.com>
2403         * aot-compiler.c (add_wrappers): Avoid generating synchronized wrappers for
2404         generic methods.
2406         * unwind.h: Rename this to mini-unwind.h to avoid conflicts with the gcc
2407         unwind.h header file.
2409         * tramp-x86.c (mono_arch_patch_callsite): Patch the code when using valgrind,
2410         newer valgrind versions seems to handle this fine.
2412 2009-12-09  Zoltan Varga  <vargaz@gmail.com>
2414         * debugger-agent.c (start_runtime_invoke): Fix a crash if this is called
2415         on the debugger thread.
2417 2009-12-08  Zoltan Varga  <vargaz@gmail.com>
2419         * mini-llvm.c (mono_llvm_emit_method): Add more SIMD opcodes.
2421         * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
2423         * mini-codegen.c (mono_local_regalloc): Allow non-call opcodes with cloc:c.
2425         * cpu-<ARCH>.md: Make call_handler clob:c.
2427         * mini.c: Reenable SSA for methods with clauses.
2429         * mini.c (mini_method_compile): Disable SSA for now for methods with clauses,
2430         as it causes failures on x86.
2432 2009-12-08  Sebastien Pouliot  <sebastien@ximian.com>
2434         * driver.c: Fail gracefully with --compile-all if mono_method_signature
2435         returns NULL (e.g. a bad assembly).
2437 2009-12-08  Geoff Norton  <gnorton@novell.com>
2439         * debugger-agent.c:  Refactor the mono_runtime_invoke guarding against
2440         stepping out into native code.  There were issues with nested invokes
2441         like .cctors.
2443 2009-12-07  Zoltan Varga  <vargaz@gmail.com>
2445         * mini.c (mini_method_compile): Do the disable_llvm checks early
2446         and avoid the LLVM compile pass if the checks fail.
2448         * mini.c ssa.c abcremoval.c: Enable SSA for methods with exception clauses.
2450         * mini-llvm.c: Put our methods/globals into the 'llvm.used' array, so the
2451         LLVM optimizations don't try to remove them.
2453         * aot-compiler.c (emit_llvm_file): Save the result of opt into a
2454         different file so the original remains.
2456 2009-12-06  Zoltan Varga  <vargaz@gmail.com>
2458         * mini-llvm.c mini.c: Fix alignment issues with SIMD vars.
2460         * aot-runtime.c (decode_arm_exidx): Handle most descriptors created by gas.
2462         * aot-runtime.c (decode_arm_exidx): Refactor this into two functions, add
2463         support for non-inline unwind descriptors.
2465 2009-12-07  Geoff Norton  <gnorton@novell.com>
2467         * debugger-agent.c:  Darwin can colesce signals, so we need to handle
2468         the interrupt_count slightly differently.  Native threads were never
2469         marked as resumed.
2471 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
2473         * aot-runtime.c (decode_arm_exidx): New function to initialize a MonoJitInfo
2474         based on the contents of the ARM .exidx section. Not yet used since llvm doesn't
2475         yet generate this info.
2477         * mini-llvm.c: Fix the conversion of call results if they are unsigned.
2479         * debugger-agent.c (buffer_add_value): Treat I/U as a valuetype, so the
2480         client can distinguish between intptrs and longs.
2482 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
2484         * aot-compiler.c (emit_trampoline): Emit the trampoline info into the global
2485         blob.
2487         * aot-runtime.c (load_function): Update after the change above.
2489         * mini.h: Bump AOT file format version.
2491         * method-to-ir.c (mono_method_to_ir): Disallow the delegate optimization
2492         if the delegate class is dynamic.
2494         * method-to-ir.c (handle_delegate_ctor): Allow the method_code optimization
2495         in gshared code too using the new rgctx info type
2496         MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
2498 2009-12-04  Geoff Norton  <gnorton@novell.com>
2500         * debugger-agent.c: When doing a func-eval invoke on a suspended runtime,
2501         we need to track the original suspend count so the thread properly
2502         wakes up in resume_thread.
2504 2009-12-04  Zoltan Varga  <vargaz@gmail.com>
2506         * method-to-ir.c (handle_delegate_ctor): Add support for using this from gshared
2507         code.
2509         * generics.cs: Add a test.
2511         * method-to-ir.c (emit_get_rgctx_method): Make this work even if context_used
2512         is 0. Simplify a lot of code using this.
2514         * mini-trampolines.c (mono_delegate_trampoline): Call
2515         mono_create_static_rgctx_trampoline () before saving the final address in
2516         delegate->method_code, to avoid calling it each time a delegate is first called.
2518         * method-to-ir.c (mono_method_to_ir): Allow fast delegate creation for methods
2519         which need static rgctx trampolines.
2521         * mini-trampolines.c (mono_create_static_rgctx_trampoline): Use a cache
2522         keyed on the method+addr pair, since addr could be either the method addr or
2523         an unbox trampoline in the AOT case. Fixes #560246.
2525 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
2527         * mini.c (mini_method_compile): Call handle_exception_clauses () in the same
2528         place it was called before too.
2530 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
2532         * mini.c (mono_jit_runtime_invoke): Avoid the call to mono_class_setup_vtable ()
2533         if no security manager is present, to speed up the AOT case. Call
2534         mono_class_vtable () full with raise_on_error == TRUE instead.
2536 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
2538         * mini.c (mini_method_compile): Call handle_exception_clauses earlier so
2539         the local optimization passes can take its result into account. Fixes
2540         #559876.
2542         * exceptions.cs: Add a test.
2544 2009-01-24  Steven Munroe  <munroesj@us.ibm.com>
2546         This patch is contributed under the terms of the MIT/X11 license
2548         * cpu-ppc64.md (load_memindex): Add loadi8_memindex.
2550 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
2552         * mini.h (MonoInst): Remove unused 'ssa_op' field.
2554         * debugger-agent.c: Rework the handling of stack traces of running threads to
2555         avoid crashes if compute_frames () tries to walk the stack of running thread.
2557         * mini.c (mono_print_method_from_ip): Use mini_jit_info_table_find.
2559         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): Set frame->lmf.
2561         * mini.h (StackFrameInfo): Add an 'lmf' field.
2563 2009-12-02  Zoltan Varga  <vargaz@gmail.com>
2565         * debugger-agent.c (suspend_current): Always set really_suspended.
2567         * debugger-agent.c (clear_event_request): Clear method entry/exit requests too.
2569         * exceptions-x86.c (mono_arch_get_restore_context): Restore EAX too.
2571 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
2573         * debugger-agent.c (vm_commands): Don't allow invokes on threads which are not
2574         really suspended.
2576 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
2578         * cpu-ppc64.md (store_memindex): Add storei8_memindex.
2580 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
2582         * mini-trampolines.c: Fix MSVC build.
2584 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
2586         * mini-trampolines.c: Check for mono_method_get_vtable_slot failures.
2588 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
2590         * mini-arm.c (mono_arch_lowering_pass): Fix an assert which is hit when
2591         the instruction following an OP_FCOMPARE is optimized away.
2593 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
2595         * aot-compiler.c (arch_emit_autoreg): Extract the auto-registration code from
2596         emit_autoreg () into this arch-specific function.
2598         * aot-compiler.c (emit_exception_debug_info): Don't emit the length of the
2599         code, it is no longer needed.
2601         * aot-runtime.c (decode_exception_debug_info): Don't read the code length.
2603         * mini.h: Bump AOT file format version.
2605         * aot-runtime.c (mono_aot_find_jit_info): Compute the length of the method
2606         using the sorted_code_offsets array, instead of reading it from the
2607         exception debug info.
2608         (load_method): Call mono_aot_find_jit_info instead of
2609         decode_exception_debug_info ().
2611         * aot-compiler.c (emit_exception_debug_info): Emit whenever the method was
2612         LLVM compiled as a flag.
2614 2009-11-29  Zoltan Varga  <vargaz@gmail.com>
2616         * debugger-agent.c (resume_thread): Fix a warning.
2618         * aot-compiler.c: Add an option to set the number of static rgctx trampolines
2619         generated.
2621 2009-11-28  Zoltan Varga  <vargaz@gmail.com>
2623         * aot-compiler.c aot-runtime.c: Get rid of a few global symbols, move their
2624         contents to MonoAotFileInfo.
2626 2009-11-27  Zoltan Varga  <vargaz@gmail.com>
2628         * aot-compiler.c aot-runtime.c: Reorganize the AOT file format once again.
2629         Put all binary data into a giant blob, similarly to the way .net assemblies
2630         store binary data. Emit offset tables in a compact form to reduce their size.
2632         * mini.h: Bump AOT file format version.
2634         * aot-compiler.c (emit_globals_table): Use temp_prefix instead of .L in a few
2635         places.
2637         * aot-compiler.c (emit_globals_table): Emit a hash table for the globals, to
2638         avoid linear searches at runtime.
2640         * aot-runtime.c (find_symbol): Update this to use the hash.
2642         * mini.h: Bump AOT file format version.
2644 2009-11-26  Zoltan Varga  <vargaz@gmail.com>
2646         * aot-compiler.c (emit_klass_info): Save whenever the class has a generic
2647         container.
2649         * aot-runtime.c (decode_cached_class_info): Set the is_generic_container field
2650         too.
2652         * aot-compiler.c (mono_compile_assembly): Add a 'stats' option to print out
2653         the distribution of got slot types.
2655         * mini.h (MonoDebugOptions): Add 'explicit_null_checks' option.
2657         * method-to-ir.c: Add support for generating explicit null checks.
2659 2009-11-25  Zoltan Varga  <vargaz@gmail.com>
2661         * debugger-agent.c (vm_commands): Implement EXIT by invoking Environment.Exit ()
2662         on a random thread if possible.
2664         * aot-runtime.c (mono_aot_plt_resolve): Clean up the handling of function
2665         descriptors a bit, add comments, handle RGCTX_FETCH/GENERIC_CLASS_INIT_TRAMPOLINE
2666         correctly.
2668         * exceptions-ppc.c (mono_arch_find_jit_info_ext): Use mgreg_t as the type of
2669         regs. Pass the real size of the regs array to mono_unwind_frame ().
2671         * unwind.c (mono_unwind_frame): Remove an incorrect assert, add more correct
2672         ones instead.
2674 2009-11-24  Geoff Norton  <gnorton@novell.com>
2676         * mini-darwin.c: Work around apple bug rdar://7209349  See
2677         http://openradar.appspot.com/7209349 for details.  Synopsis,
2678         CoreFoundation SIGTRAP's if you dlopen it off the main thread if its
2679         never been initialized before.
2681 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2683         * tramp-arm.c: Use blx instead of mov pc, reg to improve support for thumb.
2685         * mini-arm.c (mono_arm_thumb_supported): New helper function.
2687 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2689         * cfold.c (mono_constant_fold_ins): Fix a problem in the previous change,
2690         OP_SHL_IMM is not 32 bit.
2692 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2694         * aot-compiler.c (encode_patch): Fix the encoding of R8 on big-endian systems.
2696 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2698         * aot-compiler.c: Avoid infinite recursion when generic virtual recursion is
2699         encountered.
2701         * debugger-agent.c (resume_vm): Signal the suspend_cond even if suspend_count
2702         > 0 since some threads can resume if their resume_count is > 0.
2703         (invoke_method): Avoid reading freed memory.
2705         * debugger-agent.c (process_suspend): Extract the suspend code from
2706         process_single_step_inner () to a separate function. Rework the code to prevent
2707         races between this function and thread interrupts.
2709         * debugger-agent.c (suspend_current): Check the resume_count field instead
2710         of resume_one so suspends+resumes during single threaded invokes work
2711         correctly.
2713 2009-11-23  Zoltan Varga  <vargaz@gmail.com>
2715         * aot-compiler.c (emit_llvm_file): Enable some llvm optimizations which seem
2716         to make the generated code smaller.
2718         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Add a code
2719         sequence generated by recent LLVM versions.
2721         * mini-llvm.c: Add support for a few simple cases which weren't supported
2722         before.
2724         * mini-trampolines.c (mono_magic_trampoline): Don't call
2725         mono_arch_get_vcall_slot () when llvm is enabled.
2727         * aot-compiler.c (emit_llvm_file): Add code to run the 'opt' llvm tool.
2729         * mini-trampolines.c (mono_magic_trampoline): Extract the bulk of this function
2730         into a new function called common_call_trampoline () which is used by the
2731         llvm vcall trampoline as well.
2733         * debugger-agent.c: Implement single threaded invokes.
2735         * debugger-agent.c: Revert change which broke the agent on linux.
2737         * method-to-ir.c (inline_method): Prevent infinite recursion. Fixes
2738         #557606.
2740         * generics.cs: Add a test.
2742 2009-11-22  Zoltan Varga  <vargaz@gmail.com>
2744         * debugger-agent.c: Fix the cygwin build.
2746 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
2748         * cprop.c: Remove this unused file.
2750 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
2752         * cfold.c (mono_constant_fold_ins): Fix constant folding of shr_imm. Fixes
2753         #557262.
2755         * basic.cs: Add a test.
2757 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
2759         * method-to-ir.c (mono_method_to_ir): Use mono_use_llvm instead of ENABLE_LLVM
2760         in one more place.
2762 2009-11-20  Zoltan Varga  <vargaz@gmail.com>
2764         * mini.c mini-trampolines.c driver.c: Add a 'mono_use_llvm' flag to control
2765         whenever the runtime uses LLVM code. Add a '--llvm' command line option to set
2766         it. Use this flag to control llvm related code paths instead of #ifdef
2767         ENABLE_LLVM, so a runtime configured without --enable-llvm can use LLVM compiled
2768         AOT code.
2770         * aot-runtime.c aot-compiler.c: Add a 'flag' field to MonoAotFileInfo.
2772         * mini.h: Bump AOT file format version.
2774         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline_full): These
2775         receive their argument in MONO_ARCH_VTABLE_REG, not in the first argument reg.
2777         * debugger-agent.c (create_event_list): Fix a crash if an empty assembly list
2778         was used as an assembly filter.
2780 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
2782         * unwind.c: Fix support for ppc.
2784         * exceptions-ppc.c (mono_arch_find_jit_info): Change this to use dwarf frame
2785         unwind info. Change to the mono_arch_find_jit_info_ext () interface.
2787 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
2789         * mini-ppc.c (mono_arch_emit_prolog): Fix a copy-paste error to fix the ppc64
2790         port.
2791         (mono_arch_cpu_init): Don't set cpu_hw_flags to 0 at the end, this was somehow
2792         added by the ps3 changes.
2794 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
2796         * mini-gc.c: Resurrect this, so at least it compiles.
2798         * debugger-agent.c (assembly_commands): Implement GET_NAME command.
2800 2009-11-18  Zoltan Varga  <vargaz@gmail.com>
2802         * debugger-agent.c (mono_debugger_agent_handle_exception): Pass a MonoJitInfo to
2803         create_event_list () so assembly filters can be used.
2805         * exceptions-ppc.c (mono_arch_find_jit_info): Fix the restoration of registers
2806         from the LMF.
2808 2009-11-17  Zoltan Varga  <vargaz@gmail.com>
2810         * debugger-agent.c (mono_debugger_agent_breakpoint_hit): Fix a warning.
2811         (mono_debugger_agent_thread_interrupt): Make this return FALSE if the agent
2812         is disabled.
2814         * aot-compiler.c (add_generic_instances): Emit instances of common generic
2815         classes for char/bool too.
2817         * debugger-agent.c (DebuggerTlsData): Honor the DISABLE_SOFT_DEBUG option.
2819         * debugger-agent.c (DebuggerTlsData): Add a 'really_suspended' flag, not yet
2820         used.
2822         * debugger-agent.c: Add some definitions to make backporting to 2.6 easier.
2823         Fix warnings.
2825 2009-11-15  Andreas Faerber  <andreas.faerber@web.de>
2827         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Signature fix.
2828         
2829         Code contributed under MIT/X11 license.
2831 2009-11-14  Zoltan Varga  <vargaz@gmail.com>
2833         (mono_debugger_agent_thread_interrupt): Save the context so stacktraces for
2834         threads in native code work.
2836         * debugger-agent.c: Pass the 'flags' argument to VM_INVOKE_METHOD earlier in
2837         the parameter list, so it can be acted upon by vm_commands (). Bump protocol
2838         version.
2840 2009-11-13 Jonathan Chambers <joncham@gmail.com>
2842         * debugger-agent.c: Implementation for Windows platform.
2844         * mini-x86.c: Add support for Windows. Use mono-* synchronization
2845         primitives. Use SEH to implement breakpoints and single stepping.
2847         * mini-x86.h: Enable soft debugger on Windows.
2849         Code contributed under MIT/X11 license.
2851 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
2853         * mini-amd64.c (emit_call_body): Disable usage of near calls when running
2854         under XEN. Fixes #522894.
2856         * patch-info.h: Add LLVM_IMT_TRAMPOLINE.
2858         * mini-llvm.c aot-compiler.c aot-runtime.c mini.c: Add support for making
2859         interface calls in LLVM AOT code.
2861         * aot-compiler.c mini-llvm.c: Abort llvm compilation if a non-encodable patch
2862         is found.
2864         * mini-llvm.c: Add support for OP_VPHI.
2866         * objects.cs: Add a test.
2868 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
2870         * debugger-agent.c (mono_debugger_agent_single_step_event): Avoid a crash if
2871         this is called on the debugger thread.
2873 2009-11-12  Zoltan Varga  <vargaz@gmail.com>
2875         * mini-llvm.c: Add soft-float support.
2877         * method-to-ir.c (mono_decompose_soft_float): Restart after decomposing an
2878         FCALL which returns an R4.
2880         * driver.c (mono_main): Add a missing '\n'.
2882         * mini-trampolines.c (mono_create_llvm_imt_trampoline): Fix the build on
2883         platforms which doesn't support the LLVM IMT trampoline.
2885 2009-11-11  Zoltan Varga  <vargaz@gmail.com>
2887         * mini-llvm.c (mono_llvm_emit_method): Fix LOCALLOC.
2889         * mini-llvm-cpp.cpp: Update to latest LLVM SVN.
2891         * mini-llvm.c (mono_llvm_emit_method): Avoid creating plt entries for
2892         virtual calls.
2894         * aot-runtime.c: Don't define HAVE_DL_ITERATE_PHDR, configure now does that.
2896 2009-11-10  Zoltan Varga  <vargaz@gmail.com>
2898         * aot-compiler.c aot-runtime.c: Change how mono_arch_find_jit_info () works.
2899         Instead of emitting a method_order table, sort the contents of the code_offsets
2900         table and do a binary search in the sorted table. The previous approach doesn't
2901         work with LLVM which emits methods in a arbitrary order.
2903         * aot-runtime.c: Add support for creating MonoJitInfo structures by searching
2904         in the .eh_frame section in ELF files.
2906         * mini.h: Bump corlib file format version.
2908         * mini-llvm.c aot-compiler.c: Add support for AOT to the LLVM back end.
2910         * exceptions-arm.c (mono_arch_get_call_filter_full): Update after the
2911         LDMIA->LDM macro name change.
2913 2009-11-09  Zoltan Varga  <vargaz@gmail.com>
2915         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Fix and enable this for
2916         x86.
2918         * mini-llvm-cpp.cpp (JITMemoryManager): Fix compilation with LLVM 2.7
2919         SVN.
2921         * aot-compiler.c: Ditto.
2923         * mini-arm.c (mono_arch_allocate_vars): Fix the previous change by passing
2924         &align to mini_type_stack_size_full ().
2926         * mini-arm.c (mono_arch_emit_prolog): Implement support for varargs.
2928         * mini-ops.h: Add documentation for the OP_ARGLIST opcode.
2930 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
2932         * mini-arm.c: Compute the stack space used by arguments using
2933         mini_type_stack_size_full ().
2935 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
2937         * optflags-def.h: Remove dead TREEPROP optimization.
2939 2009-11-08  Rodrigo Kumpera  <rkumpera@novell.com>
2941         * mini-ppc.h: Make mono compiler under FreeBSD/ppc64. 
2943         Patch by Justin Hibbits <chmeeedalf@gmail.com>.
2945 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
2947         * driver.c (mono_jit_parse_options): New public API function to parse options
2948         as done by the runtime executable.
2950         * debugger-agent.c (buffer_add_cattrs): Fix reading an uninitialized variable
2951         when handling named arguments.
2953 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
2955         * mini-arm.c: Implement support for returning vtypes in registers, fix support
2956         for passing small vtypes in registers, make the CallInfo structures more
2957         similar to the code on the other platforms.
2959         * mini-arm.c (mono_arch_allocate_vars): Align small vtypes to 4 bytes too since
2960         the code in the prolog requires it.
2962 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
2964         * mini-arm.c debugger-agent.c: Android changes from Koushik K. Dutta
2965         (koush@koushikdutta.com).
2967         * mini-arm.c (handle_thunk): Add a domain argument to control the domain
2968         where the thunk memory should be allocated from. Fixes appdomain unloading
2969         on arm.
2971 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
2973         * mini-arm.c exceptions-arm.c: Make ctx->regs map directly to the 16 hardware
2974         registers, instead of r4..r11,ip,lr. Make restore_context () restore r0..r3 too.
2976 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2978         * mini-amd64.c (mono_arch_output_basic_block): Don't allow OP_SEQ_POINT in
2979         AOT, as it is not implemented yet.
2981         * mini-x86.c (mono_arch_output_basic_block): Ditto.
2983 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2985         * debugger-agent.c: Fix windows build.
2987 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
2989         * debugger-agent.c (debugger_thread): Call mono_set_is_debugger_attached ()
2990         after the client connects/disconnects.
2992         * debugger-agent.c: Add an 'onthrow' option to start the debugger agent
2993         when an exception of a given type is thrown.
2995         * debugger-agent.c: Add a 'onuncaught' option to start the debugger agent
2996         only on an uncaught exception.
2998         * mini-exceptions.c: Notify the debugger agent on an uncaught exception.
3000         * debugger-agent.c: Add a 'launch' option.
3002 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
3004         * debugger-agent.c: Add a 'timeout' option.
3006 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
3008         * debugger-agent.c: Implement the 'server' and 'suspend' options supported by
3009         the JDWP agent.
3011 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
3013         * debugger-agent.c (set_breakpoint): Emit a log message.
3015 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
3017         * mini-arm.c: Fix the arm build.
3019 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
3021         * aot-compiler.c: don't leak the value returned from
3022         mono_type_full_name().
3024 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
3026         * debugger-agent.c: defer including mono-mutex.h until we know the
3027         agent is supported.
3029 2009-11-04 Jonathan Chambers <joncham@gmail.com>
3031         * debugger-agent.c: Changes to build on windows. Use mono-mutex instead
3032         of pthreads directly.
3034         * mini.c (mono_sigfpe_signal_handler): Changed signature of Windows
3035         exception handlers. Pass info argument.
3037         * mini.h: Adjust signatures of soft debugger functions to pass void*
3038         instead of siginfo_t. Adjust SIG_HANDLER_SIGNATURE on Windows.
3040         * mini-amd64.c (mono_arch_is_single_step_event): Adjust signature to pass void*
3041         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3042         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
3043         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3045         * mini-amd64.h: Adjust MonoW32ExceptionHandler signature.
3047         * mini-x86.c (mono_arch_is_single_step_event): Adjust signature to pass void*
3048         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3049         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
3050         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3052         * mini-x86.h: Adjust MonoW32ExceptionHandler signature.
3054         * exceptions-x86.c: Adjust W32_SEH_HANDLE_EX for new signature.
3056         * exceptions-amd64.c: Adjust W32_SEH_HANDLE_EX for new signature.
3058         * mono-semaphore.h: Skeleton implementation for Windows.
3060         Code contributed under MIT/X11 license.
3062 2009-11-04 Jonathan Chambers <joncham@gmail.com>
3064         * simd-intrinsics.c (simd_intrinsic_emit_setter): Unfix my fix.
3066         Code contributed under MIT/X11 license.
3068 2009-11-04 Jonathan Chambers <joncham@gmail.com>
3070         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix windows build.
3072         Code contributed under MIT/X11 license.
3074 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
3076         * aot-compiler.c (mono_save_xdebug_info): Bump the threshold for flushing
3077         debug info to 100 because 10 still slows down gdb too much.
3079         * method-to-ir.c (mono_method_to_ir): Avoid rethrowing thread abort exceptions
3080         inside runtime invoke wrappers. This avoids the need to call ResetAbort () on
3081         them in the wrappers.
3083 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
3085         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
3087         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix a warning.
3089         * aot-runtime.c (mono_aot_get_method): Refactor some code into a new helper
3090         function mono_aot_get_array_helper_from_wrapper ().
3092         * aot-compiler.c (add_generic_class): Refactor the code a bit, really emit
3093         array helper methods.
3095 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
3097         * simd-intrinsics.c (load_simd_vreg): Add extra argument to signal if
3098         the value was loaded from memory.
3100         * simd-intrinsics.c (simd_intrinsic_emit_setter): Store back to memory if
3101         the value was loader from there.
3103         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Fail correctly for Shuffle
3104         without constant swizzle.
3106 2009-11-02 Jonathan Chambers <joncham@gmail.com>
3108         * mini-amd64.c: Put soft debugger functions behind a
3109         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
3111         * mini-amd64.h: disable the soft debugger in windows.
3113         Code contributed under MIT/X11 license.
3115 2009-11-02 Jonathan Chambers <joncham@gmail.com>
3117         * mini-x86.c: Put soft debugger functions behind a
3118         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
3120         Code contributed under MIT/X11 license.
3122 2009-11-02 Jonathan Chambers <joncham@gmail.com>
3124         * exceptions-x86.c (win32_handle_stack_overflow): Fix parameters
3125         to mono_arch_find_jit_info_ext.
3127         Code contributed under MIT/X11 license.
3129 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
3131         * debugger-agent.c: Include netinet/in.h to fix the bsd build.
3133         * debugger-agent.c: Add support for filtering events by assemblies.
3135         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Return false if
3136         the agent is not enabled.
3138 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3140         * exceptions-x86.c: hopefully last change to fix the windows build.
3141         This one courtesy of Jonathan Chambers.
3143 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3145         * debugger-agent.c: remove unused function.
3147 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3149         * debugger-agent.c: add #ifdefs for a few header files.
3150         * mini-x86.h: disable the soft debugger in windows.
3151         Step 1 of 2 to make this compile on windows with gcc.
3153 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
3155         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Comment this out for now
3156         as it breaks the build.
3158 2009-07-01  Zoltan Varga  <vargaz@gmail.com>
3160         Merge the soft debugger branch.
3162         * debugger-agent.h debugger-agent.c: New files containing the soft
3163         mode debugger module.
3165         * method-to-ir.c (mono_method_to_ir): Generate OP_SEQ_POINT opcodes
3166         at the appropriate locations.
3168         * mini-<ARCH>.c (mono_arch_output_basic_block): Handle OP_SEQ_POINT
3169         opcode.
3171         * mini-<ARCH>.c: Add new arch-specific functions to set/clear breakpoints,
3172         enable/disable single stepping.
3174         * exceptions-<ARCH>.c (mono_arch_find_jit_info_ext): New stack unwinding api
3175         which returns all information in a StackFrameInfo structure, and can handle the
3176         LMF frames added by the debugger.
3178         * mini-<ARCH>.h (MonoLMFExt): New structure containing additional information
3179         about an LMF frame.
3181         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): New stack
3182         walker function which works on a specific thread and passes a StackFrameInfo
3183         structure to its callback.
3185         * mini.c (mini_init): Initialize the debugger agent.
3187         * aot-compiler.c aot-runtime.c: Add soft-debug support.
3189         * mini-ops.h: Add OP_SEQ_POINT opcode.
3191         * driver.c (mono_main): Add new '--debugger-agent' option for passing
3192         arguments to the debugger agent.
3194 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
3196         * mini.c (mini_method_compile): Disable llvm for methods with an lmf here to
3197         speed things up.
3199         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOCALLOC.
3201         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Implement this for x86.
3203         * mini.c (mini_init): Avoid using the IMT trampoline in the LLVM case.
3205         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add a static rgctx trampoline
3206         if needed.
3207         (mono_create_llvm_imt_trampoline): New function to create a trampoline which
3208         sets the IMT argument and makes a virtual call.
3210         * mini-llvm.c: Enable interface calls using the llvm imt trampoline.
3212 2009-11-01  Zoltan Varga  <vargaz@gmail.com>
3214         * Makefile.am (llvm_sources): Enable the llvm option since it no longer breaks
3215         the windows build.
3217 2009-10-30  Zoltan Varga  <vargaz@gmail.com>
3219         * mini.c (mini_cleanup): Call profiler shutdown before shutting down the
3220         runtime. Fixes #551228.
3222 2009-10-29  Zoltan Varga  <vargaz@gmail.com>
3224         * mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.
3226         * basic.cs: Add a test.
3228         * method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
3229         load vtypes instead if OP_LOADV_MEMBASE in the implementation of
3230         CONSTRAINED. Fixes #550964.
3232         * generics.cs: Add a test.
3234 2009-10-28  Mark Probst  <mark.probst@gmail.com>
3236         * mini-posix.c (add_signal_handler): Use
3237         mono_gc_get_suspend_signal() instead of GC_get_suspend_signal().
3239 2009-10-28 Jerry Maine <crashfourit@gmail.com>
3241         Contributed under the terms of the MIT/X11 license by
3242         Jerry Maine <crashfourit@gail.com>.
3244         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
3245         sse4a for simd intrinsics.
3247         * mini-amd64.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
3248         sse4a for simd intrinsics.
3250 2009-10-27  Zoltan Varga  <vargaz@gmail.com>
3252         * ir-emit.h method-to-ir.c: Change a few _IMM macros to assign to inst_imm
3253         instead of inst_p1 which is not the same on ILP32 platforms.
3255 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
3257         * mini-ppc.c (mono_arch_emit_prolog): Load the current got address,
3258         not the mscorlib one before calling mono_get_lmf_addr.
3260         * tramp-ppc.c (mono_arch_create_trampoline_code_full): Fix the storing
3261         of the ip to the LMF.
3263         * method-to-ir.c (mono_method_to_ir): Fix the handling of the
3264         immediate in the op->op_imm optimization.
3266         * mini-ppc.c: Add a 'vtregs' field to ArgInfo to make the code easier to
3267         understand. VTypes now work, but are not abi compliant, as they are
3268         split into 4 byte parts instead of 8.
3269         (emit_memcpy): Fix the unrolled case to work on the PS3.
3271         * mini-ppc.c (get_delegate_invoke_impl): Fix this for the PS3.
3273         * aot-compiler.c (mono_compile_assembly): Make the autoreg option
3274         the default when static linking.
3276         * mini-ppc.c (mono_arch_emit_prolog): Fix handling of I8 arguments.
3278         * aot-compiler.c: Add an autoreg option to automatically register
3279         statically linked aot modules using ELF .ctors.
3281         * genmdesc.pl: Add __ppc64__ to allowed defines.
3283 2009-10-25  Zoltan Varga  <vargaz@gmail.com>
3285         * mini-posix.c (add_signal_handler): Delay the GC suspend signal while
3286         executing a SIGSEGV handler on an altstack, since libgc can't handle that.
3288 2009-10-24  Mark Probst  <mark.probst@gmail.com>
3290         * exceptions-x86.c (mono_arch_find_jit_info): Fix build.
3292 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
3294         * mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
3295         which will contain the domain where the method was found.
3297         * exceptions-<ARCH>.c mini-exceptions.c: Update callers of
3298         mini_jit_info_table_find ().
3300         * aot-compiler.c (xdebug_end_emit): Remove so stray debug code.
3302         * branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.
3304 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
3306         * mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
3307         set, its not supported yet.
3309 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
3311         * aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
3312         iface wrapper is not found.
3313         (mono_aot_get_method): Ditto for GetGenericValueImpl.
3315 2009-10-21  Zoltan Varga  <vargaz@gmail.com>
3317         * aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
3318         which have a different name.
3320         * aot-runtime.c (mono_aot_get_method): Special case the array generic iface
3321         wrappers and Array.GetGenericValueImpl ().
3323         * aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
3324         because of the change above.
3326         * generics.cs: Add a test for full aot + generic array ifaces.
3328 2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>
3330         * aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable 
3331         that hides the previous one.
3333 2009-10-18  Zoltan Varga  <vargaz@gmail.com>
3335         * aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
3336         marshalled. Fixes #541623.
3338 2009-10-16  Zoltan Varga  <vargaz@gmail.com>
3340         * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
3342 2009-10-15  Zoltan Varga  <vargaz@gmail.com>
3344         * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
3346 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
3348         * mini-posix.c (sigprof_signal_handler):
3349         Implemented support for building stat call chans in different ways.
3351 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
3353         * mini-exceptions.c (mono_find_jit_info):
3354         Also check that a jit info has been found (fixes a profiler crash).
3356 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
3358         * mini.c (mono_codegen):
3359         Call mono_profiler_code_buffer_new with correct code address.
3361 2009-10-14  Zoltan Varga  <vargaz@gmail.com>
3363         * driver.c (mono_main): Change the date in the copyright.
3365 2009-10-14  Mark Probst  <mark.probst@gmail.com>
3367         * method-to-ir.c (mono_method_to_ir): Don't use a managed array
3368         allocator in shared generic code for open classes, because we
3369         can't get those classes' vtables.  We need to make managed
3370         allocators not depend on the vtable at compile-time to solve this.
3372 2009-10-13  Martin Baulig  <martin@ximian.com>
3374         * debug-mini.c (mono_debugger_trampoline_compiled): Add
3375         `const guint8 *trampoline' argument; send both the old and the new
3376         notification.
3378 2009-09-30  Zoltan Varga  <vargaz@gmail.com>
3380         * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
3381         mono_runtime_capture_context () without calling mono_runtime_invoke ().
3382         (can_marshal_struct): Skip structures with auto layout.
3384         * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
3386 2009-10-02  Zoltan Varga  <vargaz@gmail.com>
3388         * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
3389         (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
3390         a variable to hold the stack slot used by the int<->float conversion opcodes.
3392         * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
3394 2009-10-04  Zoltan Varga  <vargaz@gmail.com>
3396         * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
3397         when using full-aot.
3399 2009-10-06  Zoltan Varga  <vargaz@gmail.com>
3401         * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
3402         each instance of Comparer<T>.
3404         * generics.cs: Add a new test.
3406 2009-10-09  Zoltan Varga  <vargaz@gmail.com>
3408         * driver.c (parse_debug_options): Add a 'gdb' option.
3410         * mini.c (mini_parse_debug_options): Add a 'gdb' option.
3412         * image-writer.c: Add support for emitting the image into a memory buffer.
3414         * dwarfwriter.c: Add support for sharing one IL file between multiple images.
3416         * aot-compiler.c: Add support for registering debug info with GDB using the
3417         new JIT debugging interface in GDB 7.0. It can be turned on by setting
3418         MONO_XDEBUG to 'gdb'.
3420 2009-10-10  Zoltan Varga  <vargaz@gmail.com>
3422         * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
3423         gdb mode.
3425 2009-10-11  Zoltan Varga  <vargaz@gmail.com>
3427         * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
3428         can be used to set breakpoints in gdb.
3430         * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
3431         segment to an absolute address.
3433 2009-10-13  Mark Probst  <mark.probst@gmail.com>
3435         * method-to-ir.c: Use the managed array allocator method if
3436         available.
3438 2009-10-13  Bill Holmes  <billholmes54@gmail.com>
3440         * aot-compiler.c : Fix the MSVC builds
3442         Code is contributed under MIT/X11 license.
3444 2009-10-13  Zoltan Varga  <vargaz@gmail.com>
3446         * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
3447         avoid registering 1 symbol file per method with gdb.
3449 2009-09-29  Zoltan Varga  <vargaz@gmail.com>
3451         * mini-sparc.c: Fix the handling of enums with base type long.
3453         * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
3455         * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
3456         instead of using type->data.klass as the later doesn't work with generics.
3458 2009-09-25  Mark Probst  <mark.probst@gmail.com>
3460         * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
3461         mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
3462         mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
3463         works differently now and we don't handle it in the JIT anymore.
3465         * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
3466         debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
3467         the Thread class split.
3469 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
3471         * driver.c: Don't run tests with the obsolete treeprop optimization.
3473         * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
3474         variable volatile. Fixes #541577.
3476         * basic-calls.cs: Add a new test.
3478         * basic-long.cs: Remove tests which are now in basic-calls.cs.
3480 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
3482         * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
3483         work/required with recent iphone sdk versions.
3485         * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
3486         structures.
3488         * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
3489         in the VCALL decomposition code.
3491 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
3493         * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
3495         * basic.cs: Add a test.
3497         * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
3498         generic invokes.
3500         * mini-exceptions.c (mini_jit_info_table_find): New helper function which
3501         searches all the domains of the current thread.
3503         * exceptions-<ARCH>.c: Use it. Fixes #539394.
3505 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
3507         * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
3508         so catching exceptions thrown in the same method works. Fixes exception17.exe.
3510         * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
3511         for non-jit trampolines.
3513         * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
3515         * aot-compiler.c (add_wrappers): Ditto.
3517         * mini-arm.c: Implement support for passing vtypes and floats, and increase
3518         the size of the param area used by dyn_call to 6 which covers the majority of
3519         methods.
3521         * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
3523         * mini-arm.c: Implement support for passing/receiving
3524         longs and receiving floats in the dyn_call code.
3526         * mini-amd64.c: Implement support for receiving vtypes in registers in
3527         the dyn_call code.
3529         * mini.c mini-amd64.c: Implement partial support for passing vtypes in
3530         the dyn_call code.
3532 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
3534         * mini-arm.c (get_call_info): Return more precise information in
3535         ArgInfo->regtype.
3536         (dyn_call_supported): Use the information in CallInfo.
3538         * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
3540         * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
3541         code.
3543         * mini-arm.c: Update after the dyn_call api changes.
3545         * mini.c (mini_create_jit_domain_info): Register a destructor function
3546         for the runtime_invoke_hash.
3548         * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
3549         'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
3550         this function.
3551         (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
3552         (dyn_call_supported): Simplify this by using get_call_info ().
3553         (mono_arch_dyn_call_free): New destructor function.
3555         * generics.cs: Remove a printf.
3557         * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
3559         * mini-arm.c: Add support for enum return values and passing a few arguments
3560         on the stack.
3561         
3562         * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
3563         dyn invoke.
3565         * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
3567         * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
3568         the dynamic invoke wrappers.
3570         * mini-arm.c: Implement OP_DYN_CALL for arm.
3572         * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
3573         supported by the dynamic runtime invoke wrapper.
3575         * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
3576         runtime invoke wrapper.
3578         * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
3579         if possible when running with full-aot.
3581         * mini-ops.h: Add OP_DYN_CALL opcode.
3583         * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
3584         with dynamic arguments lists similar to libffi.
3586 2009-09-19  Zoltan Varga  <vargaz@gmail.com>
3588         * method-to-ir.c: Fix the previous change on 64 bit platforms.
3589         
3590         * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
3591         to NEWARR.
3593         * iltests.il.in: Add a new test.
3594         
3595 2009-09-18  Zoltan Varga  <vargaz@gmail.com>
3597         * aot-compiler.c (add_generic_instances): Add more instances of
3598         GenericEqualityComparer.
3600 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
3602         * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
3604 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
3606         * method-to-ir.c: Handle failures from mono_class_vtable. Added some
3607         comments on some functions that now can fail.
3609 2009-09-17  Andrew Jorgensen  <ajorgensen@novell.com>
3611         * Makefile.am: Add Info.plist to EXTRA_DIST
3613 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
3615         * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
3616         static synchronized wrappers. Fixes #539500.
3618 2009-09-14  Rodrigo Kumpera  <rkumpera@novell.com>
3620         * jit-icalls.c (mono_class_static_field_address): handle vtable failure
3621         properly.
3623 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
3625         * mini-exceptions.c (mono_handle_exception_internal): Store the computed
3626         lmf before calling filter clauses as well. Fixes #539550.
3628         * exceptions.cs: Add a test.
3629         
3630 2009-09-14  Zoltan Varga  <vargaz@gmail.com>
3632         * aot-compiler.c (add_generic_class): Add instances of
3633         Array.GetGenericValueImpl as well.
3635         * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
3636         can be tested too.
3638         * generics.cs: Add a fullaot linq test.
3640 2009-09-10  Zoltan Varga  <vargaz@gmail.com>
3642         * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
3643         reg r1 on arm.
3645 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
3647         * mini-trampolines.c (mono_delegate_trampoline) : Call
3648           mono_cominterop_get_invoke if the delegate target object
3649           is a COM object.
3651         Code is contributed under MIT/X11 license.
3653 2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
3655         * method-to-ir.c: For CoreCLR throw a SecurityException if an 
3656         internal call is defined outside platform code. Reduce code 
3657         duplication with existing [Method|Field]AccessException
3659 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
3661         * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
3662         if the return value is a small struct passed on regs.
3664 2009-09-09  Zoltan Varga  <vargaz@gmail.com>
3666         * cpu-arm.md mini-arm.c: Remove unused opcodes.
3668         * mini-codegen.c: Enable the cpu description validation for arm.
3670 2009-09-08  Zoltan Varga  <vargaz@gmail.com>
3672         * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
3673         test which depends on structs to objects.cs.
3674         
3675         * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
3676         require object model related stuff working.
3678         * cpu-x86.md mini-x86.c: Remove more unused opcodes.
3680         * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
3682         * mini-codegen.c (mono_local_regalloc): Validate the cpu description 
3683         against the instruction metadata in mini-ops.h. amd64 only for now.
3685         * mini-ops.h: Fix some instruction descriptions.
3687         * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
3688         unused instructions.
3690 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
3692         * exceptions.cs: Add a new test.
3694 2009-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
3696         * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
3698 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
3700         * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
3701         skip empty phi opcodes.
3702         
3703         * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
3704         correctly by zero extending after loads. Skip methods containing calls
3705         to the monitor enter/exit trampolines.
3707         * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
3708         when calling mono_thread_force_interruption_checkpoint ().
3710         * mini.c (mini_method_compile): Disable llvm when AOT compiling.
3712         * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
3713         64 bit thunks.
3714         (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
3716         * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a 
3717         bootstrap could run.
3719 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
3721         * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
3723 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
3725         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
3726         of the method to
3727         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
3728         LLVM might be very short.
3730         * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
3731         in OP_THROW/RETHROW.
3733         * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
3734         alignment on osx.
3736 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
3738         * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
3739         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
3740         LLVM might be very short.
3742 2009-09-01  Zoltan Varga  <vargaz@gmail.com>
3744         * exceptions-x86.c (throw_exception): Fix the previous change by substracting
3745         the alignment for the value of sp.
3747 2009-09-01  Geoff Norton  <gnorton@novell.com>
3749         * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to 
3750         managed wrappers in full aot.
3752 2009-08-31  Zoltan Varga  <vargaz@gmail.com>
3754         * exceptions-x86.c (get_throw_exception): Align the stack on osx.
3756 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
3758         * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
3760 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
3762         * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
3764         * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
3765         saved info.
3767         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3769         * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
3770         depend on the info MonoMethodHeader which could be missing in IL stripped
3771         assemblies.
3773 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
3775         * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
3776         they are only 4 byte aligned.
3778 2009-08-21  Zoltan Varga  <vargaz@gmail.com>
3780         * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
3781         was done previously, since using SP causes too many problems.
3783         * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
3784         frames without a frame pointer works.
3786         * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
3787         global register in methods with calls, since the calls can go through
3788         a static rgctx trampoline which doesn't save it.
3790 2009-08-19  Zoltan Varga  <vargaz@gmail.com>
3792         * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
3794 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
3796         * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
3798 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3800         * method-to-ir.c: Fix warnings for uninitialized variables.
3802 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3804         * mini-exceptions.c:
3805         * aot-compiler.c: Fix printf warnings.
3807 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
3809         * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
3810         Add GetGenericValueImpl<string>.
3811         
3812         * aot-compiler.c (add_generic_instances): Add instances of
3813         GenericEqualityComparer<T> for primitive types. Only emit the array
3814         wrappers into the mscorlib image.
3816 2009-08-15  Zoltan Varga  <vargaz@gmail.com>
3818         * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
3819         the methods_loaded array using amodule->info->nmethods.
3821         * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
3822         (MONO_AOT_FILE_VERSION): Bump this.
3824         * aot-compiler.c: Emit more generic instances allowing some parts of linq
3825         to work.
3827         * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
3828         MonoJitInfo doesn't belong to its methods aot image.
3830 2009-08-14  Zoltan Varga  <vargaz@gmail.com>
3832         * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
3834         * mini-arm.c: Fix warnings.
3835         
3836         * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
3838         * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
3839         supports it.
3841 2009-08-12  Zoltan Varga  <vargaz@gmail.com>
3843         * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
3844         avoid clobbering IP.
3846         * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
3847         hold the trampoline argument, so its initial value is available during
3848         debugging.
3850 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3852         * exceptions-arm.c:
3853         * exceptions-hppa.c:
3854         * mini.c:
3855         * exceptions-s390x.c:
3856         * exceptions-mips.c:
3857         * exceptions-ppc.c:
3858         * exceptions-sparc.c:
3859         * exceptions-alpha.c:
3860         * aot-runtime.c:
3861         * mini-trampolines.c:
3862         * exceptions-x86.c:
3863         * exceptions-s390.c: add and use #define's instead of sizeof()
3864         for MonoJitInfo and MonoJitInfoTable.
3866 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
3868         * tramp-arm.c:
3869         * tramp-amd64.c:
3870         * tramp-ppc.c:
3871         * tramp-x86.c: use a #define instead of sizeof() for a few
3872         structures that use a zero-length array.
3874 2009-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
3876         * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
3877         case when the method is dynamic. Fixes #529238.
3879 2009-08-06  Zoltan Varga  <vargaz@gmail.com>
3881         * mini.c (mono_jit_compile_method_inner): Throw an exception instead
3882         of asserting when a method is JIT compiled in full-aot mode.
3884 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
3885         
3886         Contributed under the terms of the MIT/X11 license by
3887         Jerry Maine <crashfourit@gail.com>.
3888         
3889         * fixed wrong dates in changelog.
3891 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
3892         
3893         Contributed under the terms of the MIT/X11 license by
3894         Jerry Maine <crashfourit@gail.com>.
3896         * basic-simd.cs: added test for packed double square root.
3897         * cpu-amd64.md: added opcode info for packed double square root.
3898         * cpu-x86.md: added opcode info for packed double square root.
3899         * mini-ops.h: added IR opcode for packed double square root.
3900         * mini-x86.c: added IR to native translation code for packed double square root.
3901         * mini-amd64.c: removed todo for packed double square root.
3902         * simd-intrinsics.c: added method to IR opcode converstion for
3903         packed double square root.
3905 2009-08-03 Jerry Maine <crashfourit@gmail.com>
3907         Contributed under the terms of the MIT/X11 license by
3908         Jerry Maine <crashfourit@gail.com>.
3910         * mini-amd64.c: Added a change to help tell the difference as 
3911         to what perpose the xmm register is being used--mainly to help
3912         with debuging.
3913         * mini-amd64.h: Changed callee regs to use 15 out of 16 
3914         (one used for special cases) xmm registers for both fp
3915         and simd ops. Added define to turn on new feature in the regalloc
3916         that allows fp and simd ops to share the xmm regs happily.
3917         * codegen.c: Added code to detect for which perpose an xmm reg is
3918         being used (fp or simd) and to translate back and forth to the
3919         correct logical reg bank (fp or simd) for 'spill load's.
3921 2009-08-03 Jerry Maine <crashfourit@gmail.com>
3923         Contributed under the terms of the MIT/X11 license by
3924         Jerry Maine <crashfourit@gail.com>.
3926         * basic-simd.cs: Added tests for stressing the regalloc when running with
3927         16 simd regs and when simd and fp ops share the same reg bank.
3929 2009-08-01  Mark Probst  <mark.probst@gmail.com>
3931         * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
3932         in shared generic code, we might have to look up the class in the
3933         RGCTX.  If we use the class directly, compute its GC descriptor.
3935 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
3937         * mini.c (mono_jit_runtime_invoke): Fix a warning.
3939 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
3941         * mini.c (mono_jit_runtime_invoke): Initialize the class and
3942         check for errors. Fixed the case when the class with the Main
3943         method is broken.
3945 2009-07-31 Jerry Maine <crashfourit@gmail.com>
3947         Contributed under the terms of the MIT/X11 license by
3948         Jerry Maine <crashfourit@gail.com>.
3950         * cpu-amd64.md: Fixed simple bug in machine discrition file.
3952 2009-07-31  Zoltan Varga  <vargaz@gmail.com>
3954         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
3956 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
3958         * method-to-ir.c: Fix naming of stelem and ldelem.
3960 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
3962         * driver.c (main_thread_handler): Check that the assembly loaded
3963         matches the filename when doing AOT.
3965 2009-07-30  Mark Probst  <mark.probst@gmail.com>
3967         * mini.c: get_ip_from_sigctx installer has been removed, so don't
3968         call it anymore.
3970         * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
3971         utils/mono-sigcontext.h).
3973         * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
3974         #ifdef.
3976 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
3978         * mini.c (mono_codegen):
3979         Call profiler hook to keep track of method code buffers.
3981 2009-07-27  Mark Probst  <mark.probst@gmail.com>
3983         * method-to-ir.c: Invoke write barriers for the
3984         Interlocked.(Compare)Exchange JIT intrinsics.
3986 2009-07-26  Raja R Harinath  <harinath@hurrynot.org>
3988         * Makefile.am (version.h): Fix issues when built out of tree.
3989         Remove some redundant 'grep's piped through 'sed's.
3991 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
3993         This patch is contributed under the terms of the MIT/X11 license
3995         * mini-ppc.c (mono_arch_output_basic_block):
3996         (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
3997         for bits 32-47 with signed load/store diplacements for bits
3998         48-63.  Use prefered base/offset order for indexed form.
3999         (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
4000         (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
4001         OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
4002         OP_LOADI2_MEMBASE): Same.
4003         (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
4004         OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
4005         (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
4006         indexed form.
4007         (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
4008         (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
4009         OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
4010         OP_LOADI1_MEMINDEX): Same
4011         (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
4012         OP_STORER8_MEMINDEX): Same
4013         (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
4014         computations.
4015         (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
4016         for bits 32-47 with signed load/store diplacements for bits
4017         48-63.  Use prefered base/offset order for indexed form.
4019 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
4021 This patch is contributed under the terms of the MIT/X11 license
4023         * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
4024         (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
4025         (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
4026         OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
4027         (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
4028         cfg->stack_usage to avoid size warnings.
4029         (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
4030         store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
4031         (mono_arch_output_basic_block) [!__mono_ppc64__]: For
4032         OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
4033         to convert.
4034         (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa 
4035         after code varible is initialized.
4036         Add g_assert ppc_is_imm16 for ainfo->offset. Handle
4037         ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
4038         (mono_arch_emit_epilog): 
4039         Move Use ppc_load32 for cfg->stack_usage to avoid size
4040         warnings.
4042 2009-07-24  Mark Probst  <mark.probst@gmail.com>
4044         * method-to-ir.c: The write barrier doesn't do the store anymore,
4045         so we have always to emit it.  Also, emit the wbarrier after the
4046         store.
4048 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
4050         * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
4051         for argument count 3 too.
4053 2009-07-23  Zoltan Varga  <vargaz@gmail.com>
4055         * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
4056         the caller handle the exceptions.
4057         (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
4058         method. Fixes #524498.
4060 2009-07-22  Geoff Norton  <gnorton@novell.com>
4062         * mini-exceptions.c: Fix build on ia64.
4064 2009-07-22  Mark Probst  <mark.probst@gmail.com>
4066         * mini-exceptions.c (ves_icall_get_frame_info): Use write
4067         barriers.
4069 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
4071         * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
4072         code.
4074 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
4076         * basic-simd.cs (Main): Pass args to the test driver.
4078 2009-07-20  Geoff Norton  <gnorton@novell.com>
4080         * mini-x86.h: Fix the x86 version guards to use Apple's
4081         properly defined macros.
4083 2009-07-20  Geoff Norton  <gnorton@novell.com>
4085         * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
4086         aligned access.
4088 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
4090         * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
4091         MonoJitDomainInfo which maps MonoMethod's to a structure containing all
4092         the information which is needed for invokes, so only one locking+hash table
4093         lookup is needed.
4095         * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
4096         
4097         * aot-compiler.c (add_generic_instances): Emit instances of 
4098         GenericComparer<T> for primitive types.
4100 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
4102         * mini-posix.c: Fix linux build.
4104 2009-07-19  Geoff Norton  <gnorton@novell.com>
4106         * mini.h: Add prototypes for mono_runtime_syscall_fork and
4107         mono_gdb_render_native_backtraces
4108         * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
4109         so we implement the sane semantics to the runtime here
4110         (mono_gdb_render_native_backtraces).  Apple also uses an ancient gdb
4111         so we need to call it differently (mono_gdb_render_native_backtraces)
4112         * mini-posix.c: Move the old semantics from mini.c to the prototypes
4113         here for default implementations.
4114         * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
4115         support Apple's weird syscall (SYS_fork) implementation and not busy
4116         loop in abort() on native crashes on OSX anymore.
4118 2009-07-18  Zoltan Varga  <vargaz@gmail.com>
4120         * aot-runtime.c (load_method): Change the handling of the
4121         MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
4122         are used.
4124         * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
4126 2009-07-17  Zoltan Varga  <vargaz@gmail.com>
4128         * mini.c (mono_patch_info_equal): Revert the last change for now as it
4129         seems to break the aot tests.
4130         
4131         * mini.c (mono_patch_info_equal): Fix the handling of 
4132         MONO_PATCH_INFO_RGCTX_FETCH.
4134 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
4136         * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
4138         * mini.c (mono_patch_info_hash): Fix the handling of 
4139         MONO_PATCH_INFO_INTERNAL_METHOD.
4140         (mono_patch_info_equal): Ditto.
4142 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
4144         * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
4145         in a few places.
4146         
4147         * mini-llvm.c: Add some infrastructure for AOT support.
4149 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
4151         * mini-llvm-cpp.c: Update to the latest llvm api.
4152         
4153         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
4154         option to false to prevent llvm from installing signal handlers which
4155         trip up the gc.
4156         
4157 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
4159         * cpu-x86.md:
4160         * cpu-amd64.md: Revert previous change as those instructions
4161         take 2 separate arguments. Remember to read the arch docs more
4162         carefully next time.
4164 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
4166         * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
4168 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
4170         * mini-ppc.c: exploit multiple load/store units if available (rest of
4171         the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at 
4172         http://bugzilla.novell.com/show_bug.cgi?id=487846).
4174 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
4176         * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
4177         first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
4179 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
4181         * cpu-x86.md: Fix missing clobbering from trancendental simd
4182         ops.
4184         * cpu-amd64.md: Same.
4186 2009-07-14 Jerry Maine <crashfourit@gmail.com>
4188         Contributed under the terms of the MIT/X11 license by
4189         Jerry Maine <crashfourit@gail.com>.
4191         * basic-simd.cs: Added tests for single and doulble indexers.
4193         * cpu-amd64.md: Added simd opcode information.
4195         * mini-amd64.c: Added IR to native simd generation code.
4196         Added simd register names and function that returns them.
4198         * mini-amd64.h: Added marcos to turn on simd code compilation in
4199         amd64. Added max simd register count marco. Added caller/callee
4200         register mask marcos. Added marcos to use simd register bank.
4202         * mini.h: Added helper marco for shufling dwords and simple
4203         floats.
4205 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
4207         * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
4209         * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
4211         * unwind.c (mono_unwind_get_ops_from_fde): Make this return
4212         the length of the native code as well.
4214         * basic-simd.cs: Add a test for #521662.
4216 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
4218         * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
4220 2009-07-13  Mark Probst  <mark.probst@gmail.com>
4222         * mini.c: Register function for getting the IP from a signal
4223         context with metadata.
4225 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
4227         * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
4228         call a generic class init trampoline if needed. Fixes #519336.
4230         * generics.cs: Add a test.
4231         
4232 2009-07-09  Mark Probst  <mark.probst@gmail.com>
4234         * method-to-ir.c: When doing a call which might be remote from
4235         shared generic code to other shared code with open type arguments,
4236         get the remoting invoke wrapper from the RGCTX and do an indirect
4237         call to it.
4239 2009-07-03  Zoltan Varga  <vargaz@gmail.com>
4241         * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
4242         after the unbox trampoline in the full-aot case.
4244 2009-07-02  jonas echterhoff <jonas@unity3d.com>
4245         
4246         * mini.c: Move initialization of jit_mutex before debugger initialization
4247         
4248         to avoid crashes.
4249         
4250         
4251         * Info.plist: added Info.plist and link flag to enable the mono executable
4252         to access other processes. Requires codesigning of the executable to work.
4253         
4254         * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to 
4255         
4256         compile on OS X.
4257         
4259 2009-06-30  Zoltan Varga  <vargaz@gmail.com>
4261         * driver.c (mini_regression): Handle loading errors. Fixes #508869.
4263 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
4265         * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
4266         when the generic instance is an instantiation of a subclass of the
4267         methods class. Fixes #517166.
4269 2009-06-26  Zoltan Varga  <vargaz@gmail.com>
4271         * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
4272         code.
4274         * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
4275         AOTed code.
4277         * CMakeLists.txt: Add minimal support for installation.
4279 2009-06-25  Zoltan Varga  <vargaz@gmail.com>
4281         * aot-compiler.c (emit_and_reloc_code): Factor out the code to
4282         determine whenever a method is directly callable to a separate function.
4284         * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
4285         needed ones as a result of the previous change.
4287         * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
4288         type of register arrays.
4290         * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
4291         type of register arrays.
4293 2009-06-24  Jerry Maine  <crashfourit@gmail.com>
4294         
4295         Contributed under the terms of the MIT/X11 license by
4296         Jerry Maine <crashfourit@gail.com>.
4298         * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
4300 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
4302         * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
4304 2009-06-24  Neale Ferguson <neale@sinenomine.net>
4306         * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
4307         dump of structure return value. Fix some formatting.
4308         * cpu-s390x.md: Fix lengths of instruction sequences.
4309         * mini-s390.c: Minor formatting changes.
4311 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
4313         * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
4314         Use sigaction on freebsd as well.
4316 2009-06-23  Zoltan Varga  <vargaz@gmail.com>
4318         * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
4319         uses #ifdef on it.
4320         
4321         * mini.c (mini_init): Revert a change which breaks cross-compilation.
4323 2009-06-22  Mark Probst  <mark.probst@gmail.com>
4325         * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
4327 2009-06-22  Mark Probst  <mark.probst@gmail.com>
4329         * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
4331 2009-06-20  Martin Baulig  <martin@ximian.com>
4333         * debug-mini.c
4334         (MonoDebuggerThreadFlags): New enum typedef.
4335         (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
4336         (mono_debugger_thread_created): Added `gpointer func' argument;
4337         initialize the new `thread_flags' field.
4339 2009-06-18  Martin Baulig  <martin@ximian.com>
4341         * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
4342         (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
4344         * debug-debugger.c
4345         (mini_debugger_set_attach_ok): New function; sets the attach-ok
4346         flag in `MONO_DEBUGGER__info.runtime_info'.
4348         * driver.c
4349         (mono_main): Call mini_debugger_set_attach_ok() if generics
4350         sharing is disabled.
4352 2009-06-22  Zoltan Varga  <vargaz@gmail.com>
4354         * aot-compiler.c (add_wrappers): Fix a warning.
4356         * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
4357         the ppc load/store macro changes.
4359 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
4361         * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
4363         * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
4364         not just the got symbol.
4366         * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
4367         on ppc.
4369         * aot-compiler.c unwind.c: Add infrastructure for unwind support on
4370         ppc.
4371         
4372         * aot-compiler.c: Remove some fixmes.
4374         * driver.c (mono_main): Print a helpful message when cross-compiling.
4376         * mini.c (mini_init): Disable signal handlers when cross-compiling.
4378         * method-to-ir.c (initialize_array_data): Do the optimization if the
4379         target byte order is little endian, instead of the host byte order.
4381         * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
4382         wrappers into the mscorlib image, Emit a unique plt symbol for each
4383         image, emit symbols for plt entries.
4385         * image-writer.c (img_writer_emit_symbol_size): New function to emit
4386         a .size directive.
4387         
4388 2009-06-20  Zoltan Varga  <vargaz@gmail.com>
4390         * aot-compiler.c (add_wrappers): Avoid calling 
4391         mono_marshal_get_type_info () since it can assert for some types.
4393         * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of 
4394         ldtoken are used inside wrappers.
4396         * helpers.c: Add support for prefixing tools with the arch name.
4398         * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
4399         quantities when using ilp32.
4401         * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
4402         spill slots. Use sizeof(mgreg_t) for the spill slot size.
4404         * image-writer.c: Use .long on ilp32.
4406         * aot-compiler.c: Use 32 bit loads on ilp32.
4407         
4408 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
4410         * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
4412         * mini-ops.h: Use TARGET_POWERPC define for consistency.
4414         * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
4416         * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the 
4417         second got slot of every aot image.
4418         
4419         * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
4420         aot on platforms with function pointers.
4422         * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
4423         support for aot/full aot on ppc/ppc64.
4424         
4425         * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
4426         arguments which are needed on ppc.
4428         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
4429         argument.
4431         * mini-trampolines.c aot-runtime.c: Update after the above changes.
4432         
4433         * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
4435         * regalloc2.c (BITS_PER_CHUNK): Ditto.  
4437         * aot-compiler.c (emit_got_info): Fix reading unused memory.
4439         * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
4441 2009-06-17  Geoff Norton  <gnorton@novell.com>
4443         * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
4445 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
4447         * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
4448         to control whenever the dwarf writer is in xdebug or aot mode.
4449         (emit_class_dwarf_info): Use a separate abbrev for structures without
4450         children.
4452         * aot-compiler.c: Pass the appending parameter to 
4453         mono_dwarf_writer_create ().
4455         * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
4456         falls through to its next bblock. Fixes #513931.
4458         * iltests.il: Add a test.
4460         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
4461         infor even if emit_line is FALSE, as the apple linker seems to require it.
4463         * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
4465         * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
4466         gcc does.
4467         (emit_fde): Ditto.
4469 2009-06-15  Zoltan Varga  <vargaz@gmail.com>
4471         * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
4472         mips build.
4474 2009-06-13  Zoltan Varga  <vargaz@gmail.com>
4476         * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
4477         'has_call_handler' fields.
4479         * method-to-ir.c (mono_method_to_ir): Set them if needed.
4481         * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
4482         first bblock if not needed. Fixes #512790.
4483         
4484 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
4486         * aot-compiler.c (mono_compile_assembly): Fix a warning.
4487         
4488         * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
4489         wrappers.
4491         * aot-runtime.c (mono_aot_get_method): Use the original method's code for
4492         remoting-invoke-with-check wrappers, which are not needed when running with
4493         full-aot, since it doesn't support remoting.
4494         
4495 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
4497         * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
4499         * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
4500         method info, it is not used anymore.
4502         * mini.h: Bump AOT file format version.
4503         
4504         * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
4505         word smaller.
4507         * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
4508         change above.
4509         
4510         * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
4512         * mini.h: Bump AOT file format version.
4513         
4514 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
4516         * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
4517         TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
4518         iphone.
4520         * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
4521         of CKFINITE and FBGE for VFP.
4523 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
4525         * aot-compiler.c: Don't align code to 16 bytes on arm.
4526         
4527         * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
4528         before the methods they belong to.
4530         * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
4531         the full-aot case if possible, since the trampoline will be called right 
4532         away.
4534         * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
4535         trampolines to 1024 after the change above.
4537         * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
4538         trampoline to save 8 bytes per trampoline.
4540         * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
4541         change above.
4543 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
4545         * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
4547 2009-06-08  Martin Baulig  <martin@ximian.com>
4549         * debug-mini.c
4550         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
4551         (_mono_debugger_throw_exception): Don't make this static.
4552         (_mono_debugger_unhandled_exception): Likewise.
4553         (mono_debugger_handle_exception): Moved to mini-exceptions.c
4555         * debug-mini.c
4556         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
4557         (_mono_debugger_throw_exception): Add function prototype.
4558         (_mono_debugger_unhandled_exception): Likewise.
4560         * mini-exceptions.c
4561         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
4562         arg; return the first exception handler if the exception is caught
4563         and we're running inside the debugger.
4564         (mono_debugger_handle_exception): Moved here from debug-mini.c;
4565         improve exception handle inside runtime-invoke, check whether the
4566         exception is actually caught in the method being invoked and not
4567         by the runtime-invoke-wrapper.
4569 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
4571         * image-writer.c: Improve support for the osx assembler.
4573         * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
4574         support them.
4576 2009-06-08  Martin Baulig  <martin@ximian.com>
4578         * debug-mini.c
4579         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
4580         (_mono_debugger_throw_exception): Don't make this static.
4581         (_mono_debugger_unhandled_exception): Likewise.
4582         (mono_debugger_handle_exception): Moved to mini-exceptions.c
4584         * debug-mini.c
4585         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
4586         (_mono_debugger_throw_exception): Add function prototype.
4587         (_mono_debugger_unhandled_exception): Likewise.
4589         * mini-exceptions.c
4590         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
4591         arg; return the first exception handler if the exception is caught
4592         and we're running inside the debugger.
4593         (mono_debugger_handle_exception): Moved here from debug-mini.c;
4594         improve exception handle inside runtime-invoke, check whether the
4595         exception is actually caught in the method being invoked and not
4596         by the runtime-invoke-wrapper.
4598 2009-06-07  Zoltan Varga  <vargaz@gmail.com>
4600         * image-writer.c (append_subsection): Don't align subsections of the
4601         debug_line section as a workaround.
4603         * dwarfwriter.c: Emit line number info in the AOT case as well.
4605 2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
4607         This patch is contributed under the terms of the MIT/X11 license
4609        * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
4610        code_len <= code_size
4612 2009-06-06  Zoltan Varga  <vargaz@gmail.com>
4614         * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
4616 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
4618         * aot-compiler.c aot-runtime.c: Delete references to static rgctx
4619         invoke wrappers, we now use trampolines instead.
4621 2009-06-04  Mark Probst  <mark.probst@gmail.com>
4623         * mini-darwin.c: The exception thread must not be registered with
4624         the GC.
4626 2009-06-04  Mark Probst  <mark.probst@gmail.com>
4628         * mini-gc.c: Disable the code because it makes SGen crash.
4630 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
4632         * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
4633         instead of asserting.
4635 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
4637         * aot-compiler.c (mono_compile_assembly): Move the creation of the
4638         output file after the code has been compiled.
4640 2009-05-30  Zoltan Varga  <vargaz@gmail.com>
4642         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
4644 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
4646         * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
4647         entries distinction to simplify the code.
4649         * mini.h: Bump AOT file format version.
4650         
4651 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
4653         * objects.cs: Fix the signature of one of the tests.
4655         * mini.c (mini_create_ftnptr): New helper function, moved here from
4656         object.c.
4657         (mini_get_addr_from_ftnptr): Ditto.
4658         (mini_init): Install the new helpers.
4660 2009-05-28  Martin Baulig  <martin@ximian.com>
4662         Correctly initialize the debugger when embedding Mono.
4664         * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
4665         `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
4666         see documentation in mini_debug_running_inside_mdb().
4668         * debug-debugger.c
4669         (mini_debug_running_inside_mdb): New function to check whether
4670         we're running inside mdb.
4672         * mini.c (mini_init): Call mini_debugger_init() if we're running
4673         inside the debugger.
4675         * driver.c (mono_main): Moved the call to mini_debugger_init()
4676         into mini_init() to make this work when embedding Mono.
4678         * debug-debugger.c (mini_debugger_init): Warn about duplicate
4679         calls to mini_debugger_init().
4681         * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
4682         mono_debugger_main() -> mini_debugger_main() and put them inside a
4683         `MONO_DEBUGGER_SUPPORTED' conditional.
4685 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
4687         * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
4688         this is no longer in use.
4689         * mini.h: Same.
4691 2009-05-26  Zoltan Varga  <vargaz@gmail.com>
4693         * mini-sparc.c (add_outarg_load): Fix the sparc build.
4695         * aot-compiler.c (emit_method_code): Always write out C style symbols for
4696         methods.
4698 2009-05-27  Martin Baulig  <martin@ximian.com>
4700 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4702         * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
4703         long_conv_to_r_un to 64 bits.
4705         * cpu-x86.md: Increase the instruction size due to the changes.
4707         * iltests.il.in: Add regression test.
4709         Fixes #467201.
4711 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4713         * objects.cs: Move the previous test from basic.cs to here.
4715 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4717         * basic.cs: Add regression test for #506915.
4719 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4721         * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
4722         optimization we must check the bb of the first byte of stobj as
4723         it's the only one set in cil_offset_to_bb.
4725         Fixes #506915.  
4727 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
4729         * image-writer.c: Fix pointer directive on ppc64.
4731 2009-05-24  Zoltan Varga  <vargaz@gmail.com>
4733         * image-writer.c (asm_writer_emit_section_change): Avoid using
4734         .bss subsections on ppc too.
4736 2009-05-23  Zoltan Varga  <vargaz@gmail.com>
4738         * image-writer.c: Fix the definition of TARGET_ASM_....
4739         
4740         * image-writer.c: Fix the emission of assembler directives in the last
4741         change.
4743         * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
4744         exception throwing code to accomodate ppc64.
4746         * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
4747         size to work on ppc64 too.
4749         * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
4750         too.
4752         * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
4753         the assembler dialect instead of using platform specific defines.
4755 2009-05-22  Geoff Norton  <gnorton@novell.com>
4757         * mini-arm.c (get_call_info): If a structure is split between the stack
4758         and argument registers, we should not advance the stack pointer by the entire
4759         native size, but just by the amount that spilled.
4761 2009-05-22  Zoltan Varga  <vargaz@gmail.com>
4763         * mini-arm.c (get_call_info): Handle structures with alignment requirements
4764         correctly.
4766 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
4768         * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
4769         wrappers normally.
4770         
4771         * aot-compiler.c (add_extra_method): Fix up the collection of extra
4772         methods so wrapper don't get added twice.
4773         (add_generic_instances): Don't add methods of arrays.
4775         * generics.cs: Mark one test as !FULLAOT.
4777 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
4779         * mini-x86.c (emit_move_return_value): Remove unused vars.
4781 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
4783         * mini-x86.c (mono_arch_emit_call): The decompose code now supports
4784         decomposing 8 bytes structs into a LCALL.
4786         * mini-x86.c (emit_move_return_value): We no longer push the vtype
4787         pointer for where to store the returned regs.
4789         * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
4790         state the concern.
4792         Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
4794 2009-05-20  Miguel de Icaza  <miguel@novell.com>
4796         * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
4797         without getenv.
4799 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
4801         * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
4803         * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
4804         generics.
4806 2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
4808         * local-propagation.c (mono_local_cprop): Avoid local propagation
4809         across paired add/sub if the first instruction dest reg is it's
4810         source reg. For example:
4812         int_add_imm R12 <- R12 [1] clobbers: 1
4813         int_sub_imm R42 <- R12 [1] clobbers: 1
4815         The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
4816         maintain the math identify.
4818         Fixes #505375.
4820 2009-05-20  Andreia Gaita  <avidigal@novell.com>
4822         * Makefile.am: avoid going on the network just to get the revision,
4823         use git log instead
4825 2009-05-19  Massimiliano Mantione  <massi@ximian.com>
4827         Fixed estimate for short branches on amd64 (they were off mark, and
4828         enabling call prolog-epilog instrumentations caused assertions).
4829         * mini.h (struct MonoBasicBlock): added max_length field to hold the
4830         estimate for the maximum length of this basic block.
4831         * mini-amd64.c:
4832         - mono_arch_emit_prolog: compute max_length for each basic block
4833           (instead of max_offset), and inflate size estimate also for entry bb
4834           in case of code instrumentation.
4835         - mono_arch_output_basic_block: get rid of "cpos" (the current
4836           estimated "position" in the code), and always use "offset" instead,
4837           which is accurate; at the beginning of the function quickly recompute
4838           max_offset for all the remaining blocks, starting from the current
4839           cfg->code_len (which is correct, and not estimated) and using the
4840           estimated block lengths computed previously.
4842 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
4844         * exceptions-ppc.c: Remove the caching from the trampoline creation 
4845         functions, it is already done in the caller.
4847         * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
4849         * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
4850         MONO_ARCH_GSHARED_SUPPORTED define.
4852         * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
4854         * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
4855         function.
4857 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
4859         * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
4860         call to mono_marshal_get_rgctx_invoke ().
4862         * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
4863         mono_marshal_get_static_rgctx_invoke (), all platforms which support
4864         gshared use the static rgctx trampolines now.
4865         
4866         * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
4867         platform supports it.
4869 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
4871         * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
4873         * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
4875 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
4877         * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
4879         * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
4880         for ppc.
4882 2009-05-15  Massimiliano Mantione  <massi@ximian.com>
4884         Made it possible for mono_arch_instrument_epilog to preserve
4885         argument registers, otherwise instrumenting the "epilogue" before
4886         a tail call would clobber them.
4887         * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
4888         if like mono_arch_instrument_epilog but with an additional parameter
4889         that states if argument registers must be preserved.
4890         * mini.c: implemented mono_arch_instrument_epilog as a call to
4891         mono_arch_instrument_epilog_full without asking to preserve argument
4892         registers (this makes the existing code work as usual).
4893         * mini-amd64.c:
4894         - mono_arch_instrument_epilog: add parameter to transform it into
4895         mono_arch_instrument_epilog_full, and preserve argument registers
4896         when required.
4897         - mono_arch_output_basic_block, OP_TAILCALL case: call
4898         mono_arch_instrument_epilog_full.
4899         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4900         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
4901         only transformed mono_arch_instrument_epilog into
4902         mono_arch_instrument_epilog_full.
4904 2009-05-15  Geoff Norton  <gnorton@novell.com>
4906         * mini-darwin.c: This works on arm now.
4908 2009-05-14  Geoff Norton  <gnorton@novell.com>
4910         * jit.h, driver.c: Allow full-aot to be decided programatically by the
4911         embedding api.
4913 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
4915         * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
4916         label names.
4918         * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
4919         wrappers during full aot mode correctly.
4921         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
4922         methods correctly.
4924         * aot-compiler.c (mono_aot_method_hash): Use our internal version of
4925         mono_metadata_type_hash ().
4927 2009-05-14  Massimiliano Mantione  <massi@ximian.com>
4929         * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
4930         mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
4931         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
4932         Removed MONO_INST_BRLABEL from the instruction flags, and the
4933         remaining code that used it, because we do not support branches inside
4934         basic blocks (and branch target labels) anymore.
4935         * Makefile.am: As part of the above cleanup, remove reference to
4936         BURG files which don't exist anymore.
4938 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
4940         * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
4941         osx.
4943         * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
4944         to use mono_arch_throw_corlib_exception.
4946         * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
4947         mono_arch_throw_corlib_exception for throwing corlib exceptions.
4949         * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
4950         domain mempool.
4952         * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
4954         * aot-compiler.c: Emit a local symbol prefixed with the assembly name 
4955         for the got to make debugging easier and to avoid confusing it with the
4956         system got.
4957         
4958         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
4959         method so a breakpoint can be set when using gdb.
4961 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
4963         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
4964         on mono_method_get_imt_slot ().
4966         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
4967         num_decodes variables.
4969         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
4970         change as it doesn't seem to work.
4971         
4972         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
4973         wrappers.
4975 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
4977         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
4978         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
4980         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
4981         builder when using full aot.
4983         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
4984         here, it is already handled.
4985         
4986         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
4987         correctly for IMT.
4989         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
4991         * mini-arm.h: Enable IMT for full aot.
4992         
4993         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
4994         arch doesn't support it.
4996         * mini.c (mini_init): Don't disable IMT for full aot if the
4997         architecture supports it.
4999         * mini.h (MonoAotTrampoline): New enum containing the different types
5000         of 'numerous' trampolines.
5001         (MONO_AOT_FILE_VERSION): Bump this.
5003         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
5004         static rgctx trampolines. Add support for full-aot IMT thunks.
5006         * mini-amd64.h: Enable IMT for full aot.
5008         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
5009         to exclude tests belonging to a category.
5011         * generics.cs: Mark some tests with a !FULLAOT category.
5013         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
5014         generics tests.
5016 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
5018         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
5019         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
5020         (emit_plt): Fix a warning.
5022 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
5024         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
5025         back into aot-compiler.c to a place where the other functions shared by
5026         the runtime and aot compiler are.
5027         
5028         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
5029         as done previously, instead of in MonoAotFileInfo, since pointers might have
5030         alignment requirements.
5032         * mini.h: Bump AOT file format version.
5034 2009-05-10  Miguel de Icaza  <miguel@novell.com>
5036         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
5037         that is used at runtime from the aot-compiler.c, this makes it
5038         work on setups that remove the AOT compiler from the output
5039         image. 
5041 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
5043         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
5044         PPC.
5046         * mini-ppc.h: Enable static rgctx trampolines for ppc.
5048         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
5050         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
5051         stuff to mono_arch_decompose_long_opts ().
5052         (mono_decompose_opcode): Remove some dead code.
5054 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
5056         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
5057         cmethod can be null for quite a some reasons.
5059 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
5061         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
5063 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
5065         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
5067 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
5069         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
5070         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
5071         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
5072         calls returning structures by addr on amd64.
5074         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
5076         * iltests.il.in: Restructure the tail call tests a bit.
5077         
5078 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
5080         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
5081         for virtual methods too.
5083 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
5085         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
5086         due to regression in verifying System.dll.
5088 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
5090         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
5091         in dynamic methods.
5093         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
5094         instances.
5096         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
5097         g_str_hash () which can change.
5099         * driver.c (mini_regression): Disable optimizations not supported by
5100         the cpu. Fixes #500019.
5102         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
5103         build.
5105 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
5107         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
5108         to the latest LLVM code.
5110 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
5112         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
5114 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
5116         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
5117         x86/amd64.
5119         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
5120         no longer saving offsets, so just save the patch types along with the other
5121         info.
5122         * aot-runtime.c (load_patch_info): Update after the changes to 
5123         encode_patch_list ().
5124         (decode_got_entry): Removed, merged into load_patch_info ().
5125         (is_shared_got_patch): Removed, call the same function from
5126         aot-compiler.c.
5128         * mini.h: Bump aot file format version.
5129         
5130         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
5131         half-finished no-dlsym code.
5133         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
5134         option.
5136         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
5137         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
5139 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
5141         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
5142         buffer length to work with AOT code.
5144         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
5145         ldfld/stfld opcodes.
5147         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
5148         as it is not used.
5150         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
5152         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
5154         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
5155         LLVM API.
5157         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
5158         if needed. Don't decompose long operations when using llvm.
5160 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
5162         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
5163         PAGESIZE constant.
5165         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
5167 2009-05-03  Martin Baulig  <martin@ximian.com>
5169         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
5170         mono_debugger_insert_method_breakpoint() since the class init
5171         handler we're inserting at the top of the method already gives us
5172         a notification.
5174 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
5176         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
5177         to mono_arch_decompose_long_opts () for x86 and arm.
5179 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
5181         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
5182         TARGET_AMD64 here.
5184 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
5186         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
5187         JIT code.
5189 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
5191         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
5192         number of trampolines used in full-aot mode.
5194         * aot-compiler.c: Add an ntrampolines option to set the number of 
5195         trampolines emitted in full-aot mode.
5197 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
5199         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
5200         a volatile load. Get rid of get_tempname (), llvm assigns names
5201         automatically.
5203         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
5204         builder function.
5206         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
5207         a value.
5209         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
5210         level 1.
5212         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
5213         to the same register as a fixed sreg2. Fixes #497271.
5215         * iltests.il.in: Add a new test.
5217 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
5219         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
5220         stack, since pushes complicate exception handling.
5222         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
5223         the stack if they are passed using moves.
5225         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
5227         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
5228         when using llvm.
5230         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
5231         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
5232         of FMOVE if it is an R4.
5234 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
5236         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
5238         * mini.h (LLVMCallInfo): New structure to store calling convention 
5239         information for the LLVM back end similar to the CallInfo structures in 
5240         the back-ends.
5242         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
5243         call information in a format usable by LLVM.
5244         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
5246         * method-to-ir.c (mono_emit_call_args): Emit calls using 
5247         mono_llvm_emit_call () when compiling using LLVM.
5249         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
5250         comments to all functions. Fix memory leaks. Add a public init/cleanup
5251         function.
5253         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
5255         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
5256         mono_array_new_va () jit icall.
5257         
5258 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
5260         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
5261         multiple machine description files to be specified.
5262         * mini-ops.h: fixes for cross-compilation.
5264 2009-04-22  Miguel de Icaza  <miguel@novell.com>
5266         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
5267         some porting work.
5269 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
5271         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
5272         to prevent asserts in various passes. Fixes #497220.
5274 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
5276         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
5277         a racy assert.
5279         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
5280         table to avoid duplicates.
5282         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5283         
5284         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
5285         option is used.
5287 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
5289         * mini.c (mini_method_verify): Fail fulltrust code if the exception
5290         is for method or field access.
5292 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
5294         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
5295         a Value to stdout.
5297         * mini-llvm.c (mono_llvm_emit_method): Use it.
5298         
5299         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
5300         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
5301         on volatile values.
5303         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
5304         synchronized methods.
5306         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
5308         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
5310         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
5311         OP_LOADI8_MEM.
5313         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
5314         allowing some options to be set dynamically.
5316 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
5318         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
5319         unconditional branch.
5321         * mini.h (MonoTrampolineType): Add new trampoline type 
5322         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
5323         compiled code.
5325         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
5326         function.
5328         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
5329         creation function.
5331         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
5332         is enabled. Instead, use the llvm vcall trampoline.
5333         
5334         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
5336         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
5337         
5338         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
5339         functions.
5341         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
5342         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
5344         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
5345         OP_IA64_CSET opcode.
5347         * mini.c: Fix a warning.
5349         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
5350         THROW to the appropriate llvm type.
5352 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
5354         * mini.c (mini_method_compile): Add statistics for methods JITted
5355         with/without LLVM.
5357 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
5359         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
5360         OP_IA64_CMP_<cond>_IMM opcodes.
5362 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
5364         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
5365         corlib exceptions.
5367         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
5368         correctly.
5370         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
5371         GENERICINST.
5373 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
5375         * mini-exceptions.c : add thread id to EXCEPTION trace message.
5377 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
5379         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
5380         support.
5382         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
5383         rgctx invoke trampolines for x86.
5385         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
5386         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
5387         (mono_arch_get_vcall_slot): Simplify this.
5389 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
5391         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
5392         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
5394 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
5396         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
5397         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
5399         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
5401         * liveness.c (visit_bb): Remove a needless assert.
5403 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
5405         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
5406         full aot support to the arch specific code.
5408         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
5410         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
5412         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
5413         
5414         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
5415         collect information about the delegate invoke impl trampolines.
5417         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
5418         to save trampolines during full-aot mode.
5420         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
5421         creation function which returns a trampoline which sets the rgctx
5422         argument.
5423         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
5424         wrapper if possible.
5425         (mono_delegate_trampoline): Ditto.
5427         * mini.c (mono_jit_runtime_invoke): Ditto.
5429         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
5430         
5431         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
5433         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5434         
5435 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
5437         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
5438         just setting the opcode to OP_NOP.
5440 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
5442         * mini.c (mini_method_compile): Put the last change inside an 
5443         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
5444         
5445         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
5446         and extend live ranges to cover the whole method when using xdb.
5448         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
5449         do it in the trampolines.
5451         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
5452         needed.
5454         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
5455         
5456         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
5457         call code in full-aot mode since IMT is disabled there.
5458         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
5459         new JIT no longer has that restriction.
5461         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5463         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
5464         a more compact format.
5465         (mono_aot_wrapper_name): New function to return a unique name for a
5466         wrapper method, also used by the AOT runtime.
5468         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
5469         aot-compiler.c.
5471         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
5472         when a ICollection<T> etc is encountered.
5473         (add_generic_instances): Process method arguments/locals too.
5474         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
5475         trampoline names.
5477         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
5478         
5479 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
5481         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
5483         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
5485         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
5486         representing the result of the decomposition. Nullify instructions
5487         instead of setting them to OP_NOP since nops can't have registers
5488         set.
5490 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
5492         * aot-compiler.c (mono_compile_assembly): Split this huge function into
5493         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
5494         info. Strip 'mapping symbols' on ARM.
5496         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
5497         
5498         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
5499         this with the native genmdesc.
5501 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
5503         * aot-runtime.c:  Fixing the MSVC build.
5505         Code is contributed under MIT/X11 license.
5507 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
5509         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
5510         JITted code depends on it.
5512 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
5514         * aot-compiler.c: Use new MonoGenericParam accessors.
5516 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
5518         Reduce memory usage and improve correctness wrt MonoGenericParam
5519         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
5520         handing.  Avoid allocating MonoGenericParams, but use the ones in
5521         the container itself.
5523 2009-04-07  Miguel de Icaza  <miguel@novell.com>
5525         * tasklets.c: Return exceptions in the out argument.
5527 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
5529         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
5530         opcode. Use pointer types in more places instead of casting them to 
5531         integers.
5533         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
5534         optimizations.
5535         (mono_llvm_optimize_method): New helper function to optimize a method.
5537         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
5538         widening code so it could be called from more places.
5539         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
5540         code paths in the call opcodes.
5542 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
5544         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
5546 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
5548         * dwarfwriter.c: Use _ to separate class name 
5549         components as gdb can't handle '.'. Represent reference variables
5550         as 'class <NAME>&'.
5551         
5552         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
5554         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
5555         
5556         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
5558         * gc-test.cs: New file with GC stack marking tests.
5559         
5560         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
5561         negative numbers for vfp.
5563         * basic-float.cs: Add a test.
5564         
5565 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
5567         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
5569 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
5571         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
5572         part of tasklet/continuation support.
5574 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
5576         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
5577         amd64 opcodes inside an ifdef.
5579         * dwarfwriter.c: Emit inheritance information for classes, emit fields
5580         of complex types.
5581         
5582         * dwarfwriter.c (emit_type): Emit the class info for classes.
5584 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
5586         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
5588         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
5590         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
5592         * ssa.c (mono_ssa_compute): Fix some memory leaks.
5594 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
5596         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
5598         * mini-llvm.c: Update comments.
5600         * mini.h (COMPILE_LLVM): New macro.
5602         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
5604         * ssa.c (mono_ssa_compute): Ditto.
5605         
5606         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
5607         the unwind ops from a DWARF FDE.
5609         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
5610         methods by extracting the dwarf unwind ops from the unwind info generated
5611         by LLVM.
5612         
5613         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
5614         calls.
5616         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
5617         addressing modes.
5619 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
5621         * Makefile.am (llvm_sources): Enable this.
5623         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
5624         failing back to the JIT if something cannot be handled.
5626         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
5627         compiling with LLVM.
5629         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
5630         compiling with LLVM.
5632         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
5633         compiling with LLVM.
5635         * mini-ops.h: Add a few opcodes needed by LLVM.
5637         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
5638         has no unwind info.
5640         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
5641         backend.
5643         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
5645         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
5647 2009-04-01  Mark Probst  <mark.probst@gmail.com>
5649         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
5650         ridiculously large methods.
5652 2009-03-31  Martin Baulig  <martin@ximian.com>
5654         * debug-debugger.c (debugger_remove_breakpoint): Call
5655         mono_debugger_remove_class_init_callback ().
5657 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
5659         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
5660         right before emitting code, not at the start.
5662         * mini.c (mono_postprocess_patches): Extract this into a separate function
5663         from mono_codegen ().
5665         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
5666         byref types correctly.
5668 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
5670         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
5671         by the last change.
5673 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
5675         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
5676         indirect calls, this avoids problems where get_vcall_slot () would get
5677         confused by the native code for the instruction preceeding the call.
5678         (mono_arch_get_vcall_slot): Simplify this.
5679         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
5681         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
5682         register allocator now seems to depend on them instead of the data in
5683         cpu-<ARCH>.md.
5685         * mini.c (mini_method_compile): Throw the correct type of exception if
5686         mono_method_get_header () fails because of a loading error.
5688 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
5690         * mini.c (mini_method_compile): Clear the loader error if the method
5691         header cannot be decoded.
5693         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
5694         interface methods on proxies correctly.
5696         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
5697         this argument for vtype methods. Add precise liveness info for arguments.
5699         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
5700         LIVERANGE_START/END opcodes.
5702         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
5703         for arguments and values in registers.
5705 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
5707         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
5708         return a valuetype. Fixes #487518.
5710         * iltests.il: Add a test.
5711         
5712         * aot-compiler.c: Use mono_thread_create () to create helper threads.
5714         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
5715         closed over a null reference correctly.
5717 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
5719         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
5721 2009-03-25  Mark Probst  <mark.probst@gmail.com>
5723         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
5724         allocated to the same registers as fixed sregs.
5726 2009-03-24  Mark Probst  <mark.probst@gmail.com>
5728         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
5729         ATOMIC_CAS_IMM ops.
5731         * method-to-ir.c: Handle more cases for
5732         Interlocked.CompareExchange.
5734         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
5735         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
5736         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
5738 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
5740         * aot-runtime.c (decode_method_ref): Fix a warning.
5742         * unwind.c (mono_unwind_frame): Ditto.  
5744 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
5746         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
5747         (mono_compile_assembly): Enable the binary writer for full-aot as well.
5749         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
5750         fix the handling of large values in the ALU_PC_G0_NC relocation.
5752 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
5754         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
5756 2009-03-22  Mark Probst  <mark.probst@gmail.com>
5758         * method-to-ir.c (mono_spill_global_vars): Support for ternary
5759         ops.
5761 2009-03-22  Mark Probst  <mark.probst@gmail.com>
5763         * method-to-ir.c: MINI_OP3 needs a comma.
5765         * method-to-ir.c, mini.h, mini.c: Remove
5766         mono_init_op_sreg_counts ().
5768 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
5770         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
5771         OP_JMP.
5772         
5773         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
5774         assertion.
5776         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
5778         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
5779         code somewhat.
5781 2009-03-21  Mark Probst  <mark.probst@gmail.com>
5783         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
5784         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
5785         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
5786         operations.
5788 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
5790         * driver.c: Change location of gc_wrapper.h.
5792         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
5793         inside finally clauses correctly. Fixes #485721.
5795         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
5796         after the change above.
5798         * exceptions.cs: Add a test.
5799         
5800 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
5802         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
5804         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
5805         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
5806         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
5808         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
5809         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
5811 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
5813         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
5814         Simplify logic for ensure_method_is_allowed_to_call_method. 
5815         Handle wrappers on callers.
5817 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
5819         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
5820         them don't run yet.
5822         * basic-simd.cs: Fix the names of some test methods.
5824 2009-03-18  Geoff Norton  <gnorton@novell.com>
5826         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
5828 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
5830         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
5832 2009-03-17  Jb Evain  <jbevain@novell.com>
5834         * driver.c: remove now uneeded call to mono_gc_base_init before
5835         mono_profiler_load.
5837 2009-03-17  Jb Evain  <jbevain@novell.com>
5839         * dwarfwriter.c (token_handler): handle more cases.
5841 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
5843         * method-to-ir.c: Remove more dead code (that was required only
5844         because of method_is_safe). Fix compiler warnings.
5846 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
5848         * method-to-ir.c: Remove unneeded/useless method_is_safe
5849         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
5851 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
5853         * mini.c (mini_method_compile): Print the method been compiled with
5854         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
5855         for people not familiar with the runtime.
5857 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
5859         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
5860         a managed object which is later put into a GList. Return its class instead.
5862         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
5863         stack slots when using sgen.
5865 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
5867         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
5869 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
5871         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
5872         > so it works on the first vreg as well.
5874 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
5876         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
5877         trigger randomly.
5879         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
5880         
5881         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
5882         implement GArray.
5884 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
5886         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
5887         native->IL offset mapping.
5889 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
5891         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
5893         * basic.cs: Add a test.
5895 2009-03-11  Mark Probst  <mark.probst@gmail.com>
5897         * mini-x86.c (mono_arch_output_basic_block): Use different
5898         registers in case the ones we want to overwrite are used by the
5899         other operand.  Fixes regression in #480807.
5901 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
5903         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
5905         * dwarfwriter.c (emit_line_number_info): The line number info for
5906         IL code was off by one. Fix that.
5908         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
5909         stack.
5911 2009-03-09  Mark Probst  <mark.probst@gmail.com>
5913         Contributed under the terms of the MIT/X11 license by Steven
5914         Munroe <munroesj@us.ibm.com>.
5916         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
5917         Fixes #483462.
5919 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
5921         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
5922         as well.
5924 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
5926         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
5927         the delegate ctor handling code. Fixes #482638.
5928         
5929         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
5930         #481458.
5932         * iltests.il.in: Add a test.
5933         
5934         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
5935         mini-posix.c.
5937 2009-03-05  Mark Probst  <mark.probst@gmail.com>
5939         * mini-trampolines.c (mono_create_jump_trampoline): If the method
5940         is shared generic code, return the trampoline, even if the method
5941         has already been compiled.  Fixes #479763.
5943         * mini.c, mini.h: New function
5944         mono_jit_find_compiled_method_with_jit_info() which is the same as
5945         mono_jit_find_compiled_method() but also returns the jit info.
5947 2009-03-05  Mark Probst  <mark.probst@gmail.com>
5949         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
5950         for methods which actually have one.  For all other methods, make
5951         sure the this argument var is live the whole method.
5953         * mini.c (mini_method_compile): Every shared method has a
5954         this/vtable/mrgctx info.  Fixes #480807.
5956 2009-03-05  Mark Probst  <mark.probst@gmail.com>
5958         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
5959         generic/imt thunks where some entries branch through the vtable,
5960         while other entries branch directly.
5962 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
5964         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
5966         * mini-windows.c: Ditto.
5967         
5968         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
5969         ctors.
5971 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
5973         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
5974         down an assert.
5976 2009-03-04  Mark Probst  <mark.probst@gmail.com>
5978         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
5979         #481403.
5981 2009-03-04  Mark Probst  <mark.probst@gmail.com>
5983         * exceptions-x86.c: Include debug-mini.h - fixes build.
5985 2009-03-04  Martin Baulig  <martin@ximian.com>
5987         * debug-mini.c: Clean up the exception API and add documentation.
5988         (mono_debugger_handle_exception): New public method; this is
5989         called when throwing an exception or encountering an unhandled one.
5990         (mono_debugger_call_exception_handler): Formerly known as
5991         mono_debugger_handle_exception(); this is used to tell the
5992         debugger that we're about to invoke an exception handler.
5994 2009-03-04  Martin Baulig  <martin@ximian.com>
5996         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
5997         ../metadata/mono-debug-debugger.c; save and reset exception state.
5999 2009-03-02  Martin Baulig  <martin@ximian.com>
6001         * debug-mini.c: Moved the debugger exception handling here from
6002         ../metadata/mono-debug-debugger.c.
6004         * debug-mini.h
6005         (MonoDebuggerExceptionAction): New exception typedef.
6007         * debug-mini.c
6008         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
6010         * exceptions-amd64.c
6011         (mono_amd64_throw_exception): Use the new debugger exception
6012         handling code.
6014         * mini-exceptions.c
6015         (mono_handle_exception_internal): Don't call
6016         mono_debugger_unhandled_exception() here.
6018 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
6020         * mini.c aot-compiler.c: Update after the changes to 
6021         mono_marshal_get_runtime_invoke ().
6023         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
6024         Virtual generic methods might not have method->slot set, work around
6025         that.
6027         * generics.cs: Add a test.
6029 2009-03-02  Geoff Norton  <gnorton@novell.com>
6031         * mini.c:
6032         * driver.c: Allow signal chaining of SIGFPE as well.
6034 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
6036         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
6037         this since it now receives the method not its generic context in the
6038         IMT reg.
6040         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
6041         generic/imt thunks where some entries branch through the vtable, while
6042         other entries branch directly.
6044         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
6046         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
6047         support for interface methods as well.
6049         * mini-trampolines.c: Add support for virtual generic methods in interfaces
6050         using the normal IMT thunks.
6052         generics.cs: Add new tests.
6053         
6054         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
6055         the generic inst to the generic imt thunks. This fixes AOT support, 
6056         improves consistency with the normal IMT thunks, and makes it easier to
6057         add support for interface generic virtual methods later.
6059         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
6060         
6061 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
6063         * driver.c (mono_set_signal_chaining): New public API function to enable
6064         signal chaining on POSIX platforms.
6066         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
6067         (si@lindenlab.com) to implement signal chaining. The original patch was
6068         contributed under the MIT X/11 license:
6069         https://bugzilla.novell.com/show_bug.cgi?id=318894
6071 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
6073         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
6074         too until it can be made to run on amd64.
6076 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
6078         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
6079         to  get_generic_context_from_code () + get_call_info () if possible.
6081 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
6083         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
6084         suspend-on-sigsegv functionality.
6086         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
6087         to suspend when a native SIGSEGV is received. This is useful for debugging
6088         crashes which don't happen under gdb, since a live process contains more
6089         information than a core file.
6091         * mini-exceptions.c (mono_print_thread_dump): Use 
6092         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
6094         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
6096         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
6097         
6098         * basic-float.cs: Disable the tests which currently fail on amd64.
6100         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
6101         value to mono_arch_patch_callsite () to fix crashes.
6102         
6103         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
6105 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
6107         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
6108         nop code by patching the call address to point to the nullified class init
6109         trampoline, as the former does not seem to be safe on SMP machines.
6111 2009-02-23  Mark Probst  <mark.probst@gmail.com>
6113         * mini-ops.h: Fix the argument types for a few x86 opcodes where
6114         they were wrong.
6116 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
6118         * basic-float.cs basic-calls.cs: Fix warnings.
6120 2009-02-22  Mark Probst  <mark.probst@gmail.com>
6122         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
6123         correct frame pointer in the LMF.  Should fix #478394.
6125 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
6127         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
6129         * image-writer.c: Make the binary writer less verbose.
6131 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
6133         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
6134         are called from runtime invoke wrappers.
6136 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
6138         * cpu-ppc.md (store_memindex): Increase the size of this.
6140 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6142         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6144         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
6146         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
6147         OP_LCONV_TO_R_UN.
6149         Last fix for of #467201.
6152 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6154         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6156         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
6157         and long_conv_to_r8_2:
6159         Fixed part of #467201.
6161 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6163         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6165         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
6166         conversion to 32 bits.
6168         * cpu-x86.md: Increase the size of int_conv_to_r4.
6170         * basic-float.cs: Add a test for this.
6172         Fixed part of #467201.
6174 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6176         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6178         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
6179         conversion to 64 bits.
6181         * basic-float.cs: Add a test for this.
6183         Fixed part of #467201.
6185 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6187         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6189         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
6190         This behavior is compatible with MS.
6192         * iltest.il.in: Add a test for this.
6194         Fixed part of #467201.
6196 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6198         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6200         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
6201         change the precision of the value.
6203         * cpu-x86.md: Define len for float_conv_to_r4.
6205         * basic-float.cs: Add a test for this.
6207         Fixed part of #467201.
6209 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
6211         * mini.c: Adjust locking order to the new semantics where the loader lock
6212         comes first.
6214 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
6216         * aot-runtime.c:
6217         * mini-amd64.c:
6218         * mini-arm.c:
6219         * mini-ia64.c:
6220         * mini-mips.c:
6221         * mini-ppc.c:
6222         * mini-sparc.c:
6223         * mini-trampolines.c:
6224         * mini-x86.c:
6225         * mini.c:
6226         * tramp-alpha.c:
6227         * tramp-amd64.c:
6228         * tramp-arm.c:
6229         * tramp-hppa.c:
6230         * tramp-ia64.c:
6231         * tramp-mips.c:
6232         * tramp-ppc.c:
6233         * tramp-s390.c:
6234         * tramp-s390x.c:
6235         * tramp-sparc.c:
6236         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
6238 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
6240         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
6241         as it is incorrect.
6243 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
6245         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
6246         for cctors if needed.
6248 2009-02-17  Mark Probst  <mark.probst@gmail.com>
6250         * mini-ppc.c: Fix build on Darwin.
6252 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
6254         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
6255         version instead of 3 as valgrind doesn't like version 3.
6257         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
6259         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
6260         usable for hashing methods.
6261         (emit_extra_methods): Use the new hash to avoid putting every method in the
6262         same hash bucket.
6264         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
6266         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
6267         whenever a method ref could match a method.
6268         
6269         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
6270         test to fail.
6271         
6272         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
6273         methods refs.
6275         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
6277         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
6278         the encoding buffer.
6280         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
6281         mono_method_get_header () on inflated methods as an optimization.
6283 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
6285         * ssa.c (fold_ins): Fix another crash if the instruction following the
6286         switch was optimized away.
6288 2009-02-16  Mark Probst  <mark.probst@gmail.com>
6290         Contributed under the terms of the MIT/X11 license by Steven
6291         Munroe <munroesj@us.ibm.com>.
6293         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
6295 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
6297         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
6298         around the mono_domain_alloc calls, it is now done by the functions
6299         themselves.
6301         * aot-compiler.c (compile_method): Only add wrappers referenced by
6302         the method if compiling with full AOT.
6303         (mono_compile_assembly): Error out if --aot=full is specified on
6304         a platform where it is not supported.
6306         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
6307         on ARM too.
6309         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
6310         AOT support.
6312         * aot-runtime.c (load_named_code): Handle 
6313         mono_arm_throw_exception_by_token.
6315         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
6317         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
6318         unaligned.
6320         * Makefile.am (fullaotcheck): Exit if a test fails.
6322         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
6323         on ARM.
6324         (mono_compile_assembly): Handle the assembler failing.
6326         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
6327         accepting subsections of .bss.
6329         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
6330         was optimized away.
6332         * aot-compiler.c: Remove some unused includes.
6333         
6334         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
6335         now in MonoImageWriter.
6337         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
6338         code sequence which matches a non-virtual call. Fixes #472654.
6340 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
6342         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
6343         xdebug code.
6344         
6345         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
6346         use the image/dwarf writers directly.
6348         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
6349         field.
6351         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
6352         MonoDwarfWriter.
6354         * image-writer.h: Fix some typos.
6356         * dwarfwriter.h dwarfwriter.c: New files.
6357         
6358         * aot-compiler.c: Extract the DWARF info writing functionality into a 
6359         separate module.
6361         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
6362         argument to return unwind info.
6364         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
6366         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
6367         
6368         * aot-runtime.c (decode_method_ref): Add a case for 
6369         MONO_AOT_METHODREF_WRAPPER_NAME.
6371         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
6372         for AOT.
6374         * aot-compiler.c (encode_method_ref): Use the new constants.
6376         * aot-runtime.c (decode_method_ref): Ditto.
6378         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
6379         be compiled, not the icall itself.
6381 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
6383         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
6384         using decode_method_ref ().
6386         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
6387         convert it to an in32. Fixes #475859.
6389         * arrays.cs: Add a test.
6391 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
6393         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
6394         OP_LCONV_TO_U2.
6396         * basic-long.cs: Add a test.
6398 2009-02-12  Mark Probst  <mark.probst@gmail.com>
6400         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
6401         remove the frame pointer in leaf methods which don't receive any
6402         arguments, don't throw exceptions and don't do dynamic stack
6403         allocations.
6405 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
6407         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
6408         the fail_tramp changes. Hopefully fixes #475132.
6410 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
6412         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
6413         instead of mono_metadata_signature_dup_full.
6415 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
6417         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
6418         for processing jump tables. Fixes #473787.
6420 2009-02-11  Mark Probst  <mark.probst@gmail.com>
6422         * mini-generic-sharing.c: mini_method_get_context() just calls
6423         mono_method_get_context_general() now.
6425         * mini.c, mini.h: Moved get_object_generic_inst(),
6426         construct_object_context_for_method() and
6427         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
6429 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
6431         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
6432         basic block fell through to its successor bblock without a branch. Fixes
6433         #474718.
6435         * iltests.il.in: Add a test.
6436         
6437         * aot-compiler.c (encode_method_ref): Encode methods of array types.
6438         (can_encode_patch): We can now handle arrays of generic parameters and
6439         array methods.
6441         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
6443         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
6444         the AOT file to avoid some #ifdefs in aot-runtime.c
6446         * mini.h: Bump AOT file format version.
6448 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
6450         * Makefile.am (fullaotcheck): Make this run the tests.
6452         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
6454 2009-02-10  Mark Probst  <mark.probst@gmail.com>
6456         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
6457         individually.  Fixes #473482.
6459 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
6461         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
6463 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
6465         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
6466         (mono_compile_assembly): Hush compile warnings about
6467         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
6468         code path.
6470 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
6472         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
6474         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
6476         * aot-compiler.c: Fix arm support.
6478         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
6479         img_writer_emit_unset_mode () function.
6481         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
6482         (mono_unwind_get_dwarf_pc_reg): Ditto.
6484         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
6485         Move almost all platform specific code to a set of arch_ functions, 
6486         and document them to ease porting.
6487         
6488         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
6490         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
6492         * aot-compiler.c: Extract the image writing functionality into a separate
6493         module to reduce the size of this file.
6495 2009-02-09  Geoff Norton  <gnorton@novell.com>
6497         * mini-s390.c: Fix the signature of emit_sig_cookie.
6499 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
6501         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
6503         * aot-runtime.c (is_shared_got_patch): Ditto.
6505         * aot-runtime.c (load_named_code): Cope with the fact that 
6506         decode_got_entry () won't decode the patch fully if its corresponding got
6507         entry is already filled.
6508         
6509         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
6510         Initialize *ji.
6511         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
6513         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
6514         as the moving pointer instead of 'buf' for consistency with the rest of the
6515         codebase.
6516         (mono_arch_create_monitor_exit_trampoline): Ditto.
6518         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
6519         generic_class_init trampolines.
6520         (add_generic_class): Extract some code from add_generic_instances () into a
6521         separate function so it can be called from other places too.
6522         (compile_method): Call add_generic_class () for the classes of inflated methods
6523         referenced by the method.
6524         (can_encode_patch): Allow references to generic parameters.
6526         * aot-runtime.c: Add support the patches required by the new trampolines.
6527         
6528         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
6529         support.
6531         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
6532         full-aot support.
6534         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
6535         this from get_throw_pending_exception, make the signature full aot compatible.
6537         * Makefile.am (fullaotcheck): New target to run full-aot tests.
6539         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
6541         * exceptions.cs: Add a test.
6543 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
6545         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
6546         use the DWARF_DATA_ALIGN constant instead.
6548         * exception-<ARCH>.c: Update after the above change.
6550         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
6551         dwarf unwinder.
6553         * mini-arm.c: Enable the dwarf unwinder.
6555         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
6556         instead of mono_class_setup_vtable ().
6558 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
6560         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
6561         dwarf unwinder.
6563         * mini-x86.h: Enable the dwarf unwinder.
6565 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
6567         Fix mcs/tests/test-7.cs
6568         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
6569         2009-02-03.
6571 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
6573         * mini.c (print_jit_stats): Remove some unused statistics.
6575 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
6577         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
6579 2009-02-05  Mark Probst  <mark.probst@gmail.com>
6581         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
6582         the method we get from mono_object_get_virtual_method() because
6583         that function does it properly, now.
6585 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
6587         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
6588         opcodes. Fixes #472775.
6590 2009-02-05  Mark Probst  <mark.probst@gmail.com>
6592         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
6593         fact that mono_find_jit_info() sometimes returns the context
6594         corresponding to the jit info in new_ctx.  Fixes #472600.
6596 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
6598         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
6599         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
6600         klass->enum_basetype directly.
6602         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
6603         enum subtypes.
6605         * unwind.c: Avoid 0 sized arrays.
6607 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
6609         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
6610         size on systems with 64k pages. Fixes #471389.
6612 2009-02-04  Mark Probst  <mark.probst@gmail.com>
6614         Contributed under the terms of the MIT/X11 license by Steven
6615         Munroe <munroesj@us.ibm.com>.
6617         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
6618         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
6619         necessary.
6621 2009-02-04  Mark Probst  <mark.probst@gmail.com>
6623         Contributed under the terms of the MIT/X11 license by Steven
6624         Munroe <munroesj@us.ibm.com>.
6626         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
6627         comparison fix.
6629         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
6630         The trampoline can be longer on PPC64.
6632 2009-02-04  Mark Probst  <mark.probst@gmail.com>
6634         Contributed under the terms of the MIT/X11 license by Steven
6635         Munroe <munroesj@us.ibm.com>.
6637         * mini-ppc.c: Compiler warning fixes and trivial code
6638         simplifications.
6640 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
6642         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
6643         ins->dreg which could be a hardware register, not a vreg.
6645         * aot-compiler.c (emit_method_dwarf_info): Ditto.
6646         
6647         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
6648         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
6650         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
6651         
6652         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
6653         ->dreg, that is not the vreg we are looking for.
6655         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
6657         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
6658         LIVERANGE_END.
6660         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
6661         strange crashes.
6663 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
6665         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
6667         * aot-compiler.c (emit_line_number_info): Fix line number emission when
6668         the line diff is 0.
6670         * aot-compiler.c: Add xdebug support on x86.
6672         * unwind.c: Add x86 support.
6673         
6674         * aot-compiler.c (emit_exception_debug_info): Control the emission of
6675         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
6677         * mini.c (mini_method_compile): Ditto.
6678         
6679         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
6680         the variable index.
6682         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
6683         which mimic .push_section/.pop_section in GAS.
6684         
6685         * aot-compiler.c: Emit precise live range information for variables.
6687         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
6689         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
6690         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
6691         them.
6693         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
6694         the live ranges of variables.
6696         * mini.h (struct MonoMethodVar): Add two fields containing the live range
6697         of the variable in terms of native offsets.
6699 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
6701         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
6702         
6703 2009-02-02  Mark Probst  <mark.probst@gmail.com>
6705         Contributed under the terms of the MIT/X11 license by Steven
6706         Munroe <munroesj@us.ibm.com>.
6708         * exceptions-ppc.c (restore_regs_from_context): Correct operand
6709         order (offset then base reg) for ppc_load_multiple_regs.
6710         (emit_save_saved_regs) Correct operand order for
6711         ppc_store_multiple_regs.
6712         (mono_arch_get_call_filter): Correct operand order for
6713         ppc_load_multiple_regs.
6715         * mini-ppc.c (emit_memcpy): Fix operand order for
6716         ppc_load_reg_update and ppc_store_reg_update.
6717         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
6718         (mono_arch_emit_epilog): Correct operand order for
6719         ppc_load_multiple_regs.
6721         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
6722         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
6724 2009-02-02  Mark Probst  <mark.probst@gmail.com>
6726         * cpu-ppc64.md: Fixed storer4_memindex length.
6728 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
6730         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
6731         line number info.
6732         
6733         * aot-compiler.c (emit_line_number_info): Optimize this.
6735 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
6737         * aot-compiler.c: Disassemble tokens in the IL disassembly.
6738         
6739         * aot-compiler.c: Add debug info for methods without debug info by
6740         emitting an IL file and having the line number info referencing that file.
6742         * aot-compiler.c: Optimize the size of the generated line number info.
6744         * aot-compiler.c: Emit line number info in xdebug mode.
6746         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
6747         million arguments.
6749 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
6751         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
6753         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
6754         is used.
6756 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
6758         * basic-calls.cs: Test for the weird crash found on arm.
6759         
6760 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
6762         * cpu-arm.md: Increase the size of storer8_membase_reg and
6763         loadr8_membase_reg to 24 bytes to accomodate the extra add.
6765         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
6766         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
6767         reg to LR otherwise we'll be loading/storing from just the offset.
6769 2009-01-30  Miguel de Icaza  <miguel@novell.com>
6771         Question: if we are storing gint32's inside the "*native_offset",
6772         should we change the signature to "gint32 *native_offset" to
6773         ensure that we do not have type definition problems?
6774         
6775         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
6776         an int * as this is what the other function expects, causes
6777         problems with Freescale's compiler that defined int32_t to be a
6778         long and makes int incompatible 
6780 2009-01-30  Miguel de Icaza  <miguel@novell.com>
6782         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
6783         filename conflict with bjam.
6785 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6787         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
6788         as it might use decomposed ops.
6790 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6792         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
6794         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
6795         is defined.
6797         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
6799         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
6800         offsets.
6802         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
6803         way registers are stored in MonoContext on arm.
6805         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
6806         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
6808         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
6810         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
6812         * mini.c (mini_init): Register mono_isfinite.
6814         * jit-icalls.c (mono_isfinite): New jit icall.
6816         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
6817         
6818         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
6819         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
6820         the parent frame.
6822 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6824         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
6825         separate frame and stack pointers, so we must use FP to find the register
6826         spill area.
6827         The FP reg is retrieved from the MonoContext::regs array.
6829 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6831         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
6832         as FPA requires it.
6834 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6836         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
6837         return R4 and R8 when not running under softfloat.
6839         Fixes basic-calls.exe
6841 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6843         * mini-arm.c: Implement some overflow opcodes.
6845 2009-01-29  Miguel de Icaza  <miguel@novell.com>
6847         * ssa.c: handle another alloca.h
6849         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
6850         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
6851         MONO_ARCH_USE_SIGACTION. 
6853         * aot-runtime.c, mini-exceptions.c: Replace platform define with
6854         capability defines.
6856         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
6858         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
6859         PPC targets as sigaction does not exist on all platforms, define
6860         this on a per-platform basis.
6862         Instead of erroring out if the platform is not defined, include
6863         mini-ppc-os.h, and expect that the OS specific setting provides
6864         the required information.   
6866 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6868         * aot-compiler.c: Fix --enable-minimal=aot.
6870 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6872         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
6873         previous change.
6875 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
6877         * exceptions-arm.c: Fix warnings.
6879         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
6880         ARM.
6882         * mini-x86.c: Fix --enable-minimal=jit build.
6884         * mini.c: Really fix --enable-minimal=jit build.
6885         
6886         * mini.c (construct_object_context_for_method): Move this outside
6887         the DISABLE_JIT block to fix the --enable-minimal=jit build.
6889         "Backported" of r124984 from 2.0 branch.
6890         
6891         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
6893         "Backport" of r124977 + r124978 from 2.0 branch.
6894         
6895         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
6896         to avoid calling mono_exception_from_token () from the throw trampoline.
6897         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
6898         for throwing corlib exceptions, this fixes full-aot support for corlib
6899         exceptions.
6901         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
6903 2009-01-29  Miguel de Icaza  <miguel@novell.com>
6905         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
6906         part of the changes to split the code in mini into operating
6907         system specific files.
6909         This patch was done by copying mini.c to the respective files to
6910         preserve SVN history.
6912 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
6914         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
6916 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
6918         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
6919         remoting-invoke-with-check wrappers of shared methods.
6921         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
6923 2009-01-27  Mark Probst  <mark.probst@gmail.com>
6925         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
6926         optimization if the top of stack is the last instruction in the
6927         bblock.  Otherwise it might have been used after its definition.
6928         Fixes #469742.
6930 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
6932         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
6933         method as well when get_vcall_slot () fails to match a code sequence.
6935         * mini-arm.c: Fix the android build, which doesn't have
6936         __aeabi_read_tp.
6938 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
6940         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
6941         the s390x build.
6943 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
6945         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
6947 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
6949         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
6950         and put its id into jinfo->used_regs. This is only used on amd64,
6951         which is currently the only platform generating unwind info.
6953         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
6954         the dwarf unwinder. This is required to correctly handle async exceptions
6955         like thread abort and stack overflows, which can happen while a method
6956         is in the middle of its prolog or epilog.
6957         
6958         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
6959         the unwind info belonging to an AOTed method.
6961         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
6962         into cfg->unwind_ops.
6963         
6964         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
6966         * mini.c (mini_init): Call mono_unwind_init ().
6967         (mini_cleanup): Call mono_unwind_cleanup ().
6969         * unwind.c: Add functions for managing a set of unwind info entries, allowing
6970         unwind info to be shared between methods.
6972         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
6973         saved in the LMF.
6975         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
6976         get_throw_pending_exception () to avoid initialization races.
6978         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
6979         mono_arch_exceptions_init () function.
6981         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
6983 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
6985         * mini.c (mono_get_domain_intrinsic): New helper function.
6986         (mono_get_thread_intrinsic): Ditto.
6988         * mini-arm.c mini-ia64.c: Use the new helper functions.
6989         
6990         * method-to-ir.c (mono_method_to_ir): Fix the comment for
6991         the last constrained_call change, since it is needed in the non-AOT
6992         case as well.
6994         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
6995         
6996         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
6997         mono_get_lmf_addr () on arm eabi linux.
6999 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
7001         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
7002         code sequence which matches a non-virtual call.
7004 2009-01-23  Mark Probst  <mark.probst@gmail.com>
7006         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
7007         stack pointer (r1).
7009 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
7011         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
7012         runtime-invoke wrappers, since they are also shared based on signature.
7014 2009-01-22  Mark Probst  <mark.probst@gmail.com>
7016         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
7017         info from the (correct) context.
7019 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
7021         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
7022         
7023         * unwind.c (mono_unwind_frame): New function to unwind through a frame
7024         using dwarf unwinding info. Not yet used.
7026         * mini.c (mini_init): When using xdebug, disable freeing of domains.
7028 2009-01-21  Mark Probst  <mark.probst@gmail.com>
7030         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
7031         descriptors.
7033         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
7034         special case and handle mono_arch_delegate_invoke_impl() returning
7035         function descriptors.
7037         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
7038         trampolines return function descriptors, too.
7040 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
7042         * method-to-ir.c (handle_alloc): Avoid generic instances in the
7043         out_of_line optimization.
7045 2009-01-21  Martin Baulig  <martin@ximian.com>
7047         * mini.h
7048         (MonoCompile): Added `disable_deadce_vars' to disable removing
7049         unused variables.
7051         * mini.c
7052         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
7053         inside the debugger.
7055         * liveness.c (mono_analyze_liveness): Don't remove any unused
7056         variables if `cfg->disable_deadce_vars' is set.
7058 2009-01-21  Mark Probst  <mark.probst@gmail.com>
7060         * method-to-ir.c: Only apply exception constructor optimization if
7061         the the method actually belongs to an exception class.  Fixes
7062         #467456.
7064 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
7066         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
7067         change inside a #ifdef __mono_ppc64__.
7069         * aot-compiler.c (compile_method): Remove the previous limitation.
7071         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
7072         on type variables in AOTed code.
7073         
7074         * aot-compiler.c (compile_method): Skip generic methods having type 
7075         constraints on their generic parameters.
7077         * aot-compiler.c (compile_method): Check for methods which cannot be
7078         encoded inside RGCTX_FETCH patches as well.
7080         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
7081         build.
7083 2009-01-20  Mark Probst  <mark.probst@gmail.com>
7085         * method-to-ir.c: Force the vtable variable in shared generic code
7086         for the case that they might show up on a stack trace where they
7087         are needed.
7089         * mini-exceptions.c: Save and use generic sharing info as well as
7090         IP in stack traces to resolve shared generic instantiations.
7092 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
7094         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
7095         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
7097 2009-01-20  Mark Probst  <mark.probst@gmail.com>
7099         * method-to-ir.c: Do generic sharing for array constructors.
7101 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
7103         * mini-exceptions.c (mono_print_thread_dump): Add information
7104         about the thread state using wapi_current_thread_desc.
7106 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
7108         * basic-simd.cs: Tests for the new constructors. 
7110 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
7112         * mini-ops.h: Added OP_EXPAND_*
7114         * cpu-x86.md: Same.
7116         * mini-x86.c (mono_arch_output_basic_block): Same.
7117         
7118         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
7120 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
7122         * iltests.il.in: Add a test for #467385.
7124 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
7126         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
7127         thread been cleaned up is not the same currently in execution.
7129         Fixes appdomain-unload crashes on windows, osx and linux variants
7130         without the __thread keyword.
7132 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
7134         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
7135         (koush@koushikdutta.com). Implement this for android.
7137         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
7138         begins with a digit.
7140         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
7141         mono_marshal_get_write_barrier ().
7143 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
7145         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
7146         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
7147         that pass them on a register pair.
7149         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
7150         test was crashing due to that.
7152 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
7154         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
7155         trampoline code. Include ucontext.h only if available.
7157 2009-01-15  Mark Probst  <mark.probst@gmail.com>
7159         * mini.c: mono_domain_lookup_shared_generic() takes an open method
7160         and doesn't check whether it's sharable, like it was before
7161         removing the shared generics hash.  This brings IronPython
7162         performance back to what it was before that change.
7164 2009-01-14  Mark Probst  <mark.probst@gmail.com>
7166         * method-to-ir.c: Handle delegate invocation optimization earlier,
7167         otherwise it would be handled (much more slowly) by the
7168         final/sealed optimization.
7170 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
7172         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
7173         domain is not set. Fixes #465864.
7175 2009-01-12  Mark Probst  <mark.probst@gmail.com>
7177         * method-to-ir.c: Don't stop sharing of generic methods with catch
7178         clauses - we already handle those.
7180 2009-01-12  Mark Probst  <mark.probst@gmail.com>
7182         * mini.c, mini.h: lookup_generic_method() is now
7183         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
7184         making the shared_generics_hash obsolete.
7186 2009-01-12  Mark Probst  <mark.probst@gmail.com>
7188         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
7189         use the red zone.  Make room on the stack first and then use it,
7190         not the other way around.
7192 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
7194         * mini.c (mini_init): Call mono_xdebug_init ().
7196         * aot-compiler.c (mono_xdebug_init): Make this non-static.
7198 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
7200         * TestDriver.cs: Add an --iter argument to run tests multiple times.
7202         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
7203         trampolines.
7205         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
7206         debug+unwind info for trampolines.
7208         * mini.c (mono_create_unwind_op): New helper function.
7210         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
7212 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
7214         * aot-compiler.c: Fix the build.
7216 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
7218         * Makefile.am: Update dtrace-prelink.sh location.
7220 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
7222         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
7223         optimization. Fixes #464520.
7225 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
7227         * mini-amd64.c : Adding code to save/restore non-volatile registers
7228            on Winx64.
7230         * exceptions-amd64.c : Adding code to save/restore non-volatile 
7231           registers on Winx64.
7233         Contributed under MIT/X11 license.
7235 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
7237         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
7238         __GNUC_MINOR__ which can break when the major version changes.
7240 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
7242         * basic-simd.cs: Add tests for usage of the sizeof opcode.
7244 2009-01-07  Geoff Norton  <gnorton@novell.com>
7246         * helpers.c:  Allow mono -v -v -v to work on darwin.
7248 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
7250         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
7251           pattern. 
7253         Contributed under MIT/X11 license.
7255 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
7257         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
7258         instead of directly accessing type->data.klass. Fixes #462016.
7259         (mono_allocate_stack_slots_full): Ditto.
7261         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
7262         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
7264         * aot-compiler.c (emit_plt): Fix ARM build.
7266 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
7268         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
7269         
7270         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
7271         change.
7273         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
7274         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
7275         #463357.
7277         * iltests.il.in: Add a regression test.
7279 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
7281         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
7283 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
7285         * basic-simd.cs: Add a regression test for #462457.
7287 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
7289         * mini-ops.h: Add a definition of XPHI.
7291         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
7293         * ssa.c (op_phi_to_move): Handle XPHI.
7295         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
7297         Fixes #462457
7299 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
7301         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
7303 2008-12-31  Geoff Norton  <gnorton@novell.com>
7305         * mini-ppc.c: The prolog size allocated can be too small for darwin
7306         ppc32 under certain circumstances.  Also fix a small logic bug.
7308 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
7310         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
7311         while loading AOT methods.
7313         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
7314         since only the former is nulled out after a successful cast. This prevents
7315         crashes with rethrown exceptions when using --debug=casts.
7317 2008-12-24  Mark Probst  <mark.probst@gmail.com>
7319         * mini.h: New macro for checking whether a method is final,
7320         i.e. whether the method or its class is marked final.
7322         * method-to-ir.c: Use the new macro for all final-checks
7323         consistently.  Fixes the crash in the System.ServiceModel tests.
7325 2008-12-23  Mark Probst  <mark.probst@gmail.com>
7327         * mini-exceptions.c (get_exception_catch_class): Corrected another
7328         overly strict assertion.
7330 2008-12-23  Mark Probst  <mark.probst@gmail.com>
7332         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
7333         Clobbering it is not allowed because the caller might use it as
7334         the vtable register in the interface call.
7336 2008-12-19  Mark Probst  <mark.probst@gmail.com>
7338         * mini-exceptions.c (get_exception_catch_class): Corrected an
7339         overly strict assertion.
7341 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
7342         
7343         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
7345         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
7347         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
7349         * cpu-mips.md: correct lengths for certain long_ opcodes.
7351         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
7353         * 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().
7354         
7355 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
7357         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
7358         
7359 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
7360         
7361         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
7362         
7363 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
7365         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
7366         next basic block.
7367         
7368 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
7370         * 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
7372         * 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)
7373         
7374 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
7375         
7376         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
7377         
7378 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
7380         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
7381         gshared code. Fixes #458947.
7383         * generics.cs: Add a test.
7385 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
7386         
7387         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7388         
7389         * mini-mips.c: first pass n32 code generation.
7391         * mini-mips.h: datatypes and defines for n32 support.
7393         * exceptions-mips.c: first pass n32 code generation.
7394         
7395         * tramp-mips.c: first pass n32 code generation.
7396         
7397         * cpu-mips.md: add long_ opcodes.
7398         
7399 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
7401         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7403         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7404         
7405         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7406         
7407         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7409         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7411         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7413         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7415         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7417         * helpers.c: for mips/n32, don't pass -mips32 to objdump
7419 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
7421         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
7423 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
7425         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
7427 2008-12-12  Mark Probst  <mark.probst@gmail.com>
7429         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
7430         descriptors for helper functions directly in front of the code.
7432 2008-12-11  Mark Probst  <mark.probst@gmail.com>
7434         * method-to-ir.c: Removed an unnecessary assertion.
7436 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
7438         * method-to-ir.c: Merge SGEN changes from the old JIT.
7440 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
7442         * driver.c (compile_all_methods_thread_main): Handle failure of
7443         mono_get_method ().
7445 2008-12-10  Mark Probst  <mark.probst@gmail.com>
7447         * mini-ppc.c: Merged with mini-ppc64.c.
7449         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
7451         * Makefile.am: Use the same sources for PPC and PPC64.
7453         * mini-ppc64.c: Removed.
7455 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
7457         * branch-opts.c (remove_block_if_useless): Extract fall through detection
7458         code to mono_bb_is_fall_through.
7459         
7460         * branch-opts.c (mono_remove_critical_edges): Same.
7462 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
7464         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
7465         expect that an OP_BR_REG will be there.
7467 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
7469         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
7470         for the many branch ops. The original check miss OP_BR_REG.
7472         Fixes #457574.
7473         
7474 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
7476         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
7478 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
7480         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
7481         while holding the aot lock.
7483 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
7485         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
7486         
7487 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
7489         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
7490           to release all runtime callable wrappers held by the runtime.
7492         Contributed under MIT/X11 license.
7494 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
7496         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
7497           for Winx64.
7499         Contributed under MIT/X11 license.
7501 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
7503         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
7504         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
7506 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
7508         * cpu-mips.md: fix ckfinite length
7510         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
7511         (mono_arch_lowering_pass): cleanup, rearrange for clarity
7512         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
7513         
7514 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
7516         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
7517         
7518 2008-12-08  Geoff Norton  <gnorton@novell.com>
7520         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
7521         size by 8 bytes as well.
7523 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7525         * basic-simd.cs: Fix method names for Vector16b.
7526         
7527 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7529         * basic-simd.cs: Fix method names for Vector16sb.
7531 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7533         * basic-simd.cs: Fix method names for Vector8us.
7534         
7535 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7537         * basic-simd.cs: Fix method names for Vector8s.
7538         
7539 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7541         * basic-simd.cs: Fix method names for Vector4ui.
7543 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7545         * basic-simd.cs: Fix method names for Vector2l.
7547 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7549         * basic-simd.cs: Fix method names for Vector2d.
7551 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7553         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
7554         that are extension methods.
7556 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7558         * basic-simd.cs: Fix method names for Vector4f.
7560 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
7562         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
7563         as such. Fixes #456669.
7565 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
7567         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
7568         
7569 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
7571         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
7572         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
7573         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
7574         (mips_adjust_stackframe): handle FP spills
7575                 
7576         * mini-ops.h: add mips_mtc1_s2
7577         
7578         * cpu-mips.md: add mips_mtc1_s2
7579         
7580 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
7582         * unwind.c: New file, move the unwind info encoding functions here from
7583         aot-compiler.c, so they could be used at runtime too.
7585 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
7587         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
7588         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
7589         
7590 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
7592         * mini-mips.c: cleanup warnings
7593         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
7594         (mips_adjust_stackframe): handle case of taking the address of stack locals
7595         
7596 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
7598         * aot-compiler.c: Implement a few functions missing from the asm writer.
7599         (emit_method_code): Only write symbols for methods when using the bin
7600         writer, since the assembler can't deal with the characters in our method
7601         names.
7603         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
7605         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
7606         call.
7608         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
7609         a bit to also restore %rax.
7611 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7613         * mini-ppc.c: Some simple merges from mini-ppc64.c.
7615 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
7617         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
7618         arguments.
7620 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7622         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
7624         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
7625         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
7627         * exceptions-ppc64.c: Removed.
7629         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
7631 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7633         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
7634         tramp-ppc64.c.
7636         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
7638         * tramp-ppc64.c: Removed.
7640 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
7642         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
7643         the TYPESPEC table.
7645 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7647         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
7649         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
7650         mini-ppc.h instead of mini-ppc64.h.
7652         * mini-ppc64.h: Removed.
7654 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7656         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
7657         
7658         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
7659         
7660 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7662         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
7663         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
7664         code easier.
7666 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7668         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
7670 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7672         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
7674 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7676         * basic-simd.cs: Tests for operator == and != on Vector4f.
7678 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7680         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
7682         * simd-intrinsics.c: Kill useless enum.
7684 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7686         * cpu-mips.md: add long_conv_to_ovf_i4_2
7687         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
7689 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7691         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
7692         
7693         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
7695 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7697         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
7698         
7699 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
7701         * basic-simd.cs: Add tests for new methods.
7703 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
7705         * simd-intrinsics.c: Add support for operator == and !=
7706         on Vector4(u)i.
7708         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
7710 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
7712         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
7714 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
7716         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
7718         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
7719         MONO_PATCH_INFO_ICALL_ADDR.
7721         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
7723         * aot-compiler.c: Resurrect full-aot support.
7725 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7727         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
7728         
7729 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7731         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
7732         
7733 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
7735         * basic-simd.cs: Fix tests to work under ppc.
7736         Remove tests for methods that will be removed.
7738 2008-12-03  Mark Probst  <mark.probst@gmail.com>
7740         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
7741         generic type (via a typedef or typeref) correctly.
7743 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
7745         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
7746         diagnose an assertion failure.
7748 2008-12-02  Mark Probst  <mark.probst@gmail.com>
7750         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
7751         Fix trampoline size.
7753         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
7754         conversion opcodes are implemented natively instead via emulation.
7756 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
7758         * cpu-mips.md: remove mips_xori
7760         * mini-ops.h:  remove mips_xori
7762         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
7764         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
7765         
7766         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
7767         
7768 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
7770         * cpu-mips.md: fix instruction lengths.
7772         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
7774         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
7776         * mini-ops.h: fix slti / sltiu op profiles.
7777         
7778 2008-12-02  Martin Baulig  <martin@ximian.com>
7780         * method-to-ir.c (mono_method_to_ir): Disable debugging
7781         information for the init locals block to make the debugger stop
7782         after all locals have been initalized.
7784 2008-12-02  Martin Baulig  <martin@ximian.com>
7786         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
7787         running inside the debugger.
7789 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
7791         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
7792         is enabled.
7794         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
7795         alu->alu imm optimization which only shows if deadce is disabled.
7797         * aot-compiler.c: Rename the function names for the binary and asm writers
7798         so they can coexist in the same process. Rework the xdebug code to use the
7799         asm writer. This avoids the need to call into the runtime to dump the
7800         debugging info. Add more debugging info for types.
7802         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
7804         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
7805         cpu description tables, they can't occur in cpu-<ARCH>.md.
7807         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
7808         the stack in CEE_LDFLDA. Fixes #450542.
7810         * generics.cs: Add a new test.
7812 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
7814         * mini-ops.h: updated MIPS opcodes
7815         * mini-mips.c: decompose long opts
7816         * mini-mips.h: decompose long opts
7817         
7818 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
7820         * cpu-mips.md: fix length on int_rem_un
7821         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
7822         
7823 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
7825         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
7827         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
7829 2008-11-29  Martin Baulig  <martin@ximian.com>
7831         * mini-exceptions.c (mono_handle_native_sigsegv): Check
7832         mono_debug_using_mono_debugger() in addition to the
7833         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
7835 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7837         * mini-ops.h: updated more MIPS opcodes
7838         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
7839         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
7840         
7841 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7843         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
7845 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7847         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
7848         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
7849         * mini-ops.h: correct selected mips opcode entries
7850         
7851 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7853         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
7854         make them work.
7856 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7858         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
7860 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7862         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
7863         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
7864         * mini-mips.h: disable IMT
7865         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
7866         
7867 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7869         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
7871 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7873         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
7875 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
7877         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
7878         consistency.
7880 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7882         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
7883         for Set/GetVector aligned versions.
7885 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7887         * basic-simd.cs: Add tests for Get/SetVector.
7889 2008-11-27  Mark Probst  <mark.probst@gmail.com>
7891         * mini.c: Removed g_slist_append_mempool().  Now in
7892         metadata/mempool.c.
7894 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7896         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
7897         size properly and make the bounds check optional.
7899         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
7900         for SetVector and IsAligned.
7902 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
7904         * mini.c: Remove unused mono_normalize_opcodes () function.
7906 2008-11-26  Mark Probst  <mark.probst@gmail.com>
7908         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
7909         using the new atomic add ops now.
7911         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
7912         add.
7914 2008-11-26  Mark Probst  <mark.probst@gmail.com>
7916         * mini-ppc64.c: Several fixes.
7918 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7920         * cpu-mips.md: added jump_table
7921         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
7923 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7925         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
7927 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7929         * mini-ops.h: corrected a handful of MIPS opcodes.
7931 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7933         * aot-compiler.c: MIPS to use ELF writer
7935 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
7937         * mini-codegen.c: remove MIPS specific assert.
7939 2008-11-25  Mark Probst  <mark.probst@gmail.com>
7941         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
7942         fixes.  PPC64 now passes most of the runtime regressions.
7944 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
7946         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
7947         volatile intervals a bit.
7949 2008-11-24  Mark Probst  <mark.probst@gmail.com>
7951         * basic-long.cs: New test case.
7953 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
7955         * mini.c (mini_method_compile): Disable globalra for large methods for 
7956         now.
7958         * regalloc2.c (order_moves): Add fp support.
7960         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
7961         source bblock ends with an OP_BR_REG.
7963         * ratests.cs: Add a new test.
7965 2008-11-23  Mark Probst  <mark.probst@gmail.com>
7967         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
7968         sharing.  PPC64 now passes generics.exe.
7970 2008-11-23  Mark Probst  <mark.probst@gmail.com>
7972         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
7974 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
7976         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
7977         memory when mono_jit_info_table_find () can't find the method in the
7978         LMF case.
7980         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
7981         AOTed code too.
7982         
7983         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
7984         writer too.
7986 2008-11-23  Mark Probst  <mark.probst@gmail.com>
7988         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
7989         Several fixes.  PPC64 now runs exceptions.exe and
7990         devirtualization.exe.
7992 2008-11-22  Mark Probst  <mark.probst@gmail.com>
7994         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
7995         arrays.exe and basic-math.exe.
7997 2008-11-22  Mark Probst  <mark.probst@gmail.com>
7999         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
8000         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
8002 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
8004         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
8006 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
8008         * method-to-ir.c: Move bounds checking macros to ir-emit.h
8010         * ir-emit.h: Move macros from method-to-ir.c to here.
8012 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
8014         * mini-ops.h: Correct the long simd ops to use LREG.
8016 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
8018         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
8019         
8020         * mini-ops.h: Correct the dreg type of a few long opcodes.
8022         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
8023         Add netbsd support.
8025 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
8027         * mini-ppc.c: remove negative stack references in epilog
8028         for platforms that don't support the red zone.
8030 2008-11-21  Mark Probst  <mark.probst@gmail.com>
8032         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
8033         point regs.  Now PPC64 passes basic-calls.exe.
8035 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8037         * basic-simd.cs: Add tests for accessors of Vector2l.
8039 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8041         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
8043         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
8044         
8045         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
8047 2008-11-21  Mark Probst  <mark.probst@gmail.com>
8049         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
8050         PPC64 passes basic-long.exe.
8052 2008-11-20  Mark Probst  <mark.probst@gmail.com>
8054         * decompose.c: Decompose carry and overflow add on PPC64 like on
8055         other 64 bit archs.  Don't decompose sub at all on PPC64.
8057         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
8058         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
8059         basic-long.exe.
8061 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8063         * basic-simd.cs: Add tests for accessors of Vector2d.
8065 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8067         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
8069         * cpu-x86.md: Same.
8071         * mini-x86.c (mono_arch_output_basic_block): Same.
8072         
8073         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
8075 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8077         * basic-simd.cs: Add tests for accessors of Vector4f.
8079 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8081         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
8083         * cpu-x86.md: Same.
8085         * mini-x86.c (mono_arch_output_basic_block): Same.
8086         
8087         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
8089 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8091         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
8093 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8095         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
8097         * cpu-x86.md: Same.
8099         * mini-x86.c (mono_arch_output_basic_block): Same.
8100         
8101         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
8103 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8105         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
8107 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8109         * simd-intrinsics.c: Enable setters for Vector16sb.
8111 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8113         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
8115         * cpu-x86.md: Same.
8117         * mini-x86.c (mono_arch_output_basic_block): Same.
8118         
8119         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
8121 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
8123         * simd-intrinsics.c: Implement setter for Vector8us.
8125 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
8127         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
8128         for dead variables.
8130 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
8132         * mini-ppc.c: remove references to the red zone in the prolog
8133         (for systems that don't support it).
8135 2008-11-19  Mark Probst  <mark.probst@gmail.com>
8137         * cpu-ppc64.md: Fixed a few instruction lengths.
8139         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
8140         now.
8142 2008-11-19  Mark Probst  <mark.probst@gmail.com>
8144         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
8145         basic.exe now.
8147 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
8149         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
8151 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
8153         * mini-ops.h: Added OP_INSERT_I2.
8155         * cpu-x86.md: Same.
8157         * mini-x86.c (mono_arch_output_basic_block): Same.
8158         
8159         * simd-intrinsics.c: Implement setter for Vector8s.
8161         * simd-methods.h: Add the names of get setters of Vector8s.
8163 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
8165         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
8166         
8167         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
8168         parameters.
8170         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
8172 2008-11-18  Mark Probst  <mark.probst@gmail.com>
8174         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
8175         for PPC64.  An empty program runs now.
8177 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
8179         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
8181         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
8182         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
8183         info for JITted code is emitted into a shared library, loadable into gdb.
8185 2008-11-18  Mark Probst  <mark.probst@gmail.com>
8187         * Makefile.am: Changes to build PPC64.
8189         * mini-arch.h: Include mini-ppc64.h on PPC64.
8191 2008-11-18  Mark Probst  <mark.probst@gmail.com>
8193         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
8194         in PPC code up to r119147.
8196 2008-11-18  Mark Probst  <mark.probst@gmail.com>
8198         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
8199         cpu-ppc64.md: Changes for PPC64.
8201         Based on code submitted by andreas.faerber@web.de at
8202         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
8203         X11/MIT license.
8205 2008-11-18  Mark Probst  <mark.probst@gmail.com>
8207         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
8208         cpu-ppc64.md: Copied from the corresponding PPC files from
8209         r118846.
8211 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
8213         * mini-ops.h: Added OP_ROUND.
8215         * cpu-x86.md: Added round.
8217         * mini-x86.c: Added support for intrinsicing Math.Round (double).
8219         * basic-math.cs: Added test_0_round to test rounding.
8221         Contributed under MIT/X11 license.
8223 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
8225         * aot-compiler.c : Fix the Winx64 build.
8227         Contributed under MIT/X11 license.
8229 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
8231         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
8232         in OP_EXTRACT_R8 to avoid possible stack corruption.
8234 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
8236         * mini-ops.h: Added OP_EXTRACT_R8/I8.
8238         * cpu-x86.md: Added extract_r8.
8240         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
8241         
8242         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
8243         a couple of OP_EXTRACT_I4.
8245         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
8247         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
8249 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
8251         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
8252         and not 4.1. 
8254 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
8256         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
8257         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
8259         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
8260         are not needed any more.
8262         * mini.h: Remove the unused INS_LIST macros.
8264         * mini.c (mini_method_compile): Remove a disable globalra case which is no
8265         longer needed.
8267         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
8268         ir-emit.h.
8270         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
8271         mono_alloc_ireg () instead.
8273         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
8274         macros.
8276         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
8277         on amd64.
8279         * aot-runtime.c (load_aot_module): Disable AOT when running under
8280         CAS.
8282         * mini-amd64.h: Change the monitor fastpath defines to check for
8283         !PLATFORM_WIN32 so they work on *bsd too.
8285         * mini.h mini.c mini-hhpa.c: Remove more unused code.
8287         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
8289         * mini.h (MonoCompile): Remove new_ir flag.
8291         * regalloc.h regalloc.c: Remove unused code.
8293         * cpu-*.md: Remove more unused opcodes.
8295         * simple-cee-ops.h simple-mini-ops.h: Removed.
8297         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
8298         
8299 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
8301         * aliasing.h: Removed.
8303         * *.c: Remove references to aliasing.h and inssel.h.
8305         * mini.c: Remove additional unused functions.
8307         * mini-ops.h cpu-*.md: Remove unused opcodes.
8309 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
8311         Remove the old JIT code.
8313         * inssel*.brg: Removed.
8315         * ssa.c abcremoval.c aliasing.c: Removed.
8317         * ssa2.c: Renamed to ssa.c.
8319         * abcremoval2.c: Renamed to abcremoval.c.
8321         * *.c: Removed all !cfg->new_ir code.
8323         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
8324         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
8326         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
8327         
8328 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
8330         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
8331         to simplify the code and cut back on the number of global symbols in the AOT
8332         file.
8333         
8334         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
8336 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
8338         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
8339         with the got/got_info tables.
8341         * mini.h: Bump AOT file format version.
8342         
8343         * unwind.h: New file, contains definitions for stack unwinding.
8345         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
8346         to cfg->unwind_ops.
8347         
8348         * aot-compiler.c: Generalize the emitting of unwind information to use the
8349         information in cfg->unwind_ops.
8351         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
8353         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
8354         AOT method frames. Enable writing symbols for methods by default.
8356 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
8358         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
8359         and make it work with vectors of element sizes 1, 2 and 4.
8361         * simd-intrinsics.c: Enable getter for all vectors with element size
8362         1, 2 or 4.
8364         * simd-methods.h: Add the names of other getters.
8366         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
8368         * cpu-x86.md: Same.
8370         * mini-x86.c: Same.
8372 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
8374         * mini-ppc.h: portability fix.
8376 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
8378         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
8379         buggy and will overwrite it.
8381 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
8383         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
8384         Use it to emit local symbols for all methods so AOTed methods show up with
8385         their full name in gdb/valgrind output.
8387 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
8389         * mini-ppc.c: portability fixes.
8391 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
8393         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
8394         entries out of the if (!generic_shared...) code so it is always done.
8395         (mono_class_init_trampoline): Do the patching when running under valgrind
8396         too, newer versions of valgrind have no problems with it.
8398 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
8400         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
8401         further sections.
8403 2008-11-13  Mark Probst  <mark.probst@gmail.com>
8405         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
8406         filters.
8408 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
8410         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
8412 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
8414         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
8416         * cpu-x86.md: Same.
8418         * mini-x86.c: Same.
8420         * simd-intrinsics.c: Same.
8422 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
8424         * simd-intrinsics.c: Enable constructor intrinsics for all types.
8426 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
8428         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
8429         to work with more Vector types.
8431 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
8433         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
8434         store the elemens directly instead of using and intermediate.
8436 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
8438         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
8440         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
8441         to preserve %eax for aot plt trampolines.
8443         * aot-compiler.c (compile_method): Don't skip synchronized methods.
8444         (encode_method_ref): Flag synchronized methods so they won't go through
8445         the AOT trampoline.
8447         * aot-compiler.c: Additional work to support AOTing synchronized methods/
8448         wrappers.
8450         * cpu-ia64.md (jmp): Increase max length.
8452 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
8454         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
8455         open generic classes.
8457         * aot-compiler.c: Enable the ELF writer on ELF platforms.
8459         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
8460         box+brtrue optimization since it causes test failures on x86.
8462 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
8464         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
8466         * cpu-x86.md: Same.
8468         * mini-x86.c: Same.
8470         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
8471         for simd ctor values. 
8473         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
8474         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
8476 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
8478         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
8479         LogicalRightShift.
8481         * simd-instrincs.c: Same.
8483         * basic-simd.cs: Same.
8485 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
8487         * ratests.cs: Add more tests.
8489         * regalloc2.c (add_spill_code): Handle more corner cases.
8491 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
8493         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
8494         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
8495         both the source an destination of an instruction.
8497 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
8499         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
8500         wapihandles.c: more portability changes.
8502 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
8504         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
8505         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
8506         safe to execute in a signal handler and the kernel provides better
8507         the info in /proc/self/smaps. Avoid the assert on sigaction during
8508         cleanup.
8510 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
8512         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
8513         do the bblock linking hack if it is actually needed.
8515         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
8516         up linking.
8518         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
8519         crash problem is fixed.
8521         * branch-opts.c (mono_remove_critical_edges): Link up newly added
8522         bblocks.
8524         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
8525         for catch clauses.
8526         (mini_method_compile): Set the starting value of next_vreg to 
8527         MAX_IREGS + MAX_FREGS when using globalra.
8529         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
8530         filter clauses with BB_EXCEPTION_HANDLER.
8532         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
8534 2008-11-10  Mark Probst  <mark.probst@gmail.com>
8536         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
8537         space for stdcall.  Fixes regressions on Win32.
8539 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
8541         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
8542         bblocks.
8543         (linear_scan): Remove an assert which doesn't seem to be needed.
8545         * local-propagation.c (mono_local_deadce): Avoid a call to
8546         MONO_DELETE_INS which would screw up the instruction linking.
8548         * mini.c (mono_decompose_op_imm): Make this work with globalra.
8550         * regalloc2.c: Upgrade to work the current JIT code.
8552 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
8554         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
8555         case.
8557         * aot-runtime.c: Remove some dead code.
8559         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
8560         consistency.
8561         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
8563         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
8564         trampolines using sscanf since atoi doesn't work on large unsigned values.
8566         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
8567         Initialize code_size.
8569 2008-11-08  Mark Probst  <mark.probst@gmail.com>
8571         * method-to-ir.c (mini_emit_inst_for_method): Make
8572         Interlocked.CompareExchange work for Int arguments on 32 bit
8573         archs, as well.
8575 2008-11-07  Mark Probst  <mark.probst@gmail.com>
8577         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
8579 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
8581         * main.c Fix MSVC build.
8583         Contributed under MIT/X11 license.
8585 2008-11-06  Mark Probst  <mark.probst@gmail.com>
8587         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
8588         alignment larger than 8 bytes are aligned correctly, too.
8590         * mini.c: Honor the min_align field of MonoClass when laying out
8591         the stack.
8593 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
8595         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
8597         * aot-compiler.c (emit_plt): Fix a warning.
8598         
8599         * aot-compiler.c: Implement ARM support in the binary writer.
8601 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
8603         * basic-simd.cs: Add test for getter with byref arg.
8604         Fix the naming of a few tests.
8605         Add missing checks to a test.
8607 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
8609         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
8611         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
8612         most of the full-aot support for monitor enter/exit trampolines.
8614         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
8615         enter/exit trampoline creation functions.
8617         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
8618         make dist.
8620 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
8622         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
8623         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
8624         implement the needed functionality without adding crap to the runtime.
8626 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
8628         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
8629         non-x86 builds.
8631         * mini.c (mono_build_date): New global version holding the build date in
8632         string format.
8633         
8634         * Makefile.am (buildver.c): Generate a file containing the build date.
8636         * main.c: Set the build date from the generated file.
8638         * mini.c (mono_get_runtime_build_info): New helper function returning build
8639         information in a string format.
8640         
8641         * driver.c (mono_main): Print the build date in --version.
8643         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
8644         file when the bind-to-runtime-version option is used.
8646 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
8648         * simd-intrinsics.c: Fix bug when using getters and byref args. 
8650 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
8652         * simd-methods.h: Rename prefetch methods.
8654         * simd-intrinsics.c: Same.      
8656 2008-11-05  Mark Probst  <mark.probst@gmail.com>
8658         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
8659         sizes.
8661 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8663         * aot-compiler.c: Use the bundled elf header files instead of depending on
8664         the system one.
8665         
8666         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
8667         mempool.
8669         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
8670         on every call.
8672 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
8674         * cpu-x86.md: Add store nta ops.
8676         * mini-ops.h: Same.
8678         * mini-x86.c: Same.
8680         * mini.h: Add an enum for simd prefetch modes.
8682         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
8683         of store. Use the changed code to support store nta.
8685         * simd-intrinsics.c: Add prefetch ops for all vector types.
8687 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8689         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
8690         threads.
8691         
8692         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
8693         names.
8695         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
8696         trampolines.
8698 2008-11-04  Mark Probst  <mark.probst@gmail.com>
8700         * mini-x86.c: Fixed commit.
8702 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8704         * aot-compiler.c (emit_plt): Align the plt section only on x86.
8706 2008-11-04  Mark Probst  <mark.probst@gmail.com>
8708         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
8709         and MONITOR_EXIT, for the ASM fastpaths.
8711         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
8712         available.
8714         * mini.c, patch-info.h: Signature and patch infos for
8715         Monitor.Enter/Exit trampolines.
8717         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
8719         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
8720         Monitor.Enter/Exit ASM fastpath for Linux.
8722 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8724         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
8726         * objects.cs: Add a new test.
8727         
8728         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
8730         * aot-runtime.c (load_method): Run class initialization in the PLT case even
8731         if MONO_LOG_LEVEL is set.
8733         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
8735         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
8737         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
8738         
8739         * aot-compiler.c: Change the relocation code to use virtual addresses instead
8740         of file offsets. Align the sections belonging to the data segment to 
8741         PAGESIZE.
8743 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
8745         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
8746         elf.h. Port it to amd64.
8748 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
8750         * driver.c: Enable SIMD by default.
8752 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
8754         * cpu-x86.md: Add prefetch op.
8756         * mini-ops.h: Same.
8758         * mini-x86.c: Same.
8760         * mini.h: Add an enum for simd prefetch modes.
8762         * simd-methods.h: Add prefetch function names.
8764         * simd-intrinsics.c: Add prefetch ops for all vector types.
8766 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
8768         * aot-compiler.c (emit_bytes): Speed this up a little.
8770 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
8772         * aot-compiler.c: Add JIT time etc. statistics.
8773         
8774         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
8776         * mini.h (MonoCompile): Add 'got_offset' field.
8778         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
8779         method_got_offsets array.
8781         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
8782         wrappers.
8784         * aot-compiler.c (compile_method): Add generic method instances referenced
8785         by the method to the list of methods to be compiled, this is required so if
8786         A<T> references B<T>, and another assembly references A<int>, then it will
8787         also get a copy of B<int>.
8789         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
8790         when checking for monitor enter/exit.
8792 2008-10-30  Mark Probst  <mark.probst@gmail.com>
8794         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
8795         for Monitor.Enter and Monitor.Exit if enabled.
8797         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
8798         Solaris.
8800 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
8802         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
8803         of an OP_MOVE. Fixes #440046.
8805         * basic-long.cs: Add a new test.
8807 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
8809         * mini.h: Add synchronization note for the managed counter-part.
8811         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
8812         returns the simd caps of the current cpu.
8814 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
8816         * basic-simd.cs: Remove Console.WriteLine.
8818 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8820         * basic-simd.cs: New tests for Vector2ul.
8822 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8824         * simd-intrinsics.c: Add new vector type Vector2ul.
8826 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8828         * basic-simd.cs: New tests for Vector2l.
8830 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8832         * cpu-x86.md: Add long version of most packed int ops.
8834         * mini-ops.h: Same.
8836         * mini-x86.h: Same.
8838         * simd-intrinsics.c: Add new vector type Vector2l.
8840 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8842         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
8844         * simd-methods.h: Remove SN_op_BitwiseXor.
8846 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
8848         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
8849         alignment.
8851 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8853         * basic-simd.cs: Test for Vector2d.
8855         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
8856         value.
8858 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8860         * cpu-x86.md: Add double version of all packed float ops.
8862         * mini-ops.h: Same.
8864         * mini-x86.h: Same.
8866         * simd-intrinsics.c: Add new vector type Vector2d.
8868         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
8870         * simd-methods.h: Add Duplicate.
8872 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8874         * basic-simd.cs: Test for packing with signed saturation.
8876 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
8878         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
8879         found in the TYPESPEC table.
8881 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
8883         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
8884         too.
8886         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8888         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
8889         instead of the RVA, since the RVA can be changed by tools like the cil 
8890         stripper.
8892         * method-to-ir.c (mono_method_to_ir2): Ditto.
8894         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
8895         (deserialize_variable): Ditto.
8897 2008-10-25  Martin Baulig  <martin@ximian.com>
8899         * debug-mini.c (write_variable): Use
8900         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
8902 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8904         * cpu-x86.md: Add unsigned variants of packd and packw.
8906         * mini-ops.h: Same.
8908         * mini-x86.h: Emit the right instruction for packd and packw.
8909         Add unsigned variants of packd and packw.
8911         * simd-intrinsics.c: Packd and packw were used in place of their
8912         unsigned variants. Change that.
8913         Add intrinsics for (Signed)PackWithSignedSaturation.
8915         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
8917 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8919         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
8921 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8923         * mini-ops.h: Remove dword packed add/sub with saturation ops.
8925         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
8927         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
8928         sse instructions.
8930         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
8932 2008-10-24  Mark Probst  <mark.probst@gmail.com>
8934         * method-to-ir.c, mini.c: Special casing for the synchronized
8935         wrapper for the ldtoken+GetTypeFromHandle case.
8937 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
8939         * mini.c (mono_replace_ins): Move this to branch-opts.c.
8941         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
8942         created/split bblocks.
8944 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8946         * mini-ops.h: Add packed signed mul high.
8947         
8948         * cpu-x86.md: Same.
8950         * mini-x86.c (mono_arch_output_basic_block): Same.
8952         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
8954         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
8956 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8958         * basic-simd.cs: Tests for Vector16sb.
8960 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
8962         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
8964 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
8966         * mini-ops.h: Add packed signed min, max and compare greater.
8967         
8968         * cpu-x86.md: Same.
8970         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
8971         saturation.
8973         * simd-methods.h: Add CompareGreaterThan.
8975         * simd-methods.h: Remove CompareEquals.
8977         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
8979         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
8981         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
8982         CompareEqual.
8984 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
8986         * basic-simd.cs: Fix tests due to change in the API.
8988 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
8990         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
8992 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
8994         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
8996         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
8997         inst_offset as this has invalid values for LDADDR.
8999 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
9001         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
9003         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
9005 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
9007         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
9008         for accessing field->data.
9010 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
9012         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
9014 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
9016         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
9018         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
9020 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
9022         * dominators.c (mono_compute_natural_loops): Allocate GList enties
9023         from the cfg mempool.
9025 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
9027         * basic-simd.cs: Tests for new methods in Vector8us.
9029 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
9031         * mini-ops.h: Add multiply and store high.
9032         
9033         * cpu-x86.md: Same.
9035         * mini-x86.c (mono_arch_output_basic_block): Same.
9037         * simd-methods.h: Same.
9039         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
9040         and CompareEqual.
9042 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
9044         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
9045         mono_class_setup_vtable ().
9047         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
9048         mono_class_get_vtable_entry () for accessing klass->vtable.
9050         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
9052         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
9053         found.
9055         * method-to-ir.c (mono_save_token_info): Don't save references made from
9056         wrappers.
9058         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
9059         of generic instances.
9061         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
9063 2008-10-19  Mark Probst  <mark.probst@gmail.com>
9065         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
9066         OP_JMP depends on the method signature.  Calculate it properly.
9068 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
9069         
9070         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
9071         called directly.
9073         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
9074         instances.
9075         (emit_extra_methods): Add another table mapping method indexes to 
9076         offsets in the extra_method_info table.
9078         * mini.h: Bump AOT file format version.
9079         
9080         * aot-runtime.c: Merge most of the code from mono_aot_get_method
9081         and mono_aot_get_method_from_token () into one function.
9083 2008-10-19  Mark Probst  <mark.probst@gmail.com>
9085         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
9086         separate counter.
9088 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
9090         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
9091         methods.
9093         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
9094         disable_aot.
9096         * mini.c (mono_patch_info_equal): Compare the generic context as well.
9098         * mini.h: Bump aot file format version.
9100         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
9101         AOT file can contain native code for methods which are not in the METHOD
9102         table. Generate code for non-sharable generic instances of generic methods
9103         found in the METHODSPEC table.
9104         
9105         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
9106         encoding generic type handles.
9108         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
9109         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
9111         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
9112         macros + MONO_ADD_INS.
9114         * mini.c (mono_jump_info_token_new2): New function which takes a generic
9115         context as well.
9117         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
9119         * mini.h: Bump aot file format version.
9121         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
9123 2008-10-17  Mark Probst  <mark.probst@gmail.com>
9125         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
9126         platforms, with definable stack alignment value.  Set to 16 now
9127         for all platforms.
9129         * mini.c, mini.h, driver.c: Command line option for disabling
9130         stack alignment.
9132 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
9134         * basic-simd.cs: Tests for new methods in Vector4ui.
9136 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
9138         * mini-ops.h: Add packed int shuffle.
9139         
9140         * cpu-x86.md: Same.
9142         * mini-x86.c (mono_arch_output_basic_block): Same.
9144         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
9145         extract mask, max, min, shuffle.
9147         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
9149 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
9151         * basic-simd.cs: Tests for new methods in Vector8us.
9153 2008-10-17  Mark Probst  <mark.probst@gmail.com>
9155         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
9156         RuntimeTypeHandle, not a TypedReference.
9158 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
9160         * simd-intrinsics.c: remove relocations.
9162 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
9164         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
9165         optimizations from the x86 backend.
9167 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
9169         * simd-methods.h, simd-intrinsics.c: debloat method names and
9170         prepare for no relocations.
9172 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
9174         * mini-ops.h: Add packed min/equal and sum of absolute differences.
9175         
9176         * cpu-x86.md: Same.
9178         * mini-x86.c (mono_arch_output_basic_block): Same.
9180         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
9181         extract mask, max, min and sum of absolute differences.
9183         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
9184         method name.
9186 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
9188         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
9189         Renamed one test for consistency.
9191 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
9193         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
9194         fix to the code that deal with other blocks.
9196 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
9198         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
9200 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
9202         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
9203         that deals with vreg interference. Explicitly check for OP_LDADDR to be
9204         able to process the source reg.
9206 2008-10-16  Martin Baulig  <martin@ximian.com>
9208         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
9210         * inssel.brg: Add `OP_HARD_NOP'.
9212         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
9214         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
9215         `OP_HARD_NOP' instruction when running inside the debugger.
9217         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
9218         `OP_HARD_NOP' instruction when running inside the debugger.
9220 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
9222         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
9223         now works. The issue with the regalloc tripping up no longer
9224         happens.
9226         * simd-intrinsics.c (load_simd_vreg): Same.
9228 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
9229         
9230         * basic-simd.cs: Tests for new Vector8ui methods.
9232 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
9234         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
9235         only for type. This fixes crashes where MonoInst::klass is checked
9236         for ops of type != VTYPE or OBJ.
9238         * simd-intrinsics.c (load_simd_vreg): Same.
9240 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
9242         * mini-ops.h: Add ops for packed shuffle/max/avg and
9243         extract mask.
9244         
9245         * cpu-x86.md: Same.
9247         * mini-x86.c (mono_arch_output_basic_block): Same.
9249         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
9250         extract mask.
9252         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
9253         to emit extract mask op.
9255         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
9256         to emit word shuffles.
9258 2008-10-15  Mark Probst  <mark.probst@gmail.com>
9260         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
9261         the largest alignment needed by a variable, but at least
9262         sizeof(gpointer).
9264 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
9266         * basic-simd.cs: Tests for the fixes in the last commit.
9268 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
9270         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
9271         no longer handles STACK_PTR input.
9273         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
9275         * simd-intrinsics.c (load_simd_vreg): New function that works like 
9276         get_simd_vreg   but handles STACK_PTR input.
9278         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
9279         as the input can be an arbitrary pointer.
9281         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
9282         LDADDR local optimization directly otherwise use a store op.
9284 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
9286         * basic-simd.cs: Tests for dup low and dup high.
9288 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
9290         * mini-ops.h: Add dup low and dup high ops.
9291         
9292         * cpu-x86.md: Same.
9294         * mini-x86.c (mono_arch_output_basic_block): Same.
9296         * simd-intrinsics.c (vector4f_intrinsics): Same.
9298 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
9300         * basic-simd.cs: Tests for recently added functionality.
9302 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
9304         * mini-ops.h: Add remaining sse1 fp ops.
9305         
9306         * cpu-x86.md: Add remaining sse1 fp ops.
9308         * mini-x86.c (mono_arch_output_basic_block): Same.
9310         * mini.h: Add enum for simd FP compare conditions.
9312         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
9314         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
9315         so the backed can generate the appropriate op.
9317 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
9318         This patch squeese one more byte from the SimdIntrinsc struct.
9320         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
9321         a a shift amount intead of simply or'ing it.
9323         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
9325         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
9326         byte so we can have an aditional flags field without increasing struct size.
9328         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
9329         against the simd_supported_versions bitmask.
9331         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
9333 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
9335         * mini.c: remove rawbuffer code (the only use here is unsafe because
9336         it takes locks during signal handling and the kernel now provides much
9337         better info in proc/pid/smaps these days).
9339 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
9341         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
9342         OP_X86_PUSH_OBJ. Fixes #434620.
9344         * objects.cs: Add a test.
9345         
9346 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
9348         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
9349         that the packuswb/packusdw don't work with unsigned numbers for what
9350         would be negative numbers in signed format.
9352         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
9353         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
9355         * mini-ops.h: Add doubleword forms of many ops and packing ones.
9357         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
9359         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
9361         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
9363         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
9364         add more ops.
9366         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
9367         version as the enum in mini.h.
9369         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
9370         for sse3 ops, check the simd_version field if present. This way the code
9371         works with all versions of sse.
9373 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9375         * simd-intrinsics.c: Fixed intrinsic name typo.
9377         * mini.h: Added missing simd exported function.
9379         * basic-simd.cs: Added tests for Vector4ui.
9380         Fixed broken test for Vector16b.
9382 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
9384         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
9385         the max length to 64.
9387 2008-10-10  Mark Probst  <mark.probst@gmail.com>
9389         * method-to-ir.c: Only do the fast virtual generic method call for
9390         non-wrapper methods.
9392         * mini.h, mini-trampolines.c: The new generic virtual remoting
9393         trampoline handles virtual method calls via the vtable (as done by
9394         the fast virtual generic method calls) to remoting proxies.
9396         * mini.c (mono_jit_create_remoting_trampoline): For generic
9397         methods reate a generic virtual remoting trampoline.
9399         * mini-amd64.h: Enable fast virtual generic method calls again.
9401 2008-10-10  Mark Probst  <mark.probst@gmail.com>
9403         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
9404         restore registers when doing tail calls.
9406 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9408         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
9409         Vector4ui.
9411 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9413         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
9415 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9417         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
9419 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9421         * basic-simd.cs: Retrofit for API changes.
9423 2008-10-10  Mark Probst  <mark.probst@gmail.com>
9425         * mini-ppc.c: Handle integer stack arguments for tail calls.
9427 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9429         * optflags-def.h: Removed sse3 optimization.
9431         * driver.c: Same.
9433         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
9434         sse3.
9436         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
9438         * mini.h: Added enumeration with simd versions.
9440         * simd-intrinsics.c (emit_intrinsics): Use the new static var
9441         for detecting SSE3.
9443         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
9445         * mini.c (mini_init): Call mono_simd_intrinsics_init.
9447 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
9449         * basic-simd.cs: Added tests for Vector8u and Vector16u.
9451         * basic-simd.cs: Fixed test naming.
9453 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
9455         * mini-ops.h: Added ops for packed and saturated math, shifts
9456         and packing/unpacking.
9458         * cpu-x86.md: Added descriptors for the above ops.
9460         * mini-x86.c: Added code to emmit the above ops.
9462         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
9464 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
9466         * aot-compiler.c (compile_method): Enable AOT for generic code.
9468         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
9470 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
9472         * mini.c: add a workaround for a common screwup that ends up blamed
9473         to mono (other processes blocking signal delivery).
9475 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
9477         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
9478         in the LDFLD/STFLD opcodes. Fixes #432673.
9480         * iltests.il.in: Add a new test.
9482 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
9484         * mini-arm.c: attach the thread in unmanaged->managed transitions
9485         using delegates (bug #433148).
9487 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
9489        * basic-simd.cs: Use new ShuffleSel constants.
9491 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
9493         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
9495         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
9496         only disable simd intrinsics if no sse2 is detected.
9498         * optflags-def.h: Added sse3.
9500         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
9501         is disabled.
9503 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
9505         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
9506         when adding delegate-invoke wrappers.
9508 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
9510         * Makefile.am: Reenable the simd tests.
9512 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
9514         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
9515           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
9516           other vreg is allocated to that hreg.
9518         Contributed under MIT/X11 license.
9520 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
9522         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
9523         yet checked in.
9525 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
9527         * basic-simd.cs: New test suite for SIMD intrinsics.
9529         * Makefile.am: Added new tests.
9531 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
9533         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
9535         * mini-ops.h: Same.
9537         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
9539         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
9540         using SSE2 aware opcodes.
9542         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
9543         is enabled, this code path is only reachable if conversion ops are emmited after
9544         mono_method_to_ir.
9546         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
9548         This optimization saves 6 bytes per conversion against the old version.
9550 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
9552         * aot-compiler.c (compile_method): Don't skip methods referencing 
9553         generic methods without a corresponding entry in token_info_hash, since
9554         encode_method_ref () can handle all generic methods now.
9556         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
9557         generic context is set.
9558         
9559         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
9560         generic sharing of LDTOKEN.
9562 2008-10-06  Mark Probst  <mark.probst@gmail.com>
9564         * mini-amd64.h: Temporarily disabled fast virtual generic method
9565         calls because it breaks the System.Runtime.Remoting tests.
9567 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
9569         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
9571         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
9572         so inlining actually works.
9573         (check_inline_caller_method_name_limit): Ditto.
9575 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
9577         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
9578         64 bit safety (from Olaf Hering and Andreas Farber).
9580 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
9581         
9582         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
9583         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
9584         unused virtual call support code.
9586         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
9587         
9588         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
9589         which can't use aot trampolines.
9590         (decode_patch): Don't create aot trampolines for methods which can't use
9591         them.
9593         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
9594         use aot trampolines.
9596         * mini.h: Bump AOT image format version.
9597         
9598 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
9600         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
9601         to save_token_info () since cmethod is inflated for constrained calls.
9603         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
9605 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
9607         * Makefile.am: Add build rules for ppc64.
9608         This avoids the build failing at pedump with unresolved symbols
9609         due to lack of arch_sources. Instead it will now fail earlier
9610         due to lack of cpu-ppc64.md.
9612         Contributed under MIT/X11 license.
9614 2008-10-04  Mark Probst  <mark.probst@gmail.com>
9616         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
9617         tail calls.
9619         * iltests.il.in: Add test case for tail call with many arguments.
9621 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
9623         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
9624         to the fast virtual generic method code until the aot case is fixed.
9626 2008-10-03  Mark Probst  <mark.probst@gmail.com>
9628         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
9630 2008-10-03  Mark Probst  <mark.probst@gmail.com>
9632         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
9633         thunks.
9635 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
9636         
9637         * simd-intrinsics.c: Forgot to add this one.
9639         * mini-codegen.c: Fix macro in case SIMD is not supported.
9641 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
9642         
9643         This patch land initial JIT support for simd intrinsics.
9645         * mini-x86.h: Added new define to make --enable_minimal work on x86.
9647         * Makefile.am: Added simd-intrinsics.c
9649         * simd-intrinsics.c: New file with simd instrinsic related
9650         code.
9652         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
9654         * cpu-x86.md: Add simd related instructions.
9656         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
9658         * driver.c: Added two new --regression variants.
9660         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
9662         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
9664         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
9665         extract some complicated logic to helper functions.
9667         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
9669         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
9671         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
9672         the specialized simplification pass.
9674         * method-to-ir.c (mono_spill_global_vars): Use new macro.
9676         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
9678         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
9679         table.
9681         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
9682         if MONO_ARCH_NEED_SIMD_BANK is defined.
9684         * mini-ops.h: Added the new simd ops.
9686         * mini-x86.c: Added mono_arch_xregname.
9688         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
9690         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
9692         * mini-x86.h: Define simd related MONO_ARCH macros.
9694         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
9696         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
9698         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
9699         MONO_CLASS_IS_SIMD to deal with simd related IR.
9701         * mini.h (MonoInst): Added spill_var to the backend union.
9703         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
9705         * mini.h: Added forward declarations of the new simd fuctions.
9707         * optflags-def.h: Added new optimization names SIMD.
9709         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
9711         * regalloc.h: Added support for working with 3 register banks.
9713         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
9715         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
9717 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
9719         * mini-exceptions.c: remove 64 bit related ifdef clutter.
9721 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
9723         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
9724         instead of one on 64 bit systems.
9726         * method-to-ir.c: Remove unused includes.
9728 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
9730         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
9731         cfg->used_int_regs, since the two are different on arm.
9733 2008-10-02  Mark Probst  <mark.probst@gmail.com>
9735         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
9736         mono_method_get_vtable_index() to get the vtable index.
9738 2008-10-02  Mark Probst  <mark.probst@gmail.com>
9740         * method-to-ir.c (mono_method_to_ir2): Don't create native
9741         wrappers for array methods, because they're never called (and if
9742         they were called they wouldn't work).
9744 2008-10-02  Mark Probst  <mark.probst@gmail.com>
9746         * method-to-ir.c (mono_method_to_ir2): Array methods are
9747         special-cased and must not be invoked indirectly via the (M)RGCTX
9748         when generic sharing is turned on.  Fixes #431413.
9750 2008-10-01  Mark Probst  <mark.probst@gmail.com>
9752         * method-to-ir.c: When generic sharing is active, call
9753         non-interface virtual generic methods via the standard trampoline.
9755         * mini-trampolines.c: Handle virtual generic shared methods.
9757         * mini.h, mini-x86.c, mini-x86.h: New argument for
9758         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
9759         method thunks and which is the trampoline to call if the lookup
9760         fails.  Enable the virtual generic method thunk for x86.
9762         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
9763         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
9764         argument but assert that it's NULL, because these archs don't yet
9765         implement the virtual generic method thunk.  Changes in the IMT
9766         thunk data structures.
9768 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
9770         * aot-compiler.c (emit_globals): Avoid invalid characters in
9771         the static linking symbol.
9773         * objects.cs: Add a test for the range check optimization. Fix warnings.
9775         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
9776         optimization from the current JIT.
9778         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
9779         later in decompose_array_access_opts () to allow more optimizations.
9781         * method-to-ir.c (mono_handle_soft_float): Rename this to 
9782         mono_decompose_soft_float () for consistency.
9784         * mini-ops.h: Fix arguments of OP_STRLEN.
9786         * method-to-ir.c (save_cast_details): Extract the cast details saving code
9787         into a separate function.
9788         (reset_cast_details): Ditto.
9789         (handle_unbox): Save cast details. Fixes #431254.
9791         * method-to-ir.c: Remove some obsolete FIXMEs.
9793 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9795         * ir-emit.h (alloc_dreg): Write a warning before crashing.
9797 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9799         * mini-codegen.c: More work on macros to make them
9800         ready for multiple regbanks.
9802 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9804         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
9806         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
9808 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9810         * mini-codegen.c (mono_spillvar_offset): Proper support for
9811         multiple regbanks.
9813 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
9815         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
9816         the stack overflow changes.
9818 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9820         * mini-codegen.c: Make all bank macros depend on reg_bank.
9822         * mini-codegen.c (mono_local_regalloc): Make free mask
9823         initialization regbank aware.
9825 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9827         * mini-codegen.c (mono_local_regalloc): Extract callee
9828         mask selection to a function and make it regbank aware.
9830 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9832         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
9833         code to deal with many regbanks.
9835 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
9837         * mini-codegen.c: More fp->regbank changes.
9839 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
9841         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
9842         of a hardcoded constant.
9844 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
9846         * method-to-ir.c (type_from_stack_type): Fix typo.
9848 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
9850         * mini-ia64.c (emit_move_return_value): Convert float return values to
9851         double.
9853         * objects.cs: Add a new test.
9854         
9855         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
9856         VARARG methods to fix an assert later.
9858         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
9859         end so it at least compiles.
9861 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
9863         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
9865 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
9867         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
9868         optimization to a new function (emit_optimized_ldloca_ir) and enable
9869         it for both ldloca and ldloca_s.
9871 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
9873         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
9874         gshared CASTCLASS code.
9876         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
9877         amd64, where the libc stack unwinder encounters stack frames referring to
9878         native code in unmapped memory.
9880         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
9881         sharing.
9883         * generics.cs: Add new test.
9885 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
9887         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
9888         add a check that one of the ARM_FPU_ constants is defined.
9890         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
9891         
9892         * mini-exceptions.c: Fix build on non-altstack platforms.
9894         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
9895         sharing of vtypes.
9897         * ir-emit.h: Add a comment to NEW_PCONST.
9899         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
9901         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
9903         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
9904         after the changes to MonoJitDomainInfo.
9906 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9908         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
9910 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9912         * mini-ppc.c: Compiler warning fixes.
9914 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9916         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
9917         for pinvokes.
9919 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9921         * exceptions-ppc.c, mini-ppc.h: Compile
9922         mono_arch_handle_altstack_exception() on Darwin, too.
9924 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9926         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
9927         work on archs which don't have generic sharing implemented, only
9928         without the vtable_arg.
9930 2008-09-26  Mark Probst  <mark.probst@gmail.com>
9932         * mini.c: Added comment explaining why delegate ctor icall
9933         wrappers are compiled.
9935 2008-09-26  Mark Probst  <mark.probst@gmail.com>
9937         * mini.c: Don't produce trampolines to delegate ctor icall
9938         wrappers but compile them upfront.
9940 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
9942         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
9943         runtime-set function when going back to managed code. Currently this
9944         is used to set back the protection on the soft ovf pages and/or to
9945         throw the stack overflow exception that happened in unmanaged code.
9947 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
9949         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
9950         runtime-set function when going back to managed code. Currently this
9951         is used to set back the protection on the soft ovf pages and/or to
9952         throw the stack overflow exception that happened in unmanaged code.
9954 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
9956         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
9957         the support code for restoring stack protection after stack overflows
9958         that happen in unmanaged code. Don't set the exec permission on the
9959         soft overflow area.
9961 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
9963         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
9964         delegate->method_ptr is set. Fixes #428054.
9966 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
9968         * tests.cs: Rename to ratests.cs.
9970         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
9971         emit_get_rgctx_... functions.
9973 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9975         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
9977 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9979         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
9980         before asserting that method is sharable.
9982 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9984         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
9985         whether method needs a static RGCTX wrapper used instead of
9986         complex conditions.
9988         * generic-sharing.c, mini.h: A few functions moved to
9989         metadata/generic-sharing.c.
9991 2008-09-25  Mark Probst  <mark.probst@gmail.com>
9993         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
9994         Generic code sharing for value types, which essentially means
9995         treating value type methods like static methods.  The RGCTX is
9996         passed in the same way.
9998 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
10000         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
10001         opcode when creating multi-dimensional arrays of open types.
10003         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
10004         open generic types.
10006         * generics.cs: Add a test.
10008         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
10010 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
10012         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
10014         * mini.c (mini_method_compile): Set it when running under the debugger. 
10016         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
10017         vreg optimization if the flag is set.
10019         * driver.c (mono_main): Add --attach= option to pass options to
10020         the attach agent.
10022         * mini.c (sigquit_signal_handler): Start the attach agent.
10024         * ssapre.c: Disable this to save space since it is not yet ported to
10025         linear IR.
10027         * regalloc2.c: Disable this to save space.
10029         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
10031 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
10033         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
10034         the -v option useful again.
10036 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
10038         * mini-amd64.c (mono_arch_output_basic_block): Add support for
10039         --break-at-bb.
10041         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
10042         arrays of arrays. Fixes #428406.
10044         * method-to-ir.c (mini_emit_castclass): Ditto.
10046         * objects.cs: Add new test.
10047         
10048 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
10050         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
10051         was wrong at it choked against target_type_is_incompatible for byref types.
10053 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
10055         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
10056         places.
10058 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
10060         * mini-exceptions.c: update a few more exceptions-related counters.
10062 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
10064         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
10065         new functions to allocate from persistent mempools.
10067 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
10069         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
10070         multiple register banks in the future.
10072         * mini-codegen.c (mono_local_regalloc): Fix a warning.
10074 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
10076         * mini.c (type_to_eval_stack_type): Remove duplicated function.
10078         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
10080         * mini.h: Export type_to_eval_stack_type.
10082         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
10083         is only ins->klass of byref types.
10085 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
10087         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
10088         (mini_emit_memcpy2): Ditto.
10090         * mini-amd64.c: Fix a warning.
10092 2008-09-21  Mark Probst  <mark.probst@gmail.com>
10094         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
10095         linking.
10097 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
10099         * method-to-ir.c: Extract stloc micro-optimization to a
10100         function and apply it to all cases.
10102 2008-09-19  Mark Probst  <mark.probst@gmail.com>
10104         * method-to-ir.c: Don't fail generic code sharing in cases we
10105         already support.
10107 2008-09-18  Mark Probst  <mark.probst@gmail.com>
10109         * mini-ppc.c: Handle structs in tailcalls on Darwin.
10111 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
10113         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
10114         implementation.
10116 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
10118         * trace.c: make tracing more useful and correct, with per-thread
10119         id and indent info.
10121 2008-09-15  Mark Probst  <mark.probst@gmail.com>
10123         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
10124         doing a method call and the argument is an R4.
10126 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
10128         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
10129         generic methods.
10131 2008-09-13  Mark Probst  <mark.probst@gmail.com>
10133         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
10135 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
10137         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
10138         (MONO_JUMP_TABLE_FROM_INS): Ditto.
10140 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
10142         * driver.c: Add a --agent argument (not supported yet) to load managed
10143         agent assemblies before loading the main assembly, similarly to how the
10144         Java VM handles agents.
10146 2008-09-11  Mark Probst  <mark.probst@gmail.com>
10148         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
10149         function to do stack layout of local variables.
10151 2008-09-11  Mark Probst  <mark.probst@gmail.com>
10153         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
10154         calculation.
10156 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
10158         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
10159         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
10160         JIT if DISABLE_JIT is defined.
10162         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
10163         defined.
10165 2008-09-10  Mark Probst  <mark.probst@gmail.com>
10167         * iltests.il.in: Disable the fconv test on PPC (the result is
10168         undefined according to ECMA).
10170 2008-09-10  Mark Probst  <mark.probst@gmail.com>
10172         * iltests.il.in: Enable tail call tests for PPC.
10174         * mini.h: Add variable for storing incoming valuetype argument
10175         addresses for tail calls.
10177         * mini-ppc.c: Implement valuetype arguments and return values for
10178         tailcalls on Linux.
10180 2008-09-09  Mark Probst  <mark.probst@gmail.com>
10182         * mini-ppc.c: Partially implement tail calls (struct arguments and
10183         return values not supported).
10185         * method-to-ir.c: Enable tail calls on PPC.
10187 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
10189         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
10190         runtime-invoke wrappers to work around the problem of them getting
10191         assigned to a random class.
10193         * aot-runtime.c (mono_aot_get_method): Ditto.
10194         
10195 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
10197         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
10198         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
10200 2008-09-07  Mark Probst  <mark.probst@gmail.com>
10202         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
10203         until they're implemented properly.
10205         * exceptions-ppc.c: Use arch-independent exception-handling code
10206         instead of custom one.
10208         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
10209         for Linear IR.
10211         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
10213         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
10214         applies when __powerpc__ is defined.
10216 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
10218         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
10219         methods to their code to avoid computing the full name of wrappers and
10220         doing a lookup in a string hash table.
10222 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
10224         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
10225         we identify bblocks before method_to_ir () is ran.
10227         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
10228         Also avoid optimizing branches pointing to themselves.
10230         * mini.c (mini_method_compile): Ditto. Fixes #422947.
10232 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
10234         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
10236 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
10238         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
10239         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
10240         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
10241         'buf'.
10243         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
10244         jumped to the same entry in plt_jump_table.
10246 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
10248         * method-to-ir.c (initialize_array_data): Handle field with RVA from
10249         dynamic images.
10251 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
10253         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
10254         other assignment can be if converted. Saves 1.5% on corlib size and fixes
10255         #421807.
10257 2008-08-29  Geoff Norton  <gnorton@novell.com>
10259         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
10260         segment, and doesn't properly handle .space as .text.  Fixes
10261         AOT Mach/ARM
10263 2008-08-29  Geoff Norton  <gnorton@novell.com>
10265         * mini.c: Disable the mach exception handler when running on 
10266         ARM
10268 2008-08-29  Geoff Norton  <gnorton@novell.com>
10270         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
10271         globals on Darwin/ARM
10273 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
10275         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
10276         since too many things depend on it. Instead, call 
10277         mono_runtime_set_no_exec ().
10278         
10279         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
10280         the new JIT.
10282         * aot-compiler.c: Add an 'asm-only' AOT option.
10284         * mini.c: Avoid initializing the runtime when doing AOT compilation.
10285                 
10286         * aot-compiler.c (compile_method): Disable gshared support for now as it
10287         doesn't yet work.
10289 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
10291         * mini-amd64.h : Fix a compiler warning.
10293         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
10294           Changed to use a callback function to retrieve the unwind info.
10295           This avoids problems observed when code blocks were removed by
10296           unloading an app domain.
10298         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
10299           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
10300           to work properly.
10302         Contributed under MIT/X11 license.
10304 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
10306         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
10307           case to keep the stack aligned to 8.
10309         Contributed under MIT/X11 license.
10311 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
10313         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
10314         avoid repeated linear searches.
10316 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
10318         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
10319         methods it can't handle.
10320         
10321         * aot-compiler.c (add_method): Avoid adding a method twice.
10322         (add_wrappers): Add runtime invoke wrappers for all methods.
10324         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
10325         function to create an aot-compatible version of this trampoline.
10327         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
10329 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
10331         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
10333         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
10334         with a generic sharing failure.
10336         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
10338         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
10339         CEE_RETHROW. Fixes #419634.
10341         * mini.c (mono_method_to_ir): Ditto.
10343         * exceptions.cs: Add a new test.
10344         
10345         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
10346         to mono_type_stack_size_internal () since some callers might not pass in
10347         an rgctx.
10349         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
10350         instrument_prolog. Fixes #419878.
10352         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
10353         doubles in soft float mode volatile.
10355 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
10357         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
10359         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
10360         to handle soft float correctly.
10362         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
10363         the fast path.
10365         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
10367         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
10368         to sp, since the generics catch code requires it.
10370         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
10371         copying.
10373         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
10374         mono_arch_emit_imt_argument ().
10376         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
10378         * mini-arm.c tramp-arm.c: Generic sharing updates.
10380 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
10382         * mini-arm.c: Fix the arm build.
10384         * generic-sharing.c (mini_type_get_underlying_type): New helper function
10385         handling enums, generic instances and generic sharing.
10386         (mini_type_stack_size_full): Ditto.
10388         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
10389         
10390         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
10392         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
10394         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
10395         trampolines.
10397         * mini-arm.c: Various small generic sharing changes.
10399         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
10400         this for x86.
10401         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
10402         custom code.
10404         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
10405         helper function to return a generic class init trampoline.
10407         * method-to-ir.c mini.c: Use it.
10408         
10409         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
10410         arch-specfic function to return a generic class init trampoline.
10412         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
10413         the GENERIC_CLASS_INIT custom code.
10415         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
10416         a fatal error, not a sharing failure.
10418         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
10419         needed.
10421         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
10422         trampoline argument from MONO_ARCH_VTABLE_REG.
10424         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
10425         order of the arguments to the C trampoline: pass 'slot' as the trampoline
10426         argument, and pass the vtable in VTABLE_REG.
10428         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
10429         order of the arguments to the C trampoline: pass 'slot' as the trampoline
10430         argument, and pass the vtable in VTABLE_REG.
10431         (mono_arch_create_trampoline_code_full): Remove some special casing for
10432         the rgctx fetch trampoline.
10434         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
10435         Fixes #419273.
10437         * iltests.il: Add a test for it.
10439 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
10441         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
10443         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
10444         no longer needed.
10446         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
10447         use mono_jit_info_table_find () to avoid recursion.
10448         (mono_delegate_trampoline): Add a sync wrapper here.
10450         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
10451         here.
10453         * mini.c (mono_method_to_ir): Ditto.
10454         
10455         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
10456         add_sync_wrapper argument. Don't add a sync wrapper here.
10457         (mono_create_jump_trampoline): Don't add a sync wrapper here.
10459         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
10460         
10461 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
10463         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
10464           of nonvolatile registers back from MonoContext to CONTEXT.
10466         Contributed under MIT/X11 license.
10468 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
10470         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
10471           arguments on Winx64 there are only 4 argument registers.  For this
10472           logic to work the last argument must be pulled from the stack.  
10474         Contributed under MIT/X11 license.
10476 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
10478         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
10480         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
10481         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
10482         encode/decode_method_ref ().
10484         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
10486         * aot-runtime.c (decode_patch): Ditto.  
10488         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
10489         MONO_PATCH_INFO_METHOD.
10491         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
10492         MonoGenericJitInfo.
10494         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
10495         MonoGenericJitInfo.
10497         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
10499         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
10500         one from the caller.
10502         * aot-runtime.c (decode_generic_inst): New function to decode and
10503         return a interned generic inst.
10504         (decode_klass_ref): Use it.
10505         (decode_method_ref): Ditto.
10507         * aot-compiler.c (emit_exception_debug_info): Save 
10508         jinfo->has_generic_jit_info too.
10510 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
10512         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
10514         * iltests.il.in: Add a test for fconv_to_i.
10516         * liveness.c: Disable the liveness2 pass for now to save space.
10518         * regalloc2.c: Include mempool-internals.h to fix warnings.
10520         * aot-compiler.c (encode_method_ref): Encode the context of generic
10521         instance methods.
10523         * aot-runtime.c (decode_method_ref): Inflate generic methods using
10524         the context saved in the aot file.
10526         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
10528         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
10530         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
10531         volatile so they won't be optimized away.
10533 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
10535         * ssa.c:
10536         * ssa2.c:
10537         * mini.c:
10538         * regalloc2.c:
10539         * dominators.c: Remove duplicated functions that now are in
10540         mempool-internals.h.
10542 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
10544         * aot-compiler.c: Fix warnings.
10546         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
10548         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
10550         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
10551         as the patch type.
10553         * mini.c (mono_resolve_patch_target): Ditto.
10554         
10555         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
10556         (encode_klass_ref): Add support for encoding VARs/MVARs.
10558         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
10560         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
10561         the handling of the got entries into a separate 'decode_got_entry' function.
10562         Add support for RGCTX_FETCH.
10564         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
10565         clobbered by the trampoline code.
10567         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
10568         not clobbered by the indirect calling code.
10570 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
10572         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
10573         to fix the build.
10575 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
10577         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
10578         signature using the compilation mempool otherwise we would leak it.
10580 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
10582         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
10583         mono_emit_abs_call ().
10585         * patch-info.h: Add GENERIC_CLASS_INIT.
10587         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
10589         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
10590         as their target as a near call.
10592         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
10593         ABS handling code.
10594         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
10596         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
10597         call to a runtime function described by a patch.
10599         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
10600         mono_emit_abs_call, this has the advantage that the ABS handling code in
10601         mono_codegen () can handle them both, and can handle other stuff in the
10602         future without additional code.
10604         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
10605         entry.
10606         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
10607         abs addresses.
10609         * mini.h: Add missing bblock related prototypes.
10611         * mini.h (MonoCompile): Remove unused reverse_inst_list and
10612         reverse_inst_list_len fields.
10614         * mini.c: Refactor this file a bit by moving branch optimizations to 
10615         branch-opts.c.
10617         * method-to-ir.c: Merge generic sharing changes missed earlier.
10619         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
10621         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
10622         shared patches. Process METHODCONST as a shared patch.
10624         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
10625         as it crashes on the 2.0 mscorlib.
10627         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
10628         to cause crashes.
10629         
10630         * aot-compiler.c: Use is_plt_patch () in a few additional places.
10631         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
10632         by IMT.
10634         * aot-compiler.c: Reorganize the got handling code to be a bit more
10635         understandable.
10637 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
10639         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
10640         mono_patch_info_equals/hash, and use it to massively simplify
10641         get_plt_index ().
10643         * mini.c (mono_patch_info_hash): Simplify this and add support for
10644         more patch types.
10646         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
10648         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
10649         handling code, since an offset is not enough to identify a trampoline.
10651         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
10653 2008-08-17  Mark Probst  <mark.probst@gmail.com>
10655         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
10657         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
10659         * mini-ops.h: Argument and result types for OVF_CARRY ops.
10661         * decompose.c: PPC decompositions for various ops.
10663         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
10665 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
10667         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
10668         call the generic trampoline code using a call, instead of a jump, to
10669         remove some special casing from the generic trampoline code.
10671         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
10672         (mono_codegen): Ditto.
10674         * aot-compiler.c aot-runtime.c: Ditto.
10676         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
10678         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
10679         helper function to find the offset corresponding to a lazy fetch trampoline.
10681         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
10682         when doing generic sharing.
10684         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
10685         places.
10686         
10687         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
10688         mini-trampolines.c to be with the other trampoline creation functions.
10690         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
10691         as it is equal to method->signature in most cases, add a 
10692         mono_emit_method_call_full variant which takes a signature and an imt
10693         argument as well.
10695 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
10697         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
10698         to this function, since it could be computed easily from the method 
10699         argument.
10700         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
10701         more.
10703         * method-to-ir.c mini.c: Remove references to 
10704         compile_generic_method_wo_context.
10706         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
10707         generic method calls.
10708         
10709         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
10710         dimensional non-szarrays.
10712         * mini.c (mini_init): Register mono_array_new_1.
10714         * jit-icalls.c (mono_array_new_1): New jit icall.
10716         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
10717         pointing to the method.
10719         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
10720         method addresses belonging to METHOD_JUMP patches in the 
10721         jump_target_got_slot_hash.
10722         (mono_aot_load_method): Ditto.
10724         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
10725         METHOD_JUMP patches.
10727         * mini.c (mini_create_jit_domain_info): New helper function which 
10728         initializes/frees domain->runtime_info.
10729         (mini_free_jit_domain_info): Ditto.
10730         (mini_init): Install the domain hook functions with the runtime.
10732         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
10733         information maintained by the JIT.
10735         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
10736         insertion into jump_table_hash into mono_codegen (), also implement proper
10737         locking.
10739         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
10740         tail calls, it is already done by the aot code.
10741         
10742         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
10743         mechanism on amd64.
10745         * iltests.il.in: Make the jmp test a bit more complex.
10747         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
10748         generic instances which doesn't have a token.
10750         * aot-runtime.c (decode_method_ref): Ditto.
10751         
10752         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
10753         can handle this case now.
10754         (handle_box): Ditto.
10756 2008-08-15  Geoff Norton  <gnorton@novell.com>
10758         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
10759         debugging check.
10761 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
10763         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
10764         calling generic methods.
10766         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
10768         * aot-runtime.c (decode_patch_info): Ditto.
10770         * mini.c (mono_resolve_patch_target): Ditto.
10771         
10772         * patch-info.h: Add METHOD_RGCTX.
10774         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
10776 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
10778         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
10779         arguments in registers.
10781         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
10782         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
10784         * mini.c (mini_method_compile): Abort aot compilation for generic
10785         methods if generic sharing is disabled.
10786         
10787         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
10788         an mrgctx.
10790         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
10791         requiring an mrgctx.
10793         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
10794         store instructions when converting a vcall to a normal call.
10796         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
10797         mono_arch_find_jit_info.
10799 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
10801         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
10802         avoid calling mono_method_full_name () for every method even if the
10803         env var is not set.
10804         (check_inline_caller_method_name_limit): Ditto.
10806 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
10808         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
10809         assemblies in one run.
10811         * aot-compiler.c (mono_compile_assembly): Only print out a count of
10812         skipped methods if it is not 0.
10814         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
10816 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
10818         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
10819           MONO_ARCH_HAVE_UNWIND_TABLE.
10821         Contributed under MIT/X11 license.
10823 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
10825         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
10826           from default optimizaton list on Winx64.
10828         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
10830         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
10831           the LMF from the MonoJitTlsData structure.
10833         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
10835         Contributed under MIT/X11 license.
10837 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
10839         * mini.c (sigsegv_signal_handler): Fix the build.
10841         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
10842         assembly->aot_module.
10844         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
10845         hash table. This simplifies and speeds up a lot of code, and fixes support
10846         for .netmodules.
10848         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
10849         with the runtime.
10851         * mini-exceptions.c: Ditto.
10852         
10853         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
10854         'native_offset' argument, since these are computed in the 
10855         mono_find_jit_info () function.
10857         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
10858         is used by exceptions-ppc.c.
10860         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
10861         mono_arch_find_jit_info ().
10862         
10863         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
10864         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
10865         generic code in mini-exceptions.c.
10867 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
10869         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
10871         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
10872         
10873         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
10874         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
10875         called while holding the loader lock. Fixes #415608.
10876         (mono_aot_get_method_from_token_inner): Ditto.
10878 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
10880         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
10881         to reduce differences between this and the generic implementation in
10882         mini-exceptions.c.
10883         (ves_icall_get_frame_info): Ditto.
10885         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
10887         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
10888         longer neccesarry.
10890         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
10891         mono_arch_get_call_filter () and make it non-static, for consistency with the
10892         other architectures.
10894 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
10896         * mini.c:
10897         * local-propagation.c:
10898         * mini-x86.c: Correct the name of arch defines.
10900 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
10902         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
10903         NO_EMULATE_LONG_SHIFT_OPS define.
10905 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
10907         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
10908         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
10910         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
10911         MACH fixes. Merged from the 2.0 branch.
10913         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
10915         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
10916         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
10918         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
10920         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
10921         mono_marshal_get_native_wrapper () signature changes.
10923 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
10925         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
10926         conversion bug under arm.
10928 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
10930         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
10932         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
10933         with overflow checking.
10935 2008-08-05  Marek Habersack  <mhabersack@novell.com>
10937         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
10938         to the genmdesc.pl file
10940 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
10942         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
10943         arg_array in the soft-float versions of the LOAD/STORE macros.
10945         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
10946         implementation.
10948         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
10950 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
10952         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
10953         a float HFA. Fixes #413621.
10955 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
10957         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
10958         frame_size to args_size. Fixes build.
10960 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
10962         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
10963         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
10965         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
10966         the stack are not unaligned. Fixes #413247.
10967         
10968 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
10970         * mini.c: update jitted methods performance counters.
10972 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
10974         * mini-exceptions.c: increase the exceptions thrown performance
10975         counter in mono_handle_exception ().
10977 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
10979         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
10980         can work with netmodules.
10982 2008-07-28  Geoff Norton  <gnorton@novell.com>
10984         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
10985         regression tests.
10987 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
10989         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
10990         correct place.
10992 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
10994         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
10995           The float param registers and other param registers must be the 
10996           same index on Windows x64.
10998         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
10999           ArgValuetypeAddrInIReg argument case.  Setting the argument
11000           op to OP_VTARG_ADDR (OP_REGOFFSET)).
11002         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
11003           variable computed above as the copy length for arguments of storage
11004           type ArgValuetypeAddrInIReg.
11006         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
11007           ArgValuetypeAddrInIReg argument case.  This case will rely on
11008           mono_arch_emit_outarg_vt to emit the correct code later in the process.
11010         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
11011           a 32 byte stack allocation for all calls.  We will omit the adjustment for
11012           jump and tail call instructoins as they do not follow the typical call behavior.
11014         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
11015           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
11016           local variable and pass the local variable by reference to the called method.
11018         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
11019           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
11020           of a struct is passed in a register it must be saved with the other
11021           volatile argument on the stack.
11023         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
11024           frame pointer the stack adjustment value must be saved to the unwind 
11025           info structure.
11027         Contributed under MIT/X11 license.
11029 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
11031         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
11032         which got lost in the merge.
11034 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
11036         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
11037         build.
11039         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
11040         
11041         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
11042         icalls, since they won't be patched.
11044         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
11045         different code sequence when running under valgrind to prevent some valgrind
11046         errors.
11048         * iltests.il.in: Add new regression test.
11050         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
11051         end with a throw.
11053         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
11054         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
11056         * iltests.il.in: Add new test.
11058         * aot-compiler.c: Fix some warnings.
11060         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
11061         Fixes #412494.
11063 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
11065         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
11066         (mini_usage_jitdeveloper): Add a missing --wapi option.
11068 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
11070         * mini-codegen.c: Simplify the is_fp macros.
11071         (free_up_ireg): Remove, use free_up_reg instead.
11072         (free_up_reg): Fix the fp case.
11074 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
11076         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
11077         lowered earlier.
11079         * exceptions-x86.c: Merge some changes which seemed to have got lost
11080         in the linear-ir merge.
11082         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
11084         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
11085         long vreg volatile even if the variable was already created.
11087         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
11088         volatile variables.
11090 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
11092         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
11094         * mini.c (mono_jit_compile_method_inner): Add support for 
11095         MONO_EXCEPTION_BAD_IMAGE.
11097         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
11098         mini_method_get_context () returns NULL. Fixes #356531.
11100         * mini.c (mono_method_to_ir): Ditto.
11101         
11102         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
11103         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
11105 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
11107         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
11108         in the LDFTN implementation.
11110 2008-07-25  Mark Probst  <mark.probst@gmail.com>
11112         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
11113         code, patch calls to icalls, too, even if they're not in the
11114         shared generic code hash.  Fixes #411962.
11116 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
11118         * cpu-x86.md: Increase the length of the fcall opcodes.
11120         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
11121         calls returning floats.
11123         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
11124         on NEWARR.
11125         
11126         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
11127         missed earlier.
11129         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
11130         into the domain->method_code_hash.
11132         * aot-compiler.c: Fix win32 build.
11134         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
11135         
11136         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
11137         gshared NEWARR implementation.
11139         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
11141         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
11142         can be used outside of method_to_ir.
11144         * mini.h (MonoCompile): Add arg_types field.
11146         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
11147         
11148         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
11149         the values of the local arg_array and param_types array.
11151 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
11153         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
11154         got accesses might only get generated later when NEWOBJ is decomposed.
11155         
11156         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
11157         looking up the native code of the target method when a delegate is called
11158         for the first time.
11160         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
11161         optimization.
11163         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
11165         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
11166         AOT work on platforms without a working dlsym implementation.
11168         * mini.h: Bump AOT image format version.
11169         
11170 2008-07-24  Mark Probst  <mark.probst@gmail.com>
11172         * mini-exceptions.c: Free a MonoType with
11173         mono_metadata_free_type() instead of g_free().
11175         * aot-runtime.c: Free a MonoType.
11177 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
11179         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
11180         optimization.
11182         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
11183         fp stack on x86.
11185 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
11186         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
11187         profiler hook.
11189 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
11191         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
11192         NEWOBJ calls on valuetypes.
11194         * iltests.il.in: Add new test.
11196         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
11198 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
11200         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
11201         is no longer needed.
11203         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
11204         non register sized integer arguments.
11205         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
11206         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
11207         emit_memcpy2 ().
11209         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
11210         CEE_MONO_RETOBJ.
11211         
11212         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
11213         two a binop with different sized arguments is emitted.
11215         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
11216         instruction in the ins==NULL case.
11218 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
11220         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
11222         * mini-x86.c: Fix osx build.
11224         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
11225         opcodes as well.
11227         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
11228         instruction for non int sized variables.
11230         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
11231         implementation.
11233 2008-07-23  Robert Jordan  <robertj@gmx.net>
11235         * method-to-ir.c: Fix MSVC build.
11237 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
11239         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
11240         a non int sized type, widen it to an int since newer versions of gcc seem to
11241         generate code which needs this.
11243         * ssa2.c abcremoval2.c: Fix warnings.
11245         * *: Merge the Linear IR branch.
11247         The original branch is at trunk/branches/vargaz/mini-linear-il, and
11248         the ChangeLog file there describes all the changes done over the years. 
11249         Further documentation can be found at www.mono-project.com/Linear_IL.
11251 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
11253         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
11254           The float param registers and other param registers must be the 
11255           same index on Windows x64.
11257         Contributed under MIT/X11 license.
11259 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
11261         * mini.c: Make the previous fix GC safe.
11263 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
11265         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
11267 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
11269         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
11270           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
11271           ArgValuetypeAddrInIReg instead.
11273         Contributed under MIT/X11 license.
11275 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
11277         * mini-codegen.c (get_register_spilling): Fix a warning.
11279 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
11281         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
11282         for types which the initialization fails. Raises the provided exception
11283         at the right stop after cleanup.
11285 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
11287         * aot-compiler.c: Free most of the memory allocated during compilation.
11289         * mini.c (mini_parse_debug_options): Fix a leak.
11290         
11291         * mini.c (mini_method_compile): Don't add the method to the jit info tables
11292         during aot compilation.
11294 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
11296         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
11297         it has too much register pressure.
11299 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
11301         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
11303 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
11305         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
11306         on x86.
11308         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
11309         on amd64 similar to the way it is done on arm.
11311         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
11313         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
11314         consistency, normalize error messages, avoid loading aot-only modules in
11315         normal mode.
11317         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
11318         for consistency.
11320         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
11322 2008-07-11  Martin Baulig  <martin@ximian.com>
11324         * debug-debugger.h
11325         (MonoDebuggerInfo): Add `interruption_request'.
11327 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
11329         * aot-compiler.c (emit_plt): Remove some dead code.
11331         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
11333         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
11334         return the plt info offset belonging to a given plt entry.
11336         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
11337         mono_aot_get_plt_info_offset.
11338         
11339         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
11340         similar to the amd64 code by makeing jumps through a separate jump table 
11341         instead of embedding the jump addresses into the code.
11343 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
11345         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
11346         method.
11348 2008-07-10  Martin Baulig  <martin@ximian.com>
11350         * mini.c (mini_method_compile): Disable generics sharing when
11351         running in the debugger.
11353 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
11355         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
11357         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
11358         the local register allocator from running out of registers on x86 when 
11359         using aot.
11361 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
11363         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
11364         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
11365         C4146.
11367         Contributed under MIT/X11 license.
11369 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
11371         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
11372         speed up the assembler.
11374 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
11376         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
11377         support.
11379         * mini.c: Move the soft float handling macros a bit earlier, add 
11380         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
11381         place.
11383         * mini.h: Add prototype for mono_arch_fixup_jinfo.
11385         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
11386         read-only to help catch code allocation requests.
11387         
11388         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
11389         and turn it off when using --aot-only or when compiling with --aot=full.
11391         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
11392         jump table for switches from the normal domain mempool, not the code
11393         manager.
11395         * mini-trampolines.c (get_unbox_trampoline): New function to return an
11396         unbox trampoline which handles aot-only mode too.
11398         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
11399         an AOTed unbox trampoline.
11401         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
11403 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
11405         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
11406         ""
11408         Contributed under MIT/X11 license.
11410 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
11412         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
11413           the unwind information for the method at the end of the allocated block.
11414           
11415         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
11416           MonoCompileArch to hold the unwind info for SEH on Winx64
11417         
11418         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
11419           frame pointer info for the method being compiled.
11420           
11421         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
11422           the call to mono_exception_from_token.
11423           
11424         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
11425           storing the method prolog information in a format that the Winx64 SEH can understand.  This
11426           information is stored a the end of the method block because it is all 32-bit offset based.
11428         Contributed under MIT/X11 license.
11430 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
11432         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
11434         * wapihandles.c: Fix warnings.
11436         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
11437         mode.
11439         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
11440         mono_jit_compile_method in aot-only mode since that calls the type 
11441         initializer.
11442         
11443         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
11444         get_delegate_invoke_impl in aot-only mode.
11446         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
11448 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
11450         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
11452         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
11453         is on by default.
11455         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
11457         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
11458         init trampoline from the AOT file as well.
11460         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
11461         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
11462         code.
11464         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
11465         mono_init.
11467         * exceptions-amd64.c: Add _full variants for the remaining exception code
11468         creation functions as well, allow emission of relocatable code, remove
11469         caching since that is now done by the caller.
11471         * mini-exceptions.c: Add _full variants for the remaining exception code
11472         creation functions as well, add aot-only support.
11474         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
11475         if we can determine a proper token for them.
11476         (add_wrappers): Add a few more wrappers.
11477         (emit_method_code): Remove some dead code.
11478         (emit_trampolines): Emit exception code too.
11480         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
11482         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
11483         mono_array_new_va which avoids varargs.
11485         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
11487         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
11488         mono_arch_create_specific_trampoline () in all places.
11490         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
11491         a bit so it can be used for other things as well.
11492         
11493         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
11494         on demand as well.
11496         * exceptions-amd64.c: Rename the caching from the exception code creation
11497         functions, it is done by the caller instead.
11498         
11499         * exceptions-amd64.c: Change the signature of the exception code creation 
11500         functions to allow the creation of relocatable code later.
11502         * mini-exceptions.c: Add a set of functions to query the various 
11503         runtime-generated exception functions.
11505         * mini.c mini-exceptions.c: Use the newly added functions instead of the
11506         mono_arch_.. () functions.
11507         
11508 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
11510         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
11512         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
11514         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
11515         (mini_get_vtable_trampoline): Ditto.
11517         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
11518         code in the AOT case by returning the code size and a list of relocations to
11519         the caller.
11521         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
11523 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
11525         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
11526           clean the stack.
11528         Contributed under MIT/X11 license.
11530 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
11532         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
11533         so the buffer size can be computed correctly. Fixes #404735.
11535         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
11536         normally as cfg->debug_info is already freed.
11538 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
11540         * mini-amd64.c: For calls returning vtypes in registers, don't store
11541         the return address on the stack, instead allocate a separate local for
11542         it. Fixes #404729.
11544 2008-07-05  Mark Probst  <mark.probst@gmail.com>
11546         * mini-trampolines.c, mini.h: Add an argument to
11547         mono_create_jit_trampoline_in_domain() for turning off the adding
11548         of the sync wrapper.
11550         * mini.c: Use the JIT trampoline without sync instead of
11551         ldftn_nosync in static RGCTX invoke wrappers so that the call can
11552         be patched.
11554 2008-07-04  Mark Probst  <mark.probst@gmail.com>
11556         * driver.c: Turn on GSHARED optimization by default.
11558 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
11560         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
11561         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
11563         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
11564         create a variant of the generic trampoline code callable from AOTed trampolines.
11566         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
11567         trampoline code callable from AOTed trampolines.
11569         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
11571 2008-07-04  Mark Probst  <mark.probst@gmail.com>
11573         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
11574         pass-through manner.
11576         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
11577         and don't fail sharing for them anymore.
11579         * mini-exceptions.c: Handle exceptions in shared generic methods.
11581         * generic-sharing.c: When checking the context of a generic
11582         method, also check its class's context.  Don't treat wrappers as
11583         sharable.
11585         * mini-trampolines.c: Some code factored out to
11586         metadata/generic-sharing.c.  Handle the MRGCTX case.
11588         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
11589         we must deal with the method being of another instantiation of the
11590         class.  Add static rgctx invoke wrappers to generic methods.
11592 2008-07-04  Mark Probst  <mark.probst@gmail.com>
11594         * mini.c: Provide all jit infos of generic shared methods with a
11595         generic jit info.
11597         * mini-exceptions.c: Handle the new situation that a generic info
11598         might be available, but not info about the this/vtable/mrgctx
11599         variable.
11601 2008-07-03  Mark Probst  <mark.probst@gmail.com>
11603         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
11604         generic methods.
11606 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
11608         * dominators.c (check_dominance_frontier): Fix a warning.
11610         * mini.h: Add some missing prototypes.
11612         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
11614         * driver.c (mono_jit_init_version): Correct the comments since the first
11615         argument should be the name of the root domain, not a filename.
11617         * aot-runtime.c (make_writable): Error out if this is called while running
11618         with --aot-only.
11619         (load_aot_module): Ditto.
11621         * aot-compiler.c: Really fix the computation of method indexes.
11623         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
11624         optimizations as this is no longer called frequently.
11626         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
11627         method and the invoke impl code and pass it to the delegate trampoline instead of
11628         just the delegate class.
11630 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
11632         * aot-compiler.c: Fixup the computation of method indexes.
11633         (add_wrappers): Create the base methods of the runtime invoke wrappers using
11634         the method builder infrastructure.
11636         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
11637         has no header.
11639         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
11640         mode, load the method right away instead of creating a trampoline.
11642         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
11644         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
11645         some checks a bit.
11647 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
11649         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
11650         (mono_aot_load_method): Use method_index instead of method->token.
11652         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
11653         can handle icalls etc. properly.
11655         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
11657         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
11659         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
11660         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
11661         JIT_ICALL_ADDR patch type.
11663         * patch-info.h: Add JIT_ICALL_ADDR patch type.
11665         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
11666         request flag.
11667         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
11669         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
11671 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
11673         * mini.c: Use domain->jit_code_hash_lock for controlling access to
11674         domain->jit_code_hash.
11676 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
11678         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
11680 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
11682         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
11683         get_this_arg_from_call, let it compute it when needed.
11685         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
11686         gsctx from code only when needed.
11688         * mini-trampolines.c (get_generic_context): Rename this to 
11689         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
11690         it can be called by the arch backends.
11692         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
11694 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
11696         * driver.c (mono_main): Add experimental --aot-only command line option.
11698         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
11699         set.
11701 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
11703         * driver.c (DllMain): Remove mono_module_handle.
11705         Contributed under MIT/X11 license.
11707 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
11709         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
11710         for emitting methods which are not in the source assembly. Detect and report
11711         failure of assembling+linking.
11712         
11713         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
11715         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
11717 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
11719         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
11721 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
11723         * mini.h: Remove some obsolete prototypes.
11725         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
11727 2008-06-24  Mark Probst  <mark.probst@gmail.com>
11729         * mini.c (get_object_generic_inst): Variable-sized arrays are not
11730         supported by Visual Studio, so use alloca().
11732 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
11734         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
11735         Fixes #402585.
11737 2008-06-23  Mark Probst  <mark.probst@gmail.com>
11739         * mini.c: Fail sharing of a generic method if it contains an open
11740         catch clause (because we don't pass MRGCTXs yet).
11742 2008-06-23  Mark Probst  <mark.probst@gmail.com>
11744         * mini.c: When compiling a method with generic sharing, insert the
11745         method instantiated with an all-Object generic context into the
11746         jit info table, instead of the context of the first instantiation
11747         of the method we happen to compile.
11749 2008-06-18  Martin Baulig  <martin@ximian.com>
11751         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
11752         `major_version' and `minor_version'.
11754 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11756         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
11757         mono_method_is_generic_sharable_impl() takes an additional
11758         argument specifying whether to treat type variables as reference
11759         types.
11761 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11763         * mini.h: Removed obsolete prototypes.
11765 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11767         * mini.c: Don't fail generic sharing for initobj and sizeof - we
11768         already handle them.
11770 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11772         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
11773         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
11774         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
11775         tramp-x86.c: Added a MonoGenericContext* argument to
11776         mono_arch_get_unbox_trampoline() so that it can call other
11777         functions which require it.
11779 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11781         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
11782         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
11783         mono_arch_get_this_arg_from_call() takes a
11784         MonoGenericSharingContext* as well.
11786 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11788         * mini.c: Factor out code for emitting unbox into emit_unbox() and
11789         implement generic sharing of unbox.
11791 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11793         * mini.c: Don't compute the vtable to determine whether a field is
11794         special static, because it might not work for open types.
11796 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11798         * mini.c: Removed the unused token_type and token_source arguments
11799         from get_runtime_generic_context_ptr().
11801 2008-06-17  Marek Habersack  <mhabersack@novell.com>
11803         * mini.c (ADD_BINOP): fix the build
11805 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
11807         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
11808         a widening op.
11810 2008-06-16  Mark Probst  <mark.probst@gmail.com>
11812         * mini.h: Removed class relations enum that's not used anymore.
11814 2008-06-16  Mark Probst  <mark.probst@gmail.com>
11816         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
11818         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
11819         the lazy fetch trampoline access code.
11821 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
11823         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
11825 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
11827         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
11829         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
11831         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
11833 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11835         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
11836         intrinsics.
11838         * mini-ops.h: Add MIN/MAX_UN opcodes.
11840         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
11841         intrinsics.
11843         * basic-math.cs: Add more min/max tests.
11845         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
11847 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11849         * mini.c: Small fix in the prologue of emit_castclass.
11851 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11853         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
11855         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
11856         do not work even for unsigned types. Fixes #400014.
11858         * basic-math.cs: Add regression tests for unsigned Min/Max.
11860 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11862         * mini.c: Added additional context_used argument to several
11863         functions, which will be needed for sharing generic methods.  Use
11864         GET_RGCTX macro wherever appropriate.  Declare only one
11865         context_used in mono_method_to_ir().
11867 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11869         * mini.c, generic-sharing.c: Removed generic class relations.
11871         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
11872         functions due to MRGCTX changes.
11874 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11876         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
11877         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
11878         with calculated IMT.
11880         * mini.c: Generic sharing of calls via generic interfaces.
11882         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
11883         generic method with non-constant MonoGenericContext*.  Instead,
11884         the context is taken out of the method itself.
11886 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11888         * mini.c: Generic sharing of ldvirtftn.
11890 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11892         * mini.c: Generic sharing of ldftn.
11894 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11896         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
11898 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11900         * mini.c: Generic sharing of the special case of ldtoken followed
11901         by a call to GetTypeFromHandle.
11903 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11905         * mini.c: Generic sharing of box for nullable types.
11907 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11909         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
11910         are passed on the stack. Fixes #324807.
11912 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
11914         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
11915         for the ArgValuetypeAddrInIReg case.
11917         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
11918         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
11920         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
11921         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
11922         local variable and pass the local variable by reference to the called method.
11923           
11924         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
11925         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
11927         Contributed under MIT/X11 license.
11929 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
11931         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
11933         * debug-mini.c (mono_debug_print_vars): Release memory after printing
11934         everything.
11936 2008-06-10  Martin Baulig  <martin@ximian.com>
11938         * debug-mini.c
11939         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
11941 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
11943         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
11944         possible error when no arguments are passed.
11946         Contributed under MIT/X11 license.
11948 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
11950         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
11951         where the file name is NULL.
11953 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
11955         * mini.c: Fix s390 build.
11957 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
11959         * trace.c (mono_trace_parse_options): Fix warnings.
11961         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
11963 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
11965         * mini.c (remove_block_if_useless): Avoid printing the method name.
11966         
11967         * mini.c: Remove needless setting of ins->cil_code which is now done by 
11968         MONO_INST_NEW.
11970         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
11971         LMF. Not yet used.
11973         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
11974         translated code after it has been patched.
11976 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
11978         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
11979         avoid problems during code patching on SMP systems.
11980         (emit_call): Avoid adding a patch info which is already added by 
11981         emit_call_body.
11982         (mono_arch_emit_exceptions): Ditto.
11984 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
11986         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
11987         MONO_TYPE_ISSTRUCT already checks for it.
11989 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
11991         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
11992           structs with floats on Winx64 the float registers are not used.  
11993           The integer registers are always used..
11994         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
11995           only one register will be used and only if the size of the struct 
11996           is 1,2,4, or 8 bytes.
11998         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
11999           to work for Winx64.
12001         Contributed under MIT/X11 license.
12003 2008-06-05  Martin Baulig  <martin@ximian.com>
12005         * debug-debugger.c (debugger_lookup_class): Also call
12006         mono_class_setup_methods() here; we're only called from RTI.
12008 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
12010         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
12011         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
12012         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
12013         Post-process object files and add dtrace-generated object, if necessary.
12015         Contributed under MIT/X11 license.
12017 2008-06-04  Mark Probst  <mark.probst@gmail.com>
12019         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
12020         element class.
12022         * mini.c: Generic sharing for unbox.any and castclass.
12024 2008-06-04  Mark Probst  <mark.probst@gmail.com>
12026         * mini.c: Ignore tailcall prefix in shared generic code and when
12027         doing calls which require a vtable/rgctx argument.
12029 2008-06-04  Mark Probst  <mark.probst@gmail.com>
12031         * mini.c: Don't free the JIT info.
12033         * driver.c: Changes in the JIT info table testing code.
12035 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
12037         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
12038         interruption. Fix some warnings.
12040         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
12041         interruption_checkpoint.
12043 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
12045         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
12046         from embedding applications.
12048 2008-06-02  William Holmes  <billholmes54@gmail.com>
12050         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
12051           reserving 32 bytes on the stack when making calls. 
12053         Contributed under MIT/X11 license.
12055 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
12057         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
12058         the linear IL branch.
12060         * driver.c: Print out more information for --version on arm.
12062 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
12064         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
12065         bb_exit instead, since out of line bblocks might not actually be emitted
12066         out-of-line.
12067         
12068         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
12069         maximum epilog size for out of line bblocks if tracing is enabled.
12071         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
12073 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
12075         * arrays.cs: Regression tests for allocating arrays with negative sizes.
12077 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
12079         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
12080         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
12081         opcodes.
12083 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
12085         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
12086         the 'value' to store is a constant.
12088         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
12090         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
12091         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
12093 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
12095         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
12096         for accessing method->generic_container.
12098 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
12100         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
12101         
12102         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
12104         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
12106         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
12107         fails.
12109 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
12111         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
12113         * mini.c: Handle the case when mono_class_vtable () fails.
12115 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
12116         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
12117         the stat profiler.
12119 2008-05-22  Mark Probst  <mark.probst@gmail.com>
12121         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
12122         together with domain sharing.
12124 2008-05-22  Mark Probst  <mark.probst@gmail.com>
12126         * mini.c: Treat callvirts to final methods like non-virtual calls
12127         when doing generic sharing, i.e. look them up in the runtime
12128         generic context.
12130 2008-05-22  Mark Probst  <mark.probst@gmail.com>
12132         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
12133         with computed types (for generic sharing).
12135         * mini.c: Generic sharing for mkrefany and refanyval.
12137 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
12139         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
12140         possible.
12142         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
12143         the generic sharing code.
12144         
12145         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
12146         when needed.
12148 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
12150         * mini.h: Remove the declaration of mono_aot_init_vtable ().
12152 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
12154         * driver.c: updated copyright date
12156 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
12158         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
12159         needed.
12161 2008-05-19  Martin Baulig  <martin@ximian.com>
12163         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
12164         pointing to the new `_mono_debug_using_mono_debugger' variable.
12166         * driver.c
12167         (mono_main): Check mono_debug_using_mono_debugger() rather than
12168         the `MONO_INSIDE_MDB' environment variable to check whether we're
12169         inside the debugger.
12171 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
12173         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
12174         argument.
12176 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
12178         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
12180         * mini.c: Added mini_assembly_can_skip_verification. This
12181         function checks if the assembly requested to skip verification. 
12182         Fixes part of #387274.
12184 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
12186         * mini.c (mini_get_method): Disable the check for open generic classes when
12187         using generic sharing.
12189         * generics.cs: Add a test for #387034.
12191         * mini.c (mini_get_method): Check whenever the method class is an open generic
12192         type, and return NULL in that case, causing a verification error. Fixes
12193         #384123.
12195 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
12197         * driver.c (mono_main): Revert r102623. The right
12198         thing to do is to enable the verifier under verifiable
12199         unless a --security flag was passed.
12201         We need this non-trivial behavior for --verify-all otherwise
12202         mcs-compileall won't be able to use it. As it needs everything to
12203         be verified under validil.
12205 2008-05-06  Martin Baulig  <martin@ximian.com>
12207         Fix #383749.
12209         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
12210         (mono_debugger_thread_cleanup): Likewise.
12211         (mono_debugger_extended_notification): Likewise.
12213 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
12215         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
12216         against both inflated and non-inflated methods. We need to check against the
12217         generic definition for cases where the instantiated method is not visible.
12218         We need to check against the inflated types for cases where the instantiation
12219         changes any super type. This fixes #382986.
12221         Note that this doesn't need to be applied to other parts of mono_method_to_ir
12222         that check for visibiliy as generic params only appears as the type subject
12223         of tokens on call opcodes. Field manipulation and ldftn must always
12224         target an exact type.
12226 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
12228         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
12229         if no related --security flag is passed.
12231 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
12233         * mini-arch.h: Prepare support for ppc64.
12235         Contributed under MIT/X11 license.
12237 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
12239         * aot-runtime.c: Prepare support for ppc64.
12241         Contributed under MIT/X11 license.
12243 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
12245         * mini-ops.h: Prepare support for ppc64.
12247         Contributed under MIT/X11 license.
12249 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
12251         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
12253         Contributed under MIT/X11 license.
12255 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
12257         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
12258         assemblies, since aot_name is not a full path, causing us to load MS.NET 
12259         assemblies on windows.
12261 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
12263         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
12264         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
12265         * main.c: Use UTF-8 encoded command line instead of Windows default code
12266         page on Windows to support Unicode.
12267         * driver.c (DllMain): New function for mixed-mode assembly support.
12268         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
12269         export __stdcall functions without decoration.
12271         Contributed under MIT/X11 license.
12273 2008-04-28  Mark Probst  <mark.probst@gmail.com>
12275         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
12276         saving it very early.
12278 2008-04-28  Mark Probst  <mark.probst@gmail.com>
12280         * mini.h, mini.c: Lots of code for accessing the old RGCTX
12281         deleted.  The only way to access the new RGCTX is via the
12282         trampline.
12284         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
12285         vtable instead of the RGCTX to static methods.
12287         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
12288         accessing the new RGCTX.
12290         * generic-sharing.c: There is no separation between self, type
12291         arguments and other types in the RGCTX anymore.
12293 2008-04-25  Jonathan Chambers <joncham@gmail.com>
12295         * mini-amd64.c (add_general): Remove previous stack adjustment.
12296         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
12297         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
12298         for 32 bytes of stack space reserved for all calls.
12299         
12300         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
12301         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
12302         adjustment.
12303         
12304         Code contributed under MIT/X11 license.
12306 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
12308         * mini.c (mini_method_verify): Only verify non-inflated methods, check
12309         against the root definition, peeling out method and type instantiations.
12310         Cache verify success results, code that fails verification is still
12311         checked multiple times.
12313 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
12315         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
12317 2008-04-23  Jonathan Chambers <joncham@gmail.com>
12319         * mini-amd64.c (add_general): Always increment stack on Win64.
12320         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
12321         on Win64.
12322         
12323         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
12324         stack based argument handling on Win64.
12325         
12326         Code contributed under MIT/X11 license.
12328 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
12330         * Makefile.am (version.h): Add support for git-svn.
12332 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
12334         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
12335         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
12336         avoiding allocations and libc functions which might deadlock.
12337         
12338         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
12339         'no-gdb-backtrace' option is set.
12341         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
12343         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
12345 2008-04-21  Martin Baulig  <martin@ximian.com>
12347         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
12348         and `get_lmf_addr'; `notification_address' is no longer a pointer.
12350 2008-04-21  Martin Baulig  <martin@ximian.com>
12352         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
12353         `thread_vtable', `event_handler_ptr' and `event_handler'.
12355 2008-04-21  Martin Baulig  <martin@ximian.com>
12357         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
12358         allows delayed initialization of the `executable_code_buffer' when
12359         attaching.
12361 2008-04-21  Martin Baulig  <martin@ximian.com>
12363         * mini.h (mono_debugger_create_notification_function): Removed.
12364         * tramp-*.c (mono_debugger_create_notification_function): Removed.
12366         * mdb-debug-info64.s
12367         (MONO_DEBUGGER__notification_function): Added this in the .text section.
12369         * mdb-debug-info32.s
12370         (MONO_DEBUGGER__notification_function): Added this in the .text section.
12372         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
12373         currently only works on x86 and x86_64, so don't create it on ppc.
12375 2008-04-21  Martin Baulig  <martin@ximian.com>
12377         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
12379         * mini.c
12380         (mini_method_compile): In the fp elimination check, check
12381         `debug_options.mdb_optimizations' in addition to
12382         mono_debug_using_mono_debugger().       
12384         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
12385         disable some JIT optimizations which are only disabled when
12386         running inside the debugger.
12387         Added `--help-debug' option to describe the debugging options.
12388         (parse_debug_options): New static function to parse the `--debug'
12389         options, so we can easily add more stuff in future.
12391 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
12393         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
12394         the method has no body.
12396 2008-04-19  Jonathan Chambers <joncham@gmail.com>
12398         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
12399         assembly is not allowed in MSVC 64-bit compiler. 
12400         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
12401         as we get floating point exceptions everywhere.
12402         
12403         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
12404         correctly align arguments for call to throw_exception.
12405         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
12406         
12407         Code contributed under MIT/X11 license.
12409 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
12411         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
12413 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
12415         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
12417         * mini-amd64.c (NEW_INS): Set cil_code.
12419         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
12420         from mini-amd64.c so all debugger related logic is in one place.
12422         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
12423         later won't have a random ip assigned to them.
12425 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
12427         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
12428         the arch specific function initializes code_size.
12429         (mono_create_delegate_trampoline): Ditto.
12431         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
12432         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
12433         platforms.
12435         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
12436         running under the debugger.
12438         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
12439         debugger.
12441         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
12442         debugger. Also move the disabling of optimizations here from driver.c.
12443         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
12444         debugger.
12446         * mini.h (MonoCompile): Add a few new flags.
12448 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
12450         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
12451         so the cil_code field of created MonoInst's is properly set.
12452         (mini_select_instructions): Ditto.
12454         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
12455         (MONO_INST_NEW_CALL): Ditto.
12457         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
12458         in many places so the ins->cil_code field is properly initialized.
12460         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
12461         place.
12463 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
12465         * mini.c (mini_method_compile): Print a different message when compiling a 
12466         shared method.
12467         
12468         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
12469         > 1.
12471 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
12473         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
12474         SSE2 instructions.
12476         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
12477         
12478 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
12480         * mini.c (handle_stack_args): Make this return void since its return value was
12481         never used. Also set cfg->unverifiable for invalid IL instead of calling
12482         G_BREAKPOINT ().
12484 2008-04-10  Mark Probst  <mark.probst@gmail.com>
12486         * mini.c: Make sure "this" is live in catch clauses with type
12487         variables in shared generic code.
12489 2008-04-08  Mark Probst  <mark.probst@gmail.com>
12491         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
12492         generic_class_is_reference_type() to ensure the proper behaviour
12493         when sharing generic code and the type in question is a type
12494         argument.
12496 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
12498         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
12499         race conditions when printing thread dumps. Fixes #377738.
12501 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
12502         
12503         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
12504         shows up when both MonoInst arguments can cause aliasig.
12505         There is likely no way in the current JIT to trigger this problem, but
12506         it showed up in the development of generics sharing, when in a new
12507         opcode both args of an OP_GROUP can be aliases (addresses of a local).
12508         When the generics sharing code will be committed, its tests will be
12509         valid also for this bug.
12511 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
12513         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
12514         PATCH_INFO_METHOD.
12516         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
12517         NULL.
12519 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
12521         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
12522         use a more detailed exception message for InvalidCastException.
12524         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
12526         * driver.c (mono_main): Add --debug=casts option to turn on better 
12527         InvalidCastException message details.
12529         * mini.c (mini_get_debug_options): New helper function to return the address of
12530         the debug_options variable.
12532         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
12533         the jit_tls TLS variable.
12535         * mini.c (mono_jit_tls): New TLS variable.
12537         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
12538         option is used.
12540 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
12542         * mini.h: Removed verifer related stuff. This code was moved to verify.c
12544         * mini.c: Removed verifer related stuff, code moved to verify.c.
12546         * driver.c: Using code from verify.c instead of mini.c.
12548 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
12550         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
12551         longer valid.
12553 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
12555         * mini.c (check_for_method_verify): Enabling verification of
12556         corlib if mono_verify_all is set. Bugs in the verifier preventing that
12557         have been fixed.
12559 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
12561         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
12562         caller saved registers as well.
12563         
12564         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
12565         saved registers as well.
12567 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
12569         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
12571         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
12572         code.
12574 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
12576         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
12577         to get_call_info.
12578         (get_call_info): Take a gsctx argument instead of 'cfg'.
12580 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
12582         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
12583         mono_verify_all is set.
12585         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
12587         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
12589 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
12591         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
12592         an exception.
12594         * driver.c mini.c mini.h: Add a --verify-all development option to test the
12595         verifier and the code generated by the compiler.
12597 2008-03-25  Mark Probst  <mark.probst@gmail.com>
12599         * mini.c: Generic sharing of the non-nullable case of the box
12600         instruction.
12602 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
12604         * inssel.brg: Fix the build.
12606         * iltests.il.in: Add a test for lconv.ovf.u8.un.
12608 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
12610         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
12611         Array:Address. Fixes #372410.
12613         * iltests.il.in: New tests for readonly prefix.
12615 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
12617         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
12618         mini-trampolines.c.
12620         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
12621         mini-exceptions.c.
12623         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
12624         
12625         * mini.c (mono_decompose_op_imm): New helper function.
12627         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
12628         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
12629         return value.
12631         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
12632         mono_arch_output_basic_block. Fix warnings.
12634         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
12635         for now.
12637 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
12639         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
12640         since the extra frame is now detected automatically inside the loop.
12642         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
12643         opts which are now in mono_peephole_ins ().
12644         
12645         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
12647         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
12648         frames and skip duplicate managed-to-native frames. Fixes #367665.
12650         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
12651         opts which are now in mono_peephole_ins ().
12652         (mono_arch_peephole_pass_2): Ditto.
12654         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
12656         * mini-codegen.c (mono_peephole_ins): New helper function containing the
12657         arch independent peephole optimizations.
12659         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
12660         opts which are now in mono_peephole_ins ().
12662         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
12663         
12664         * mini-s390.c (mono_arch_output_basic_block): Fix build.
12666         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
12667         pattern.
12669         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
12670         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
12671         opcode. 
12673 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
12675         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
12676         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
12677         return value.
12679         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
12680         mono_arch_output_basic_block. Fix warnings.
12682 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
12684         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
12685         conv.ovf.u.un.
12687 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
12689         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
12690         conv.ovf.u.un.
12692         * iltests.il: Add new tests.
12694 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
12696         * mini.c: Removed Windows version macros.
12698 2008-03-20  Mark Probst  <mark.probst@gmail.com>
12700         * generic-sharing.c: Put reflection types in the extensible part
12701         of the runtime generic context.
12703         * mini.c: Generic sharing of the GetTypeHandle special case of the
12704         ldtoken instruction.
12706 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
12708         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
12710         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
12711         
12712         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
12713         consistency with the other version on the linear IR branch.
12715         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
12717         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
12719         * iltests.il.in: Add new tests.
12721 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
12723         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
12725         * iltests.il.in: Add new tests.
12727 2008-03-19  Mark Probst  <mark.probst@gmail.com>
12729         * mini.c: Two variables with the same name were declared in
12730         nesting contexts and one wasn't initialized.  Fixed.
12732 2008-03-19  Mark Probst  <mark.probst@gmail.com>
12734         * mini.c: Generic sharing of the initobj instruction.
12736 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
12738         * mini.c: make the test to optimize ldtoken from typeof() more
12739         precise.
12741 2008-03-18  Mark Probst  <mark.probst@gmail.com>
12743         * mini.c: Generic sharing of the initobj instruction for reference
12744         types.
12746 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
12748         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
12749         the mono_breakpoint_clean_code() code to perform bound checks.
12751 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
12753         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
12754         mono_arch_patch_callsite() to include the start of the managed method
12755         to be able to perform bound checks.
12757 2008-03-17  Mark Probst  <mark.probst@gmail.com>
12759         * mini.c: Generic sharing for the isinst instruction.
12761 2008-03-17  Mark Probst  <mark.probst@gmail.com>
12763         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
12764         inssel-long32-mips.brg: Added opcodes for doing indirect calls
12765         with the runtime generic context argument.
12767         * mini.c: Share calls to several types of unsharable methods by
12768         putting the address of the method code in the runtime generic
12769         context and doing an indirect call.
12771         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
12772         to switches.
12774 2008-03-16  Mark Probst  <mark.probst@gmail.com>
12776         * generic-sharing.c: Change due to a change in the runtime genric
12777         context API.
12779 2008-03-15  Martin Baulig  <martin@ximian.com>
12781         * tramp-x86.c
12782         (mono_arch_nullify_class_init_trampoline): Add call to
12783         mono_breakpoint_clean_code() to make things work when running
12784         inside the debugger.
12786         * tramp-amd64.c
12787         (mono_arch_nullify_class_init_trampoline): Add call to
12788         mono_breakpoint_clean_code() to make things work when running
12789         inside the debugger.
12791 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
12793         * inssel-long.brg (reg): Fix 64 bit build.
12795 2008-03-14  Mark Probst  <mark.probst@gmail.com>
12797         * mini.c, mini.h: Share static generic code by passing it an
12798         implicit argument pointing to the runtime generic context.
12800         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
12801         inssel-long32-mips.brg: New opcodes for calling shared static,
12802         which need to be passed the runtime generic context.
12804         * mini-amd64.c, mini-x86.c: Save the runtime generic context
12805         argument on the stack in the prologue if needed.  New function for
12806         finding the runtime generic context argument from the registers
12807         saved by the trampoline.
12809         * mini-amd64.h, mini-x86.h: Specify which register to use for the
12810         runtime generic context argument.
12812         * tramp-amd64.c: Also restore the register used for the runtime
12813         generic context argument.
12815         * mini-trampoline.c: Resolve shared static calls by consulting the
12816         runtime generic context via the new argument.
12818         * generic-sharing.c: Add an argument to sharability-checking
12819         functions that specifies whether type variables should be treated
12820         as sharable type arguments.
12822         * inssel-x86.brg: Removed a superfluous, buggy rule.
12824         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
12825         to switches.
12827 2008-03-14  Martin Baulig  <martin@ximian.com>
12829         * debug-debugger.c (main_thread_handler): Call
12830         mono_runtime_run_main() without sending any notifications.
12832         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
12834 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
12836         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
12838 2008-03-14  Mark Probst  <mark.probst@gmail.com>
12840         * tramp-x86.c: Fixed register restore offsets in the trampoline
12841         code for ECX and EDX.
12843 2008-03-12  Geoff Norton  <gnorton@novell.com>
12845         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
12846         different ucontext_t implementations.
12847         * exceptions-arm.c: Use the above defines to get exceptions working on 
12848         iPhone (based on a patch by Luke Howard lukeh@padl.com)
12849         * mini-arm.c: Implement iPhone icache support (based on a patch by
12850         Luke Howard lukeh@padl.com)
12852 2008-03-12  Mark Probst  <mark.probst@gmail.com>
12854         * mini.c: Enable generic sharing of calls to non-static
12855         non-interface non-generic non-value-type methods.
12857         * mini-trampolines.c: Resolve calls from shared generic code.
12859 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
12861         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
12863         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
12865 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
12867         * mini.c: some fixes for the AOT compiler.
12869 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
12871         * cpu-amd64.md: Add clob:1 to some float opcodes.
12873 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
12875         * mini.h: Added MiniVerifierMode enumeration.
12877         * mini.c: Added mini_verifier_set_mode to control
12878         the usage of the new verifier.
12880         * mini.c (mono_method): Integrated the new verifier.
12882         * driver.c: Extended --security option with validil and
12883         verifiable options to activate the new verifier.
12885 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
12887         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
12888         optimization to ctors taking 0 or 2 arguments too.
12890         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
12891         a bit.
12893         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
12895         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
12897 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
12899         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
12900         non-aot case as well.
12902         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
12904         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
12905         changes.
12907         * aot-compiler.c (encode_patch): Ditto.
12909         * mini.h (G_MININT32): Fix the definition of this.
12911 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
12913         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
12915         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
12917 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
12919         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
12920         methods returning vtypes in registers.
12921         (mono_arch_allocate_vars): Ditto.
12923         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
12925         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
12927         * generics.cs: Add a test from the linear IR branch.
12929         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
12931         * mini.c (inline_method): Cache failed inline attempts.
12933 2008-03-04  Mark Probst  <mark.probst@gmail.com>
12935         * mini.c: For shared methods of generic classes put the location
12936         of "this" into the MonoGenericJitInfo.
12938         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
12939         register out of a MonoContext by register number.  Add the generic
12940         sharing context as an argument to mono_arch_find_this_argument().
12942         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
12943         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
12944         for new arch function.
12946         * mini-exception.c: Handle open exception clauses in shared
12947         generic code.
12949         * mini-trampolines.c: Supply additional argument to
12950         mono_arch_find_this_argument().
12952 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
12954         * Makefile.am (regtests): Run the bench.exe tests last.
12956 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
12958         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
12959         a bit.
12961 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
12963         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
12964         with MS.
12966         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
12967         
12968         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
12970         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
12971         whose class has no cctor.
12973         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
12975 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
12977         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
12978         unverified.
12980 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
12982         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
12983         to be in sync with the code on the linear IR branch.
12985         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
12987         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
12989 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
12991         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
12993         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
12995         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
12997         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
12999         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
13000         
13001         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
13002         body.
13004 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
13006         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
13007         OP_LOADR4_MEMBASE emission.
13009         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
13010         (mono_spillvar_offset_float): Ditto.
13012         * mini-mips.c (mono_arch_emit_prolog): Ditto.
13014         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
13015         emission.
13017         * basic-long.cs: Add regression tests for them.
13019         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
13020         use.
13021         (mono_arch_allocate_vars): Fix representation of single-precision float
13022         argument.
13023         (mono_arch_output_basic_block): Ditto.
13025         * inssel-mips.brg: Ditto, remove duplicate items.
13027         * mini-mips.c (emit_load_volatile_arguments): New function to handle
13028         arguments of tail calls as on other platforms.
13029         (mono_arch_output_basic_block): Handle tail calls.
13031         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
13032         register.
13034         * objects.cs (test_5_pass_static_struct): Add test for it.
13036         Contributed under MIT/X11 license.
13038 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
13040         * Makefile.am: Use gmcs for compiling the regression tests.
13042         * *.2.cs *.2.il: Rename to *.cs and *.il.
13044 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
13046         * regalloc.h: Make the vassign array smaller.
13048         * mini.c (mini_method_compile): Remove an unused field in cfg.
13050         * mini-codegen.c: Add a bunch of micro optimizations.
13052 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
13054         * regalloc.h: Remove some unused fields.
13056 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
13058         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
13060         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
13062 2008-02-22  Mark Probst  <mark.probst@gmail.com>
13064         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
13066         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
13067         trampoline: Fetch an entry from the runtime generic context.  If
13068         it's NULL, jump to the actual trampoline to fill the runtime
13069         generic context.  Otherwise, return it.
13071         * mini.c: Call the lazy fetch trampoline to get entries out of the
13072         runtime generic context.
13074         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
13075         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
13076         tramp-sparc.c: Stubs for the lazy fetch trampoline.
13078 2008-02-21  Mark Probst  <mark.probst@gmail.com>
13080         * mini.c: Fetch data out of the extensible part of the runtime
13081         generic context instead of calling a helper function.
13083         * generic-sharing.c: Some functions moved into
13084         metadata/generic-sharing.c.  Helper function for fetching other
13085         types now checks and asserts against extensible rgctx (just for
13086         debugging purposes - the helper function isn't called anymore
13087         unless for debugging).
13089 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
13091         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
13092         for tail calls up to the point that the tests in iltests.exe run. Also add a
13093         dummy CKFINITE implementation.
13094         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
13095         needed for trampoline LMF frames.
13097         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
13098         trampoline LMF frames.
13100 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
13102         * mini.c (inline_method): clean any pending loader error when inlining fail.
13103         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
13105 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
13107         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
13109         * aot-runtime.c (decode_patch_info): Ditto.
13111         * mini.c (mono_resolve_patch_target): Ditto.
13112         
13113         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
13114         icall wrappers.
13116         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
13117         
13118         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
13119         if it references an icall address.
13121 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
13123         * cpu-s390x.md: Remove some more unused opcodes.
13124         
13125         * cpu-s390x.md: Remove some unused opcodes.
13127         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
13128         mono_op_imm_to_op ().
13130         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
13131         instead of a switch statement.
13132         
13133         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
13134         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
13136         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
13137         
13138         * mini-codegen.c: Remove unused mono_regstate2_... functions.
13140         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
13141         -1.
13143 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
13145         * driver.c (mono_main): Improve error reporting when an assembly cannot be
13146         opened. Fixes #362607.
13148         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
13150         * iltests.il.in: Add a test for static methods in interfaces.
13152 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
13154         * genmdesc.c (build_table): Fix a crash on older glib versions.
13156         * cpu-sparc.md: Remove some unused opcodes.
13157         
13158         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
13159         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
13161         * cpu-amd64.md: Remove some unused opcodes.
13163         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
13164         like the other opcodes.
13166 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
13168         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
13170         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
13172         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
13173         variables 'cfg' instead of 'm' for consistency.
13175         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
13177         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
13178         argument holding the vtype return address, to avoid the ambigious use of
13179         cfg->ret for this purpose.
13181         * mini.c (NEW_RETLOADA): Use vret_addr if set.
13183         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
13184         
13185         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
13186         new mono_print_ins () function which only takes one argument.
13188 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
13190         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
13191         macro arguments.
13193 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
13195         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
13197         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
13199         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
13200         opcodes and other small changes.
13202         * mini-ops.h: Add some new opcodes from the linear IR branch.
13204         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
13206         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
13207         opcodes, use the REG_MEMBASE opcodes instead.
13208         
13209         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
13210         opcodes, use the REG_MEMBASE opcodes instead.
13211         
13212         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
13213         linear IR branch.
13215         * mini.c (mono_op_imm_to_op): New helper function.
13217         * mini-ops.h: Add some opcodes from linear IR branch.
13219 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
13221         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
13222         <tsv@solvo.ru>.
13224 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
13226         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
13227         OP_ICONV_TO_R4/R8.
13229         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
13231 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
13233         * aot-compiler.c (emit_method_code): Add an assert.
13235         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
13236         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
13237         methods.
13239 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
13241         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
13242         some load/store opcodes so they are consistent. 
13243         (mono_arch_emit_prolog): Simplify some code.
13245         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
13247         * objects.cs: Add tests for large argument offsets on ARM.
13249         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
13250         stack offsets. Fixes #359651.
13252         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
13254         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
13256         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
13258         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
13260         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
13262         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
13263         rid of CEE_CONV_R_UN.
13265         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
13267 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
13269         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
13271         * mini.c (mono_normalize_opcodes): Add some more opcodes.
13273         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
13275         * cpu-amd64.md: Remove some unused opcodes.
13277         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
13279         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
13281         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
13282         arch specific functions for its parts. Call the peephole pass after local
13283         regalloc so the prolog can compute a more accurate max_offset.
13284         
13285         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
13286         the corresponding OP_I/OP_L opcodes.
13288         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
13290         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
13292 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
13294         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
13295         as they are handled in mini.c.
13297         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
13298         
13299         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
13300         case since it is handled in mini.c.
13302         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
13304         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
13306         * *.c: Use the new opcodes in the IR and back end code.
13308         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
13310         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
13312 2008-02-06  Mark Probst  <mark.probst@gmail.com>
13314         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
13315         an assert because it has a race condition.
13317 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
13319         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
13321         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
13323         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
13325         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
13326         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
13328 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
13330         * cpu-amd64.md (move): Correct the maximum size of move.
13332 2008-02-05  Mark Probst  <mark.probst@gmail.com>
13334         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
13335         the generic class init trampoline to return quickly if the class
13336         is already inited.
13338 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
13340         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
13341         issues where an 32 bit callsite cannot be patched by a 64 bit address.
13343 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
13345         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
13346         branch.
13348 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
13350         * objects.cs: Add some soft-float tests.
13352         * mini.c: Fix a couple more soft-float issues.
13354         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
13356         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
13357         avoid a REX prefix.
13359 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
13361         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
13362         exception happens while compiling a virtual method.
13364 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
13366         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
13367         
13368         * mini-sparc.c: Fix build.
13370         * mini-sparc.c (get_call_info): Add support for generic sharing.
13372         * mini-exceptions.c: Add a FIXME.
13374 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
13376         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
13377         altstack handling code.
13379         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
13380         
13381         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
13383         * mini-s390.c: Add support for generic sharing.
13385         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
13386         Fix CAS on s390.
13387         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
13389         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
13391         * mini-s390x.c: Add support for generic sharing.
13392         
13393         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
13394         Fix CAS on ia64.
13395         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
13397         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
13398         can be used since it takes a 16 bit signed immediate.
13400         * inssel-s390x.brg: Fix OP_SETRET.
13402         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
13404         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
13406         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
13408         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
13410         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
13411         in one place.
13413         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
13414         stuff.
13416         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
13417         of the unused mono_arch_patch_delegate_trampoline stuff.
13419 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
13421         * basic-long.cs: Move the fp related tests to basic-float.cs.
13423         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
13425         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
13427         * basic-calls.cs: Add a test for proper float argument passing.
13429         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
13430         if the context corresponds to an exception received through a signal.
13432         * exceptions.cs: Add a test for nullref handling at the start of a try
13433         clause.
13435         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
13437         * jit-icalls.c (mono_break): New JIT icall.
13439         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
13441         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
13443 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
13445         * cpu-*.md: Get rid of unused opcodes.
13447         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
13449         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
13450         by all platforms.
13452         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
13453         define.
13455         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
13456         the arch independent trampoline code in mini-trampolines.c.
13458         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
13460         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
13462         * mini-s390.h: Remove an unused define.
13463         
13464         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
13465         the arch independent trampoline code in mini-trampolines.c.
13467         * mini-arm.c (mono_arch_emit_prolog): Fix build.
13469 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
13471         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
13473         * mini-s390.c (mono_arch_emit_prolog): Fix build.
13475         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
13477         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
13479         * cpu-amd64.md: Use smaller sizes for int opcodes.
13481         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
13483         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
13484         objects.cs.
13486         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
13487         debugging.
13489         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
13490         instead of though a pointer to save an indirection when accessing elements of
13491         the array.
13493         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
13494         some typos.
13495         (NOT_IMPLEMENTED): New helper macro.
13496         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
13497         of a bb.
13499         * *.c: Use the new helper macro.
13501 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
13503         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
13505 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
13507         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
13508         stack slots.
13510 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
13512         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
13513         profiling is enabled.
13514         
13515         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
13516         the end.
13517         (mono_arch_emit_prolog): Add more first bblock optimizations.
13519         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
13520         in order if possible.
13521         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
13522         bblock, since the arguments are still in their original registers.
13524         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
13526 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
13528         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
13529         as well.
13531         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
13532         offset 0.
13534         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
13536         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
13537         process async exceptions received while in unmanaged code.
13539         * mini.c (mini_init): Install a callback with the runtime which will be called
13540         when a thread receives an async exception while in unmanaged code.
13542         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
13544         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
13546 2008-01-16  Wade Berrier  <wberrier@novell.com>
13548         * cpu-g4.md:
13549         * cpu-arm.md:
13550         * cpu-s390x.md:
13551         fix build
13553 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
13555         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
13556         compilation with sun cc.
13558         * cpu-*.md: Fix the build.
13560         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
13562         * mini-amd64.h: Add some comments to the MonoLMF structure.
13564         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
13565         
13566         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
13567         in the LMF structure if possible. This saves two instructions in the
13568         managed->native wrappers.
13570         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
13572 2008-01-16  Mark Probst  <mark.probst@gmail.com>
13574         * generic-sharing.c: New type argument lookup code which uses the
13575         runtime generic context template.
13577 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
13579         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
13581         * mini-arm.c (add_general): Fix arm eabi parameter passing.
13582         (mono_arch_output_basic_block): Fix localloc implementation.
13584         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
13586         * mini-ia64.c (peephole_pass): Fix ia64 build.
13588         * mini-amd64.c (peephole_pass): Fix a warning.
13589         
13590         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
13591         at a constant offset from sp/fp.
13593         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
13594         instead of obtaining it from *lmf in the managed method case.
13596 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
13598         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
13600 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
13602         * mini.h (MonoInstList): New type.
13603         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
13604         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
13605         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
13606         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
13607         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
13608         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
13609         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
13610         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
13611         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
13612         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
13613         MONO_INST_LIST_FOR_EACH_ENTRY,
13614         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
13615         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
13616         mono_inst_list_first, mono_inst_list_last,
13617         mono_inst_list_next, mono_inst_list_prev): New instruction
13618         list handling interfaces.
13619         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
13620         list head 'ins_list'.
13621         (MonoInst): Replace next pointer with list head 'node'.
13622         (MonoCallInst): Make 'out_args' a MonoInstList.
13623         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
13624         (MonoCompile): Delete reverse_inst_list and
13625         reverse_inst_list_len.
13626         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
13627         mono_arch_lowering_pass, mono_arch_local_regalloc,
13628         mono_arch_output_basic_block, mono_arch_emit_prolog):
13629         Convert to new instruction lists.
13630         (insert_after_ins): Delete.
13631         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
13632         instruction lists.
13633         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
13634         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
13635         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
13636         mono_emulate_opcode, mono_emit_load_got_addr,
13637         inline_method, mono_method_to_ir, mono_print_bb_code,
13638         print_dfn, decompose_pass, nullify_basic_block,
13639         replace_out_block_in_code, remove_block_if_useless,
13640         merge_basic_blocks, move_basic_block_to_end,
13641         try_unsigned_compare, optimize_branches, mono_print_code,
13642         mini_select_instructions, remove_critical_edges): Likewise.
13643         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
13644         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
13645         mono_arch_output_basic_block, mono_arch_emit_prolog):
13646         Likewise.
13647         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
13648         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13649         mono_arch_output_basic_block): Likewise.
13650         (inst_list_prepend, insert_after_ins): Delete.
13651         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
13652         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
13653         instruction lists.
13654         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
13655         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
13656         mono_arch_emit_prolog): Likewise.
13657         * cfold.c (mono_constant_fold): Likewise.
13658         * liveness.c (visit_bb, mono_analyze_liveness,
13659         optimize_initlocals): Likewise.
13660         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
13661         * graph.c (mono_draw_code_cfg): Likewise.
13662         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
13663         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
13664         mono_ssa_cprop): Likewise.
13665         * abcremoval (get_relations_from_previous_bb, process_block):
13666         Likewise.
13667         * local-propagation (mono_cprop_invalidate_values,
13668         mono_local_cprop_bb): Likewise.
13669         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
13670         peephole_pass, mono_arch_output_basic_block,
13671         mono_arch_emit_prolog): Likewise.
13672         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
13673         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13674         mono_arch_emit_prolog): Likewise.
13675         (insert_after_ins): Delete.
13676         * aliasing.c (print_code_with_aliasing_information,
13677         mono_build_aliasing_information, mono_aliasing_deadce):
13678         Convert to new instruction lists.
13679         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
13680         peephole_pass, NEW_INS, mono_arch_lowering_pass,
13681         mono_arch_local_regalloc, mono_arch_output_basic_block):
13682         Likewise.
13683         (insert_after_ins): Delete.
13684         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
13685         peephole_pass, mono_arch_output_basic_block): Convert to
13686         new instruction lists.
13687         * mini-codegen (InstList, inst_list_prepend,
13688         insert_after_ins): Delete.
13689         (insert_before_ins, get_register_force_spilling,
13690         get_register_spilling, free_up_ireg, free_up_reg,
13691         create_copy_ins, create_spilled_store, alloc_int_reg,
13692         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
13693         to new instruction lists.
13694         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
13695         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13696         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
13697         (insert_after_ins): Delete.
13698         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
13699         mono_arch_local_regalloc, mono_arch_output_basic_block,
13700         mono_arch_call_opcode): Convert to new instruction lists.
13701         (insert_after_ins): Delete.
13702         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
13703         peephole_pass, mono_arch_output_basic_block,
13704         mono_arch_emit_prolog): Convert to new instruction lists.
13706 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
13708         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
13710         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
13711         Fixes #353182.
13713         * Makefile.am (version.h): Make this work with non-bash shells.
13715 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
13717         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
13719 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
13721         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
13722         the InitializeArray optimization.
13724 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
13726         * mini.c driver.c: Don't include os/gc_wrapper.h.
13728 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
13730         * mini.c (print_jit_stats): Print GC statistics if available.
13732 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
13734         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
13736 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
13738         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
13740 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
13742         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
13743         
13744         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
13746         * driver.c (mono_main): Ditto.
13748 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
13750         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
13752         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
13753         in the vtable can't be encoded.
13754         (compile_method): Ditto.
13756 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
13758         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
13759         defined.
13761         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
13762         lmf->rbp.
13764         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
13765         the top LMF entry belongs to the current method.
13767         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
13769 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
13771         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
13772         
13773         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
13775         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
13777         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
13779         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
13781         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
13782         implementation.
13784         * basic-float.cs: Add an ulong->double cast test.
13786 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
13788         * mini.c (mono_method_to_ir): Fix a warning.
13790 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
13792         * mini-ops.h: Add OP_SWITCH.
13794         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
13795         CEE_SWITCH in back-end code, use OP_SWITCH instead.
13797 2007-12-11  Geoff Norton  <gnorton@novell.com>
13799         * mini-s390x.c: Minor change to the MAX() define to allow
13800         it to compile with other gcc versions.
13802 2007-12-11  Geoff Norton  <gnorton@novell.com>
13804         * cpu-s390x.md:
13805         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
13807 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
13809         exceptions-arm.c (mono_arch_get_restore_context): Restore
13810         the frame pointer.
13812         exceptions-arm.c (throw_exception): Save the frame pointer.
13813         This is a partial fix for #323747. Only the client side is
13814         fixed.
13816 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
13818         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
13819         was using an unrelated variable to log the class which
13820         needed the cctor to be called. This was crashing on arm.
13822 2007-12-09  Robert Jordan  <robertj@gmx.net>
13824         * mini-x86.c (mono_arch_emit_epilog):
13825         Consider all kinds of 64-bit types. Fixes #323114.
13827 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
13829         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
13831 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13833         * mini-amd64.c (peephole_pass): Add a missing instruction check.
13835 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13837         * mini.c: run type ctor before allocating an object, not only
13838         when running it's constructor method (fixes at least part of bug #342507).
13840 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13841         
13842         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
13843         
13844         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
13845         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
13846         function.
13848         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
13849         mono_generic_class_init_trampoline () the same as it is done with the other
13850         trampolines.
13852         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
13853         aot-runtime.c aot-compiler.c: Implement AOT support.    
13855 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13857         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
13858         build for archs which don't have the vtable trampoline defined
13859         yet.
13861 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13863         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
13865         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
13867         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
13869         * tramp-<ARCH>.c: Use the new helper function.
13871 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13873         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
13874         trampoline call, which takes a vtable argument.
13876         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
13877         OP_TRAMPCALL_VTABLEs like other calls.
13879         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
13880         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
13881         call.  Implemented a support function which fetches the vtable
13882         from a register set.
13884         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
13885         Implemented a generic class init trampoline, using the
13886         OP_TRAMPCALL_VTABLE opcode.
13888         * mini.c: Implemented static field access when sharing generic
13889         code.  This implies initing the class using the new
13890         OP_TRAMPCALL_VTABLE call.
13892 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13894         * mini.c: Don't compile methods with sharing enabled if their
13895         classes are disabled for sharing.
13897 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
13899         * inssel.brg: Add a missing sign extension to the GETCHR and array access
13900         opcodes. Fixes #346563.
13902         * objects.cs: Add a new test.
13904         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
13906         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
13907         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
13909 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
13911         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
13913 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
13915         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
13916         code stream.
13918 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
13920         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
13922         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
13923         optimization in the AOT case.
13924         
13925 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
13927         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
13928         
13929         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
13931         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
13933         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
13935         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
13936         is created by the inlined delegate ctor.
13938         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
13940         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
13942 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
13944         * cpu-x86.md: Fix the length of ckfinite.
13946 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
13948         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
13949         
13950         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
13951         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
13953         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
13955         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
13956         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
13958 2007-11-28  Martin Baulig  <martin@ximian.com>
13960         * mini-x86.c
13961         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
13962         after creating the trampoline.
13964 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
13966         * aot-runtime.c (load_aot_module): Check runtime version if needed.
13968         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
13969         the same version.
13971         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
13972         instead of the calling method to help AOT.
13974         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
13976 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
13978         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
13979         is defined.
13981 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
13983         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
13984         
13985         * aot-compiler.c (compile_method): Correct check for generic method definitions.
13986         (encode_method_ref): No need to handle generic method definitions specially.
13988         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
13990         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
13991         decode_klass_info.
13993         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
13994         encode_klass_info.
13995         (compile_method): Enable generic sharing.
13997 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
13999         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
14000         (mini_method_compile): Add preliminary support for AOTing shared generic code.
14002         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
14003         generic code.
14005         * mini-trampolines.c: Fix a warning.
14007         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
14008         NEW_PCONST.
14009         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
14010         (generic_class_is_reference_type): Remove unused function.
14012         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
14013         in the generic vtable trampoline case.
14015         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
14016         
14017         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
14018         return an AOT method based on a vtable slot.
14020         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
14022         * mini.c (mini_get_vtable_trampoline): Export this.
14024 2007-11-22  Martin Baulig  <martin@ximian.com>
14026         * debug-debugger.h
14027         (MonoDebuggerInfo): Move `debugger_version' up.
14029 2007-11-22  Martin Baulig  <martin@ximian.com>
14031         * mini-amd64.c
14032         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
14034         * mini-trampolines.c
14035         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
14036         after compiling the method.
14038 2007-11-20  Martin Baulig  <martin@ximian.com>
14040         * debug-mini.c
14041         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
14042         (mono_debugger_remove_breakpoint): Likewise.
14043         (mono_debugger_check_breakpoints): Likewise.
14045         * debug-debugger.c: Implement the new breakpoint interface here.
14047 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
14049         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
14050         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
14052         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
14054 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
14056         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
14058         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
14059         mini.c.
14061         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
14062         mini.c.
14064         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
14065         returning a vtype in a register.
14067         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
14068         here from the arch specific code.
14070         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
14071         mini.c.
14073         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
14074         (mono_arch_emit_prolog): Increment maximum prolog size.
14076         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
14077         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
14079         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
14080         MonoGenericSharingContext.
14082         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
14083         MonoGenericSharingContext. Allocate memory from the cfg mempool.
14085 2007-11-15  Mark Probst  <mark.probst@gmail.com>
14087         * mini.c, mini.h, generic-sharing.c: Functions for producing code
14088         which extract fields out of the runtime generic context.  Full
14089         sharing of the NEWARR opcode.
14091 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
14093         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
14094         --enable-minimal=ssa.
14096 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
14098         * mini-trampolines.c (mono_delegate_trampoline): Update after 
14099         mono_marshal_get_delegate_invoke () signature change.
14101 2007-11-13  Mark Probst  <mark.probst@gmail.com>
14103         * mini.c: Removed the shared context in favor of the generic
14104         sharing context.  Allocate the MonoJitInfo structure with room for
14105         the generic sharing context if it's needed.
14107         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
14108         domain-internals.h now.
14110         * mini-x86.c: Pass the generic sharing context to get_call_info ().
14112         * generic-sharing.c: Several changes for working without a shared
14113         context and instead operating on open types instead.
14115 2007-11-12  David S. Miller  <davem@davemloft.net>
14117        * inssel-sparc.brg: Fix double instruction emit.
14119 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
14121         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
14122         Get/Set/Address methods.
14123         
14124         * mini.c debug-debugger.c mini-trampolines.c: Update after 
14125         mono_marshal_get_delegate_invoke signature change.
14127 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
14129         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
14130         This can happens with dynamic methods. Fixes the other bug in #322722.
14132 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
14134         * tramp-arm.c (mono_arch_patch_callsite): Support patching
14135         BX call sequence.
14137         * mini-arm.c (arm_patch): Implement patching of BX call
14138         sequence. Fixes one of the bugs in #322722.
14140 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
14142        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
14143        under Linux.  We only need to flush every 32-byte cache line.    
14145 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
14147         * mini.c:
14148         move_basic_block_to_end: Add branches when needed, eventually creating
14149         a new BB.
14150         optimize_branches: added a parameter that tells if it's ok to create
14151         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
14152         and avoid calling move_basic_block_to_end when it's not ok.
14153         Fixes bug 318677.
14155 2007-11-07  Mark Probst  <mark.probst@gmail.com>
14157         * mini.c: Abort inlining call to InitializeArray if something
14158         looks wrong.  Let the icall handle it, which now has proper safety
14159         checks.
14161 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
14163         * mini.c (mono_spill_call): add support for soft-float.
14165         * mini.c (mono_method_to_ir): add support for soft-float
14166         to inlined functions that return float.
14168         * mini.c (mono_method_to_ir): add support for soft-float
14169         to cee_stsfld opcode on float fields.
14171 2007-11-05  Geoff Norton  <gnorton@novell.com>
14173         * mini-x86.h: Fix the structure access for X86 Leopard.
14176 2007-11-05  Martin Baulig  <martin@ximian.com>
14178         * mini-trampolines.c
14179         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
14180         after compiling the method to notify the debugger.
14182 2007-11-05  Martin Baulig  <martin@ximian.com>
14184         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
14186 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
14188         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
14189         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
14191 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
14193         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
14194         native-to-managed wrappers.
14195         
14196 2007-11-01  Geoff Norton  <gnorton@novell.com>
14198         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
14199         members.
14201 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
14203         * mini.c, mini-x86.c: when getting back from unmanaged code
14204         to managed via a marshaled delegate we also need to set the
14205         right domain.
14207 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
14209         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
14210         for amd64.
14212 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
14214         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
14215         let the debugger or other external agents to tell the JIT when
14216         a sw breakpoint has been inserted in the code that the JIT needs
14217         to be able to inspect.
14219 2007-10-31  Martin Baulig  <martin@ximian.com>
14221         * debug-debugger.h
14222         (MonoDebuggerInfo): Remove `runtime_class_init'.
14224 2007-10-30  Martin Baulig  <martin@ximian.com>
14226         * debug-mini.h
14227         (mono_debugger_thread_created): Added `MonoThread *' argument.
14228         (mono_debugger_extended_notification): New public method.
14229         (mono_debugger_trampoline_compiled): New public method.
14231         * debug-mini.c
14232         (MonoDebuggerThreadInfo): Added `thread' and
14233         `extended_notifications' fields.
14235         * debug-debugger.c
14236         (debugger_executable_code_buffer): New static variable.
14238         * debug-debugger.h
14239         (MonoDebuggerInfo): Added `executable_code_buffer',
14240         `executable_code_buffer_size', `breakpoint_info_area',
14241         `breakpoint_table' and `breakpoint_table_size'.
14243 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
14245         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
14246         that IP  either is an unused value or the vtable pointer. IMT 
14247         calls use vtable + offset now. Reduced by almost half the size
14248         of IMT entries.
14250 2007-10-26  Jonathan Chambers <joncham@gmail.com>
14252         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
14253         defines to access param registers. Replace long usage with
14254         gsize as sizeof(long) != sizeof(void*) on Win64.
14256         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
14257         on Win64. Fix intrinsic, use _AddressOfReturnAddress
14258         instead of non-existant _GetAddressOfReturnAddress.
14260         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
14261         param registers. Save/restore %rdi and %rsi in MonoLMF.
14263         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
14264         param registers. Modify (throw_exception) signature to take 
14265         %rdi and %rsi on Win64. 
14267         Code is contributed under MIT/X11 license.
14269 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
14271         * helpers.c: unlink debugging output files.
14273 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
14275         * mini.c: Move mono_create_ftnptr () to object.c.
14277 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
14279         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
14280         optional. This function can now be used to disassemble code generated
14281         outside the JIT such as trampolines and IMT thunks.
14283         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
14285         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
14286         vtable pointer from a ldr instruction.
14288         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
14289         new IMT call sequence.
14291         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
14292         call sequence for interface invocations.
14294         * mini-arm.c (mono_arch_emit_imt_argument): added, required
14295         for imt support. This function is empty since IMT on ARM requires no
14296         special handling on the IR side.
14298         * mini-arm.c (mono_arch_find_imt_method): added, required for
14299         imt support.
14301         * mini-arm.c (mono_arch_find_this_argument): added, required
14302         for imt support.
14304         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
14305         a ldr instruction to load a value stored in the code stream.
14307         * mini-arm.c (mono_arch_build_imt_thunk):added, required
14308         for imt support.
14311 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
14313         * mini.c (mini_init): Install the jump trampoline callback.
14315 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14317         * mini-trampolines.c: handle synchronized methods with the common
14318         vtable trampoline (bug #335601).
14320 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
14322         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
14324         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
14325         64 bit platforms.
14327         * mini-ia64.h mini-ia64.c: Add support for IMT.
14329         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
14330         prolog. Fixes #331958.
14332 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
14334         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
14336 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14338         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
14339         trampoline.
14341 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14343         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
14344         trampoline.
14346 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
14348         * mini-x86.c, mini-x86.h: x86 support for the common vtable
14349         trampoline.
14351 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
14353         * mini-trampolines.c: changed the magic rampoline to understand
14354         the common vtable trampoline method: the method to invoke is
14355         determined by the vtable displacement of the call.
14357 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14359         * mini.c, mini.h: register the common vtable trampoline if the
14360         architecture supports it.
14362 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14364         * cpu-amd64.md: use the correct max length for tls_get.
14366 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
14368         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
14369         CEE_STELEM_ANY. Fixes #333696.
14371 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
14373         * exceptions-x86.c: provide more graceful handling of the case where
14374         we followed a bogus function pointer from managed code (bug #332866).
14376 2007-10-11  Mark Probst  <mark.probst@gmail.com>
14378         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
14379         replaces the generic_shared flag and will carry more information
14380         in the future.
14382         * generic-sharing.c: Added mini_type_stack_size() which allows
14383         allows open types if given a generic sharing context.
14384         mini_get_basic_type_from_generic() takes a
14385         MonoGenericSharingContext* instead of a MonoCompile* now.
14387         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
14388         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
14389         mini-sparc.c, mini-x86.c: Trivial changes required by the two
14390         changes above.  Just passing arguments through to the right
14391         places.
14393 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14395         * mini-arm.c: unify the call emission to emit_code_seq().
14397 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
14399         * tramp-arm.c: reduced the trampoline size.
14401 2007-10-10  Mark Probst  <mark.probst@gmail.com>
14403         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
14404         variable handling out of arch-specific code.
14406 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
14408         * mini-arm.c: implemented fast delegate dispatch.
14410 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
14412         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
14413         that fp elimination is turned off if the space required by locals is too
14414         big. Fixes #331958.
14416 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
14418         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
14419         ARM to the new style trampoline.
14421 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
14423         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
14425         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
14427 2007-10-09  Martin Baulig  <martin@ximian.com>
14429         * debug-debugger.h
14430         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
14431         `field_info_offset_offset'.     
14433 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
14435         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
14436         removed more internal usage of the r11 register and made it available
14437         to the register allocator.
14439 2007-10-08  Mark Probst  <mark.probst@gmail.com>
14441         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
14442         when sharing generics and treat type variables as references.
14444 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14446         * mini-ppc.c: started removing the internal uses of register r11
14447         to eventually allow the register allocator to manage it as an
14448         additional available register.
14450 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
14452         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
14454 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
14456         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
14457         specific trampolines as they are not performance critical as a jump
14458         target (maybe align as before only for AOT code?). This saves about
14459         200 KB of native code on x86 for monodevelop startup.
14461 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
14463         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
14464         monodevelop startup.
14466 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
14468         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
14470         * mini-sparc.h mini-sparc.c: Implement IMT support.
14472         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
14473         its smaller and doesn't clobber sparc_g1.
14475         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
14477 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
14479         * mini-ppc.c: optimized the size of the IMT thunks a bit.
14481 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
14483         * mini-ppc.c: implemented fast delegate invocation.
14485 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
14487         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
14489 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
14491         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
14492         code to the new style trampoline in preparation for IMT support.
14494 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
14496         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
14497         systems already. This also reduces the specific trampiline sizes and
14498         prepares for the use of r12 as the IMT identifier register.
14500 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14502         * mini-mips.h: endianess fix (simplified from a patch by
14503         Thomas Kunze <thommy@tabao.de>, bug #323737).
14505 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
14507         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
14508         to access ucontext fields and enable netbsd support
14509         (partially from Magnus Henoch <mange@freemail.hu>).
14511 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14513         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
14514         use the preprocessor from the CPP env var if it is set.
14516 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14518         * mini-trampolines.c: fixed an assertion and moved it earlier in the
14519         code, before interface_offset gets used.
14521 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
14523         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
14524         mono_class_setup_vtable () before accessing klass->vtable.
14526 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
14528         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
14529         hackish.
14531 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14533         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
14534         IMT slots (this saves hundreds of KB of memory in programs like
14535         IronPython and Monodevelop).
14537 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
14539         * mini.c: print the delegate counter.
14541 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
14543         * mini-x86.c: make it easier to enable the debugging code for IMT
14544         slots.
14546 2007-09-28  Martin Baulig  <martin@ximian.com>
14548         * debug-debugger.h
14549         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
14550         `mono_method_klass_offset' and `mono_method_token_offset'.
14552 2007-09-20  Mark Probst  <mark.probst@gmail.com>
14554         * mini.c: First generics sharing implementation.  Can only share
14555         in very simple cases.  If sharing doesn't work it falls back to
14556         dedicated compilation.
14558         * mini.h: Flag in MonoCompile to specify whether generic
14559         compilation is shared.  Flags enum for marking which generic inst
14560         of a context is used.  Prototypes for helper functions.
14562         * generic-sharing.c: Helper functions for generic method sharing.
14564         * optflags-def.h: Optimization flag (gshared) for enabling generic
14565         method sharing added.
14567         * Makefile.am: generic-sharing.c added.
14569 2007-09-19 Daniel Nauck <dna@mono-project.de>
14571         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
14573 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
14574         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
14575         fixes bug 325507.
14577 2007-09-19  Martin Baulig  <martin@ximian.com>
14579         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
14580         mono_debug_cleanup() is now part of mono_cleanup().
14582 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
14584         * driver.c (mono_main): Fix a warning.
14586 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
14588         * aot-compiler.c: Optimize various parts when processing large assemblies.
14589         Fixes ##325568.
14591         * mini.c (mono_patch_info_hash): Improve hash function.
14593 2007-09-14  Jonathan Chambers <joncham@gmail.com>
14595         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
14596         
14597         Code is contributed under MIT/X11 license.
14599 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
14601         * mini.c (mini_init): Fix a leak.
14603         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
14605 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14607         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
14609 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
14611         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
14613 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
14615         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
14616         variance tests.
14618         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
14620         * mini.c (handle_alloc): Enable managed allocators in AOT code.
14622         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
14624         * aot-runtime.c (decode_patch_info): Ditto.
14626 2007-09-12  Jonathan Chambers <joncham@gmail.com>
14628         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
14629         static case. Cache delegates in architecture specific code, 
14630         based on number of parameters.
14631         
14632         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
14633         in architecture specific code, based on number of parameters.
14634         
14635         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
14636         caching happen in architecture specific code now.
14637         
14638         Code is contributed under MIT/X11 license.
14640 2007-09-12  Jonathan Chambers <joncham@gmail.com>
14642         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
14643         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
14644         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
14646         Code is contributed under MIT/X11 license.
14648 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
14649         * mini.c: (mono_thread_abort) Fixed bug #82416.
14651 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
14653         * mini.: hook the new managed GC allocation feature into the JIT.
14655 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
14657         * mini.c: implementation for the new runtime tls opcode.
14659 2007-09-11  Martin Baulig  <martin@ximian.com>
14661         * debug-debugger.h
14662         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
14663         `mono_method_inflated_offset'.
14665 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
14667         * driver.c mini.h mini.c: Add a new devel command line option for injecting
14668         async exceptions into a method.
14670         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
14671         purpose of testing whenever the unwinder works at every instruction.
14673 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
14675         * mini.c: check accessibility of method used in ldftn (fixes
14676         bug #82635).
14678 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
14680         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
14682         * inssel.brg: Fix a warning.
14684 2007-09-03  Martin Baulig  <martin@ximian.com>
14686         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
14687         now takes the `main_method' as argument.
14689 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
14691         * cpu-sparc.md (endfilter): Add missing src1:i argument.
14693 2007-08-30  Jonathan Chambers <joncham@gmail.com>
14695         * driver.c: include the cil-coff.h header on Windows.
14696         
14697         Code is contributed under MIT/X11 license.
14699 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
14701         * mini.c, driver.c: don't include the cil-coff.h header.
14703 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
14705         * mini.c: flag places that needs fixes fo soft-float support.
14707 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
14709         * mini.h, inssel-float.brg: fix soft-float constant loads on big
14710         endian systems (partially from Dean Jenkins, bug #81924).
14712 2007-08-28  Mark Probst  <mark.probst@gmail.com>
14714         * mini.c (check_linkdemand): Remove embedded reference object in
14715         call to LinkDemandSecurityException.
14716         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
14717         with an IntPtr instead of a reference object.
14719 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
14721         * mini.c (handle_initobj): Handle alignment properly.
14723         * inssel.brg (mini_emit_memset): Ditto. 
14725         * inssel.brg (mini_emit_memcpy): Ditto. 
14727         * inssel-sparc.brg: Ditto.              
14729         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
14731 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
14733         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
14734         exceptions raised in unmanaged code. Fixes part of #82594.
14736 2007-08-24  Mark Probst  <mark.probst@gmail.com>
14738         * mini.c (mono_method_to_ir), declsec.c
14739         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
14741 2007-08-22  Martin Baulig  <martin@ximian.com>
14743         * debug-mini.h
14744         (MonoDebuggerThreadInfo): New typedef.
14745         (mono_debugger_thread_table): New global variable.
14746         (mono_debugger_thread_created): New public function.
14747         (mono_debugger_thread_cleanup): New public function.
14749         * debug-debugger.h
14750         (MonoDebuggerInfo):
14751         - removed `get_current_thread' and `lookup_assembly'.
14752         - removed `data_table'.
14753         - added `thread_table'.
14755         * mini.c
14756         (mono_thread_start_cb): Call mono_debugger_thread_created().
14757         (mono_thread_attach_cb): Likewise.
14758         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
14759         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
14760         initial domain.
14762         * driver.c (mono_main): Move mono_debug_init() up, before calling
14763         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
14765 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
14767         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
14768         together when passing several arguments of type double (gives a small
14769         speedup and saves a few bytes of generated code).
14771 2007-08-20  Jb Evain  <jbevain@novell.com>
14773         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
14775 2007-08-20  Jb Evain  <jbevain@novell.com>
14777         * mini.c (mono_method_to_ir): throw MethodAccessException
14778         and FieldAccessException instead of InvalidProgramException.
14780 2007-08-20  Mark Probst  <mark.probst@gmail.com>
14782         * mini.c: CoreCLR security checks.
14784         * mini.h: Removed MonoSecurityMode (moved to
14785         metadata/security-manager.h) and mono_security_mode global var
14786         (replaced by set/get functions in security-manager.h).
14788         * driver.c: Added "core-clr-test" security mode for testing.  Used
14789         set-function for setting security mode.
14791 2007-08-17  Mark Probst  <mark.probst@gmail.com>
14793         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
14794         the new jit_info_table.
14796         * driver.c: Test code for the new jit_info_table (enabled by the
14797         define MONO_JIT_INFO_TABLE_TEST).
14799 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
14801         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
14802         detection of call <REG> instruction sequence. Fixes build on freebsd.
14804 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
14806         * mini-exceptions.c: Fix a warning.
14808 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
14810         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
14811         stack overflow handling code on amd64 too.
14813         * mini-exceptions.c (mono_setup_altstack): Make this use 
14814         mono_thread_get_stack_bounds ().
14816         * mini-x86.h: Disable sigaltstack on solaris x86.
14818 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
14820         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
14822 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
14824         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
14826 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
14828         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
14830         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
14832 2007-08-03  Neale Ferguson <neale@sinenomine.net>
14834         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
14835         due to alignment.
14837 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
14839         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
14840         to be emitted (bug #82281).
14842 2007-08-01  Martin Baulig  <martin@ximian.com>
14844         Merged the `debugger-dublin' branch.
14846         * debug-debugger.h (MonoDebuggerInfo):
14847         Removed the `old_*' compatibility entries.
14848         Added `debugger_version' and `data_table'.
14849         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
14850         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
14852         * debug-mini.c
14853         (MiniDebugMethodBreakpointInfo): Add `address_list'.
14854         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
14855         instead of a `gconstpointer'.
14856         (mono_debugger_insert_method_breakpoint): Return a
14857         `MonoDebugMethodAddressList *'.
14859 2007-06-28  Martin Baulig  <martin@ximian.com>
14861         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
14863 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
14865         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
14866         __builtin_frame_address () since it is broken on older gcc versions.
14868 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14870         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
14871         on the stack overflow handling and made the managed stack overflows
14872         catchable in most cases using soft guard pages.
14873         * exceptions-x86.c: added code to restore the protection in the soft
14874         guard pages at the end of exception handling.
14876 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
14878         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
14880 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14882         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
14883         exception handling.
14885 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14887         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
14888         signal handling support until it has been ported to the new mechanism.
14889         * mini.c: fixed stack overflow detection and use the new
14890         architecture code  to handle signals on the altstack.
14892 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
14894         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
14895         stack overflows on the alt stack.
14897 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
14899         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
14900         stack overflows on the alt stack.
14902 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
14904         * exceptions-ppc.c: cleanup preparing for altstack support.
14906 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
14908         * exceptions-arm.c: cleanup preparing for altstack support.
14910 2007-07-27  Mark Probst  <mark.probst@gmail.com>
14912         * mini.c (print_jit_stats): Output hazard pointer stats.
14914 2007-07-26  Mark Probst  <mark.probst@gmail.com>
14916         * driver.c, mini.c: Replaced security mode flags with a single
14917         enum variable.
14919 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14921         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
14923 2007-07-25  Mark Probst  <mark.probst@gmail.com>
14925         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
14926         (which doesn't do anything yet) for activating Core CLR
14927         (Silverlight) security.
14929 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
14931         * mini-codegen.c: work around a possible gcc bug on arm.
14933 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
14935         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
14936         message for platforms that don't support AOT compilation.
14938 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
14940         * mini.h, mini.c, driver.c: temporary smcs hack.
14942 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
14944         * mini-arm.h, mini-arm.c: arm EABI fixes.
14946 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
14948         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
14949         case.
14951         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
14952         trampolines taking a method argument.
14954         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
14956         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
14957         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
14959         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
14960         JIT compilation throws an exception. Fixes #82050.
14962 2007-07-19  Mark Probst  <mark.probst@gmail.com>
14964         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
14965         with the MONO_EXCEPTION_ defines.
14967 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
14969         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
14970         #82117.
14971         
14972         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
14973         the cause of an assertion.
14975 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
14977         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
14978         removed.
14980 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
14982         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
14983         assert. Should fix #82103.
14985 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
14987         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
14988         here too. Fixes #82095.
14990         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
14991         addresses.
14993         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
14995         * mini-amd64.h: Enable IMT for amd64.
14996         
14997         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
14999 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
15001         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
15003 2007-07-12  Mark Probst  <mark.probst@gmail.com>
15005         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
15006         as soon as check_linkdemand sets an exception_type.
15008 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
15010         * mini-x86.c: fixed offsets for IMT call sequence.
15011         * mini-x86.h: enable IMT again.
15013 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
15015         * trace.c (mono_trace_enter_method): Decode MonoType too.
15017         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
15019         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
15021         * mini-amd64.c: Add preliminary IMT implementation.
15022         
15023 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
15025         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
15026         understand the new IMT-base interface invocation (thanks to
15027         Daniel Nauck for the report and the remote debugging session).
15029 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
15031         * mini-x86.c: size and speed optimizations for the IMT bsearch.
15033 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
15035         * Makefile.am (aotcheck): Make this actually use the AOTed code.
15037 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
15039         * mini-trampolines.c: implement AOT IMT support.
15040         * mini-x86.h: enable IMT support for wider testing.
15042 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
15044         * inssel.brg (emit_imt_argument): Add aot support here.
15046         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
15048 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
15050         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
15051         of the IMT implementation, partially from massi, with my
15052         implementation of the bsearch sequence. Disabled by default until
15053         the AOT code is implemented.
15055 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
15057         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
15059         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
15061 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
15063         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
15064         arch-independent IMT JIT code from Massimiliano
15065         Mantione (massi@ximian.com) with small cleanups from me.
15067 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
15069         * Makefile.am: fix svn invocation to get the svn revision to be
15070         independent of the local language (build fix).
15072 2007-07-09  Mark Probst  <mark.probst@gmail.com>
15074         * mini.c (inline_method): Reset cfg->exception_type if the
15075         inlining is aborted.  Fixes: 82049.
15077 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
15079         * mini.c: remove assert from exception handling code when exception_ptr
15080         is not set.
15082 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
15084         * mini.c (mono_codegen): Add an assert.
15086         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
15087         enter and leave code.
15088         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
15090 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
15092         * mini-ppc.c: fixed memory corruption for localloc(0)
15093         (bug #81852).
15095 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
15096         
15097         * mini.c: Fix warnings.
15099 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
15101         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
15102         to emit better double->int conversions.
15104 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
15106         * mini.c: the provided Min/Max optimizations are valid for unisgned
15107         ints.
15109 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
15111         * 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
15113 2007-06-28  Miguel de Icaza  <miguel@novell.com>
15115         * mini.c (mono_running_on_valgrind): Add support for reporting the
15116         method and  its boundaries to valgrind.
15118 2007-06-28  Martin Baulig  <martin@ximian.com>
15120         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
15122 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
15124         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
15126         * generic.2.cs: Add new test case.
15128 2007-06-25  Martin Baulig  <martin@ximian.com>
15130         Merged the `debugger-dublin' branch.
15132         * debug-mini.c
15133         (mono_debugger_insert_method_breakpoint): New public method.
15134         (mono_debugger_remove_method_breakpoint): Likewise.
15135         (mono_debugger_check_breakpoints): New static method.
15136         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
15138         * debug-debugger.h (MonoDebuggerInfo):
15139         Renamed (to keep backward compatibility in the vtable):
15140         `insert_breakpoint' -> `old_insert_breakpoint'.
15141         `remove_breakpoint' -> `old_remove_breakpoint'.
15142         `create_string' -> `old_create_string'.
15143         `lookup_class' -> `old_lookup_class'.
15144         `lookup_type' -> removed; changed into a dummy field.
15145         `lookup_assembly' -> `old_lookup_assembly'.
15146         Added (same functionality, but different signature):
15147         `create_string', `lookup_class', `lookup_assembly'
15148         Added new:
15149         `get_method_addr_or_bpt', `remove_method_breakpoint',
15150         `runtime_class_init'.
15152         * debug-debugger.c: Merged the `debugger-dublin' branch.
15154 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
15156         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
15157         well.
15158         (peephole_pass): Likewise.
15160 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
15162         * driver.c: hopefully make setaffinity work also for ancient
15163         versions of linux.
15165 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
15167         * driver.c : win32 build fix.
15169 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
15171         * driver.c: check for the MONO_NO_SMP env var and bind to a single
15172         processor if it is set.
15174 2007-06-21  Martin Baulig  <martin@ximian.com>
15176         * debug-mini.h: New file.
15178         * debug-mini.c
15179         (mono_debugger_insert_breakpoint_full): Moved here from
15180         ../metadata/mono-debug-debugger.c.
15181         (mono_debugger_remove_breakpoint): Likewise.
15182         (mono_debugger_breakpoint_callback): Likewise.
15184 2007-06-15  Raja R Harinath  <rharinath@novell.com>
15186         * jit-icalls.c (mono_helper_compile_generic_method): Update to
15187         changes in MonoGenericClass.
15189 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
15191         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
15193 2007-06-14  Raja R Harinath  <rharinath@novell.com>
15195         * jit-icalls.c (mono_helper_compile_generic_method): Update to
15196         removal of MonoGenericMethod.
15198 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
15200         * mini-exceptions.c: hooks for the exception events profiling API.
15202 2007-06-14  Randolph Chung  <tausq@debian.org>
15204         * Makefile.ma: Add hppa target.
15205         * mini-arch.h: Include mini-hppa.h
15206         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
15207         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
15208         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15210 2007-06-14  Randolph Chung  <tausq@debian.org>
15212         * inssel.brg: Add rules for "chained" compare-branch operations so that
15213         a single compare op can affect multiple branches.  Adjust cost for
15214         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
15215         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
15216         cost for some rules so that they can more easily be overridden by
15217         per-arch rules (with fixes from lupus).
15218         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15220 2007-06-13  Randolph Chung  <tausq@debian.org>
15222         * mini-ops.h: Reorder branch ops so that they match the order of the
15223         corresponding CEE_* ops.  The code expects them this way.
15224         Add new ops for HPPA target.
15225         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15227 2007-06-13  Randolph Chung  <tausq@debian.org>
15229         * mini-exceptions.c: Handle cases where the stack grows towards
15230         larger addresses.
15231         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15233 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
15235         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
15236         counter.
15237         * driver.c: explain where a non-matching corlib is found.
15239 2007-06-13  Mark Probst  <mark.probst@gmail.com>
15241         * mini.c (print_jit_stats): Output dynamic code allocation stats.
15243 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
15245         * mini-exceptions.c: Generate a method profile leave event during
15246         an exception to ensure that the profiler gets notified.
15248 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
15250         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
15251         branch.
15253         * cpu-amd64.md: Add long_and/or/xor opcodes.
15255 2007-06-06  Wade Berrier  <wberrier@novell.com>
15257         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
15258         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
15259         length of instruction shr_imm (expected 8, got 10)
15261 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
15263         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
15265 2007-06-06  Mark Probst  <mark.probst@gmail.com>
15267         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
15268         MonoInternalHashTable again (fixed bug in the internal hash table
15269         code).
15271 2007-06-06  Mark Probst  <mark.probst@gmail.com>
15273         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
15274         Have to figure out what makes it crash the SWF regression.
15276 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
15278         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
15280 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
15282         * mini.c: optimize out the type check when storing null in a
15283         reference array.
15285 2007-06-04  Mark Probst  <mark.probst@gmail.com>
15287         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
15288         MonoInternalHashTable.
15290 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
15292         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
15293         signed integer methods.
15295 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
15297         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
15298         permanently since the current approach doesn't work.
15300 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
15302         * inssel.brg (stmt): Only call delegate->invoke_impl if 
15303         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
15305 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
15307         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
15308         the sreg2==rdx case.
15309         
15310         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
15311         account if it contains a rex prefix.
15312         (peephole_pass): Handle OP_FMOVE as well.
15314 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
15316         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
15317         as it causes regressions.
15319 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
15321         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
15322         static case as well.
15324         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
15326         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
15327         (mono_arch_get_this_arg_from_call): Ditto.
15329         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
15331         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
15332         invoke_impl field.
15334         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
15335         (mono_arch_get_this_arg_from_call): Ditto.
15337         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
15338         
15339         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
15340         try to create optimized invoke code and use that for further invocations. 
15341         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
15343         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
15345 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
15347         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
15348         sealed classes or methods.
15349         *devirtualization.cs: tests for the new optimization
15351 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
15353         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
15354         by the update_volatile () function.
15356 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
15358         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
15359         require it.
15361         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
15363 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
15365         * mini.c: Add configure checks for header files.
15366         * mini-x86.c: Add configure checks for header files.
15367         * trace.c: Add configure checks for header files.
15368         * aot-runtime.c: Add configure checks for header files.
15369         * aot-compiler.c: Add configure checks for header files.
15370         * driver.c: Add configure checks for header files.
15371         * mini-codegen.c: Add configure checks for header files.
15372         
15373         Code is contributed under MIT/X11 license.
15375 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
15377         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
15378         icompare_imm -128 + op_iclt. Fixes #81703.
15380 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
15382         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
15384 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
15386         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
15387         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
15388         so that all isinst checks now use "interface_bitmap".
15390 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
15392         * cpu-amd64.md (jmp): Fix a warning.
15394         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
15396         * basic.cs: Add new regression test.
15398         * basic.cs: Remove test which is now in basic-long.cs.
15400         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
15402         * basic-long.cs: Add new test.
15403         
15404 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
15406         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
15408 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
15410         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
15412         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
15413         places.
15414         
15415         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
15416         throwing code a bit.
15418         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
15419         the exception throwing code a bit.
15421         * mini-x86.c (get_call_info): Allocate result from a mempool.
15423 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
15425         * aot-compiler.c (find_typespec_for_class): Fix the assert.
15427         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
15429         * mini.h (MonoCompile): Add 'token_info_hash' field.
15431         * mini.c: Save token->method associations during compilation so the AOT 
15432         compiler can use it.
15433         
15434         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
15435         which reference generic classes and methods.
15437 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
15439         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
15441         * aot-compiler.c (compile_method): Fix a typo in a comment.
15443         * aot-runtime.c (decode_cached_class_info): Skip generic types.
15445         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
15446         everything generic.
15448         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
15450 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
15452         * mini.h (MonoCompile): Add 'args' field.
15454         * mini.c (mono_compile_create_vars): Store variables representing the arguments
15455         into cfg->args.
15457         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
15459 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
15461         * mini.c (mono_compile_get_interface_var): Remove this unused function.
15463         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
15465         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
15466         opcodes for some opcodes.
15468         * mini.h *.brg *.c: Use the new opcodes.
15470 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
15472         * mini.h: Bumped aot revision.
15474         * inssel.brg: modified code generation of type checks for interfaces
15475         to use the new "MonoClass.interface_bitmap" instead of the old
15476         "MonoClass.interface_offsets".
15478 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
15480         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
15482 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
15484         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
15485         64 bit platforms.
15487 2007-04-27  Neale Ferguson <neale@sinenomine.net>
15489         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
15491 2007-04-27  Wade Berrier  <wberrier@novell.com>
15493         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
15494         mini.h) to fix build.
15496 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
15498         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
15499         
15500         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
15501         causes the corlib unit tests to fail.
15503 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
15505         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
15507         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
15509         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
15510         opcodes to the comparison relations.
15512         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
15513         opcodes to their types.
15514         
15515         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
15517         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
15518         it in cfg->arch.cinfo.
15520         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
15522         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
15523         cfg->cil_offset_to_bb.
15525 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
15527         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
15528         created becase of initlocals.
15530 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
15532         * mini-alpha.c cpu-alpha.md: More alpha port work from 
15533         Sergey Tikhonov <tsv@solvo.ru>.
15535 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
15537         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
15539 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
15541         * cpu-s390.md (break): Correct the length of break instruction.
15543 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
15545         * mini.c: fix a couple of soft-float issues and comments.
15547 2007-04-15  Miguel de Icaza  <miguel@novell.com>
15549         * trace.c (is_filenamechar): - is also a filename char.
15551 2007-04-15  Neale Ferguson <neale@sinenomine.net>
15553         * mini-s390.c: Correct checking for enum type in return value processing.
15555 2007-04-14  Raja R Harinath  <rharinath@novell.com>
15557         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
15558         (version.h): Makefile is in the build directory.
15560 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
15562         * mini-amd64.h: fix for assertion failure on Solaris/amd64
15564 2007-04-11  Martin Baulig  <martin@ximian.com>
15566         * mini.c (can_access_member): Fix handling of generic classes;
15567         fixes #81259.
15569 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
15571         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
15573 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
15575         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
15577 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
15579         * mini-codegen.c: make sure the right spill amount is
15580         used for fp or integer registers (fixes the float_sub_spill() on ppc).
15582 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
15584         * mini-ppc.c: fixes for the fp_branch_nan test.
15586 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
15588         * basic.cs: Comment out new test which still fails on ia64.
15590 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
15592         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
15594 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15596         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
15598 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
15600         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
15601         on 64 bit machines. Fixes part of #80738.
15603         * basic.cs: Add regression test.
15605 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
15607         * inssel.brg basic.cs: Revert previous change to fix build.
15609         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
15610         platforms.
15611         
15612         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
15614         * basic.cs: Add new regression test.
15616 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
15618         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
15619         many arguments.
15621 2007-03-16  Neale Ferguson <neale@sinenomine.net>
15623         * cpu-s390x.md: Correct length of break instruction.
15625 2007-03-16  Neale Ferguson <neale@sinenomine.net>
15627         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
15628         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
15630 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
15632         * *.c: Begin WIN64 port.
15633         * mini.c:  Use correct register in profiler.
15634         * mini-amd64.c: No inline assembly on Win64.
15635         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
15636         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
15637         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
15638         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
15639         mono_arch_ip_from_context for Win64.
15640         
15641         Contributed under MIT/X11 license.
15643 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
15645         * exceptions-amd64.c (seh_handler): Ditto.
15647         * exceptions-x86.c (seh_handler): Fix a memory leak.
15649 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
15651         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
15652         mini-s390x.c: fixed peephole optimizations to deal
15653         correctly with 1 and 2 byte reload avoidance.
15655 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
15657         * cpu-s390.md, cpu-s390x.md: update localloc length.
15659 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
15661         * cpu-g4.md: added missing descriptions.
15663 2007-03-14  Miguel de Icaza  <miguel@novell.com>
15665         *  Makefile.am: Add support so the tail tests are not executed on
15666         PowerPC as that is a known limitation of the PowerPC port.
15668 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
15670         * runmdesc.bat:  Move to msvc directory.
15671         
15672 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
15674         * runmdesc.bat:  Run executable that was produced by the current
15675         target and sent via an argument.
15676         
15677 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
15679         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
15680         #81102.
15682         * generics.2.cs: Add regression test.
15684 2007-03-09  Wade berrier  <wberrier@novell.com>
15686         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
15688 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
15690         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
15691         AOT code depends on this.
15693 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
15695         * mini.c: more precise tracking of types in the eval stack
15696         (part of fix for bug #81044).
15698 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
15700         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
15702         * aot-compiler.c (encode_patch): Remove an obsolete comment.
15704 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
15706         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
15708         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
15710 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
15712         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
15713         a pointer on 64 bit systems. Fixes #80190.
15715         * iltests.il: Add new regression test.
15717 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15719         * mini.c: inline a constant for Environment.IsRunningOnWindows.
15721 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
15723         * trace.c: Remove an erroneous alignemnt check when tracing.
15724           Fixes --trace on OSX86.
15726 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
15728         * mini-$(arch).h: initialize SP in context for all the archs.
15730 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
15732         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
15733         regressions in the thread tests.
15735 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
15737         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
15738         - fixed implementation of LOCALLOC opcode
15739         - implemented non-un compare for floats
15740         - code cleanup
15741         - implementation of FDIV and CKFINITE opcodes
15742         - fixes for latest mono updates
15743         - additional arch opcodes
15745 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
15747         * Makefile.am: simplify and merge rules for cross-compilation.
15749 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
15751         * local-propagation.c: Actually *apply* the fix for bug 80591...
15753 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
15755         * mini-exceptions.c: backuot part of the last change
15756         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
15758 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
15759         * inssel.brg: Fix bug 59286.
15762 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
15764         * mini-exceptions.c: patch from Zoltan to correctly check for
15765         stack boundaries (using the stack register, not the frame register),
15766         fixes bugs #80724, #79717.
15768 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
15770         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
15771         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
15773         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
15774         presence of frame pointer elimination.
15776 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
15777         
15778         * mini-x86.h: NetBSD UCONTEX_REG defines.
15780 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
15782         * inssel-amd64.brg: Fix amd64 build.
15784 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
15786         * mini.h: remove extern to workaround what looks likes gcc bug 26905
15787         on amd64.
15789 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
15791         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
15792         ends.
15794         * mini-<ARCH>.c: Use mono_is_regsize_var ().
15796 2007-01-30 Mark Mason <mason@broadcom.com>
15798            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
15799            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
15800            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
15801            beginning support for CEE_JMP [not quite working yet]
15802            * tramp-mips.c: LMF handling now works
15803         
15804 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
15806         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
15808         * mini.h (NULLIFY_INS): New macro.
15810 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
15812         * mini.c: statistical profiler fix for windows, patch
15813         from Tor Lillqvist (tml@novell.com).
15815 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
15816         * local-propagation.c: Fix bug 80591.
15818 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
15820         * Makefile.am: put back the --export-dynamic option as with
15821         the previous gmodule flags (thanks to Robert Jordan).
15823 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
15825         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
15827         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
15828         simplify and speed up the local register allocator. Also rename some fields
15829         like iassign->vassign.
15830         
15831         * regalloc.c: Remove some functions which are no longer used since their
15832         inlined version is in mini-codegen.c.
15833         
15834         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
15836         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
15838 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
15840         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
15841         narrowing. Fixes #80622.
15843         * iltests.il: Add new regresssion test. 
15845 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
15847         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
15848         debug-debugger.c, debug-debugger.h: warning fixes.
15849         * driver.c: updated copyright year and made it fit in one line.
15851 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
15853         * aot-runtime.c: updated to use mono-dl instead of gmodule.
15855 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
15857         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
15859         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
15861         * iltests.il: Add new test for bug #80507.
15863 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15865         * mini-arm.h: use soft-float also on vfp for now.
15867 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
15869         * mini.c: fix some more soft-float issues.
15871 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
15873         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
15875 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
15876         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
15877         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
15878         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
15880 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
15882         * mini-arm.c: typo fix.
15884 2007-01-23  Neale Ferguson <neale@sinenomine.net>
15886         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
15888 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
15890         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
15891         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
15893         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
15895         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
15897         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
15898         
15899         * inssel.brg: Fix a warning.
15901         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
15903         * abcremoval.c ssa.c ssapre.c: Update after this change.
15904         
15905         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
15907         * dominators.c (df_set): Use mono_bitset_union_fast.    
15909 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
15911         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
15912         mini-codegen.c: reduce relocations and memory usage for the cpu
15913         description.
15915 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
15917         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
15919         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
15920         to reduce their size.
15922 2007-01-19 Mark Mason <mason@broadcom.com>
15924         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
15925         * mini-mips.c: more configuration macros, support long conditional branches, additional
15926         asserts, fix epilog instrumentation.
15927         * mini-mips.h: use standard stack walk
15928         * cpu-mips.md: increase size of div, rem and conditional branches
15929         
15930 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
15932         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
15933         to cpu spec data.
15935 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
15937         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
15938         (compile_method): Ditto.
15940         * aot-runtime.c (decode_klass_info): Ditto.
15942         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
15943         needed by the code generated by inssel.brg. Also fix a warning.
15945 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
15947         * mini.c: deal with enums that become genericinsts by
15948         being nested in a generic class (bug #79956).
15950 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
15952         * mini.c: match the generic definition to check for
15953         private access with generic types (bug #78431).
15955 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
15957         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
15958         to make life easier for people cross-compiling that insist on not
15959         using scratchbox.
15961 2007-01-17 Mark Mason <mason@broadcom.com>
15963         * inssel-long.brg: patch to deal with mips missing flags
15964         * inssel-long32-mips.brg: implement overflow checks
15965         * insset-mips.brg: implement overflow checks
15966         * mini-mips.h: implement conditional exception handling
15967         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
15968           Remove unused code, minor cleanups.
15969         * exceptions-mips.c: minor cleanups
15970         * mini-ops.h: add mips conditional exception ops
15971         * cpu-mips.md: add mips conditional exception ops
15973         
15974 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
15976         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
15977         to deal with mips missing of flags.
15979 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
15981         * exceptions-ppc.c: execute fault handlers.
15983 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
15985         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
15987 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
15989         * mini.c: handle also floating point values in initialize_array.
15991 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
15993         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
15994         array initialization and make it conditional on the intrins option.
15996 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
15998         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
15999         relocations and put the patch info names close to the enum definition.
16001 2007-01-15 Mark Mason <mason@broadcom.com>
16003         * basic.cs, exceptions.cs: break up large tests to increase debugability.
16005 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
16007         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
16009 2007-01-12  Raja R Harinath  <rharinath@novell.com>
16011         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
16013 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
16015         * Makefile.am: distribute the mips sources.
16017 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
16019         * mini-codegen.h: handle bug #80489 here, by excluding ecx
16020         directly.
16022 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
16024         * cpu-x86.md: back out for now as this triggers other regressions.
16026 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
16028         * cpu-x86.md: force src1 and dest regpair for long shift instructions
16029         to eax:edx, so ecx can't get allocated to them (bug #80489).
16031 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
16033         * mini.c, mini-exceptions.c: enabled running fault handlers
16034         (bug #80469).
16036 2007-01-03  Miguel de Icaza  <miguel@novell.com>
16038         * driver.c: If nothing fail, do not use the string "failed",
16039         because it makes it very annoying to view test result logs on the
16040         web. 
16042 2006-12-30  Miguel de Icaza  <miguel@novell.com>
16044         * debug-debugger.c (mono_debugger_main): Rename "main" to
16045         "main_method" to prevent a warning.
16047         Remove a warning for unused field.
16049 2006-12-28  Martin Baulig  <martin@ximian.com>
16051         * debug-debugger.c
16052         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
16054 2006-12-22  Martin Baulig  <martin@ximian.com>
16056         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
16057         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
16058         seperate `.mdb_debug_info' section, so we can access it from the
16059         debugger even if the binary is stripped.
16061         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
16062         from the `.mdb_debug_info' here to prevent the linker from
16063         removing that section.
16065         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
16066         mdb-debug-info64.s.
16068 2006-12-19  Robert Jordan  <robertj@gmx.net>
16070         * mini-x86: enable the code to return small structures in
16071         registers for FreeBSD as well. Fixes bug #80278.
16072         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
16074 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16076         * mini-x86.c: align the stack when calling the profiler
16077         function instrumenting the prolog (on OSX).
16079 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16081         * mini.c: emit a break opcode where Debugger.Break () is called.
16083 2006-12-13  Miguel de Icaza  <miguel@novell.com>
16085         * mini.c (mono_method_to_ir): Provide useful information on this
16086         assert, to prevent others from debugging like I did.
16088 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
16090         * mini.c: enable code which was incorrectly commented
16091         (bug #80235).
16093 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
16095         * mini-x86.c: enable on OSX, too, the code to return small
16096         structures in registers.
16098 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
16100         * mini-x86.c: remove the use of the dynamic code manager here, too.
16102 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
16104         * mini.h, debug-debugger.c, tramp-*.c: fixed 
16105         mono_debugger_create_notification_function() to use
16106         mono_global_codeman_reserve () instead of a dynamic code manager.
16108 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
16110         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
16111         ves_array_element_address() jit icall and use a generated
16112         managed method instead (which is about 4 times faster for a rank 3
16113         array access).
16115 2006-11-29  Mark Mason  <mason@broadcom.com>
16117         * basic-calls.cs: additional tests for passing
16118         structures as function arguments.
16120 2006-11-29  Mark Mason  <mason@broadcom.com>
16122         * mini-mips.h: disable custom exception handling
16123         * mini-mips.c: throw/rethrow should use jalr to call
16124         exception stubs.  Fixed bug with passing structures
16125         by value. More support for tracing floating point
16126         functions.
16128 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16130         * mini.c: fixed typo in the soft-float ldind.r4 handling
16131         (bug #80086).
16133 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
16135         * mini.c, mini.h, driver.c: added --runtime command line
16136         option to select a different runtime than the autodetected one.
16137         * jit.h: added API for embedders to initialize with a specific
16138         runtime version.
16140 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
16142         * mini.c: handle also boxing of r4 values (bug #80024).
16144 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16146         * mini-ppc.c: force indirect calls until we reserve
16147         enough address space for all the generated code.
16149 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
16151         * exceptions-arm.c: workaround bugs in the libc definition
16152         of struct ucontext.
16154 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
16156         * inssel.brg: fixes from me and Mark Mason.
16158 2006-11-23  Dick Porter  <dick@ximian.com>
16160         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
16161         semaphore display now we've fixed the initial value
16163 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16165         * inssel.brg: partially revert the last change to fix the build.
16167 2006-11-21  Mark Mason  <mason@broadcom.com>
16169         * inssel.brg: Add and use compare-and-branch macros to support
16170         architectures that do not have condition code registers (ie. MIPS).
16171         * *-mips.{c,brg,md}: Fix copyright statements
16173 2006-11-20  Mark Mason  <mason@broadcom.com>
16175         * Makefile.am: remove mini-codegen.c from list of MIPS sources
16176         * mini.c: Allow GET_CONTEXT to be specified by the arch port
16177         * mini.h: Added declaration for mono_print_ins()
16178         * mini-codegen.c: added ins_spec initializer for MIPS
16179         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
16180         vreg to be virtual and hreg to be non-virtual.
16181         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
16182         is not yet working/implemented correctly.
16183         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
16184         non-static, fixup calls to print_ins() from other parts in the file.
16186 2006-11-20  Mark Mason  <mason@broadcom.com>
16188         * basic-calls.cs: added tests for passing structures as arguments
16189         to calls.
16191 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
16193         * inssel-long32.brg: optimize signed division by power of two.
16195 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
16197         * mini-arm.c: added support for interworking with thumb code
16198         (mono must be still be built using the ARM instruction encoding).
16200 2006-11-19  Miguel de Icaza  <miguel@novell.com>
16202         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
16203         verifier has different rules for it.   Fixes a few verifier issues
16204         in the test suite.
16206         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
16207         at the end, so people know what happened.
16209 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
16211         * brach-opts.c: in optimize_exception_target() make sure we
16212         are in a catch clause (fixes bug #79871).
16214 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16216         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
16217         more soft-float support fixes.
16219 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
16221         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
16222         that are passed half on the stack and half in registers.
16224 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
16226         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
16227         more mips integration work from Mark E Mason 
16228         <mark.e.mason@broadcom.com>.
16230 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
16232         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
16233         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
16234         tramp-mips.c: added sources for the mips port, not
16235         integrated in the build yet. Contributed by
16236         Mark E Mason <mark.e.mason@broadcom.com>.
16238 2006-11-14  Neale Ferguson <neale@sinenomine.net>
16240         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
16242 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16244         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
16245         put the soft-float rules in its own file since it seems to
16246         break s390 compilation.
16248 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
16250         * mini-arm.c: fixed wrnings.
16252 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
16254         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
16255         inssel-arm.brg: ARM support for soft-float.
16257 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
16259         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
16260         loads and stores of 32 bit fp values.
16262 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
16264         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
16266         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
16267         works. Fixes #79852 and #79463.
16269 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16271         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
16272         more soft-float support WIP and fixes.
16274 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
16276         * mini-arm.c: some VFP updates.
16278 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
16280         * mini-exceptions.c: 0 is a valid local var offset in some
16281         architectures, don't assert (bug #78508).
16283 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
16285         * exceptions-arm.c: fixed off by one error in stack walk code.
16287 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
16289         * mini.h, mini.c: more precise tracking of type load exceptions.
16291 2006-11-03  Robert Jordan  <robertj@gmx.net>
16293         * Makefile.am: [WIN32] Add monow.exe target.
16294         * driver.c: [WIN32] Don't detach the console when debugging.
16295         Fixes bug #79797.
16296         
16297 2006-10-30  Miguel de Icaza  <miguel@novell.com>
16299         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
16301 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
16303         * aot-compiler.c (emit_method_info): Add a case missed earlier.
16305         * driver.c (mini_regression): Fix --regression with AOT.
16307         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
16309 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
16311         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
16313         * mini-sparc.h: Don't use sigaction on sparc/linux.
16315         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
16317         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
16319         * mini-exceptions.c: Add proper include files for getpid ().
16321 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
16323         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
16324         address instead of a MonoJitInfo* to avoid decoding the exception info for the
16325         method.
16327         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
16328         name cache to reduce its size.
16330         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
16332 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
16334         * mini-x86.c: Save/restore the current LMF structure more efficiently using
16335         the mono_lmf TLS variable.
16337         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
16338         trampoline lmf frames.  
16340         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
16342 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
16344         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
16345         the mono_lmf TLS variable.
16347         * mini-exceptions.c: Access the LMF structure through accessors.
16349         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
16350         variable instead of in jit_tls->lmf.
16352         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
16353         
16354         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
16355         trampoline lmf frames.
16357         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
16359 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
16361        * mini.c trace.c mini-x86.c: Revert these too.
16362         
16363        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
16364        signature change.
16366 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
16368         * genmdesc.c: removed now dead code.
16370 2006-10-09  Robert Jordan <robertj@gmx.net>
16372         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
16374 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
16376         * mini.h: do not leave gaps in the opcode values.
16378 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
16380         * jit-icalls.h: flag functions as internal here, too.
16382 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
16384         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
16385         functions with the internal attribute.
16387 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
16389         * aot-compiler.c: fclose the file descriptor in the profile read loop.
16391 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
16393         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
16394         for soft-float.
16396 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
16398         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
16399         tail calls as on other platforms.
16401         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
16403         * iltests.il: Add a few tailcall tests.
16405 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
16407         * driver.c: fix loop for old compilers (bug #79521).
16409 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
16411         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
16413         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
16415         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
16416         metadata without any code.
16418         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
16419         more precise debugging information using gdb.
16421 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
16423         * inssel-ia64.brg: Make the helper methods static.
16425 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
16427         * inssel-x86.brg: make the helper methods static.
16429 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
16431         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
16433 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
16435         * mini.c: updates for monoburg changes.
16436         * inssel.brg: make a few helper functions static as they should.
16438 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
16440         * Makefile.am: Move mini-codegen.c to common_sources.
16442 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
16444         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
16445         instructions.
16446         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
16447         mini-ppc.h: port to use the common local register allocator.
16449 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
16451         * mini.h: Remove the comment too then.
16453 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
16455         * mini.h: put back backend.data which is to be used shortly and
16456         doesn't increase the size of MonoInst. If any 64 bit arch aligned
16457         pointers on 4 byte boundaries it'd have much bigger issues running
16458         and you can ifdef it out anyway.
16460 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
16462         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
16463         MonoInst size by 4 bytes on 64 bit machines.
16465 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
16467         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
16468         replacement with more meaningful field names. Arch maintainers, please
16469         check the assigned names are good enough for your arch.
16471 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
16473         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
16474         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
16476 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
16478         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
16479         relocations and memory requirements, put the optimization flags
16480         definitions in their own file.
16482 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
16484         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
16486         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
16488 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
16490         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
16492 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
16494         * inssel.brg: use the correct function to get the size of an item
16495         in an array, given an element class.
16496         * aot-compiler.c: do not access class->class_size directly.
16498 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
16500         * mini.h, debug-mini.c: added a debugging function to print
16501         info about local variables and arguments in a jitted method.
16503 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
16505         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
16507         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
16509 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
16511         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
16512         inner and outer loops when passing vtypes.
16514 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
16516         * mini-ppc.c: take into account the cpu errata for cache flushing
16517         which caused some random errors (bug #79381).
16519 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
16521         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
16522         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
16524 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
16526         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
16527         loaded.
16529         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
16530         freebsd ports tree.
16532         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
16533         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
16535         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
16536         displacement.
16538 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
16540         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
16542 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
16544         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
16545         macro does not have to be changed during debugging.
16547         * 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>.
16549         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
16551         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
16552         
16553         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
16554         MONO_ARCH_NO_EMULATE_MUL is defined.
16556         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
16558         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
16560         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
16562         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
16563         
16564 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
16566         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
16567         stuff to mini-exceptions.c where it is used.
16569         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
16570         setup code, the real one is in mini-exceptions.c.
16572         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
16573         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
16574         some changes from the freebsd ports tree.
16576         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
16577         constants.
16578         
16579         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
16581 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
16583         * mini.c: on Linux, check for /proc to be mounted
16584         (bug# 79351, novell bug#201204).
16586 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
16588         * mini.c: handle cases where pthread_attr_getstack() behaves
16589         incorrectly (bug #78096).
16591 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
16593         * mini-arm.c: support larger stack frames (bug #79272).
16595 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
16597         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
16599         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
16600         tokens.
16602         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
16603         mono_class_from_name () to find a class from its name.
16605         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
16607 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
16609         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
16611 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
16613         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
16615 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
16617         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
16618         callinfo->trampoline.
16620         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
16621         fixes #79271.
16622         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
16623         future.
16625 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
16627         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
16629 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
16631         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
16632         stats.method_trampolines, it is already done by the generic trampoline code.
16634         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
16635         
16636 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
16638         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
16640         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
16642         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
16644         * mini.c (print_jit_stats): Print mscorlib mempool size too.
16645         
16646         * mini.c (print_jit_stats): Print new stats.
16648         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
16650 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
16652         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
16653         Address on two dimensional arrays. Fixes #78729.
16655         * mini.h (MonoCompile): Add a 'skip_visibility' field.
16657         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
16658         a method.
16660         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
16662         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
16663         #79130.
16664         
16665         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
16666         a race condition.
16667         (mini_get_ldelema_ins): Ditto.
16669 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
16671         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
16672         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
16673         Fixes #79213.
16675 2006-08-29 Neale Ferguson <neale@sinenomine.net>
16677         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
16678         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
16680         * exceptions-s390x.c: Cosmetic change.
16682         * tramp-s390.c: Fix warning.
16684         * cpu-s390.md: Correct length of mul_imm.
16686 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
16688         * aot-compiler.c: added binary writer with ELF backend
16689         implementation (only on Linux/x86 for now).
16691 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
16693         * Makefile.am: Don't run net 2.0 AOT tests.
16695         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
16696         (mono_compile_assembly): Skip net 2.0 assemblies as well.
16698         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
16700 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
16702         * aot-compiler.c: simplified and refactored the asm-writing code
16703         to allow different backends.
16705 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
16707         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
16709         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
16710         little. Share patches of type TYPE_FROM_HANDLE as well.
16712         * mini.c (mono_patch_info_equal): New helper function.
16713         (mono_patch_info_hash): Ditto.
16715         * aot-compiler.c (emit_method_code): Fix s390 build.
16717         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
16718         is not handled because it is stored as a flag and not as a type ctor. Fixes
16719         #79016.
16721 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
16723         * aot-compiler.c: Fix computation of GOT slot statistics.
16724         
16725         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
16726         Also remove support for not PIC AOT.
16728         * mini.h: Bump AOT file format version.
16730         * objects.cs: Add a test for #78990.
16732         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
16733         (peter.dettman@iinet.net.au). Fixes #79087.
16735         * basic-long.cs: Add a test for the above.
16737 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
16739         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
16740         
16741         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
16742         code somewhat.
16744 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
16746         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
16747         exceptions.
16749 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
16751         * mini.c: Don't verify COM proxy invoke calls
16752         
16754 2006-08-10  Dick Porter  <dick@ximian.com>
16756         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
16757         which process is holding semaphores locked.
16759 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
16761         * mini-ia64.c mini-amd64.c: Fix #79027.
16763         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
16765         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
16767         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
16768         implicit arguments in a vararg call. Fixes #79027.
16770 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
16772         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
16773         (mono_get_array_new_va_signature): Ditto.
16775 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
16777         * aot-runtime.c: Call init_plt lazily.
16779         * inssel-long.brg: Fix unsigned long->int conversion.
16781         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
16783         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
16784         that most data is now in the .rss/.data section.
16786 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
16788         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
16790         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
16792         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
16794         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
16796         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
16797         virtual call. Fixes #79010.
16799         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
16800         and use the result as the this argument in the real call.
16802         * generics.2.cs: Add a new test for #79010.
16803         
16804 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
16806         * mini-x86.c: Fix a warning.
16808         * aot-compiler.c: Add a bunch of statistics.
16810         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
16812 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
16814         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
16816 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
16818         * 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>.
16820 2006-07-13  Miguel de Icaza  <miguel@novell.com>
16822         * mini.c (mono_method_to_ir): Obtain the original method in the
16823         CIL stream and use this to perform validation.
16825         Fixed: #78816
16827 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
16829         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
16830         (mono_arch_call_opcode): Ditto.
16832         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
16833         #78826.
16835         * mini.c (mono_patch_info_dup_mp): New helper function.
16836         
16837         * aot-compiler.c (compile_method): Fix some of the memory allocated during
16838         compilation. Fixes #78827.
16840 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
16842         * declsec.c: Use original security informations for
16843           MONO_WRAPPER_MANAGED_TO_MANAGED.
16845 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
16847         * mini.c: Allow Com Interop methods/classes and
16848         don't verify COM wrapper calls
16849         
16851 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
16853         * inssel-long32.brg: Fix long->i4 checked conversion.
16855         * exceptions.cs: Add a test for the above.
16857 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
16859         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
16861         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
16862         leaks.
16864         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
16865         #78775.
16867 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
16869         * mini.c: Fix solaris/x86 exception handling.
16871         * Makefile.am: Get rid of $(ICU_LIBS).
16873 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
16875         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
16876         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
16877         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
16879         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
16881         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
16882         this function causes a SIGSEGV.
16884 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
16886         * mini.c: Remove unused solaris/x86 includes.
16888 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
16890         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
16892 2006-06-20  Jb Evain  <jbevain@gmail.com>
16894         * cpu-g4.md: fix max length of start_handler instruction.
16896 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
16897         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
16899 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
16900         * ssa.c: Fixed bug 78653 for SSA based deadce.
16901         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
16902         MonoInst.flags, used in SSA based deadce.
16903         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
16904         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
16906 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
16908         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
16909         it can end up using non executable memory on ppc64 systems
16910         running ppc32 userspace (fix from Johannes Berg).
16912 2006-06-14  Dick Porter  <dick@ximian.com>
16914         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
16915         4.1.1
16917 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
16918         * mini.c: Made so that inline is locally disabled if it would
16919         trigger a .cctor, because too many apps depend on this behavior
16920         (which seems to be also the one of the MS CLR).
16922 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
16924         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
16925         No idea why this worked before.
16927         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
16928         which branch to outer exception clauses since they could skip the
16929         inner finally clauses. Fixes #78633.
16931         * exceptions.cs: Add a test for the above.
16933         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
16934         Fixes #78629.
16936         * iltests.il: Add a test for the above.
16938 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
16940         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
16941         after the end of a try bblock, to prevent asserts in mini_method_compile ().
16943         * iltests.il: Add a test for the above.
16945 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
16947         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
16948         
16949         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
16950         methods as instrinsics.
16952 2006-06-09  Wade Berrier <wberrier@novell.com>
16954         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
16955         (simple-cee-ops.h ssapre-mini-ops.h)
16957 2006-06-09  Neale Ferguson <neale@sinenomine.net>
16959         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
16960         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
16961         instruction).
16962         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
16963         * cpu-s390x.md: Fix max. length values for a couple of instructions.
16965 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
16967         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
16969 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
16971         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
16972         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
16973         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
16974         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
16975         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
16976         of opcodes, so that bug 78549 should not happen again.
16977         * ssapre.c: Updated to use the renamed files.
16979 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
16981         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
16982         in OP_ATOMIC_EXCHANGE_I4.
16984 2006-06-07  Wade Berrier <wberrier@novell.com>
16986         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
16987         in mono_debugger_create_notification_function)
16989 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
16991         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
16992         
16993         * mini.c (type_from_stack_type): Disable some changes which do not
16994         seem to work.
16996         * driver.c: Reenable opts.
16998         * mini.h (MonoStackSlot): New structure to keep track of the verification state
16999         of the evaluation stack.
17000         
17001         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
17002         evaluation stack trace at entry to the bblock.
17004         * mini.c (merge_stacks): New function to perform verification of stack merges.
17005         Turned off by default.
17007         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
17008         STACK_MP.
17009         
17010 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
17012         * local-propagation.c: Fixed bug 78549.
17014 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
17016         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
17018 2006-06-02  Miguel de Icaza  <miguel@novell.com>
17020         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
17021         tramp-arm.c, tramp-ia64.c
17022         (mono_debugger_create_notification_function): Update signature to
17023         new signature and use new protocol for creating the notification
17024         function.  
17026         Should fix the build.
17028 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
17030         * exceptions-ppc.c (mono_jit_walk_stack)
17031         (ves_icall_get_frame_info): Fix the build
17033 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
17035         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
17037 2006-05-31  Raja R Harinath  <rharinath@novell.com>
17039         * il2tests.2.il: New file for generics CIL tests.  Add test for
17040         #78019.
17041         * Makefile.am: Update.
17043         Fix #78019
17044         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
17045         to nullable types.
17047 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
17049         * aliasing.c: Fixed bug 78311.
17051 2006-05-29  Martin Baulig  <martin@ximian.com>
17053         * mini-exceptions.c (mono_find_jit_info): When computing the
17054         native offset, check whether we're actually inside the method's
17055         code; call mono_debug_print_stack_frame() to format the frame.
17056         (ves_icall_System_Exception_get_trace): Call
17057         mono_debug_print_stack_frame() to format the stack frame.
17058         (ves_icall_get_trace): Update to the new debugging API.
17059         (mono_jit_walk_stack_from_ctx): Likewise.
17060         (ves_icall_get_frame_info): Likewise.
17062         * mini.c (get_method_from_ip): Use the new debugging API.
17063         (mono_print_method_from_ip): Likewise.
17065         * exceptions-ppc.c
17066         (mono_jit_walk_stack): Use the new debugging API.
17067         (ves_icall_get_frame_info): Likewise.   
17069 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
17071         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
17073 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
17075         * mini.c: Added "limitator" to inline for debugging.
17077 2006-05-24  Martin Baulig  <martin@ximian.com>
17079         * debug-debugger.c (mono_debugger_init): Create a private,
17080         malloc()-based code manager for the notification function and
17081         intentionally leak it on exit.  This fixes the crash-on-exit race
17082         condition.
17084         * tramp-amd64.c
17085         (mono_debugger_create_notification_function): Added
17086         `MonoCodeManager *' argument.
17088         * tramp-x86.c
17089         (mono_debugger_create_notification_function): Added
17090         `MonoCodeManager *' argument.
17092 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
17094         * aliasing.c: Fixed 64 bit issue.
17095         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
17096         default since all known bugs are fixed (one more time!).
17098 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
17100         * mini.c: write barrier support.
17102 2006-05-23  Martin Baulig  <martin@ximian.com>
17104         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
17105         check at the top of the file.
17107 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
17109         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
17110         reverting changes without reason and without changelog entries.
17112 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
17114         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
17115         to a few opcodes. Fixes #78439.
17117         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
17118         consistency with other archs.
17120         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
17122 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
17124         * debug-debugger.c: fix the build.
17126 2006-05-17  Martin Baulig  <martin@ximian.com>
17128         * debug-debugger.c
17129         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
17130         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
17131         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
17132         (debugger_attach): Call GC_mono_debugger_add_all_threads().
17134 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
17136         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
17138 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
17140         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
17141         MONO_TYPE_GENERICINST.
17142         
17143         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
17144         MONO_TYPE_GENERICINST.
17146 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
17148         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
17149         #78325.
17151 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
17153         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
17154         mempool.
17155         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
17157 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
17159         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
17160         mono_trace_cleanup ().
17162         * iltests.il: Fix problem with the newly added test.
17164         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
17165         due to register constraints, free up the previous hreg. Fixes #78314.
17167         * iltests.il: Add new test for #78314.  
17169         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
17170         Interlocked.Add. Fixes #78312.
17172         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
17173         
17174 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
17176         * inssel.brg (mini_emit_virtual_call): Fix a warning.
17178 2006-05-05  Martin Baulig  <martin@ximian.com>
17180         * debug-mini.c (mono_debug_open_block): New method.
17182         * mini-amd64.c
17183         (mono_arch_output_basic_block): Call mono_debug_open_block() at
17184         the beginning of each basic block.
17186         * mini-x86.c
17187         (mono_arch_output_basic_block): Call mono_debug_open_block() at
17188         the beginning of each basic block.
17190 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
17192         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
17193         default until I understand why they break the build on amd64.
17195 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
17197         * mini.c (mini_cleanup): Call mono_cleanup ().
17199         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
17200         errors.
17202 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
17204         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
17205         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
17206         default since all known bugs are fixed, and I cannot reproduce bug
17207         77944... I'm asking Matt Hargett to test again after this commit.
17209 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
17211         * mini-codegen.c: Fixed typo that thrashed inline.
17213 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
17215         * dominators.c (compute_dominators): Avoid using a worklist since
17216         it is not correct in some cases. Instead, iterate over all bblocks as
17217         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
17219 2006-04-28  Miguel de Icaza  <miguel@novell.com>
17221         * mini.c (mono_jit_compile_method_inner): Use
17222         mono_prepare_exception_from_error that resets the value
17223         internally.
17225 2006-04-27  Miguel de Icaza  <miguel@novell.com>
17227         * mini.c: Move the mini_loader_error_to_exception to metadata. 
17228         
17229 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
17231         * aliasing.c: Fixed bug 78210.
17233 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
17235         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
17236         default until all their problems (or the ones they trigger) are fixed.
17238 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
17240         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
17241         
17242         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
17243         as loaded only after resolving patches since that could invoke the same method.
17245         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
17247         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
17248         functions.
17250         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
17251         AOT loader.
17253         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
17254         stack.
17256         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
17257         made from AOT code through the PLT table.
17259         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
17260         holding the plt offset when a call is made to the aot plt trampoline.
17261         
17262 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
17264         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
17265         amd64 AOT support.
17267         * Makefile.am (common_sources): Fix build breakage.
17269         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
17270         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
17271         intra-assembly calls if possible.
17272         
17273         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
17275         * mini-trampolines.c: Handle PLT entries.
17277         * mini.c: Avoid creating a GOT var for calls.
17279         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
17280         from mscorlib code.
17282         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
17283         from mscorlib code.
17285         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
17286         AOT code.       
17288         * mini.h: Bump AOT file format version.
17289         
17290         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
17291         covers more cases.
17293 2006-04-25  Martin Baulig  <martin@ximian.com>
17295         * driver.c: Disable copyprop, consprop and inline when running
17296         inside the debugger.
17298 2006-04-25  Martin Baulig  <martin@ximian.com>
17300         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
17301         with `get_current_thread' and added `detach'.
17302         (MonoDebuggerMetadataInfo): Added `thread_size',
17303         `thread_tid_offset', `thread_stack_ptr_offset' and
17304         `thread_end_stack_offset'.
17306 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
17308         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
17309         aot-runtime.c.
17311         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
17312         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
17314         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
17316         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
17318         * aot.c: Add support for ADJUSTED_IID.  
17320 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
17322         * aot.c (emit_method_order): Don't align method_order_end.
17324         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
17325         the interface ID changes.
17327 2006-04-21  Dick Porter  <dick@ximian.com>
17329         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
17330         cleaning up a thread.  Fixes the new part of bug 77470.
17332 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
17334         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
17335         to managed wrapper.
17336                      
17337 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
17339         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
17340         
17341         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
17342         SIGSEGV. Fixes #78072.
17344         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
17345         unregister our SIGABRT handler.
17347 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
17349         * mini.c: Disabled inline where it can alter the call stack in a
17350         way visible from managed code.
17351         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
17352         default.
17354 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
17356         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
17357         on other platforms. Fixes #78089.
17359 2006-04-13  Martin Baulig  <martin@ximian.com>
17361         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
17362         determine whether we're inside the debugger.
17364         * debug-debugger.h
17365         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
17367 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
17369         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
17370         handler clauses. Fixes #78024.
17372         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
17373         in the CALL_MEMBASE opcodes. Fixes #78088.
17374         (mono_arch_get_vcall_slot_addr): Ditto.
17376 2006-04-10  Martin Baulig  <martin@ximian.com>
17378         * debug-debugger.c: The thread handling code has now been moved
17379         into ../metadata/threads.c.
17381 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
17383         * driver.c (mono_main): Fix --with-gc=none build.
17385         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
17386         (mono_spillvar_offset_float): Ditto.
17387         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
17388         hreg, not when its !global, since on ia64, there is a third category: stacked
17389         registers.      
17391 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
17393         * mini.c: set MonoInst->klass for load field address and a few other
17394         places.
17396 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
17398         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
17400 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
17402         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
17403         the branch opt changes.
17405 2006-04-06  Dick Porter  <dick@ximian.com>
17407         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
17408         
17409         * wapihandles.c (mini_wapi_seminfo): 
17410         * driver.c (mono_main): Add semaphore info option
17412 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
17414         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
17415         branch optimization changes. Fixes #78009.
17417 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
17419         * mini.c: ignore accessibility of methods in managed->native wrappers.
17421 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
17423         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
17424         
17425         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
17427 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
17429         * mini.c: Modify the branch optimizations to preserve the invariant that
17430         the entries inside the in_bb and out_bb arrays are unique.
17431         (mono_unlink_bblock): Avoid creation of new arrays.
17433 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
17435         * mini.c (mono_unlink_bblock): Fix regression caused by previous
17436         change (#77992).
17438 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
17440         * mini.c (optimize_branches): Remove the "optimizations" in
17441         the cbranch1/cbranch2 -> branch cases which were causing several
17442         problems in the past. Fixes #77986.
17444 2006-03-31  Chris Toshok  <toshok@ximian.com>
17446         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
17447         default optimizations :(
17449 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
17451         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
17452         branch.
17454 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
17456         * local-propagation.c: Added comments to structs and removed
17457         "Mono" prefixes from local tree mover types.
17459 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
17461         * Makefile.am (arch_sources): Define this for each architecture so 
17462         libmono_la_SOURCES is defined in one place.
17464 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
17466         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
17467         from handles/.
17469 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
17471         * driver.c: print the GC name supplied by configure.
17473 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
17475         * local-propagation.c: Added tree mover, and moved here all the
17476         local propagation code from mini.c
17477         * mini.c: Added support for treeprop, and moved all the local
17478         propagation code to local-propagation.c
17479         * mini.h: Added support for treeprop
17480         * driver.c: Added support for treeprop, enabled consprop, copyprop,
17481         treeprop, inline and deadce by default
17482         * Makefile.am: Added local-propagation.c
17484 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
17486         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
17488 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
17490         * debug-debugger.c: make it compile without the Boehm GC.
17492 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
17494         * mini.c: fixed issue with mismatch when an icall is registered
17495         with multiple names but same address.
17497 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
17499         * declsec.c, mini-exceptions.c: use write barrier to set reference
17500         fields of managed objects.
17502 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
17504         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
17505         (can_access_internals): Fix a warning.
17507         * mini.c (print_method_from_ip): Rename this to 
17508         mono_print_method_from_ip so it gets exported.
17510         * trace.c: Deal with strings inside StringBuilder's containing garbage
17511         and fix memory leaks. Fixes #77848.
17513 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
17515         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
17516         fixes #77787.
17518 2006-03-16 Neale Ferguson <neale@sinenomine.net>
17519         
17520         * mini-s390.c: Remove OP_X86_TEST_NULL.
17522 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
17524         * mini.c: use the correct GetHashCode() for the moving collector.
17526 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
17528         * liveness.c: Regalloc spill cost tuning.
17530 2006-03-15 Neale Ferguson <neale@sinenomine.net>
17531         
17532         * mini-s390x.h: Correct S390_LONG macro.
17534         * mini-s390x.c: Cleanup unused code.
17536 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
17538         * jit-icalls.h: New file.
17540         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
17541         icalls and include that instead of including jit-icalls.c.
17543         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
17544         OP_X86 opcodes.
17546 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
17548         * mini.c: when checking for member accessibility, also check for
17549         friend assemblies and for explicit interface implementations.
17551 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
17553         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
17555         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
17557         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
17558         common cases are done first.    
17560         * mini-ops.h: Only define platform specific opcodes on the given platform.
17562         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
17563         branch.
17564         
17565 2006-03-14  Martin Baulig  <martin@ximian.com>
17567         Revert Paolo's change from r57348:
17569         * mini.h: don't use gboolean for bitfields.
17570         * mini.c: verifier changes for fields and methods accessibility.
17572 2006-03-13  Neale Ferguson <neale@sinenomine.net>
17574         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
17576         * mini-s390x.c: Fix conv_r_un.
17578         * cpu-s390, cpu-s390x.md: Fix lengths.
17580 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
17582         * mini.c: nested types have access to all the nesting
17583         levels, not just the enclosing types.
17585 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
17587         * mini.c: added a few more verification checks.
17589 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
17591         * liveness.c: Merge optimizations from the linear-il branch.
17593 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
17595         * mini-ia64.c (emit_call): Add a comment.
17597         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
17599         * tramp-ia64.c: Fix some warnings.
17601 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
17603         * mini.h: don't use gboolean for bitfields.
17604         * mini.c: verifier changes for fields and methods accessibility.
17606 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
17608         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
17609         lazy icall wrapper changes.
17611         * dominators.c: Replace all the dominator algorithms with faster
17612         ones from the linear-il branch.
17614         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
17615         the mempool.
17617         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
17618         common cases are done first.
17620         * mini-amd64.c: Fix some warnings.
17622         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
17623         from the mempool.
17625         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
17626         added code.
17628         * mini.h: Add a missing prototype.
17630 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
17632         * mini.c: Compile icall wrappers lazily.
17634         * mini-codegen.c: Use printf instead of g_print since its much faster.
17636         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
17637         function.
17639         * mini.c (optimize_branches): Cache the negative result from 
17640         remove_block_if_useless ().
17642         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
17643         Also fix some bblock linking issues.
17645         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
17646         assembly files.
17648         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
17650         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
17651         accessed fields first, for better cache behavior.
17652         
17653 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
17655         * mini.c: speedup IList<T> array accesses.
17657 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
17659         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
17660         inline_costs counter. Fixes #77190.
17662 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
17664         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
17665         trace messages. Fixes #77706.
17667 2006-03-04  Martin Baulig  <martin@ximian.com>
17669         * tramp-amd64.c, tramp-x86.c
17670         (mono_debugger_create_notification_function): Use
17671         mono_global_codeman_reserve() to allocate a buffer at runtime and
17672         return it.
17674         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
17676         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
17677         notification function at runtime and then call `initialize' in the
17678         `MONO_DEBUGGER__debugger_info' vtable.
17680 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
17682         * iltests.il: Fix a visibility problem.
17684 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
17686         * driver.c, mini.c: add hooks for the counters API.
17688 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
17690         * driver.c: show disabled options.
17692 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
17694         * linear-scan.c: always use cost-driven selection.
17696 2006-02-28  Raja R Harinath  <rharinath@novell.com>
17698         * jit-icalls.c (helper_compile_generic_method): Revert change from
17699         2006-02-24.
17701 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
17703         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
17705 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
17707         * inssel.brg: style fixes, mostly to force the updated monoburg
17708         to run for people using svn.
17710 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
17712         * mini.c: match monoburg changes.
17714 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
17716         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
17717         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
17718         declaration in the header file.
17720 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
17722         * helpers.c: reduce relocations and mem usage.
17724 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
17726         * mini.h, mini-codegen.c: disable logging features if
17727         requested by configure.
17729 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
17731         * mini.c: tiny verifier changes.
17733 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
17735         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
17736         cpu-pentium.md: stack alignment changes for osx/x86,
17737         partially from Geoff Norton <gnorton@customerdna.com>.
17739 2006-02-24  Raja R Harinath  <harinath@gmail.com>
17741         * jit-icalls.c (helper_compile_generic_method): Update to changes
17742         in metadata/class.c.
17744 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
17745         
17746         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
17747         
17748         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
17749         interface calls with large offsets.
17751 2006-02-23  Raja R Harinath  <rharinath@novell.com>
17753         * jit-icalls.c (helper_compile_generic_method): Document the
17754         special-case we depend on so that we can inflate the method twice
17755         with the same context with no bad side-effects.
17757 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
17759         * mini-x86.c, mini-amd64.c: fix for case when xen support
17760         is disabled.
17762 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
17764         * mini-x86.c, mini-amd64.c: generate code to access tls items
17765         in a faster way for Xen systems.
17767 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
17769         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
17770         updates and compilation fixes for the OSX/x86 port, mostly from
17771         Geoff Norton <gnorton@customerdna.com>.
17773 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
17775         * inssel.brg: faster interface call implementation
17776         to sync with the interface_offsets MonoVTable changes.
17778 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
17780         * mini.c: more verification checks.
17782 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
17784         * mini.c: added a few more verification checks.
17786 2006-02-17      Neale Ferguson <neale@sinenomine.net>
17788         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
17789         facility on the processor and use it if available.
17791 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
17793         * driver.c, aot.c, mini.c: throw exception if the IL code is
17794         invalid or unverifiable.
17796 2006-02-17  Raja R Harinath  <rharinath@novell.com>
17798         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
17799         m.StructField.
17801 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
17803         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
17805 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
17807         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
17808         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
17809         handling of instantiated generic valuetypes.
17811 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
17813         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
17814         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
17815         instead.
17817         * generics.2.cs: Revert the nullable reftypes tests.
17819 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
17821         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
17822         using __builtin_frame_address (1) as it doesn't work in the presence
17823         of optimizations. Hopefully fixes #77273.
17825         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
17826         -> generics.cs change as it doesn't work with some automake versions.
17828 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
17830         * mini.c: handle systems that sue a different way to
17831         retrieve the stack address of the current thread.
17833 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
17835         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
17836         it specially in the makefile.
17838         * generics.2.cs: Add tests for nullable reference types.
17840 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
17842         * mini.c: always handle the case when mono_jit_init()
17843         is called in a thread different from the main thread,
17844         confusing libgc (bug #77309).
17846 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
17848         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
17850 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
17852         * mini.c: change optimize_branches () to use a single loop
17853         and introduce a new optimization to simplify some range checks.
17855 2006-02-03  Martin Baulig  <martin@ximian.com>
17857         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
17858         and merged with debugger_thread_manager_add_thread().
17859         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
17860         inform the debugger about the main thread.
17862 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
17864         * basic.cs: Add test for div.un/rem.un constant folding.
17866 2006-02-03  Neale Ferguson <neale@sinenomine.net>
17868         * cpu-s390x.md: correct int_xor_imm length
17870 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
17872         * generics.2.cs: New test for #77442.
17874         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
17875         #77442.
17877 2006-02-02  Martin Baulig  <martin@ximian.com>
17879         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
17880         <mono/metadata/mono-debug-debugger.h>   
17882         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
17884 2006-02-02  Martin Baulig  <martin@ximian.com>
17886         * debug-debugger.h: New header file for debug-debugger.c.
17888         * debug-debugger.c: Big API cleanup; don't run the managed Main()
17889         function is a separate thread anymore; add support for attaching.
17891 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
17893         * tramp-x86.c: Fix a warning.
17895 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
17897         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
17898         on very large methods.
17900         * aot.c (load_patch_info): Fix a warning.
17902 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
17904         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
17905         mini-ops.h: alu membase optimizations.
17907 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
17909         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
17910         to speedup StringBuilder.
17912 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
17914         * dominators.c (mono_compute_natural_loops): Fix detection of
17915         loop body start blocks.
17917         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
17919 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
17921         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
17922         #75145.
17924 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
17926         * aliasing.c: Fixed aliasing issue on 64 bit archs.
17928 2006-01-25  Martin Baulig  <martin@ximian.com>
17930         * debug-debugger.c: Moved the `MonoDebuggerManager' and
17931         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
17932         started to cleanup this file a little bit.
17934 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
17936         * mini.c: optimize a codepath frequently happening in generics code.
17938 2006-01-23  Martin Baulig  <martin@ximian.com>
17940         * Makefile.am: Only compile debug-debugger.c on supported platforms.
17942         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
17943         functions directly.
17945         * driver.c: debug-debugger.c is only available if
17946         `MONO_DEBUGGER_SUPPORTED' is defined.   
17948 2006-01-23  Martin Baulig  <martin@ximian.com>
17950         * debug-debugger.c: Only enable this on platforms where the Mono
17951         Debugger is working (x86 and x86_64).
17953 2006-01-21  Martin Baulig  <martin@ximian.com>
17955         The Mono Debugger is now using the normal `mono' instead of the
17956         `mono-debugger-mini-wrapper' when executing managed code.
17958         * debug-debugger.c: New file; previously known as
17959         debugger/wrapper/wrapper.c.
17961         * debug-mini.c (mono_init_debugger): Removed.
17963         * driver.c (mono_main): Added new `--inside-mdb' command line
17964         argument which is used when running inside the debugger.
17966 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
17968         * liveness.c (mono_analyze_liveness): Remove some unused data
17969         structures.
17971 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
17973         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
17975 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
17977         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
17978         depends on implementation details of monobitset.
17980         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
17981         Fixes #77271.
17983 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
17985         * liveness.c: Update after monobitset changes.
17987 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
17989         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
17991 2006-01-11 Neale Ferguson <neale@sinenomine.net>
17993         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
17995         * mini-s390x.c: Remove warning messages.
17997 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
17999         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
18001 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
18003         * generics.2.cs: Add ldelem/stelem_any test.
18005 2006-01-10 Neale Ferguson <neale@sinenomine.net>
18007         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
18009 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
18011         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
18012         
18013 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
18015         * generics.2.cs: Reenable vtype tests.
18017         * inssel-x86.brg: Remove an icorrect valuetype rule.
18019 2006-01-06 Neale Ferguson <neale@sinenomine.net>
18021         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
18022         initial support for OP_ABS.
18024 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18026         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
18028 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18030         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
18031         conversion and implement LADD/LSUB.
18033         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
18034         architectures.
18036 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18038         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
18040         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
18041         architectures.
18043 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18045         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
18046         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
18047         (stack walk problem).
18049 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
18051         * aot.c (mono_aot_load_method): Fix a warning.
18053 2006-01-03  Neale Ferguson <neale@sinenomine.net>
18055         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
18057 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
18059         * iltests.il: Add test for #77148.
18061         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
18062         #77148.
18064 2006-01-03  Neale Ferguson <neale@sinenomine.net>
18066         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
18068 2006-01-03  Neale Ferguson <neale@sinenomine.net>
18070         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
18071         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
18073         * basic-long.cs: Add lconv-to-r4/r8 tests.
18075 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
18077         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
18079         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
18080         here as on other archs.
18082 2005-12-29 Neale Ferguson <neale@sinenomine.net>
18084         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
18086 2005-12-29 Neale Ferguson <neale@sinenomine.net>
18088         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
18089         
18090         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
18092         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
18093         instrument_prolog; Add memory_barrier instruction.
18095 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
18097         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
18099 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
18101         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
18103         * aliasing.c inssel.brg: Fix warnings.
18105         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
18106         could skip initialization of some parts of memory.
18108         * mini.c mini-ia64.c: Fix warnings.
18110         * inssel-sparc.brg: Add an implementation of lneg which actually works.
18112 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
18114         * aliasing.c (mono_build_aliasing_information): Add a workaround for
18115         a crash seen on sparc.
18117         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
18118         
18119         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
18121 2005-12-21 Neale Ferguson <neale@sinenomine.net>
18123         * mini-ops.h: Add s390_backchain instruction
18125         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
18127         * cpu-s390.md: Add s390_backchain instruction
18129         * mini-s390.c: Significant ABI changes
18131         * mini-s390.h: Cater for zero length structures
18133 2005-12-20 Neale Ferguson <neale@sinenomine.net>
18135         * mini-s390.c: ABI fixes
18137         * inssel-s390.brg: Remove debug statements
18139         * cpu-s390.md: Fix length of ATOMIC_xx operations
18141 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
18143         * basic-float.cs: Add float<->long conversion tests.
18145 2005-12-16 Neale Ferguson <neale@sinenomine.net>
18147         * mini-s390.c: Fix LOCALLOC processing.
18149         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
18151 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
18153         * iltests.il: Add tests for some opcodes not covered by the other
18154         tests.
18156 2005-12-15 Neale Ferguson <neale@sinenomine.net>
18158         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
18159         register loading for Tail processing; Correct trace output.
18161         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
18163         * cpu-s390.md: Correct size of jmp instruction. 
18165 2005-12-13 Neale Ferguson <neale@sinenomine.net>
18167         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
18169 2005-12-13 Neale Ferguson <neale@sinenomine.net>
18171         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
18172           Bring s390 up to current level.
18174 2005-12-12  Zltan Varga  <vargaz@gmail.com>
18176         * generics.2.cs: Disable the newly added tests as they do not work yet.
18177         
18178         * generics.2.cs: Add valuetype tests.
18180 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
18182         * basic-long.cs: Add i4->u8 test.
18184         * objects.cs: Add tests for JIT intrinsic.
18186         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
18187         optimizations lost by a mistake.
18189 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
18191         * basic-long.cs: Remove a test moved to objects.cs.
18193         * arrays.cs: Add more array tests.
18195 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
18197         * arrays.cs: Add new tests for multi-dimensional arrays.
18199 2005-12-06  Raja R Harinath  <rharinath@novell.com>
18201         * Makefile.am (test_sources2): Add generics.2.cs.
18202         (EXTRA_DIST): Add test_sources2.
18204 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
18206         Support for boxing and unboxing nullable types as well as the
18207         isinst operation on nullables, per the CLI ammendment.
18209         * inssel.brg (CEE_ISINST): Special case for nullable
18211         * mini.c (handle_unbox_nullable): new method
18212         (handle_box): Special case for nullable types
18213         (mono_method_to_ir): Call handle_unbox_nullable in correct
18214         places.
18216         * generics.2.cs: New test suite
18218         * Makefile.am: Support for regression tests with generics.
18220 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
18222         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
18223         allocated to registers. Fixes #76800.
18225 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
18227         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
18229 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
18231         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
18232         of platforms.
18234 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
18236         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
18237         objects.cs.
18239         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
18240         
18241         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
18242 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
18244         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
18245         single precision before storing to a single precision location.
18247 2005-11-28  Raja R Harinath  <rharinath@novell.com>
18249         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
18251 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
18253         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
18254         correct files.
18256         * basic.cs: Remove test_0_byte_compares test which was moved to
18257         objects.cs a long time ago.
18259 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
18261         * aliasing.c: Fixed aliasing issue on 64 bit archs.
18263 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
18265         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
18266         handlers are called.
18268         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
18269         throwing code.
18271          * mini-ia64.c: Add support for the throw->branch exception 
18272         optimization.   
18274         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
18276 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
18278         * mini.c: Enabled "fastpath" deadce :-)
18279         
18280 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
18282         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
18283         alias analysis pass to support it.
18284         * mini.h: Likewise.
18285         * ssa.c: Likewise.
18286         * liveness.c: Likewise (liveness computation can use aliasing
18287         information to be more accurate).
18288         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
18289         moreover made so that "--compile-all" uses the given optimization
18290         flags and not the default ones.
18291         * aliasing.c: Alias analysis (new file).
18292         * aliasing.h: Likewise.
18293         * Makefile.am: added "aliasing.c" and "aliasing.h".
18294         
18295 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
18297         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
18298         OP_L opcodes.
18300 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
18302         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
18303         fp >= end_of_stack exit condition, as it is not needed, and it might
18304         become true for fp eliminated frames.
18306 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
18308         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
18309         coded offsets.
18311 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
18313         * mini-arm.c: fixed alignment of doubles/longs to match
18314         the C ABI (bug #76635).
18316 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
18318         * aot.c: fix compilation with --enable-minimal=aot.
18320 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
18322         * mini-arm.c: fixed compatibility with the new
18323         floating point emulator package for compares.
18325 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
18327         * mini.c : reverted sig->pinvoke changes (r51396-51397).
18329 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
18331         * mini-exceptions.c (print_stack_frame): Output to stderr.
18332         (mono_handle_native_sigsegv): Ditto.
18334 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
18336         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
18337         OP_LCONV_TO_OVF_I implementation.
18339         * mini-amd64.c: Add support for the throw->branch exception 
18340         optimization.
18342         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
18343         when the catch clause catches a more general exception, i.e. Object.
18345 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
18347         * cpu-ia64.md: Remove unused opcodes.
18349         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
18350         specific defines for architectures defining USE_SIGACTION.
18352         * mini-ia64.c: Fix some warnings.
18354         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
18355         version seemed to skip a frame.
18357 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
18359         * mini.c: Clean up the usage of sig->pinvoke flag. Now
18360         only calls which are made to native code use this flag.
18362 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
18364         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
18365         varargs methods as well.
18366         
18367         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
18368         which have save_lmf set. Reorganize methods prologs a bit.
18370         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
18371         debugger to the proper place.
18373 2005-10-29  Martin Baulig  <martin@ximian.com>
18375         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
18376         when running inside the debugger until the debugger has support
18377         for it.
18379 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
18381         * mini.h: Fix a warning.
18383 2005-10-24  Miguel de Icaza  <miguel@novell.com>
18385         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
18386         we expose publicly, this returns the string.
18388 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
18390         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
18391         with fp elimination.
18393 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
18395         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
18396         native stacktrace using the glibc 'backtrace' function if available.
18398 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
18400         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
18402         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
18403         handle SIGSEGVs received while in native code.
18405         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
18406         code, call mono_handle_native_sigsegv which will abort the runtime
18407         after printing some diagnostics, instead of converting it into a
18408         confusing NullReferenceException.
18410 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
18412         * cpu-pentium.md: Remove unused opcodes.
18414 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
18416         * mini-amd64.h (MonoLMF): Add rsp field.
18418         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
18419         the lmf too.
18421 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
18423         * mini-codegen.c (get_register_spilling): Fix some warnings.
18425 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
18427         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
18428         elimination during exception handling. Enable fp elimination by
18429         default.
18431         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
18432         elimination.
18434 2005-10-16  Martin Baulig  <martin@ximian.com>
18436         * mini-exceptions.c
18437         (mono_debugger_run_finally): New public method for the debugger.
18439 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
18441         * debug-mini.c (mono_debug_init_method): Fix warning.
18443         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
18444         the 'exname' parameter const to fix some warnings.
18446 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
18448         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
18449         introduced by the previous patch.
18451 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
18453         * basic-float.cs: Add test for precision of float arithmetic.
18455         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
18456         when loading/storing single values from/to memory.
18458         * mini.c (mono_jit_compile_method_with_opt): Create the function
18459         pointers in the correct domain.
18461 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
18463         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
18464         introduced by previous patch.
18465         
18466         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
18467         when out_filter_idx is NULL.
18469         * mini-exceptions.c: Don't run filter clauses twice during exception
18470         handling. Fixes #75755.
18472 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
18474         * aot.c: Add support for ldflda wrappers.
18476         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
18477         #75902.
18479 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
18481         * mini.c, mini.h: do not consider exception handlers blocks when
18482         setting up interface variables.
18484 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
18486         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
18488 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
18490         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
18491         causes a regression.
18493         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
18495 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
18497         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
18498         of the OP_P definitions.
18500         * TODO: Add a proposal for dealing with the CEE/OP mess.
18502         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
18503         optimizations from the x86 port.
18505         * cpu-amd64.md: Ditto.
18507         * basic.cs basic-long.cs: Add tests.
18509 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
18511         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
18512         Patrik Torstensson's implementation of my exception-handling
18513         optimization idea, when the exception object is not used
18514         (bug #62150).
18516 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
18518         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
18519         of the mul_imm optimizations from the old jit.
18521 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
18523         * mini.c, liveness.c: patch by Patrik Torstensson and
18524         Zoltan Varga to improve performance in methods with
18525         exception clauses.
18527 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
18529         * driver.c: Remove 'Globalization' entry from --version.
18531 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
18533         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
18534         there is a profiler interested in JIT events.
18536         * aot.c: Load profile files produced by the AOT profiling module, and
18537         reorder methods based on the profiling info. Add a 'method_order' table
18538         to the AOT file to make mono_aot_find_jit_info work with the reordered
18539         methods.
18541         * mini.h: Bump AOT file version info.
18543 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
18545         * mini-arm.h: work around what looks like a gcc bug when optimizations
18546         are enabled.
18548 2005-09-28  Raja R Harinath  <rharinath@novell.com>
18550         * Makefile.am (AM_CFLAGS): Don't use += to append inside
18551         conditionals.  Use ...
18552         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
18554 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
18556         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
18557         to determine the amount of memory to copy when passing valuetypes.
18559         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
18560         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
18562 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
18564         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
18565         information about aot.
18567 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
18569         * *.c: Replace the use of {Enter,Leave}CriticalSection with
18570         macros. This will allow a deadlock debugger to easily be plugged
18571         in.
18573 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
18575         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
18577 2005-09-27  Raja R Harinath  <rharinath@novell.com>
18579         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
18580         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
18581         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
18582         ($(arch_built)) [CROSS_COMPILING]: Error out.
18584 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
18586         * aot.c: Add support for the no_special_static flag for classes.
18588 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
18590         * Reapply reverted patches.
18592         * *: Revert r50174 as well.
18594         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
18596 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
18598         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
18600 2005-09-23  Miguel de Icaza  <miguel@novell.com>
18602         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
18603         part of the SIG_HANDLER_SIGNATURE.  
18605 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
18607         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
18608         statistics.
18610         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
18611         introduced by previous patch.
18613 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
18615         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
18616         saved registers too.
18618         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
18619         upon the information returned by get_call_info ().
18620         
18621         * mini-x86.c (add_float): Fix stack size calculation.
18622         (mono_arch_call_opcode): Rewrite this so it works based up the
18623         information returned by get_call_info ().
18624         (mono_arch_get_this_vret_args): Ditto.
18626 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
18628         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
18629         in cinfo to determine the registers which need to be used.
18631 2005-09-20  Miguel de Icaza  <miguel@novell.com>
18633         * driver.c (mono_main): Add --server and --desktop flags. 
18635 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
18637         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
18638         registers as global registers.
18640         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
18641         longer needed with the new register allocator.
18643         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
18645         * cpu-ia64.md: Remove unused opcodes.
18646         
18647         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
18648         
18649 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
18651         * cpu-amd64.md: Remove unused opcodes.
18653         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
18654         needed with the new register allocator.
18656         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
18657         reg-reg moves.
18659 2005-09-16  Raja R Harinath  <rharinath@novell.com>
18661         * Makefile.am (check-local): Don't invoke semdel-wrapper.
18663 2005-09-16  Martin Baulig  <martin@ximian.com>
18665         * exceptions-amd64.c
18666         (throw_exception): Don't call mono_debugger_throw_exception() if
18667         we're a rethrow - see the FIXME in the code.
18669 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
18671         * mini.c (mono_init_exceptions): This only works on some architectures.
18672         
18673 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
18675         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
18676         on ia64.
18678         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
18680         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
18681         now in mini-exceptions.c.
18683 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
18685         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
18686         now in mini-exceptions.c.
18688 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
18690         * exceptions-x86.c: Applied patch from Patrik Torstensson 
18691         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
18693         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
18694         code into mini-exceptions.c. Add some assertions to it.
18696 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
18698         * aot.c (emit_section_change): Applied patch from "The Software Team" 
18699         (<software@solmersa.com>). Fix as errors on windows.
18701 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
18703         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
18704         method info into the LMF.
18706 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
18707         
18708         * mini-ia64.c: Add proper unwind info for method epilogs.
18710         * exceptions-ia64.c: Add some code to help debugging.
18711         
18712         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
18714         * mini-exceptions.c: Fix warning.
18716 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
18718         * mini.c: Really fix build.
18720         * mini-x86.c mini-amd64.c: Fix build.
18722 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
18724         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
18726         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
18727         some Interlocked methods as intrinsics.
18729         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
18730         for Thread methods as well.
18732         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
18734         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
18736         * mini-ia64.c mini-x86.c mini-amd64.c 
18737         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
18738         OP_MEMORY_BARRIER.
18739         
18740         * mini.c (mono_init_exceptions): Fix build breakage.
18742 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
18744         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
18745         of instructions. Use the new ia64_unw_op macros for emitting unwind
18746         info.
18748         * mini.c (mono_init_exceptions): Initialize exception handling
18749         related trampolines at startup.
18751 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
18753         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
18755 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
18757         * mini.c: Handle type loading errors gracefully during compilation and
18758         throw the appropriate exception.
18760 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
18762         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
18763         for the mono binary.
18765 2005-09-09  Martin Baulig  <martin@ximian.com>
18767         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
18768         the release.
18770 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
18772         * mini-arm.h: use emulation for conv.r.un for the release.
18774 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
18776         * mini-arm.c, objects.cs: more fixes and tests for them.
18778 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
18780         * mini-arm.c: align structures to at least 4 bytes to be able
18781         to keep our current optimized memcpy.
18783 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
18785         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
18787 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18789         * mini.c: ignore SIGPIPE.
18791 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
18793         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
18795         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
18797 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
18799         * mini.h: Add prototype for mono_allocate_stack_slots_full.
18801 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
18803         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
18804         exception handling support.
18805         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
18806         patch by Brian Koropoff <briank@marakicorp.com>).
18808 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
18810         * mini.c: revert another 'optimization' which breaks when
18811         items on the eval stack need to be saved at a basic block end
18812         (bug #75940).
18814 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
18816         * jit-icalls.c: for arrays, ensure we always provide
18817         lower bounds.
18819 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
18821         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
18822         
18823         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
18825 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
18827         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
18828         arguments in their original register.
18830 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
18832         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
18833         memset/memcpy.
18835         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
18836         when ssapre is enabled.
18838         * inssel-long.brg: Fix bug in previous patch.
18840         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
18841         multiplication by a constant.
18843 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
18845         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
18846         icc.
18848         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
18849         saving registers.
18851 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
18853         * inssel-arm.brg: apply changes tested by Brian Koropoff
18854         <briank@marakicorp.com>.
18856 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
18858         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
18859         
18860 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
18862         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
18863         to the same register if dreg is just a base register.
18864         (print_ins): Improve printing of membase opcodes.
18866         * inssel-x86.brg: Add optimized ldind(reg) rules.
18868         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
18870 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
18872         * mini.c: when running under valgrind, set the stack bottom for
18873         the GC at the actual approximate stack for the app (fixes running
18874         mono with valgrind).
18876 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
18878         * mini.c: do no break at the first valuetype to init found
18879         (fixes bug #75791).
18881 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
18883         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
18885 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
18887         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
18889 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
18891         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
18893 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18895         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
18897         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
18898         code.
18900         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
18901         code.
18903         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
18904         methods.
18906 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
18908         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
18910 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18912         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
18913         in the tail recursion optimization.
18915         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
18916         debug info into the assembly file.
18918         * iltests.il: Add test for filter regions.
18920         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
18921         initial stack of filter regions. Fixes #75755.
18923 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
18925         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
18926         stack requirements.
18928 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18930         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
18931         the check for an already compiled method on non-ia64 platforms.
18932         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
18933         proper domain.
18935         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
18937         * inssel-x86.brg: Add some optimized call rules.
18939 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
18941         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
18942         method here.
18944         * mini.h mini-trampolines.c: Pass the trampoline argument to 
18945         mono_arch_patch_delegate_trampoline.
18947         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
18949         * mini-trampolines.c: Fix build.
18951         * mini-amd64.h: Add delegate trampolines.
18953         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
18955         * inssel-amd64.brg: Add optimized call rules.
18956         
18957         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
18959         * inssel-ia64.brg: Add optimized ldind(reg) rules.
18961 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
18963         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
18964         change.
18966         * mini-ia64.c: Remove LMF fixmes.
18968         * mini-ia64.h: Remove most fields from LMF.
18970         * inssel-ia64.brg (stmt): Fix unaligned access errors.
18972         * mini-trampolines.c: Add support for IA64 function descriptors.
18974         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
18975         for IA64 function descriptors.
18977 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
18979         * tramp-arm.c: patch the vtable for virtual calls. Added
18980         support code to register/unregister the LMF.
18981         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
18982         more LMF work.
18984 2005-08-19  Dick Porter  <dick@ximian.com>
18986         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
18987         bit value if needed.
18989 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
18991         * mini.c (mini_get_method): Move handling of wrapper data here.
18993         * mini.c (mono_method_to_ir): Add support for dynamic methods.
18995         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
18996         virtual.
18998         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
18999         bblock->code does not remain empty.
19001 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
19003         * arrays.cs: Add regression test for #75832.
19005         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
19006         rules. Fixes #75832.
19008         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
19009         instruction scheduling.
19011 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
19013         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
19015 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
19017         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
19019         * mini-codegen.c: Fix VC build.
19021         * cpu-pentium.md: Increase length of atomic_exhange_i4.
19023 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19025         * mini.h: fix signature for mono_register_opcode_emulation.
19027 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
19029         * mini.c: Get rid of most of the helper_sig_... constants using
19030         mono_create_icall_signature ().
19032 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
19034         * jit-icalls.c (helper_ldstr): New helper function.
19036         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
19038         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
19039         throw, load the string using a helper call instead of creating a string object.
19041         * aot.c: Update after LDSTR changes.
19043         * mini.h: Bump AOT file version.
19044         
19045         * aot.c: Save class size info into the AOT file. Print more statistics during
19046         compilation.
19048         * mini.h: Bump AOT file version.
19050         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
19051         ordering of disasm cases. Fixes #74957.
19053 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
19055         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
19056         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
19057         the generic code needed for the ARM port.
19059 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
19061         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
19062         inssel-arm.brg: more ARM features and fixes.
19064 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
19066         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
19067         ARM port work in progress.
19069 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
19071         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
19073         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
19075         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
19077         * inssel.brg (mini_emit_memset): Add support for unaligned access.
19079         * *-ia64.*: Ongoing IA64 work.
19080         
19081         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
19083 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
19085         * TODO: Remove out-of-data todo stuff.
19087         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
19088         dead code.
19090         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
19092         * mini.h: Bump corlib version.
19094 2005-07-27  Martin Baulig  <martin@ximian.com>
19096         * mini-codegen.c
19097         (create_copy_ins): Added `const unsigned char *ip' argument; set
19098         `copy->cil_code' from it.
19100 2005-07-27  Martin Baulig  <martin@ximian.com>
19102         * mini-exceptions.c (mono_handle_exception): Don't call
19103         mono_debugger_handle_exception() for filters.
19105 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
19107         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
19108         as well.
19110 2005-07-26  Martin Baulig  <martin@ximian.com>
19112         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
19114         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
19115         helper_compile_generic_method() if the method is actually virtual
19116         and non-final.
19118 2005-07-26  Martin Baulig  <martin@ximian.com>
19120         * mini.c
19121         (trampoline_code): Renamed to `mono_trampoline_code' and made it
19122         public; this is now accessed directly by the debugger.
19123         (mono_generic_trampoline_code): Removed.
19125         * debug-mini.c
19126         (mono_debug_init_method): Also add interncalls and wrappers.
19128 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
19130         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
19132 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
19134         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
19136 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
19138         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
19140 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
19142         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
19143         getting TLS offsets on AMD64 too.
19145 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
19147         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
19149 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
19151         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
19152         inssel-arm.brg, mini-arm.h: ARM port work in progress.
19154 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
19156         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
19158         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
19159         to mini.c.
19161         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
19162         mono_sparc_is_virtual_call ().
19163         
19164         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
19166         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
19167         trampoline parameters.
19169         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
19170         
19171         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
19172         to mono_arch_get_vcall_slot_addr.
19174         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
19175         trampoline code.
19177         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
19179 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
19181         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
19183 2005-07-19  Martin Baulig  <martin@ximian.com>
19185         * exceptions-amd64.c (throw_exception): Call
19186         mono_debugger_throw_exception() here like we're doing it on i386.
19188 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
19190         * mini-ia64.c: Add optimized TLS access support.
19192 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
19194         * mini-exceptions.c: Ongoing IA64 work.
19196         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
19198         * mini.c: Use the default optimization set when embedding. Fixes
19199         #75194.
19201 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
19203         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
19204         of trampolines to a separate file.
19206         * mini-trampolines.c: New file.
19208         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
19209         separate file.
19210         
19211         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
19212         amd64/ia64 code.
19214         * mini-codegen.c: Fix cygwin build.
19216 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
19218         * mini.c: Add some minor changes needed by the IA64 port.
19220         * *-ia64.*: Ongoing IA64 work.
19222 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
19224         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
19225         trampolines into arch-independent and arch-dependent parts.
19227         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
19229 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
19231         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
19233         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
19234         the xp-regalloc-branch for amd64.
19236         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
19237         xp-regalloc-branch for x86.
19239 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
19241         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
19243 2005-07-06  Martin Baulig  <martin@ximian.com>
19245         * mini.c
19246         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
19247         (mono_jit_runtime_invoke): Likewise.
19249 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
19251         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
19252         on x86 too.
19253         
19254         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
19255         without loading their metadata. Reorganize the file format so exception handling+
19256         debug info is kept separate from normal method info. Create MonoJitInfo 
19257         structures for methods lazily.
19259         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
19260         loading metadata.
19261         (x86_class_init_trampoline): Patch AOT class init trampolines too.
19263         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
19265         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
19266         in AOT code.
19268         * mini.h: Bump AOT file version.
19270 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
19272         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
19274 2005-07-01  Raja R Harinath  <rharinath@novell.com>
19276         * Makefile.am (check-local): Call semdel-wrapper.
19278 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
19280         * mini-x86.c: Revert the last change as it seems to break the build..
19282 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
19284         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
19285         
19286         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
19288 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
19290         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
19291         outside of the macro, so strange stuff doesn't happen with gcc4
19292         (NEW_AOTCONST_TOKEN): Likewise.
19294 2005-06-28  Martin Baulig  <martin@ximian.com>
19296         * mini.c (mini_class_is_system_array): New static method; use this
19297         instead of `klass->parent == mono_defaults.array_class' everywhere
19298         since this also works for the new generic array class.
19300 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
19302         * inssel.brg: Remove warnings.
19304 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
19306         * mini-ia64.c: Ongoing IA64 work.
19308         * basic-float.cs: Add float->i1 conversion test.
19310         * iltests.il: Add conv.u4 test.
19312 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
19314         * inssel-long.brg: Fix bug caused by last change.
19316 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
19318         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
19319         BSDs.  Allows the x86 JIT to work on OSX86
19321 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
19323         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
19324         u4->i8 conversion.
19326         * mini-ia64.c: Ongoing IA64 work.
19328 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
19330         * mini-ia64.c: Ongoing IA64 work.
19332         * driver.c: Clean up jit_code_hash as well when using --regression.
19334         * inssel-long.brg: Fix long->i4/u4 conversion rules.
19336         * basic-long.cs: Add tests for long->u4 conversion.
19338 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
19340         * mini.c: Take mono_get_domainvar out of macros. This makes sure
19341         that we do not depend on undefined C behavior: the order stuff
19342         gets evaluated within an expression. Fixes mono when compiled on
19343         GCC 4.
19345 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
19347         * *-ia64.*: Ongoing IA64 work.
19349         * aot.c: Lower memory usage while loading AOT methods.
19351         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
19353         * mini.h: Bump AOT file format version.
19355 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
19357         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
19359 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
19361         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
19362         not on callee assembly). Fixed some comments.
19364 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
19366         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
19367         it gets proper disassembly.
19368         (emit_method_info): Remove some dead code.
19370         * mini.c (mini_method_compile): Allways allocate the GOT var in
19371         mono_method_to_ir for emulating opcodes.
19373 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
19375         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
19376         before freeing the code memory. Fixes #74990.
19378         * objects.cs: Add regression test for #74992.
19380         * liveness.c: Extend live ranges of arguments to the beginning of the
19381         method. Fixes #74992.
19383         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
19384         so it points into the faulting instruction.
19386 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
19388         * jit-icalls.c (mono_imul_ovf): Add exception handling.
19390         * *-ia64.*: Ongoing IA64 work.
19392         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
19394 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
19396         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
19398         * *-ia64.*: Ongoing IA64 work.
19400 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
19402         * basic-long.cs: Add tests for add/sub.ovf.
19404         * basic.cs: Add tests for sub.ovf.
19406         * *-ia64.*: Ongoing IA64 work.
19408 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
19410         * *-ia64.*: Ongoing IA64 work.
19412         * basic.cs: Add conv.ovf.i4.un test.
19414 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
19416         * mini.c: (remove_block_if_useless) Fixed bug 75061.
19417         
19418 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19420         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
19422 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
19424         * *-ia64.*: Ongoing IA64 work.
19426 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19428         * trace.[ch]:
19429         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
19431 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
19433         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
19435 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
19437         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
19439         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
19440         of a call is callable by a near call.
19442 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
19444         * mini-ia64.c: Ongoing IA64 work.
19446 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
19448         * genmdesc.c: Make the generated array non-static.
19450         * inssel-long.brg: Fix LSHR_IMM rule.
19452         * *-ia64.*: Ongoing IA64 work.
19454         * *-ia64.*: Ongoing IA64 work.
19456 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
19458         * *-ia64.*: Ongoing IA64 work.
19460         * *-ia64.*: Ongoing IA64 work.
19461         
19462         * mini-ia64.c: Ongoing IA64 work.
19464         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
19466 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
19468         * objects.cs basic-calls.cs: Move some tests to objects.cs.
19469         
19470         * objects.cs basic-long.cs: Move some tests to objects.cs.
19472 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
19474         * *-ia64.*: Ongoing IA64 work.
19476         * iltests.il: Add a new test.
19478         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
19479         newobj. Fixes #75042.
19481 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
19483         * *-ia64.*: Ongoing IA64 work.
19484         
19485         * *-ia64.*: Ongoing IA64 work.
19486         
19487         * *-ia64.*: Ongoing IA64 work.
19489         * basic.cs objects.cs: Move tests accessing static variables as well.
19491         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
19493 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
19495         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
19497         * driver.c: Always print failed tests.
19499         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
19500         frame pointer.
19502         * *ia64*: Ongoing IA64 work.
19504 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
19506         * basic.cs: Add tests for add.ovf. Fix warnings.
19508 2005-05-18  Miguel de Icaza  <miguel@novell.com>
19510         * driver.c (mono_main): Avoid crash if no argument is passed to
19511         --break;  Do not use g_error, but f_printf.   And fix all other
19512         ocurrences of the same crash.
19514 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
19516         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
19517         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
19518         Fixes #74742.
19520 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
19522         * *-ia64.*: Add beginnings of IA64 backend.
19524         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
19526 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
19528         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
19529         Fixes #74925.
19531         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
19533         * mini-amd64.c: Fix a warning.
19535 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
19537         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
19538         in float_neg. Fixes #74897.
19540         * mini-amd64.c (emit_call): Fix another near call bug.
19542 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
19544         * declsec.c: Keep the appdomain information in the structure. Added a 
19545         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
19546         value gets overwritten).
19547         * declsec.h: Set the default MonoArray for the the stack to 6. Added
19548         an MonoAppDomain member to MonoSecurityFrame.
19549         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
19550         used in the stack walk. Now use a MonoArray which grow (double) when
19551         it gets full.
19553 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
19555         * mini.c: Re-enabled runtime cleanup, since running threads should
19556         now properly stop when exiting.
19558 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
19560         * mini-codegen.c: New file contaning the arch-independent local
19561         register allocator. Not used by any architectures yet.
19563         * mini.h linear-scan.c: Merge some changes from the 
19564         mini-xp-local-regalloc branch.
19566 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
19568         * mini-amd64.c (emit_call): Fix calls to native functions when the
19569         runtime is compiled as a shared library. Fixes #74756.
19571         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
19572         on a literal field. Fixes #74751.
19574 2005-04-25  Raja R Harinath  <rharinath@novell.com>
19576         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
19578 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
19580         * objects.cs: Add missing null casting test.
19582 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
19584         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
19585         in wrapper methods. Also rename 'address' variable to 'offset'.
19587 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
19589         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
19590         warnings.
19591         
19592         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
19594         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
19595         work on windows.
19597 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
19599         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
19601 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
19603         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
19604         just the last bytes.
19606 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
19608         * aot.c (mono_compile_assembly): Fix warning.
19610         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
19611         by the _MSC_VER stuff.
19613 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
19615         * inssel-long.brg: Fix #74588.
19617         * cpu-amd64.md: Fix #74591.
19619         * iltests.il: Add new regression tests.
19621 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
19623         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
19624         valuetype.
19626 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
19628         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
19630         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
19631         from Bill Middleton <flashdict@gmail.com>.
19633 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
19635         * arrays.cs: Add new regression test. Fix warnings.
19637 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
19639         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
19640         and leakage in CKFINITE.
19642         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
19643         this to a null op since it is called on amd64 too.
19645         * exceptions-amd64.c (get_throw_trampoline): Align stack.
19647         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
19648         body since this is not used on amd64.
19649         
19650         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
19652         * mini-amd64.c: Remove obsolete fixmes.
19654         * mini.c (print_method_from_ip): Fix debugging support.
19656 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
19658         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
19659         so that expressions that don't give much gain are not reduced.
19660         * ssapre.h: Likewise.
19662 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
19664         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
19666         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
19668         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
19670 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
19672         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
19674         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
19676 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
19678         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
19679         stack touching.
19681         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
19683         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
19685         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
19687         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
19688         MONO_ARCH_USE_SIGACTION. Fixes #74252.
19690         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
19692         * mini-x86.c: Fix up stack overflow handling.   
19694         * exceptions.cs: Add new regression test.
19696 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
19698         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
19699         mono_jit_thread_attach.
19701         * mini.c (mono_method_to_ir): Verify called method is not abstract.
19703 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
19705         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
19706         avoid calling constructors using callvirt.
19708         * inssel.brg: Fix #74073.
19710 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
19712         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
19713         compilation with non-GCC compilers.
19714         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
19715         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
19717 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
19719         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
19720         klass->interface_offsets (will likely fix bug#74073).
19722 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
19724         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
19726 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
19728         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
19729         to amd64_div_reg_size ().
19730         
19731         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
19733 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
19735         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
19737 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
19739         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
19741 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
19743         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
19744         
19745         * mini.c (mono_precompile_assembly): Load and precompile referenced
19746         assemblies as well. Fixes #74015.
19748 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
19750         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
19752 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
19754         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
19755         a lot of checks and (anyway) permissions cannot work until corlib is 
19756         loaded.
19758 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
19760         * mini-ppc.c: fixed ABI issue on sysv/ppc.
19762 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
19764         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
19765         calls (fixes bug#72824).
19767 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
19769         * mini.c: fix tail recursion elimination (see test in bug#73936).
19771 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
19773         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
19774         some fp functions in sse2 mode.
19776 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
19778         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
19780 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
19782         * mini.h mini.c: Add mono_get_jit_tls_key ().
19784         * mini-x86.c: Enable fast TLS support on windows.
19786 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
19788         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
19789         * mini.c: Check for p/invoke method when generating code. If a
19790         p/invoke method, or it's class, isn't decorated with [Suppress
19791         UnmanagedCodeSecurity] then generate code to call System.Security.
19792         UnmanagedDemand (only if the security manager is active).
19794 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
19796         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
19797         last change as it seems to cause strange crashes.
19798         
19799 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
19801         * *.c: handle unsafe function pointers where needed.
19803 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
19805         * mini.c (mono_jit_free_method): Remove the fixme too.
19807 2005-03-15  Miguel de Icaza  <miguel@novell.com>
19809         * mini.c: As discussed, make the code actually free the delegate
19810         thunk now, to enable the debugging of delegate problems, use
19811         MONO_DEBUG=1 when running Mono. 
19813         This takes also care of parts of the leaks as seen by Joe.
19815 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
19817         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
19818         thread_tls_offset calculation.
19820 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
19822         * declsec.c: Reworked linkdemand checks for icall. The previous code
19823         was using the declaration code (untrusted) and didn't work as expected
19824         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
19825         specific case.
19827 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
19829         * iltests.il: Add new localloc test.
19831         * mini-amd64.c: Handle large stack allocations the same way as on
19832         windows if stack overflow handling is working.
19833         
19834         * mini-amd64.c: Allocate the signal stack using mmap.
19836         * mini.c (sigsegv_signal_handler): Fix reading of context.
19838         * mini-exceptions.c: Fix up stack overflow handling.
19840         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
19842         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
19844         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
19846         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
19848         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
19849         tramp_init functions as they are no longer needed.
19851 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
19853         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
19854         
19855         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
19857         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
19858         
19859         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
19860         support that now.
19862         * mini-ops.h: Add OP_LMUL_IMM.
19864         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
19865         long mul/div opcodes as intrinsic.
19867         * mini-amd64.c (emit_call): Handle the case when the callee might be
19868         an AOT method.
19870 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
19872         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
19873         extra safe.
19874         
19875         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
19877         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
19879 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
19881         * mini.c (mono_codegen): Don't leak here, to help people running
19882         monogrind.
19884 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
19886         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
19887         conversions in sse2 mode.
19889         * basic-float.cs: Add regression test.
19890         
19891         * mini-amd64.c: Reenable sse2.
19893 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
19895         * mini-amd64.c: Disable sse2 until some regressions are fixed.
19897 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
19899         * driver.c: Copyright text should include 2005.
19900         
19901 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
19903         * cpu-amd64.md (load_membase): Fix more max lengths.
19905 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
19907         * cpu-amd64.md (load_membase): Fix max length.
19909         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
19911         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
19913         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
19914         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
19916         * basic-float.cs: Add rounding regression test.
19918         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
19920 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
19922         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
19923         structures in registers for pinvoke wrappers.
19925 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
19927         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
19929 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
19931         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
19932         wrapper to mono_jit_thread_attach.
19934         * mini.c (mini_jit_thread_attach): New jit icall.
19936         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
19937         native->managed wrappers.
19939         * exceptions.cs: Add new regression test.
19941         * mini.c (optimize_branches): Check regions in the cbranch to throw
19942         block case as well. Fixes #73242.
19944 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
19946         * mini.c: thread safety fixes.
19948 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
19950         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
19951         patching stuff, since delegates use jump trampolines so there is
19952         no caller.
19954         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
19955         jump trampolines.
19956         
19957         * tramp-amd64.c: Fix build.
19959         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
19960         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
19962         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
19963         Rename this to mono_arch....
19964         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
19966         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
19968         * mini-amd64.c (emit_call): If both the caller and the callee is
19969         guaranteed to have 32 bit addresses, emit a normal call.
19971         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
19973         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
19974         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
19975         method_ptr inside delegates.
19977 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
19979         * mini.c (mono_jit_free_method): Free the method info even if the native code is
19980         invalidated. Fixes #73001.
19982         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
19984         * mini-x86.c: Only use stdcall for pinvokes on windows.
19986 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
19988         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
19989         * mini-x86.c: remove unreliable __thread var offset detection,
19990         use the correct accessors and enable by default.
19992 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
19994         * mini.c (mono_jit_free_method): Fix memory leak.
19996 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
19998         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
20000 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
20002         * cpu-amd64.md: Fix lengths of atomic opcodes.
20004 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20006         * driver.c: try to not imply using ICU is any good.
20008 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
20010         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
20011         functions as inline ops.
20013         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
20014         some Interlocked functions as inline ops.
20016         * mini.c (move_basic_block_to_end): Fix bug in last patch.
20018         * mini.h (MonoBasicBlock): Reorganize fields a bit.
20020         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
20022         * mini.c: Add support for OP_NOT_TAKEN.
20024         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
20025         structures in registers for pinvoke wrappers.
20027         * mini-amd64.c: Fix warnings.
20029 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
20031         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
20033         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
20035         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
20036         address instead of loading the address from it.
20038         * mini-x86.c: Add support for returning small structs in registers
20039         on Win32. Fixes part of #70864.
20040         
20041 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
20043         * trace.c (get_token): Improve error checking.
20045 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
20047         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
20049 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
20051         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
20052         it can be reused for MonoClass.
20053         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
20054         _LINKDEMAND.
20056 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
20058         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
20059         instead of a MonoReflectionMethod. The method information wasn't used
20060         when displaying SecurityException details (but will be now).
20062 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
20064         * Makefile.am : windows build fix.
20066 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
20068         * iltests.il: Add new regression test.
20070         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
20071         #72522.
20073 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
20075         * mini.c: Moved linkdemand check into helper function check_linkdemand
20076         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
20077         LDFTN, LDVIRTFTN).
20079 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
20081         * declsec.c: Added statistics counter for different kinds of 
20082         LinkDemands.
20083         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
20084         (and commented) declaration.
20085         * mini.c: Added statistics counter for security Demand code 
20086         generation. Added display of security statistics.
20088 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
20090         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
20091         Fix compilation errors under gcc-2.95.
20093 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
20095         * mini.c, driver.c: Use the new jit trampoline hashtable
20097 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
20099         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
20101 2005-02-11  Martin Baulig  <martin@ximian.com>
20103         * debug-mini.c (mono_debug_close_method): Free the line number array.
20105 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
20107         * aot.c: Break up large methods into smaller ones. Share GOT slots for
20108         icalls.
20110         * mini.h: Bump AOT file format version. 
20112 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
20114         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
20115         APTC and P/Invoke.
20116         * declsec.h: Added macros to get/set lazyly initialized security 
20117         informations about assemblies. Added new enum for different type of
20118         possible LinkDemand violation. Added function to check LinkDemands.
20119         * mini.h: Added a field to MonoCompile to hold any security violation
20120         detected when JITting a method (so it can be thrown later).
20121         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
20122         and CEE_CALLVIRT. Added code to throw exception at the end of
20123         mini_method_compile (note: the exception is unhandled right now).
20125 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
20127         * mini.c, jit-icalls.c: use the managed implementation of
20128         memset for initobj and memset, to avoid managed <-> unmanaged
20129         transitions.
20131 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
20133         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
20134         optimization if it would need a GOT var.
20136         * basic.cs: Add tests for constant propagation and switch statements.
20138         * ssa.c: Fix out-of-range constant propagation and switch statements.
20140 2005-02-09    <vargaz@freemail.hu>
20142         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
20144 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
20146         * cpu-amd64.md (load_membase): Fix max length of load_membase.
20148 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
20150         * mini.c: update to new signature of mono_class_get_allocation_ftn().
20152 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
20154         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
20155         arithmetic operations.
20157 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
20159         * mini-ppc.c: add a workaround for broken user code that
20160         DllImports vararg functions with non-vararg signatures.
20162 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
20164         * mini.c (mono_jit_compile_method_inner): Add detection and a 
20165         meaningfull error message for assemblies written in Managed C++.
20167         * tramp-amd64.c mini-amd64.h: Add support for 
20168         create_trampoline_from_token ().
20170         * aot.c mini-x86.c abcremoval.c: Applied patch from
20171         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
20173 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
20175         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
20176         which takes a MonoImage/token as parameter instead of a MonoMethod.
20178         * aot.c: Use the new trampoline for initializing vtables.
20180         * aot.c: Add support for ldfld/stfld_remote wrappers.
20182         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
20183         rules for compare <MEM>, IMM.
20185         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
20187         * aot.c: Handle inherited finalizers correctly.
20189 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
20191         * inssel.brg (stmt): Add a missing _setup_... ().
20193         * aot.c: Save some parts of the class state to the AOT file and use it
20194         to recompute that state when a class is initialized.
20196         * mini.c: Install AOT hooks into the runtime.
20198         * mini.h: Bump AOT file format version.
20199         
20200         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
20201         Fixes #72148.
20203         * iltests.il: Add new test.
20205 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20207         * mini.c: fix typo.
20209 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
20211         * mini.c: setup the statistical profiler in the thread attach
20212         callback to cope with the new single thread code.
20214 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
20216         * mini-ppc.c: ensure we have enough room for the profiler
20217         calls (fixed bug#72084).
20219 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
20221         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
20222         it.
20224 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
20226         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
20228 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
20230         * ssapre.c: Fixed an issue with down safety (this allows IronPython
20231         to succesfully execute parrotbench).
20232         * ssapre.h: Likewise.
20234 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
20236         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
20237         variable for stores to method arguments (fixes a SSAPRE issue).
20239 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20241         * mini.c: handle value types in dup, fixes gen-112.cs.
20243 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
20245         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
20246         sequence for calls in dynamic methods to avoid thunks.
20248 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20250         * mini.c: correctly remove dynamic methods from the hashtable.
20252 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
20254         * driver.c: Disabled SSAPRE until fix the bug that appears
20255         in IronPython's parrotbench.
20257 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
20259         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
20261         * mini.c (mono_method_to_ir): Revert the previous change.
20262         
20263         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
20264         when AOT compiling.
20266         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
20267         mono_jit_info_table_find () etc. when running under valgrind.
20269         * inssel.brg: Fix warnings.
20271         * mini-exceptions.c: Fix warnings.
20273 2005-01-31  Martin Baulig  <martin@ximian.com>
20275         * driver.c (compile_all_methods_thread_main): Don't try to compile
20276         generic methods or anything which has type parameters.
20278 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
20280         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
20282         * TestDriver.cs: Add --verbose flags.
20284         * graph.c ssa.c: Fix 64 bit warnings.
20285         
20286         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
20287         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
20288         Fix 64 bit warnings.
20290         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
20291         variable not spotted by gcc.
20292         
20293         * mini-amd64.c inssel-amd64.brg: Applied patch from  
20294         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
20295         X86_COMPARE_MEMBASE opcodes.
20297         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
20299 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
20301         * *: MonoMethod->signature might be NULL now. You *MUST* use
20302         mono_method_signature.
20304 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
20306         * driver.c (compile_all_methods_thread_main): Compile the methods
20307         without invoking cctors.
20309 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20311         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
20312         * basic-calls.cs: test for the above.
20314 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
20316         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
20317         MonoJitInfo changes.
20319 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
20321         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
20322         eagerly if it contains dynamic methods.
20323         
20324         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
20326         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
20327         trace, it is now computed by an icall from trace_ips.
20328         
20329         * mini-exceptions.c: Fix a warning.
20331 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
20333         * mini-exceptions.c: don't bother getting stack trace info if
20334         it's not going to be used.
20336 2005-01-27  Raja R Harinath  <rharinath@novell.com>
20338         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
20339         ssapre-mini-ops.h.
20341 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
20343         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
20345         * aot.c: Avoid calling mono_method_get_header () if not needed.
20347         * mini.h: Bump AOT file format version.
20348         
20349         * mini.c (mono_emit_native_call): Allocate a GOT var here.
20351         * mini.c (mono_print_tree): Print more info for calls.
20353 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
20355         * declsec.h: Remove warning by adding missing include for marshal.h
20357 2005-01-26  Martin Baulig  <martin@ximian.com>
20359         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
20360         `ip' twice.
20362 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
20364         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
20365         flags.
20367         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
20369         * aot.c (mono_compile_assembly): Fix a warning.
20371 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
20373         * declsec.c: Look for security attributes on the original MonoMethod 
20374         (and not the wrapped one). This fix permissions on icalls.
20376 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
20378         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
20380         * mini.c (mono_allocate_stack_slots): Add a fixme.
20382         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
20384 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
20386         * inssel.brg: optimize casts of sealed types (more
20387         optimizations waiting for fixes in remoting).
20389 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
20391         * inssel.brg (stmt): Add another dummy rule.
20393         * driver.c: Fix warnings.
20395         * driver.c (mono_main): If running under valgrind, instruct glib to use
20396         the system allocation functions so valgrind can track the memory
20397         allocated by the g_... functions.
20399         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
20401         * mini-ops.h: Add OP_DUMMY_STORE opcode.
20403         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
20405         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
20406         variables in try regions.
20408         * mini.c (mini_method_compile): Don't disable optimizations on large
20409         methods when AOT compiling.
20411         * mini.c (mono_allocate_stack_slots): New arch independent method to 
20412         allocate stack slots. Not yet used.
20414 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
20416         * debug-mini.c (mono_debug_close_method): Plug some leaks.
20418 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
20420         * mini-ppc.c: make the branch info relative as the code
20421         buffer can be reallocated.
20423 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
20425         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
20426         * driver.c: Removed the AOT/security restriction. Now initialize the
20427         security manager (in metadata) if --security is used.
20428         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
20429         rather than the pointer to declarative security, when AOT is used.
20431 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
20433         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
20434         basic blocks, reduced intrinsic exception throwing code size.
20436 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
20438         * driver.c (mini_usage): Reorder the usage screen.
20440 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
20442         * mini.c (mono_resolve_patch_target): Fix warning.
20444 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
20446         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
20447         previous patch.
20449         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
20451         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
20452         breaks the amd64 build.
20454         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
20455         register allocation. Fixes #71454.
20457         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
20459         * arrays.cs: Add new regression test.   
20461 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
20463         * ssapre.c: Turned usage of snprintf to GString.
20464         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
20465         (I left it on by mistake in my previous commit).
20467 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
20469         * mini.c, cfold.c, basic-calls.cs: preserve side effects
20470         on cond branch optimization (fixes bug# 71515).
20472 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
20474         * abcremoval.c: Fixed bug 71062.
20475         * abcremoval.h: Likewise.
20477 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
20479         * mini.c: Added a new functionality to optimize_branches, the removal
20480         of useless basic blocks, and fixed some problem in the removal of
20481         critical edges; some utility functions added for both purposes.
20482         * ssapre.c: Added complex expression support, and fixed bug 70637.
20483         * ssapre.h: Likewise.
20484         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
20485         enabled in SSAPRE.
20486         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
20487         * driver.c: Re-enabled SSAPRE.
20489 2005-01-19  Martin Baulig  <martin@ximian.com>
20491         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
20492         the result of mono_get_method_constrained().
20494 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
20496         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
20497         manager.
20499 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
20501         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
20502         be detected.  Fixes #59296.
20504 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
20506         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
20507         which can happen. Fixes #71361.
20509 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
20511         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
20512         manager.
20514 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
20516         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
20517         appdomain-unload.exe to fail.
20518         
20519         * mini.c: Fix some memory leaks.
20521 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
20523         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
20524         Fixed bug and sped up some codepaths.
20526 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
20528         * mini.c: Fix some memory leaks.
20530         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
20531         conversion.
20533         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
20535         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
20536         #71320.
20538         * iltests.il: Add regression test for #71320.
20540 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
20542         * mini.c (mono_codegen): Fix installation of profiler hooks.
20544         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
20546 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20548         * mini.h, mini.c, cfold.c: optimize access to enum
20549         readonly fields, too. Eval conditional branches if possible
20550         to perform unreachable code removal in more cases.
20552 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
20554         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
20556         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
20557         code manager.
20559         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
20560         WinXP DEP. Fixes #71244.
20562 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
20564         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
20566 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
20568         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
20570 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
20572         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
20573         changes.
20575         * mini.h: Bump AOT version.
20577         * mini.h (MonoCompile): Change exvar to a hash table.
20579         * mini.c: Allocate a separate exvar for each handler block.
20581         * mini.c: Get rid of the computation of filter_lengths, its not needed.
20583         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
20584         ex var with the pending exception and only throw if the two are equal.
20585         Fixes #68552.
20586         
20587         * exceptions.cs: Add tests for rethrow and nested catch clauses.
20589         * mini-x86.c: Fix warnings.
20591         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
20592         used by all the ports now.
20594         * aot.c: Add write-symbols and save-temps options.
20596 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
20598         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
20600 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
20602         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
20603         operations.
20605         * tramp-s390.c: Check vtable slot belongs to the domain.
20607         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
20608         as per other platforms.
20610         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
20612 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
20614         * driver.c: we don't run the Main() code in a subthread anymore.
20616 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
20618         * mini.c: added experimental rtc support in the statistical
20619         profiler: if the user has the permission, more accurate statistics
20620         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
20621         The MONO_RTC value must be restricted to what the linux rtc allows:
20622         power of two from 64 to 8192 Hz.
20624 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
20626         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
20628 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
20630         * mini-ppc.c: better icache flush for smp.
20632 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
20634         * mini-amd64.c (emit_move_return_value): Fix memory leak.
20636         * mini-x86.c (get_call_info): Add the get_call_info () code from the
20637         amd64 port, not yet used.
20639 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
20641         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
20642         a struct type.
20644 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
20646         * driver.c: Added --security option to activate the security manager.
20647         Right now this will allow code generation for declarative demands and
20648         is disabled when AOT is specified.
20649         * mini.c: Add code generation for declarative security demands.
20650         * mini.h: Add mono_use_security_manager as an extern gboolean.
20652 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
20654         * aot.c (mono_compile_assembly): Speed up compilation a bit by
20655         emitting more dense assembly code.
20657         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
20658         exception throwing stuff.
20660 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
20662         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
20663         dead code.
20665         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
20666         left in by mistake.
20668         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
20669         fixed.
20671         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
20673         * tramp-*.c: Only patch vtable slots if the object is in the current
20674         domain. Fixes appdomain-unload.exe.
20676         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
20677         
20678         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
20679         x86 branch.
20681 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
20683         * mini.c (reverse_branch_op): New helper function.
20685         * mini.c (optimize_branches): Run the new optimization only on 
20686         platforms which support it. Also reverse all kinds of branches.
20688         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
20690         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
20691         a throw statement.
20693         * mini.c (optimize_branches): Reverse not-equals branches if the false
20694         bblock is a throw. This happens a lot of time with argument checking in
20695         corlib.
20697         * mini.c (mono_codegen): Add support for placing basic blocks after
20698         the function epilogue.
20700         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
20701         function epilogue.
20702         
20703 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
20705         * mini.c (setup_stat_profiler): Only set this up if the platform
20706         supports ITIMER_PROF.
20708 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
20710         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
20711         previous patch.
20713         * inssel.brg: Fix a warning.
20715 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
20717         * mini.c: added support for statistical profiler 
20718         (run with: --profile=default:stat).
20720 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
20722         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
20724         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
20726         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
20727         related to global registers from the amd64 port.
20729 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
20731         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
20733         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
20734         with global registers.
20735         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
20737         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
20739 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
20741         * debug-mini.c (encode_value): Fix off-by-one.
20743         * aot.c (encode_value): Likewise.
20745         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
20747 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
20749         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
20750         AOT.
20752         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
20753         
20754         * aot.c (emit_method_info): Increase size of temp buffer.
20756         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
20757         the AOT case.
20759 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
20761         * aot.c (emit_method_info): Fix build.
20762         
20763         * aot.c: Further rework of the AOT file format to reduce the size of
20764         the method info data.
20766         * mini.h: Bump AOT file format version.
20768 2004-12-27  Martin Baulig  <martin@ximian.com>
20770         * mini.c (mini_get_method): New static method; call
20771         mono_get_method_full() and mono_get_inflated_method().
20772         (mono_method_to_ir): Use mini_get_method() instead of
20773         mono_get_method_full(). 
20775 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
20777         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
20779 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
20781         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
20783         * inssel-amd64.brg: Add some optimization rules.
20785 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
20787         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
20788         standard not GC'd stuff is fine.
20790 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
20792         * aot.c: Rework the AOT file format to get rid of most of the global
20793         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
20795         * mini.h: Bump AOT file format version.
20796         
20797 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
20799         * mini.h: Bump AOT file format version.
20801         * aot.c (mono_aot_is_got_entry): New function to determine if an 
20802         address is inside a GOT.
20804         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
20806         * cpu-pentium.md: Increase the maximum size of some instructions which
20807         might involve a got access.
20808         
20809         * mini.c (get_method_from_ip): Another debug helper function.
20811         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
20812         when got var accesses are created during the decompose phase.
20814         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
20816         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
20817         argument mini_compile_method and to MonoCompile, and use this to
20818         determine whenever a given method is compiled for AOT. This allows the
20819         other methods compiled during AOT compilation to be free of AOT stuff,
20820         so the backends does not need to add special support for them by
20821         creating a fake GOT etc.
20823         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
20824         longer needed.
20826 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
20828         * mini.c (mono_method_to_ir): It turns out that some of the
20829         x-appdomain wrappers are lax with types, so just ignore this for
20830         all wrappers.
20832         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
20833         at the vtable->klass. If it is non-shared code we can just use the
20834         vtable.
20836 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
20838         * mini-ppc.c: access MonoDomain from tls, too.
20840 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
20842         * declsec.c: Removed unused variable (and related warning ;-)
20844 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
20846         * iltests.il: New test for LDELEMA on an array of ref types.
20848         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
20849         all ldelema's on reftypes.
20850         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
20851         it was the wrong place to put it.
20853         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
20854         register to pop to make this cleaner, at the request of Paolo.
20856 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
20858         * mini-ops.h (OP_GETHASHCODE): New op.
20860         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
20862         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
20863         operation.
20865         For a microbenchmark, this reduces the cost of Hashtable.get_Item
20866         by 25%.
20867         
20868         * mini-x86.c (mono_arch_output_basic_block): Rather than
20870         add ebp, 4
20872         Emit
20874         pop edx
20876         The first is 3 bytes while the second is 1. This saves 36 kb on
20877         mscorlib, quite a big saving. When bootstraping mcs, I was able to
20878         see a small boost because of icache locality.
20880         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
20882 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
20884         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
20885         started code sharing with the generic code.
20887 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
20889         * mini-ppc.c, cpu-g4.md: added code for direct access to
20890         tls data slots.
20892 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
20894         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
20895          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
20896         to OP_TLS_GET.
20898 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
20900         * declsec.c|h: Added functions to cache the declarative stack modifiers
20901         in MonoJitInfo and to create a security frame from a MonoJitInfo 
20902         structure.
20903         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
20904         created. Register internal calls for System.Security.SecurityFrame::
20905         _GetSecurityFrame and _GetSecurityStack.
20906         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
20907         the definitions for the new stack walk/callback mechanism.
20908         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
20909         first security frame for LinkDemands and InheritanceDemands) and
20910         GetSecurityStack for Demands. Both use the new mono_walk_stack code
20911         from lupus.
20912         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
20913         walk initialization (lupus).
20915 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
20917         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
20918         idiom.
20919         (handle_loaded_temps): Do not create a temporary variable for
20920         things that we know are temps. They will never be modified.
20921         (mono_spill_call): Set MONO_INST_IS_TEMP
20922         (mono_emulate_opcode): ditto
20923         (emit_tree): ditto
20924         (mono_method_to_ir.CEE_DUP): ditto
20926 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
20928         * mini.c (type_to_eval_stack_type): Make this handle the void type
20929         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
20930         (emit_tree): use ip_in_bb to special case some common idioms
20931         Update all callers to pass in the IP.
20932         (mono_method_to_ir): Make CEE_CALL* do the above as well.
20934         This gives us a nice 2% speedup in mcs bootstrap.
20936         * mini-x86.c (peephole_pass): Peephole pass to make
20937         mov  [foo], eax
20938         push [foo]
20940         into
20942         mov [foo], eax
20943         push eax
20945         * mini.c (ip_in_bb): new method.
20946         (mono_method_to_ir): use this method rather than doing the hash
20947         lookup ourselves.
20949         * linear-scan.c (mono_linear_scan): When expiring actives, you
20950         don't need to keep around variables that expire on this
20951         instruction. This makes it so that:
20952              a = b + 1
20953         will turn into:
20954              store (ebx add (ebx, 1))
20955         which will become
20956              add ebx, 1
20958 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
20960         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
20961         combination to avoid doing two copies. Fix up problems with previous
20962         patch.
20964         * mini.c: Fix 64 bit warnings.
20966         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
20968 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
20970         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
20971         changes from the x86 code.
20973         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
20975 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
20977         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
20978         throwing code to reduce its size, unify the AOT and non-aot code and 
20979         get rid of relocations in the AOT case.
20981         * mini-x86.h mini.c exceptions-x86.c 
20982         (mono_arch_get_throw_corlib_exception): New arch specific function to 
20983         raise corlib exceptions which doesn't require relocations in the 
20984         caller.
20986         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
20988 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
20990         * mini.c (mono_emit_method_call): Only allocate the got var when it is
20991         needed.
20993         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
20994         in the AOT case.
20996 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
20998         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
20999         with add function when used from Inc/dec atomic 
21000         functions. Re-enabled optimization on x86.
21001         * mini-ops.h: renamed atomic_add functions to
21002         allow _add to match the Interlocked::Add and
21003         _add_next to match Interlocked::Inc/Dec.
21005 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
21007         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
21008         linking of BBs to the end BB, and enabled SSAPRE also with
21009         consprop and copyprop (which was prevented by that bug).
21011 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
21013         * mini-x86.c: disabling the Interlocked optimizing code. 
21015 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
21017         * aot.c (load_aot_module): Move reading of got_addr after the AOT
21018         file version check.
21019         
21020 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
21022         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
21023         interlocked optimization due lack of support on x86, rewrote 
21024         exchange to take into account that base may be in eax.
21025         
21026         xsp works again; activated Interlocked optimizing code.
21027         
21028 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
21030         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
21032 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
21034         * mini-ops.h: Add new opcodes.
21036         * mini.h: Add new patch types. Add got_var to MonoCompile.
21038         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
21039         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
21040         make it work with all kinds of patchable code.
21042         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
21043         address of the GOT, and referencing entries in the GOT.
21045         * mini.c: Add code to load the GOT address if needed by an opcode.
21047         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
21048         independent AOT code on the x86 using an elf-style Global Offset Table.
21050 2004-12-14  Raja R Harinath  <rharinath@novell.com>
21052         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
21054 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21056         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
21057         when running xsp.
21059 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
21061         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
21062         of Interlocked:Increment/Decrement/Add as inline ops.
21063         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
21065 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
21067         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
21068         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
21070 2004-12-12  Duncan Mak  <duncan@ximian.com>
21072         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
21073         again. `patch_info->table_size' is no longer valid after Zoltan's
21074         commit #37636.
21076 2004-12-12  Martin Baulig  <martin@ximian.com>
21078         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
21079         if we are the "real" method, ie. not an inlined method inside it.
21081 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
21083         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
21084         before we look in the special fields table. This fixes
21085         ../tests/thread-static-init.cs.
21087 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21089         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
21090         for Array get_Rank and get_Length. Fixes bug #70465.
21092 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
21094         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
21095         separate structure to reduce the size of MonoJumpInfo.
21097 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
21099         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
21101 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
21103         * mini.c (mini_get_inst_for_method): Changed to allow ports
21104         to return a MonoInst instead of opcode 
21105         (renamed mini_get_opcode_for_method to better reflect the new functionality)
21106         
21107         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
21108         Allow ports to return a created MonoInst instead of op-code, will enable
21109         new optimizations.
21110         (renamed mini_get_opcode_for_method to better reflected the functionality)
21112 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
21114         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
21116 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
21118         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
21119         Fixes #69985.
21121 2004-12-08  Martin Baulig  <martin@ximian.com>
21123         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
21124         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
21126 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
21128         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
21129         correctly.
21131         * exceptions.cs: Disable some tests which depend on properties of x86 fp
21132         arithmetic.
21134 2004-12-08  Raja R Harinath  <rharinath@novell.com>
21136         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
21138 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
21140         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
21141         bug introduced by the previous patch.
21143 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
21145         * mini-ppc.c, objectc.cs: handle large structs passed by value
21146         (fixes bug #69972).
21148 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
21150         * mini-ppc.c: OP_ARGLIST implementation from
21151         Geoff Norton  <gnorton@customerdna.com>.
21153 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
21155         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
21156         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
21158 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
21160         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
21162 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21164         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
21165         support.
21167 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
21169         * mini-sparc.c: Zero out localled-ed memory.
21171         * iltests.il: Add tests for zeroing out localloc-ed memory.
21173 2004-12-04  Martin Baulig  <martin@ximian.com>
21175         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
21176         mono_method_get_signature_full().       
21178 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
21180         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
21181         and some utility functions (always for SSAPRE), integrated SSAPRE.
21182         * mini.h: Likewise.
21183         * driver.c: Added ssapre option.
21184         * ssa.c: Small fix on OP_ARG handling.
21185         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
21186         * Makefile.am: Likewise.
21188 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
21190         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
21191         now in the xp code.
21193         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
21194         icall.
21196 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21198         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
21199         
21200         * cpu-s390.md : Increase instruction length of oparglist.
21202         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
21204 2004-11-30  Martin Baulig  <martin@ximian.com>
21206         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
21207         virtual generic methods.  We call a special helper_compile_generic_method()
21208         icall to retrieve the method from the vtable, inflate and compile
21209         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
21211         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
21213 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
21215         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
21217 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
21219         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
21220         Fixes #69929.
21222 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
21224         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
21225         platforms with PIC aot.
21227 2004-11-28  Martin Baulig  <martin@ximian.com>
21229         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
21230         Fixes gen-112.cs.
21232 2004-11-28  Martin Baulig  <martin@ximian.com>
21234         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
21235         the result of mono_type_get_underlying_type() to check whether
21236         we're byref.
21238 2004-11-26  Martin Baulig  <martin@ximian.com>
21240         * mini.c
21241         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
21242         in the g_assert().
21244 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
21246         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
21247         the same way as the other arguments so they won't get clobbered.
21249         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
21250         calls through R11 since it is clobbered by the trampoline code.
21252 2004-11-26  Raja R Harinath  <rharinath@novell.com>
21254         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
21255         pick up in-tree mscorlib.dll.
21257 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
21259         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
21261         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
21262         runtime data/code are now stored in a table similar to the GOT in ELF. 
21263         This allows the code itself to be position independent.
21265         * aot.c: Fix loading of referenced assemblies after the lazy assembly
21266         loading changes.
21268         * aot.c: Attach ELF type (object/function) directives to all global
21269         symbols.
21271         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
21273         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
21275         * mini-amd64.h: Turn on PIC AOT code.
21277         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
21278         returning the offset within an OP_AOTCONST instruction where the GOT
21279         offset needs to be added.
21281         * mini.h: Bump AOT file format version.
21283 2004-11-25  Martin Baulig  <martin@ximian.com>
21285         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
21286         uninflated generic methods.
21288 2004-11-25  Martin Baulig  <martin@ximian.com>
21290         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
21292 2004-11-24  Martin Baulig  <martin@ximian.com>
21294         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
21295         original klass (this only applies for generic instances).
21297 2004-11-24  Martin Baulig  <martin@ximian.com>
21299         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
21300         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
21301         that array).
21303 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
21305         * mini.c (mono_method_to_ir): Disable inlining for methods containing
21306         localloc. Fixes #69678.
21308         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
21309         
21310 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
21312         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
21313         used SSE registers on pinvoke calls. Fixes #69774.
21315 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
21317         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
21318         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
21320 2004-11-23  Raja R Harinath  <rharinath@novell.com>
21322         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
21323         Refer directly to the mcs/ tree.
21325 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21327         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
21328         Check if a trampoline for a synchronized method is required. 
21330 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
21332         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
21333         with localloc if needed. Throe arithmetric exception in
21334         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
21335         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
21337 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
21339         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
21340         types before switching on type.  Fixes #69622.
21342 2004-11-19  Raja R Harinath  <rharinath@novell.com>
21344         * Makefile.am (check-local): New.  Integrate into 'make check'.
21345         (MCS,RUNTIME): Define using in-tree mono and mcs.
21346         (ILASM): New.
21347         (%.exe): Use $(ILASM).
21349 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
21351         * mini-ppc.c: adjust initial prolog size (bug #69691).
21353 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
21355         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
21356         #69664.
21358 2004-11-17  Raja R Harinath  <rharinath@novell.com>
21360         * Makefile.am (clean-local): Rename from 'clean'.
21362 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21364         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
21365         to mono_arch_is_int_overflow. 
21366         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
21367         SIGFPE events.
21369 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
21371         * declsec.c|h: New files to support declarative security attributes.
21372         Added function to check if a method has (applicable) security.
21373         * mini.c|h: Add check for declarative security attributes in
21374         mono_method_check_inlining.
21375         * Makefile.am: Added declsec.c and declsec.h to the build.
21377 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
21379         * mini.c, mini.h: update to keep dynamic code info per-domain.
21381 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
21383         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
21384         (mini_init): Get rid of it from here too.
21386 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
21388         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
21389         implemented OP_RETHROW (patch by Geoff Norton
21390         <gnorton@customerdna.com>).
21392 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
21394         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
21395         between appdomains.  Fixes appdomain-unload on PPC.
21397 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
21399         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21400         mini-exceptions.c: handle the new wrapper types.
21401         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
21402         token value as a MonoClass* when compiling a wrapper.
21403         mono_jit_create_remoting_trampoline now takes an additional
21404         MonoRemotingTarget parameter.
21405         
21406 2004-11-10  Martin Baulig  <martin@localhost>
21408         * mini.c (mono_method_to_ir): Use `generic_container->context'
21409         rather than creating a new one.
21411 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21413         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
21415         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
21417 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
21419         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
21420         the experimental aot cache stuff.
21422 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
21424         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21425         mini-exceptions.c: update to exception clause structure changes.
21427 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
21429         * exceptions-x86.c (throw_exception): Fix warnings.
21431         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
21432         for OP_RETHROW.
21434 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
21436         * exceptions-sparc.c (get_throw_exception): Really fix this.
21438 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
21440         * tramp-*.c: we no longer support icalls without wrappers, so
21441         a bit of code can be removed here
21443 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
21445         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
21446         patch.
21448         * cpu-sparc.md: Add op_rethrow.
21450         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
21452         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
21454         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
21455         * mini-ops.h: Add OP_RETHROW.
21457         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
21459         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
21461 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
21462         
21463         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
21464         Makes the output much easier to read
21466 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
21468         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
21469         prevents another huge leak when compiling with ssa. Secondly, the
21470         performance of doing this rather than freeing the lists is much
21471         better. GList does a lock every time you allocate a list link,
21472         so that it can use a memory pool. So, it is better to just use
21473         a memory pool of our own.
21474         
21475         * ssa.c, linear-scan.c: replace g_list_remove_link with
21476         g_list_delete.  The remove one does not free the GList, so we were
21477         leaking memory. On -O=all --compile-all with corlib, this cut down
21478         3 MB of allocations.
21480 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
21482         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
21484         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
21486         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
21487         into a new function mono_create_jit_trampoline ().
21489 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
21491         * trace.c (get_spec): Allow tracing of classes without a namespace.
21493 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
21495         * mini.c: Fix pointer overwrite in mini_method_compile.
21497 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
21499         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
21500         The darwin ABI needs some special handling for 1 and 2 byte structs
21501         Lets use lbz/lhz instead of lwz everywhere.
21502         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
21503         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
21504         Use stb/sth for the former, and put the latter always on stack instead of in
21505         argument registers.
21507 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
21509         * trace.c (is_filenamechar): Add '_'.
21511 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
21513         * mini-s390.c: Fix prolog length to allow for large trace requirements.
21515         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
21517 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
21519         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
21520         depends on libmonogc. Fixes #68805.
21522 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
21524         * mini.c (mono_jit_free_method): Provide extra information for
21525         this error.  Currently this leaks, but will be turned into a
21526         developer option in the future.
21528 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
21530         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
21532 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
21534         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
21535         boundary. Fixes reading of PATCH_INFO_R4 and R8.
21536         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
21538 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
21540         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
21541         trampolines for AOT code.
21543 2004-10-22    <vargaz@freemail.hu>
21545         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
21546         constructed types. Fixes #68136.
21548 2004-10-21  Martin Baulig  <martin@ximian.com>
21550         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
21551         if it returns true, unwind the stack to the call instruction.
21553 2004-10-21    <vargaz@freemail.hu>
21555         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
21557         * mini.h: Bump AOT version number.
21559         * objects.cs: Add another test for unbox trampolines.
21561         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
21562         valuetype methods.
21564 2004-10-20    <vargaz@freemail.hu>
21566         * driver.c: Add SHARED to the set of optimizations tested.
21568         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
21570         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
21571         used by CEE_NEWARR.
21573         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
21575 2004-10-20  Martin Baulig  <martin@ximian.com>
21577         * mini-exceptions.c (mono_handle_exception): Call
21578         mono_debugger_handle_exception() to tell the debugger about
21579         catch/finally clauses.
21581 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
21583         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
21585         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
21586         #68447.
21588 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
21590         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
21591         methods as their native size, fixed bug #57543, #57545.
21592         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
21593         This saves a temporary register and mullw call down into 1 (minor perf
21594         increase for cases like sum = sum * 5;  This use to translate into:
21595             li r11,5
21596             mullw r28,r28,r11
21597         It now translates to
21598             mulli r28,r28,5
21600 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
21602         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
21603         #68388.
21605 2004-10-11  Martin Baulig  <martin@ximian.com>
21607         * mini.c (mono_method_to_ir): If we're a generic method, get the
21608         MonoGenericContainer from our MonoMethodNormal and create a
21609         MonoGenericContext from it.
21611 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
21613         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
21615         * basic-long.cs: Add test for checked i8->i2 cast.
21617 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21619         * inssel-ppc.brg: added a couple of speedup rules.
21621 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
21623         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
21624         to speed up rebuilds.
21626 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21628         * mini-s390.c: Minor fix to OP_OR_IMM.
21630 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
21632         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
21633         better. Fixes appdomain-unload.exe on sparc.
21635 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
21637         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
21638         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
21639         see bug 67324.
21641 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
21643         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
21645 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
21647         * mini.c: Always generate a field read/write wrapper for members
21648         of the class MarshalByRefObject since the actual instance could
21649         be a CBO.
21651 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
21653         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
21655 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
21657         * driver.c mini.h trace.c: Move the setting of the main assembly into
21658         a separate function called mono_trace_set_assembly () and call it after
21659         actually loading the main assembly. Fixes #66872.
21661 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
21663         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
21664         using the code manager.
21666 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
21668         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
21670 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
21672         * cpu-amd64.md: Fix bug in previous patch.
21673         
21674         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
21675         #66650.
21677 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
21679         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21680         mini-exceptions.c: updates for changed stack walk interface.
21682 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21684         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
21686 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
21688         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
21690 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
21692         * driver.c (mini_regression_list): Do not call mono_assembly_close 
21693         since assemblies can't be unloaded.
21694         
21695 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
21697         * cpu-amd64.md: Fix more instruction lengths.
21699         * cpu-amd64.md: Fix lengths of some instructions.
21701 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
21703         * inssel.brg: Make the array ldelema check aot friendly.
21705 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
21707         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
21709         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
21711 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
21713         * mini-x86.c: Fix build.
21715         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
21716         mono_type_get_underlying_type () helper function to simplify code.
21717         
21718 2004-09-09  Martin Baulig  <martin@ximian.com>
21720         * mini-amd64.c: Don't access `type->data.klass' directly, call
21721         mono_class_from_mono_type() instead since the type may be a
21722         generic instance.
21724 2004-09-09  Martin Baulig  <martin@ximian.com>
21726         * mini-amd64.c (get_call_info): Fix support for generic instances.
21727         (add_valuetype): Use mono_class_from_mono_type() to get the class
21728         since we can be a generic instance.
21730 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
21732         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
21734 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
21736         * liveness.c: reset spill costs on each scan: bug 62107
21738 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
21740         * exceptions-sparc.c (mono_arch_find_jit_info): remove
21741         unnecessary line that doesn't compile
21743 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
21745         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
21746         trampolines, make them call an error function so people can fix their
21747         code.
21749 2004-09-06  Martin Baulig  <martin@ximian.com>
21751         * mini.c (mono_method_to_ir): When initializing locals, handle a
21752         generic instances like a valuetype if it's a valuetype and like a
21753         class if it's a class.
21755 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
21757         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
21758         stack. Fixes #64674.
21760         * exceptions.cs: Add test for unwinding of call arguments.
21762 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
21764         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
21765         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
21766         set the carry/borrow flag). The sparc and s390 implementations
21767         can now use optimized versions (and simplify the code). ppc bugfixes.
21769 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
21771         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
21773 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
21775         * inssel-amd64.brg: Remove leftover 32 bit rule.
21777         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
21779 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
21781         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
21782         mono_arch_find_jit_info functions into a new function. Fix a memory
21783         leak.
21785         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
21786         refactored code.
21787         
21788 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
21790         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
21791         as well.
21792         
21793         * exceptions.cs: Add array size tests.
21795         * mini.c: Allocate a separate icall wrapper for each arity of 
21796         mono_array_new_va. Fixes #59509.
21798         * exceptions.cs: Add testcase for 64578.
21800         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
21802         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
21803         
21804 2004-09-02  Martin Baulig  <martin@ximian.com>
21806         * mini.c (mono_method_to_ir): When initializing the locals, call
21807         handle_initobj() on the generic instance itself, not its
21808         underlying type.
21810 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
21812         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
21813         MonoJitInfo for dynamic methods.
21815         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
21817         * mini.c: Add support for freeing JIT data for dynamic methods.
21818         
21819 2004-09-01  Martin Baulig  <martin@ximian.com>
21821         * mini-x86.c (is_regsize_var): Added support for generic
21822         instances.
21823         (mono_arch_emit_prolog): Make this compile again, use
21824         `x86_push_imm_template (code)'.
21826 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
21828         * mini-x86.c: make all push_imm instructions that get
21829         patched always emit the long form
21831 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
21833         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
21834         in a per-domain hash.
21836         * mini-amd64.c (merge_argument_class_from_type): Handle generic
21837         types.
21839 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
21841         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
21842         work.
21843         
21844         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
21845         work.
21847         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
21848         Beginnings of SSE2 support.
21850         * exceptions.cs: Add more tests for checked int<->uint casts.
21852 2004-08-28  Martin Baulig  <martin@ximian.com>
21854         * mini-x86.c (mono_arch_instrument_epilog): Added support for
21855         generic instances.
21857         * mini.c
21858         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
21859         Handle generic instances recursively.
21861 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21863         * iltests.il: test for conv.u8 on a constant
21865 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21867         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
21868         LCONV_x4 (shrun_32 (membase)).
21870 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21872         * inssel-x86.brg: c&p rules for push/setret of long
21874 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
21876         * inssel-x86.brg: c&p rules for compare (base, regvar) and
21877         compare (regvar, base)
21879         * inssel-x86.brg: more burg love
21881         * inssel.brg: more cleanup
21883         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
21885 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
21887         * basic-long.cs, basic-calls.cs: new tests for optimization.
21889 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
21891         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
21892         patch.
21894 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
21896         * mini-amd64.c (read_tls_offset_from_method): Add another case.
21897         
21898 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
21900         * inssel.brg (mini_emit_memcpy): use 
21901         NO_UNALIGNED_ACCESS to disable memcpy optimization
21903 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
21905         * mini-amd64.c: Handle generic types in various places.
21907         * mini.c (mono_method_to_ir): Handle generic types in init locals.
21909 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
21911         * mini.c (handle_box): Fix warning.
21913         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
21915         * mini-amd64.h: Enable the emit_state optimization.
21917         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
21919         * mini-amd64.c: Add some new 64 bit peephole opts.
21921         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
21923         * cpu-amd64.md: sreg1 of div instructions must be %rax.
21925         * mini-amd64.c: Register allocator fixes.
21927         * mini.c: Add an optimization to emit_state to avoid allocation of new
21928         registers on some platforms.
21930 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
21932         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
21934         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
21935         allocation. Fixes #63085.
21937         * basic-long.cs: Add new regression test.
21939         * mini-amd64.c: Register allocator improvements.
21941 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
21943         * mini-amd64.c (read_tls_offset_from_method): Add another code
21944         sequence.
21946         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
21947         instruction sequence for nullifying class init trampolines.
21949         * objects.cs: Add new regalloc test.
21951         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
21953 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
21955         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
21956         
21957         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
21958         arguments.
21960         * driver.c: Fix profiling after TLS changes.
21961         
21962         * driver.c (mono_main): Set mono_stats.enabled if needed.
21964         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
21965         CEE_BOX.
21967 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
21969         * mini-x86.c: use a 1 op rather than a 2 op tls access
21970         instruction -> faster.
21972 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
21974         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
21975         x86 backend.
21977 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
21979         * exceptions-sparc.c (throw_exception): fix typo
21981 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
21983         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
21984         set tree->dreg correctly with tls. Allow any
21985         register to be used.
21987         * mini-x86.c (read_tls_offset_from_method): add new code
21988         generation pattern seen with GCC.
21991 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
21993         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
21994         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21995         exceptions-sparc.c: fix some performance issues in exception
21996         handling and setting of the stack trace for exceptions that were
21997         already thrown.
21999 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
22001         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
22002         x86 backend.
22003         
22004         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
22005         registers.
22007 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
22009         This patch inlines tls access, when possible.
22010         
22011         * mini.h: new arch functions for TLS intrinsics.
22012         All platforms updated with a stub.
22014         * mini.c: use the new intrinsics
22016         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
22017         arch specific intrinsic for tls variables
22019 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
22021         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
22022         under windows.
22024 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22026         * mini.c: thread local allocation
22028 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
22030         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
22032         * Makefile.am: Link against the static version of libmonogc.
22033         
22034         * Makefile.am: Link the static versions of the convenience libraries
22035         into the mono executable.
22037         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
22039 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
22041         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
22042         on integer overflow.
22044         * mini-amd64.c: Reorganize function call code.
22046         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
22048 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
22050         * inssel-x86.brg: use xor eax,eax.
22051         
22052         * basic.cs: new tests
22054 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
22056         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
22057         in exception throwing code.
22058         
22059 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
22061         * inssel-x86.brg: use xor esi,esi.
22063 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
22065         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
22066         can trace methods compiled during mini_init () too.
22068         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
22069         CEE_CONV_U4.
22071 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
22073         * Makefile.am: static link on x86 (r=zoltan)
22075 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
22077         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
22078         code since it causes some programs to fail.
22080 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
22082         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
22084 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
22086         * mini.c: ovfops_op_map - add STACK_OBJ case for
22087         CONV_I 
22088         * basic.cs: add test_0_pin_string as test
22089         case for above.
22091 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
22093         * Makefile.am: build C# if srcdir != builddir
22095 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
22097         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
22098         fall-through blocks.
22100 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22102         * driver.c: enable loop by default again and include abcrem in -O=all.
22104 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
22106         * iltests.il: Add some localloc tests.
22108         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
22110         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
22111         Fixes #62574.
22113         * inssel-amd64.brg: Add some optimizations.
22115         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
22116         for gcc-3.4.
22118         * Makefile.am: Statically link mono against libmono on AMD64.
22119         
22120         * mini-amd64.c inssel-amd64.brg: Optimizations.
22122 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
22124         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
22126         * tramp-amd64.c: Patch calling code in trampolines.
22128 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
22130         * mini-amd64.c: pinvoke struct passing fixes.
22132 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
22134         * mini-sparc.c: redo change, make mono_arch_cpu_init call
22135         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
22137 2004-08-05  Duncan Mak  <duncan@ximian.com>
22139         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
22140         CEE_LDELEM_ANY.
22142 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
22144         * mini-amd64.c (emit_move_return_value): Move return value for normal
22145         calls too.
22147 2004-08-05  Martin Baulig  <martin@ximian.com>
22149         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
22150         `type->type'; just modify `type' itself when dealing with enums
22151         and generic instances.
22152         (check_call_signature): Make `simple_type' a `MonoType *'.
22154 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
22156         * mini.c: Use OP_PADD to add offsets to addresses.
22158         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
22160 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
22162         * mini-sparc.c (mono_arch_emit_epilog): fix check
22163         for folding last op into restore instruction
22165 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
22167         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
22168         helper methods using the code manager.
22169         
22170         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
22172         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
22174 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
22175         
22176         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
22177           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
22179         * mini-s390.c: fix tail processing
22181 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
22183         * mini-ppc.c: mul.ovf.un exception name fix.
22185 2004-08-03  Martin Baulig  <martin@ximian.com>
22187         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
22188         instances; before jumping to `handle_enum', also modify `ptype'.
22190 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
22192         * cpu-sparc.md: fcall maximal length too small.
22194 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
22196         * mini-amd64.c mini.h: Add initial support for passing/returning 
22197         structures to/from pinvoked methods.
22199 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
22201         * mini-ppc.c: reg allocator fix.
22203 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
22205         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
22207         * inssel.brg: Optimize memset on 64 bit machines.
22209         * mini-amd64.c: Fix some vararg cases.
22211 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
22213         * mini-s390.c: Corrected macro in emit_float_to_int
22215         * s390-abi.cs: Tests to exercise the s390 ABI
22217 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
22219         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
22220         caller saved regs.
22222         * basic.cs: Add a test for add.ovf.un.
22224 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
22226         * mini-sparc.c: add case for OP_IDIV_UN
22228 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
22230         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
22231         
22232         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
22234 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
22236         * basic.cs: regression tests.
22238         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
22239         regressions.
22241 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
22243         * basic.cs: Add a new test.
22245         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
22246         and AOT. Various fixes and optimizations.
22248         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
22250 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22252         * mini-ppc.c: make sure temp regs are not used for global reg
22253         allocation.
22255 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
22257         * cpu-sparc.md: conv_i8 fix for 64bits
22259         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
22261 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
22262         
22263         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
22264         add opcode for cmp BYTE PTR [eax], imm.
22266         * inssel.brg: Make memcpy and memset takes bases.
22268 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
22270         * *-amd64.*: More AMD64 work.
22271         
22272 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
22274         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
22275         add a compare-not-equal opcode.
22276         
22277 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
22279         * mini.c: Use mono_init_from_assembly instead of mono_init.
22280         
22281 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
22283         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
22285         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
22287         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
22289         * inssel.brg: 64 bit fixes.
22291         * mini.h (MonoCallInst): Add some AMD64 specific data.
22293         * mini.h: Add some OP_P opcodes.
22295 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
22297         * basic.cs: tests for 61797 and 61740
22299 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
22301         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
22302         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
22304 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
22306         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
22308         * *-amd64*.*: Ongoing AMD64 work.
22310 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
22312         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
22314         * *-amd64*: Ongoing AMD64 work.
22316         * mini-arch.h: Add AMD64 support.
22318         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
22320         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
22322         * mini-ops.h: Add new opcodes.
22324         * Makefile.am: Add AMD64 support.
22326         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
22327         rules into the inssel-long*.brg files.
22329         * *-amd64.*: Add beginnings of AMD64 backend.
22331 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
22333         * mini.c (print_dfn): commenting out the code that prints
22334         the cil. With -O=deadce, this makes -v -v crash.
22335         
22336         * cpu-pentium.md: make checkthis have a length of 2
22338 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
22340         * mini-sparc.h: fix implementations of __builtin
22341         functions for Sun compiler for V9.
22343 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
22345         * mini.c: use the new stelem.ref wrapper
22346         * exceptions.cs, arrays.cs: new stelem.ref tests
22348 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
22350         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
22351         new XSP should work with these changes).
22353 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
22354         
22355         * inssel-{long32,x86,}.brg: trivial optimizations.
22356         
22357 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
22359         * mini.c: load value when emitting box operation in
22360         constrained calls.
22362 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
22364         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
22365         is one byte shorter than cmp DWORD PTR [eax], 0.
22367 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
22369         * inssel-ppc.brg: arguments on the stack are always
22370         relative to the stack pointer (spotted by Neale Ferguson).
22372 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22374         * exceptions-x86.c: delay appending the method name to the trace until
22375         after mono_jit_info_table_find is called, as this gets the real
22376         MonoMethod.
22378 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
22380         * aot.c: register roots
22382 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
22384         * aot.c : I could just use PLATFORM_WIN32 flag.
22386 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
22388         * aot.c : Reverting the previous fix. This time it broke linux build.
22390 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
22392         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
22394 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
22396         * mini.c (handle_stack_args): Remove some more debugging code.
22397         
22398         * mini.c (handle_stack_args): Remove debug output left in by mistake.
22400         * driver.c mini.h aot.c: Allow additional options to be specified with
22401         --aot and pass them to mono_compile_assembly.
22403         * aot.c: Add experimental code to AOT compile all loaded assemblies
22404         on demand and save the code into a cache in the filesystem.
22406         * aot.c: Add support for more wrapper methods.
22407         
22408         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
22409         58863.
22411         * cpu-*.md: Remove removed opcodes.
22413         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
22414         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
22415         related icalls to marshal.c.
22417 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
22419         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
22421         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
22423         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
22425 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
22426         * liveness.c: If liveness is recomputated we need to reset the information
22427         for each variable. This way, if the liveness range has been narrowed
22428         by optimizations that happened after the last computation, we can return
22429         a smaller range.
22430         
22431         For example, if you have
22432         
22433         {
22434                 int i = 0;
22435                 
22436                 // Tons of code that does not affect i
22437                 
22438                 i = foo ();
22439                 ...
22440         }
22441         
22442         i = 0 is dead code and will be removed by SSA. However, when
22443         linear scan gets to the code, i will still appear to be live
22444         throughout the entire block. This prevents good register allocation.
22446 2004-07-06  Martin Baulig  <martin@ximian.com>
22448         * debug-mini.c (mono_debug_init_method): Allow
22449         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
22450         (mono_debug_add_icall_wrapper): New method.
22452         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
22454 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
22456         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
22457         optimization.
22459 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
22461         * aot.c (mono_aot_load_method): Fix loading of debug info.
22463 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
22465         * aot.c: Add logging support.
22467 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
22469         * mini.h: Add prototype for mono_print_method_from_ip.
22471         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
22473         * inssel.brg: 64 bit fixes.
22475         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
22476         inssel-long32.brg.
22478         * Makefile.am: Add SPARC64 support.
22480 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
22482         * aot.c: Fix alignment problems on 32 bit platforms.
22484 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
22486         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
22487         SPARC64.
22489         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
22490         problems.
22492         * mini.h: Bump AOT file version. Some 64 bit fixes.
22494 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
22496         * inssel-sparc.brg: Add new rule to avoid register moves.
22498         * inssel.brg: Add ldind_to_load_membase helper function.
22500 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
22502         * mini.c: OffsetToStringData intrinsic.
22503         
22504 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
22506         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
22508         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
22509         regression tests.
22511         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
22512 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
22514         * mini.c: reinstated mono_compile_get_interface_var()
22515         on x86, too, since the change breaks the Gtk# build there as well.
22517 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22519         * driver.c: remove loop from the default optimizations: it seems to
22520         interact badly with some of the other options (see bug #60613).
22522 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
22524         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
22525         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
22527 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
22529         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
22530         vararg-using methods.
22532 2004-06-21  Martin Baulig  <martin@ximian.com>
22534         * mini/mini-exceptions.c
22535         (mono_handle_exception): Added `gpointer original_ip' argument.
22536         After calling mono_unhandled_exception(), call
22537         mono_debugger_unhandled_exception() and if that returns true,
22538         restore the context and return.
22540 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
22542         * mini-ppc.c: prefer the use of relative branches so
22543         they won't need to be patched in aot code (patch from Patrick Beard).
22545 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
22547         * aot.c: patch from Patrick Beard to make the output assembly
22548         more correct for the MacOSX assembler. Small tweak to
22549         generate sane images on Linux/PPC, too.
22551 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22553         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
22554         case until bug #59509 is fixed (shows up in #60332).
22556 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22558         * mini.c: make sure the needed wrappers are compiled, too, with
22559         precomp.
22561 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
22563         * driver.c: remove NPTL reference in --version output.
22565 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22567         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
22568         generate valid assembly for the Mach-O assembler.
22570 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
22572         * driver.c: don't include abcrem in the all optimization specifier
22573         since it slows down jit compilation too much for now.
22575 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
22577         * mini.c: use BIGMUL only if both operands have the same signage.
22578         * iltests.il: Test for bug 60056. (errors related to signage in
22579         BIGMUL).
22581         r=lupus.
22583 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
22585         * mini.c, aot.c: memory leak fixes.
22587 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22589         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
22591 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
22593         * Makefile.am: remove the -static hack completely, it links in
22594         statically glib as well.
22596 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
22598         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
22599         * exceptions.cs: make it compile with new mcs/csc.
22601 2004-06-03 Massimiliano Mantione <massi@ximian.com>
22602         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
22603         and added relevant test case.
22605 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
22607         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
22608         regressions in gtk-sharp.
22610 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
22612         * exceptions.cs: New regression tests.
22614         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
22616 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
22618         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
22620 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
22622         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
22624         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
22626 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
22628         * mini.c (mono_jit_runtime_invoke): Init class in this
22629         method instead of trusting mono_jit_compile_method to
22630         do the work (because wrappers can be in object class)
22632 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
22634         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
22636         * basic-long.cs: New regression test.
22638 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
22640         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
22641         and div/rem checks.
22643 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
22645         * Makefile.am: fix miguel's change to build mono statically against
22646         libmono (track build dependencies).
22648 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
22650         * cfold.c: Some glib versions do not have G_MININT32.
22652 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
22654         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
22655         with precision of tan, atan, sin and cos, and implemented related
22656         regressions tests (fixes bug 54467, but one new problem appeared and
22657         is not fixed yet).
22659 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
22661         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
22663         * exceptions.cs: Add test for constant folding && division by zero.
22665         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
22666         since driver.c is in libmono too, so the optimization was useless.
22668         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
22669         variable to driver.c so the compiler can emit more efficient code to
22670         access them.
22672 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22674         * Makefile.am: don't distribute generated inssel.[ch] files.
22676 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
22678         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
22679         into the default appdomain. Fixes #58707.
22681         * jit-icalls.c: Remove the broken approximation for truncl, doing
22682         no conversion is better.
22684         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
22685         Fixes #58863.
22687 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
22689         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
22690         of the mcrxr instruction which is not available on some processors
22691         even if it's documented to be. Implement add and sub overflow correctly
22692         (still not complete for long unsigned). Speed up icalls a bit.
22694 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
22696         * mini.c (mono_jit_compile_method_with_opt): Make sure that
22697         we run .cctor in the current domain instead of target_domain.
22698         
22699         Fixes bug #58558, .cctor not being called in -O=shared.
22701 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22703         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
22705 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
22707         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
22708         which can be done with an imm8, do it that way.
22709         (mono_arch_output_basic_block): ditto for a jmp
22710         (mono_arch_emit_prolog): Computate maximum offset of a label.
22712 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
22714         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
22715         now tries to allocate prefered physical reg's for virtual
22716         regs. This reduces the number of emited spills/loads with
22717         20-30% on our core assemblies.
22719 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22721         * jit-icalls.c: truncl() is not needed and trunc() is
22722         the correct thing to do anyway (bug #58287).
22724 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
22726         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
22727         if available.
22729 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
22731         * driver.c: enable loop optimizations by default.
22733 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
22735         * mini-x86.c: fix calc of max loop size when aligning loops start.
22737 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
22739         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
22740         the stack.
22742 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
22744         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
22745         should set carry.
22747         * basic-long.cs: Add tests for add/subtract of immediates with carry.
22749         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
22750         
22751         * mini.c (inline_method): Allways inline some wrappers even if the cost
22752         is too large. Fixes #58785.
22754         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
22755         
22756 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
22758         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
22759         (crichton@gimp.org). Beginning of support for sparc/linux.
22761         * mini-sparc.c: Optimize retrieval of LMF address.
22763 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
22765         * exceptions-ppc.c:  handle alloca in methods with clauses.
22767 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
22769         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
22771 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
22773         * mini.c: Delegate most of the abort signal work to 
22774           mono_thread_request_interruption, which also handles Stop and Suspend
22775           states.
22777 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
22779         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
22780         supports the save/restore lmf opcodes.
22782 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
22784         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
22785         by gcc-3.4 as well.
22787         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
22789 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
22791         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
22792         methods which contain array accesses.
22794         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
22795         boundaries. Fixes #58537.
22797         * iltests.il: Add regression test for #58537.
22799 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
22801         * mini-x86.c (mono_arch_local_regalloc): Last part of
22802         fix for bug #58633 (releasing register to early).
22804 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
22806         * basic-long.cs: Add new regression test.
22808 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
22810         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
22811         register too early on the chain.
22813 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
22815         * mini.c (create_helper_signature): Use a helper function to reduce
22816         the code which needs to be written. Also set the calling convention of
22817         icalls on windows. Fixes #57840.
22819 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
22821         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
22822         exceptions-ppc.c: added helper function to get the instruction address
22823         from a signal handler context.
22825 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22827         * helpers.c: use g_get_tmp_dir. Invokes happyness 
22828         from gonzalo.
22830 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22832         * helpers.c: Add new env variable to pass args to objdump.
22833         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
22835 2004-05-17  Radek Doulik  <rodo@ximian.com>
22837         * Makefile.am (common_sources): added abcremoval.h so it get
22838         disted and daily mono packages on go-mono.com will build again
22840 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
22842         * abcremoval.c: Fixed coding style, added copyright header.
22844         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
22846         * mini.h: Added prototype for abc removal main function.
22848         * build_relations_propagation_table.pl: Added copyright header.
22850 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
22852         * basic-long.cs: reg test for complex ceq_long bug.
22854 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
22856         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
22857         reg in long and clob case (bug #58343). Fixed/added comments.
22859 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
22861         * mini.c (mono_jit_runtime_invoke): Follow new convention
22862         of calling the invoke method with an function pointer.
22864 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
22866         * ChangeLog: Fix author of memory leak patch.
22868 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
22870         * Makefile.am: fix make dist as well...
22873 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
22875         * cfold.c: Made so that conversions from pointer to int4 are no-ops
22876         on archs where pointers are 4 bytes long.
22878         * Makefile.am: Added abcremoval.c source file.
22880         * abcremoval.c: Added abcremoval.c.
22882         * abcremoval.h: Added abcremoval.h.
22884         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
22886         * inssel.brg: Enabled bounds check removal.
22888         * mini.c: Added support for abcrem optimization.
22890         * mini.h: Added abcrem optimization label.
22892         * driver.c: Added support for abcrem optimization.
22894         * propagated_relations_table.def: Added propagated_relations_table.def.
22896 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
22898         * mini.c, cfold.c: fix style.
22900 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22902         * mini.c: handle issue with the low-level implementation of
22903         some long opcodes (bug #54209).
22905 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
22907         * basic.cs: test for my new cmov stuff.
22909 2004-05-13      Patrik Torstensson
22911         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
22912         opt and added peephole documentation.
22914 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
22916         * tramp-ppc.c: rewrote the generic trampoline code.
22918 2004-05-11      Patrik Torstensson
22920         * mini-x86.c: optimize long shl/shr asm code (one less branch)
22922 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
22924         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
22926         * mini.h mini.c dominators.c: Applied patch from Derek Woo
22927         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
22929         * mini.c: Add new icalls for AsAny marshalling.
22931 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
22933         * tramp-ppc.c, mini-ppc.c: more cleanups.
22935 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22937         * mini.c: no warnings.
22939 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22941         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
22943 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
22945         * mini.c: In the thread abort signal handler, if the thread is in the
22946         process of being stoped, don't throw the Abort exception, just stop the
22947         thread.
22949 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
22951         * tramp-ppc.c: removed old code.
22953 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22955         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
22956         do some simple speed optimizations on ppc.
22958 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
22960         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
22961         and large offsets in load/store.
22963 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
22965         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
22966         it causes regressions.
22968 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
22970         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
22971         support.
22973 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22975         * jit-icalls.c: remove warnings.
22976         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
22977         speedups for unsafe code.
22979 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
22981         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
22983 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
22985         * basic-calls.cs: Add new regression test.
22987         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
22988         more portable.
22990         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
22992         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
22993         is no longer used.
22995 2004-05-06      Patrik Torstensson
22997         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
22998         long reg allocation in any reg (not only eax:edx) and implemented 
22999         long shl/shr ops in asm instead of helpers.
23001 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
23003         * mini-sparc.h: Fix warnings.
23005         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
23006         stack.
23008         * mini-exceptions.c (mono_handle_exception): Call the filter in a
23009         separate statement for clarity.
23011         * mini-sparc.c: Update status.
23013 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
23015         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
23016         here.
23018 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
23020         * inssel-ppc.brg: another small pre-release workaround:
23021         we don't do overflow detection for long_sub_un.
23023 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23025         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
23026         (also works around a weird ppc bug: 57957).
23028 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
23030         * tramp-ppc.c: trampoline fixes.
23032 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
23034         * mini-ppc.c: fixed typos.
23036 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23038         * mini-ppc.c, exceptions-ppc.c: more code saves registers
23039         at the top of the stack. Fixed typos. Use a frame registers
23040         for all the methods with exception clauses.
23042 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
23044         * exceptions-ppc.c: restore fp registers.
23046 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
23048         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
23049         order from the stack top (moved the stack room to save the
23050         return value for trace after the param area). Fixed corruption
23051         in restoring registers on unwind.
23053 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23055         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
23057 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
23059         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
23060         and prolog/epilog for methods that use it. Allow
23061         enough param area room for varargs methods. Fix miguel's
23062         breakage in exception handling.
23064 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
23066         * Makefile.am: run genmdesc only on current arch.
23068 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23070         * exceptions-x86.c:
23071         * mini-x86.h: fix the build on windows.
23073 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
23075         * 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.
23077         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
23079         * mini-exceptions.c: New file.
23080         
23081         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
23082         Move some parts of the x86 exception handling code to an 
23083         arch-independent file so it can be shared with other ports.
23085 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
23087         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
23089 2004-04-26  David Waite  <mass@akuma.org>
23091         * driver.c: remove comma from end of enumeration declaration
23093 2004-04-26  Jackson Harper  <jackson@ximian.com>
23095         * driver.c: parse config file before loading first assembly. This
23096         allows the user gac to be enabled/disabled. 
23097         
23098 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
23100         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
23101         simpler mechanism: we do not care what is encoded initially
23102         (branch absolute or relative), we care about the code and its
23103         target.  I kept the old code for reference for now.
23105         The new code tries first to determine if the jump is anywhere in
23106         the -/+32 absolute meg range, if it succeeds, it encodes using the
23107         absolute branch;  If not, it tried to find something in the
23108         relative range, if not, it uses the handle_thunk code. 
23110 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
23112         * exceptions-ppc.c: use the correct ip register on macosx.
23114 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
23116         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
23118 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
23120         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
23121         Raise exception on integer divide by zero by hand since the hw
23122         doesn't support it. Handle NaNs in FP compares.
23124 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
23126         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
23127         code reducing duplication between the platforms and enabled
23128         signal exception handling (on linux for now).
23130 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
23132         * exceptions-ppc.c: more macosx support.
23134 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
23136         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
23138 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
23140         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
23142 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
23144         * iltests.il: more tests.
23146 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
23148         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
23149         vars as well.
23151 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
23153         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
23155 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
23157         * liveness.c: Mark variables as volatile in all basic blocks reachable
23158         from exception clauses.
23160 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
23162         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
23163         inlining.
23165 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
23167         * iltests.il, basic.cs: more tests for regalloc.
23169 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
23171         * iltests.il: Some tests for register allocation modifications
23172         I have locally.
23174 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
23176         * exceptions.cs: Add regression test for bug #56782.
23178         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
23179         original stack trace if an exception is rethrown. Fixes #56782. Oh,
23180         the beauty of fixing the same thing in 5 different files...
23182 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
23184         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
23185         methods.
23187 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
23189         * mini.c: Add support for STRWLPARRAY marshalling convention.
23191 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
23193         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
23194         to init the context to setup the regs pointer).
23196 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
23198         * exceptions-ppc.c: more exceptions work.
23200 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23202         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
23203         not allowed.
23205 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
23207         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
23208         can use the memory directly.
23210         * cpu-pentium.md: Update documentation from a post from Zoltan. 
23212         add x86_add_membase, x86_sub_membase, x86_mul_membase
23214 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
23216         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
23217         GENERAL_REGS they were also hardcoded for all PPC ports.
23219         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
23221         Remove hard-coded limit for floating point registers, use
23222         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
23224         Notice that in MacOS X calling conventions you can fit a lot more
23225         floating point values in registers, so I should update the PInvoke
23226         test to excercise the passing of floating point values on the
23227         stack (currently broken).
23228         
23229 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
23231         * tramp-ppc.c (create_trampoline_code): Added
23232         JUMP_TRAMPOLINE_SIZE. 
23233         (ppc_magic_trampoline): Follow the pattern from
23234         x86_magic_trampoline: if code is set to zero, return. 
23235         (create_trampoline_code): Always pass MonoMethod to the jump
23236         trampoline, before it was passing a null.
23237         (mono_arch_create_jump_trampoline): Implement the jump stub, could
23238         share the code with mono_arch_create_jit_trampoline. 
23240         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
23241         implemented.
23242         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
23243         implemented.  
23245         * cpu-g4.md: Added length for jmp instruction, the worst case
23246         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
23247         for save_lmf).
23249 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
23251         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
23253 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
23255         * mini.c: Only set bblock->real_offset when adding a new bblock, and
23256         before each IL instruction.
23258         * mini.c (CEE_BOX): Fix warnings.
23260 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23262         * mini.c: removed a few unused vars and extra whitespace.
23264 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
23266         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
23267         checks.
23268         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
23269         index.
23270         (OP_GETCHR): use the above
23271         (CEE_LDELEMA): use the above.
23273         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
23274         version of the generic impl.
23275         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
23276         (CEE_LDELEMA): use the above.
23278 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
23280         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
23281         Fixes #56317.
23283         * iltests.il: Added new regression test for #56317.
23285 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
23287         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
23288         under NetBSD. Fixes #56450.
23290         * liveness.c (update_gen_kill_set): Fix previous patch.
23292 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23294         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
23296 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
23298         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
23299         ldsfld and ldsflda.
23301         * inssel-sparc.brg: Add more optimizations.
23303         * mini-sparc.c: Replace multiply/divide with shifts if possible.
23305 2004-04-01  Martin Baulig  <martin@ximian.com>
23307         * mini.c (handle_box): New static function; moved the
23308         implementation of CEE_BOX here.
23309         (mono_method_to_ir): Added `constrained_call' variable.
23310         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
23311         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
23312         mono_method_get_constrained() to get the method.
23314 2004-04-01  Martin Baulig  <martin@ximian.com>
23316         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
23317         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
23318         (mono_method_to_ir): We don't need these macros anymore since
23319         mono_class_get_full() already takes care of it. 
23321 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23323         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
23324         use @function (as doesn't accept #function here) and check the return
23325         value of system and stop if fails.
23327 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23329         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
23331 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
23333         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
23335         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
23337         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
23338         #56223.
23340         * basic-long.cs: Add test for negation of Int64.MinValue.
23342 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
23344         * mini-sparc.c: Update status.
23346         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
23348         * exceptions-sparc.c: Fix return value in filters.
23350         * inssel-sparc.brg: Fix register allocation in some rules.
23352 2004-03-28  Martin Baulig  <martin@ximian.com>
23354         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
23355         if neccessary.  
23357 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
23359         * mini-x86.c (mono_arch_patch_code): Fix warnings.
23360         
23361         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
23362         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
23363         remove unused conv_u4 opcode.
23365         * mini-x86.c: Remove valgrind workaround since it slows down things
23366         even when mono is not run under valgrind.
23368 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
23370         * mini-sparc.c: Update status.
23372         * inssel-sparc.brg: Add some optimizations.
23374         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
23375         future delay slot filling. Add support for varargs, tail calls and JMP.
23377         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
23378         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
23380         * inssel.brg: Fix register allocation in OP_ARGLIST.
23382         * inssel.brg: Fix warnings.
23384 2004-03-25  Martin Baulig  <martin@ximian.com>
23386         * mini.c (inflate_generic_field): Removed.
23387         (mini_get_method): Removed, use mono_get_method_full(),
23388         (mini_get_class): Removed, use mono_class_get_full().
23389         (mono_method_to_ir): Pass our generic context to
23390         mono_field_from_token().        
23392 2004-03-25  Martin Baulig  <martin@ximian.com>
23394         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
23395         of a `MonoMethod *'.
23396         (mini_get_method): Take a `MonoGenericContext *' instead
23397         of a `MonoMethod *'.
23398         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
23399         a new local variable called `generic_context' which holds the
23400         current `MonoGenericContext *'; use it to lookup things.
23402 2004-03-24  Martin Baulig  <martin@ximian.com>
23404         * mini.c (mini_get_class): New static method; if we're inside a
23405         generic instance, inflate the class if neccessary.
23406         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
23408 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
23410         * iltests.il: New regression test for #55976.
23412         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
23413         #55976.
23415 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
23417         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
23418         output.
23420 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
23422         * liveness.c: Consider SSA stores as well as loads when making vars
23423         volatile.
23425         * exceptions.cs: New regression tests for register allocation.
23426         
23427 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
23429         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
23430         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
23431           domain lock only to protect puntual access to data structures.
23432           Added access lock for sighash, jit_icall_hash_name, 
23433           jit_icall_hash_addr and domain->code_mp.
23435 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
23437         * driver.c: Print SIGSEGV handling method.
23439         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
23441         * mini.c (setup_jit_tls_data): Handle case when this is called
23442         multiple times for a thread.
23444         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
23445         is different from fbxx_un. Fixes #54303. Also use constants instead of
23446         magic numbers in a lot of places.
23448 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
23450         * exceptions.cs: Fix cctor test when --regression is used.
23452 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
23454         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
23455         for Linux/ppc.
23457 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
23459         * inssel-ppc.brg: fixed register assignments for some rules.
23461 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
23463         * exceptions.cs: Add test for exceptions in static constructors.
23465         * mini.c (mono_jit_compile_method_with_out): Move the calling of
23466         static constructors outside the domain lock. Fixes #55720.
23468 2004-03-17  Martin Baulig  <martin@ximian.com>
23470         * mini.c (get_generic_field_inst): Removed, this'll never happen.
23471         (inflate_generic_field): Take the `MonoMethod *' instead of the
23472         `MonoClass *' and added support for generic method.
23473         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
23474         have a `field->parent->gen_params', only inflate the field if it's
23475         an open constructed type.
23477 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
23479         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
23480         exception object instead of the preconstructed ones.
23482 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23484         * mini.c: reverted changed to sigsegv_signal_handler commited
23485         accidentally in the previous patch.
23487 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23489         * mini.c:
23490         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
23491         running --aot with an old assembly.
23493 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
23495         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
23496         point values.
23498         * mini-sparc.c: Add support for v9 branches with prediction.
23500 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
23502         * mini.c (mini_init): #warning is GNUC only
23504         * mini-sparc.h: implement __builtin_frame_address
23505         and __builtin_return_address for Sun C compiler
23507 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
23509         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
23511 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
23513         * basic-calls.cs: Add test for unaligned byref long argument passing.
23515         * mini-ops.h: Add sparcv9 compare and branch instructions.
23517         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
23518         v9 instructions if we have a v9 cpu.
23520         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
23521         registers for global allocation.
23523         * exceptions-sparc.c: Fixes.
23524         
23525 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
23527         * liveness.c (mono_analyze_liveness): Optimized version.
23529         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
23531         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
23532         sparc work.
23534         * basic-float.cs basic-calls.cs: New regression tests.
23536 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
23538         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
23539         sigaltstack implementation.
23541         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
23542         
23543         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
23544         stuff if SIGSEGV_ON_ALTSTACK is not defined.
23546 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
23548         * mini.c: Fix warnings.
23549         
23550         * mini.c (mono_resolve_patch_target): New function which contains the
23551         arch independent part of the patching process.
23553         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
23554         patching code to a separate function.
23556 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
23558         * mini.c (add_signal_handler): ifdef out on Windows
23560 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
23562         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
23563         cpu-sparc.md: Add exception handling support + other fixes.
23565         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
23566         typed GC detection in --version.
23568         * basic.cs exceptions.cs: New regression tests.
23570         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
23571         the arch specific code can store data during a compilation.
23573         * mini-ops.h: Add OP_SETFRET.
23575         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
23576         function, register a separate icall for each arity, so the icalls can
23577         get a wrapper.
23578         
23579         * mini.c (mono_print_tree): Print negative offsets in a more readable
23580         form.
23581         
23582         * mini.c: Make signal handling work on sparc.
23583         
23584         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
23586         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
23588         * jit-icalls.c: Emulate truncl by aintl on solaris.
23590         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
23592 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
23594         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
23596 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
23598         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
23599         a MarshalByRef type, inline a method that performs the check, taking into
23600         account that the object can be a proxy. Also implemented tow new opcodes:
23601         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
23602         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
23603         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
23605 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
23607         * mini-ppc.c: if a relative branch displacement is too big
23608         but it points to and area reachable with an absolute branch, 
23609         avoid the thunks.
23611 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
23613         * mini.c: optimize small copies in cpblk.
23615 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
23617         * basic-calls.cs basic-float.cs: New regression tests.
23619         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
23620         negative offsets from %fp. Implement localloc. Fix local register 
23621         allocation. Fix the case when the this argument needs to be saved to
23622         the stack. Implement some missing opcodes.
23624 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
23626         * mini.c (mini_method_compile): Reenable global regalloc in methods
23627         with exception handlers.
23629         * linear-scan.c (mono_varlist_sort): Fix warning.
23631         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
23633         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
23634         regalloc costs.
23636         * liveness.c: Make all variables uses in exception clauses volatile, to
23637         prevent them from being allocated to registers. Fixes #42136.
23639 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
23641         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
23642         causes regressions.
23644         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
23645         argument to mono_arch_regalloc_cost.
23647         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
23648         precisely.
23650 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
23652         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
23653         Make the cost of allocating a variable to a register arch dependent.
23655         * basic-calls.cs: Fix compilation of tests.
23656         
23657         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
23658         helper function to cut back on the number of #ifdefs needed.
23660         * mini-ppc.c: Fix compilation.
23662         * basic-calls.cs: New regression tests.
23664         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
23666         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
23667         of l0 since that is callee saved.
23669         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
23670         to virtual calls.
23672         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
23673         of delay instruction.
23675         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
23677         * mini.h (MonoCallInst): Add 'virtual' flag.
23679         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
23681 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
23683         * *.cs: New regression tests.
23685         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
23686         work.
23688         * mini.c (mono_runtime_install_handlers): Fix build.
23690         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
23691         'signal_stack_size' members.
23693         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
23694         alternate signal stack.
23696         * exceptions-x86.c: Add stack overflow handling.
23698         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
23699         functions to arch independent code.
23701         * mini.c (mono_print_tree): Print more detailed info for load_membase
23702         opcodes.
23703         
23704 2004-02-23  Martin Baulig  <martin@ximian.com>
23706         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
23708 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
23710         * mini-x86.c: fixed reg allocation for div/rem.
23712 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
23714         * driver.c (mono_main): Report some configuratio options on --version.
23716 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
23718         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
23719         low in the address space. Correctly flush memory in thunks where we
23720         output native code.
23722 2004-02-20  Martin Baulig  <martin@ximian.com>
23724         * mini.c (mini_get_method): New static method; inflate all generic
23725         methods and methods in open generic instances.
23726         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
23727         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
23729 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
23731         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
23733         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
23735 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
23737         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
23739         * mini-sparc.c (flushi mono_arch_output_basic_block): make
23740         it compile using Sun's compiler.
23742 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
23744         * 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.
23746         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
23748 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
23750         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
23751         code.
23752         * mini-ppc.c: handle calls outside of the allowed range with thunks
23753         allocated using the code manager.
23754         * tramp-ppc.c: use the code manager to hold generated native code.
23755         Fixed the magic trampoline to just patch vtable entries.
23757 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
23759         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
23760         independent file.
23762 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
23764         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
23765         PPC.
23767         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
23768         if we have a working __thread implementation.
23770         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
23771         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
23773 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
23775         * mini-x86.c: Fix compilation under gcc 2.
23776         
23777 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
23779         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
23780         contains a call to the wrapped function.
23782         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
23783         OP_<CALL>_IMM opcodes, and use them under X86.
23784         
23785         * mini.c (mono_jit_find_compiled_method): Fix warning.
23787         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
23789         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
23791         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
23792         functionality to mini.c.
23794         * mini.c (mono_create_jump_trampoline): New function to create a jump
23795         trampoline. Return a compiled method instead of a trampoline if it
23796         exists. Add a cache for jump trampolines.
23798         * mini.c (mono_jit_find_compiled_method): New function to return a
23799         compiled method if it exists.
23801         * mini-x86.c: Call mono_create_jump_trampoline instead of 
23802         mono_arch_create_jit_trampoline.
23804         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
23805         a jump trampoline. Fixes #52092.
23806         
23807 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
23809         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
23810         which is not up-to-date. Add check_corlib_version () instead.
23812         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
23813         have to call it.
23814         
23815         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
23816         since newer valgrind versions do not need it.
23818         * mini.c (mono_jit_compile_method_with_opt): New helper function to
23819         compile a method with a given set of optimizations.
23821         * mini.c: Compile icall wrappers on-demand instead of at startup.
23823         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
23824         wrapper for an icall.
23826 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
23828         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
23829         #54063.
23831         * iltests.il: Add test for non-empty stack before switch instruction.
23833 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
23835         * mini.c: Add support for new stringbuilder marshalling conventions.
23837         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
23839 2004-02-01  Martin Baulig  <martin@ximian.com>
23841         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
23842         in `ginst->mtype_argv'.
23844 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
23846         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
23847         facilitate grepping.
23849 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
23851         * mini.c: fixed buglet in initobj generic implementation for references.
23853 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
23855         * Makefile.am: make the version script conditional.
23856         * jit-icalls.c: handle missing truncl().
23858 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
23860         * exceptions.cs: Add more tests for double->int conversion.
23862         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
23863         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
23865 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
23867         * driver.c: make --verbose --version emit an error
23868         if the loaded corlib doesn't match the runtime version.
23870 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
23872         * mini-ppc.h: export ppc_patch().
23873         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
23874         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
23875         on par or better than on MacOSX.
23877 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
23879         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
23880         mono_lookup_pinvoke_call.
23882         * mini-x86.c: Under windows, the default pinvoke calling convention is
23883         stdcall. Fixes #52834.
23885         * mini.c (optimize_branches): Add an upper bound to the number of
23886         iterations to prevent infinite loops on strange loops. Fixes #53003.
23888 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
23890         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
23891         and ISINST. Fixes #52093.
23893         * objects.cs (test_0_vector_array_cast): New tests.
23894         
23895 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
23897         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
23898         checking in Array.Set ().
23900         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
23901         #52590.
23903         * object.cs (test_0_multi_array_cast): New regression test.
23905 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
23907         * exceptions-ppc.c: fix build on Linux/PPC.
23909 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
23911         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
23912         running under valgrind.
23913         (x86_magic_trampoline): Fix build bustage.
23915         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
23916         negative values as well. This is needed for the encoding of the line number
23917         info, since sometimes the line numbers are not in increasing order.
23919 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
23921         * cpu-pentium.md (localloc): Increase the size of the localloc 
23922         instruction since it is a loop under Win32.
23924         * debug-mini.c (record_line_number): Get rid of unneccesary memory
23925         allocation.
23927 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
23929         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
23930         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
23931         Max Horn (max@quendi.de). Fix file names in comments.
23933 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
23935         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
23936         avoid stack overflow.
23937         (replace_usage): Avoid uninitialized variable warnings.
23939         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
23940         and taking the address of valuetype variables.
23942 2004-01-03  Patrik Torstensson
23944         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
23945         for other purposes than FP later on.
23947 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
23949         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
23950         of tail calls.
23952 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
23954         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
23956 2003-12-30  Patrik Torstensson <p@rxc.se>
23958         * mini-x86.h: Decreased number of availiable fp regs.
23959         Solves corner cases with FP spilling.
23961 2003-12-23  Patrik Torstensson <p@rxc.se>
23963         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
23964         for floating point stack tracking / spilling on x86. 
23965         Fixes bug #49012.
23966         
23967         * basic-float.cs: added float mul overflow test.
23969 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
23971         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
23973 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23975         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
23976         supports for cond branches that overflow the immediate
23977         overflow offset. mcs can compile simple programs.
23979 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
23981         * exceptions-ppc.c: exception handling support wip:
23982         finally handlers get run on exception.
23984 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
23986         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
23987         profiling.
23989 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
23991         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
23992         initial support for stack walking and unwinding.
23994 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
23996         * driver.c (mono_main): Make corlib-out-of-sync message more 
23997         descriptive. Also remove verify_corlib call.
23999 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
24001         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
24002         not overlap with other call's arguments, too.
24004 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
24006         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
24007         move to arch-specific code the choice of arch-specific
24008         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
24009         * mini.c: ensure emulation calls will not interleave
24010         with other calls.
24012 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
24014         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
24015         the magic trampoline stack frame is dropped before executing
24016         the new method.
24018 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
24020         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
24021         and integer to fp conversions. Added support for overflowing
24022         arguments on the stack. Reserve a couple more registers as temps.
24023         Added support for aot compilation (as output still needs to be
24024         tweaked, though).
24026 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
24028         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
24029         Don't overwrite return register in some corner cases.
24031 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
24033         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
24034         static constructors when AOT compiling.
24036         * driver.c (mono_main): Call mono_check_corlib_version.
24038 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
24040         * cpu-g4.md, basic.cs: fixed div target register.
24042 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
24044         * mini-ppc.c, basic.cs: shl_imm fix with test.
24046 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
24048         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
24049         structures by value. Misc fixes.
24050         * objects.cs: more tests.
24052 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
24054         * mini-ppc.c: lconv.ovf.i implemented.
24056 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24058         * mini.c:
24059         (mini_init): don't error out if someone already called g_thread_init.
24061 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
24063         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
24064         to be any type per the spec. Fix abnormal memory usage when
24065         the same object is repeatedly thrown.
24067 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
24069         * mini.c: check for overruns in IL code.
24071 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
24073         * TODO: Add/remove some todo entries.
24075 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
24077         * driver.c (mono_main): Call mono_verify_corlib.
24079 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
24081         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
24082         This has been moved to mini.c
24083         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
24084         type being casted is marshalbyref it could be a proxy, so instead of
24085         emitting the type check code, emit a call to a runtime method that will
24086         perform the check by calling CanCastTo if needed.
24088 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
24090         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
24091         methods with large stack frames under Win32.
24093 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
24095         * Makefile.am: Distribute regression tests.
24097         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
24098         at the end instead of inserting each variable into the sorted list.
24100         * linear-scan.c (mono_varlist_sort): New helper function.
24101         
24102 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
24104         * mini.c: ensure arguments and locals are within bounds.
24106 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
24108         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
24109         related fixes.
24111 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
24113         * mini.c (mono_cprop_copy_values): Fix crash.
24115         * aot.c: Set verbosity back to 0.
24116         
24117 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
24119         * regalloc.c: complete memory leak fix by Laurent Morichetti
24120         (l_m@pacbell.net).
24122 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
24124         * driver.c (main_thread_handler): Revert the previous patch.
24126         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
24127         under valgrind.
24129         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
24130         memory from the memory pool.
24132         * driver.c (main_thread_handler): Turn on all optimizations when
24133         --aot is used.
24135         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
24136         an array for better performance.
24138         * regalloc.c (mono_regstate_assign): Fix memory leak.
24140         * debug-mini.c (mono_debug_serialize_debug_info): New function to
24141         serialize the debug info.
24143         * debug-mini.c (mono_debug_add_aot_method): New function to load the
24144         debug info from the serialized representation.
24146         * aot.c: Save debug info into the generated file and load it when 
24147         loading a method.
24149         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
24151 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
24153         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
24154         More FP-related fixes.
24156 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
24158         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
24159         and register allocation buglet. Hello world now runs.
24161 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
24163         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
24164         * tramp-ppc.c: fixed class init trampoline.
24165         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
24167 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
24169         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
24170         mini.c: more ppc changes/fixes.
24172 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
24174         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
24175         Also optimize the case when the arguments are the same in the caller 
24176         and in the callee.
24178         * iltests.il: Add tests for tail calls with valuetype arguments.
24180 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
24182         * mini-ppc.c: fixes for struct return type.
24184 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
24186         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
24187         mono_spillvar_offset() to arch-specific code.
24189 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
24191         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
24193 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
24195         * exceptions-x86.c: Fix stack space leaks.
24196         
24197         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
24198         registers from the lmf if the method has save_lmf set.
24200 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
24202         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
24203         of icall wrappers into InvokeInDomain, since these are now per-domain.
24205 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
24207         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
24208         make some opcode emulation and intrinsic ops enabled/disabled 
24209         according to the architecture. More fixes.
24211 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
24213         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
24215 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
24217         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
24218         arch-specific handling for 'this' and struct return type to
24219         arch-specific code.
24221 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24223         * aot.c: prevent divide by zero error when reporting (it happened with
24224         Accessibility.dll).
24226 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
24228         * mini.h (inst_switch): Remove unused macro.
24230 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24232         * aot.c:
24233         (load_aot_module): free 'info->methods' and 'info' properly. No more
24234         "free(): invalid pointer blah" messages when you have an old aot
24235         compiled assembly.
24237 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
24239         * jit-icalls.c, mini.c: Added support for context static fields.
24241 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
24243         * mini.c (mono_method_blittable): Methods which set LastError are not 
24244         blittable either. Fixes #51108.
24245         
24246 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
24248         * mini.c: flush icache.
24249         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
24251 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
24253         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
24255 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
24257         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
24258         safe on IA32.
24260         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
24261         vararg calls.
24263         * inssel.brg (CEE_MKREFANY): Fix AOT case.
24265 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
24267         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
24268         instruction when the result is discarded.
24270         * iltests.il (test_0_div_regalloc): New regression test.
24272         * arrays.cs: Fix compilation error.
24274 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
24276         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
24277         float rules to inssel-x86.brg: sane architectures with FP registers
24278         don't need to implement these rules.
24280 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
24282         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
24284 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
24286         * mini.h, inssel-long32.brg: fixed endianess issues in int64
24287         implementation of 32 bit systems.
24289 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
24291         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
24292         (Jeroen Zwartepoorte).
24294 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
24296         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
24297         the caller and the callee matches.
24298         
24299         * mini.c (mono_method_to_ir): Add comment.
24301         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
24302         signbit is missing on some platforms.
24304 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
24306         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
24308         * mini.c (setup_jit_tls_data): Call the new function.
24309         
24310         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
24312         * mini-x86.c: Add experimental support for fast access to the lmf
24313         structure under NPTL/Linux 2.6.x.
24315 2003-11-06  Martin Baulig  <martin@ximian.com>
24317         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
24318         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
24319         the debugger.
24321 2003-11-02  Martin Baulig  <martin@ximian.com>
24323         * mini.c (inflate_generic_field): New static method.
24324         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
24325         generic instance and the field is declared in a generic type, call
24326         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
24328 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
24330         * mini.h mini.c (mono_method_same_domain): New function to return
24331         whenever the caller and the callee are in the same domain.
24333         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
24335 2003-10-30  Martin Baulig  <martin@ximian.com>
24337         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
24338         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
24339         method parameters.
24340         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
24341         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
24343 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
24345         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
24346         propagation.
24348         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
24349         object here, so it is in the correct appdomain etc.
24351 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
24353         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
24354         already done.
24355         (mono_method_to_ir): Avoid freeing the type created returned from
24356         mono_type_create_from_typespec, since it is put into an internal cache
24357         by the function. Fixes pointer.exe.
24359         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
24360         trampolines for icalls and pinvokes as well. Fixes #33569.
24362 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
24364         * mini.c: Update after appdomain changes.
24366         * mini.c (mono_jit_compile_method_inner): Allways compile native
24367         method wrappers in the root domain, since there can only be one
24368         instance of them, whose address is stored in method->info.
24370 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
24372         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
24373         environment variable. Instead detect automatically whenever running
24374         under valgrind using the magic macro RUNNING_ON_VALGRIND from
24375         valgrind.h.
24377 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
24379         * trace.c, trace.h: New files that implement the new trace option
24380         parsing. 
24382         * driver.c: Document new --trace options.
24384         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
24385         mini-x86.c: Apply:
24387         -       if (mono_jit_trace_calls)
24388         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
24390         * mini.h: prototypes.
24391         
24392 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
24394         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
24396         * mini.c inssel.brg: Implement typedefbyref opcodes.
24398         * mini.c (mono_jit_compile_method): Remove unused local variable.
24400         * mini.c (mono_jit_compile_method_inner): Ditto.
24401         
24402 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
24404         * tramp-x86.c (x86_class_init_trampoline): Fix build.
24405         
24406         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
24408 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
24410         * mini.c (mono_no_aot): Remove unused global variable.
24412         * mini.c: Thread safety fixes.
24414 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
24416         * mini.c (mono_create_class_init_trampoline): Add a lock around
24417         class_init_hash_addr.
24419         * arrays.cs (test_0_newarr_emulation): Add new regression test for
24420         #30073.
24422         * mini.c: Decompose the NEWARR instruction before decomposing its
24423         arguments. Fixes #30073.
24425 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
24427         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
24428         convention.
24430 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
24432         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
24434         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
24436         * driver.c: Add support for compiling icall wrappers to --compile.
24438 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
24440         * inssel.brg: The empty value in class->interface_offsets is -1, not
24441         0. Fixes #49287.
24443 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
24445         * objects.cs: New test for 'is' operator on an array of interfaces.
24447 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
24449         * tramp-ppc.c: update trampoline code to support jumps
24450         and class initialization.
24452 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
24454         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
24456         * inssel.brg (OP_UNBOXCAST): Fix #46027.
24458         * inssel.brg (OP_UNBOX): Remove unused rule.
24460         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
24461         region instead of one for each method. Fixes #47813.
24463 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
24465         * exceptions.cs (test_0_nested_finally): New regression test for
24466         nested exception handlers.
24468         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
24470         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
24472         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
24473         inlining.
24475         * mini.c (mono_method_check_inlining): Make the inlining limit 
24476         configurable by an environment variable.
24477         
24478         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
24480         * mini.h: Bump AOT file version.
24482         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
24483         token, store the image along with the token, since the token might not 
24484         refer to the same image as the method containing the relocation, 
24485         because of inlining.
24487 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
24489         * mini.c (mono_precompile_assemblies): New function to compile
24490         all methods in all loaded assemblies.
24492         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
24494         * regalloc.h regalloc.c (MonoRegState): Change the type of 
24495         iassign and fassign to int*, since they can contain large negative
24496         values if the register is spilled. Also added some comments. Fixes
24497         #45817.
24499         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
24500         under Win32. Fixes #42964.
24502 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
24504         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
24506         * aot.c: Added support for AOT compiling methods which contain calls
24507         to wrappers. Currently, only remoting-invoke-with-check wrappers are
24508         handled.
24509         
24510         * driver.c (compile_all_methods): Run the compilation in a thread
24511         managed by mono. Fixes #44023.
24513         * mini.c (mono_codegen): Print full method name in verbose output.
24515         * mini-x86.c (mono_arch_patch_code): Fix warning.
24516         
24517         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
24518         jumps, since the method we are jumping to might be domain-specific.
24520         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
24522 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
24524         * inssel.brg: string chars are unsigned.
24526 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
24528         * TODO: New todo item.
24530         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
24531         which calls mono_runtime_class_init and patches the call site to
24532         avoid further calls.
24533         (mono_arch_create_class_init_trampoline): New arch specific function 
24534         to create a class init trampoline.
24535         (create_trampoline_code): Generalized so it can create
24536         class init trampolines as well.
24538         * mini.c (helper_sig_class_init_trampoline): New helper variable.
24539         (mono_create_class_init_trampoline): New function to create and cache
24540         class init trampolines.
24541         (mono_find_class_init_trampoline_by_addr): New function to lookup the
24542         vtable given the address of a class init trampoline. Used by the
24543         patching process.
24544         (mono_codegen): Generate a call to a trampoline instead of
24545         mono_runtime_class_init in LDSFLD[A].
24546         (mono_codegen): Add relocations for the new trampoline.
24547         
24548         * mini.h mini-x86.c aot.c: Added a new relocation type: 
24549         MONO_PATCH_INFO_CLASS_INIT.
24551         * mini.h: Bump AOT version number.
24553         * aot.c: Create a copy of the loaded code instead of using the original
24554         so methods which call each other will be close in memory, improving
24555         cache behaviour.
24556         
24557         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
24558         patch since it breaks the regression tests.
24559         
24560         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
24561         for the register saving instruction sequence since the 
24562         frame_state_for function in glibc 2.3.2 don't seem to detect it.
24564 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
24566         * TODO: Fix todo item && remove another.
24568 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
24570         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
24571         previous checkin.
24573         * aot.c: Moved the check for MONO_LASTAOT into the initialization
24574         function of the module.
24576         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
24577         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
24578         --no-aot command line option.
24580 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
24582         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
24583         by Bernie Solomon (bernard@ugsolutions.com).
24585         * inssel.brg: Refactor the interface offset table related code into
24586         its separate functions and add support for the AOT case.
24588 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
24590         * aot.c (mono_aot_get_method_inner): Fix memory leak.
24591         
24592         * aot.c: Added mono_aot_verbose variable and made all debugging
24593         output depend on the value of this variable.
24595         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
24596         method_label and info_label.
24598         * mini.h mini-x86.c aot.c: Added a new relocation type 
24599         MONO_PATCH_INFO_IID for klass->interface_id.
24601         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
24602         the MonoJitInfo structure.
24604         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
24605         a non-root appdomain in shared mode.
24607 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
24609         * aot.c: make aot loader less verbose. Remove free of unused variable.
24611 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
24613         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
24615         * .cvsignore: Added *.dll.
24617         * mini.c (mono_print_tree_nl): New function callable while debugging.
24619         * mini.c (mono_print_code): Export this.
24621         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
24622         patched code.
24624 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
24626         * mini.h (MonoCompile): Added 'jit_info' field.
24628         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
24629         the cfg structure, since it is needed by the AOT compiler.
24631         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
24633         * aot.c: A major rewrite. Changes include:
24634         - save exception tables for methods which have them.
24635         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
24636         to g_module_symbol.
24637         - reworked the file format so it is now much smaller and needs
24638         fewer relocation entries.
24639         
24640 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
24642         * aot.c (load_aot_module): Fix build bustage on platforms without
24643         Boehm GC.
24645 2003-09-04  Martin Baulig  <martin@ximian.com>
24647         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
24649 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
24651         * TODO: Some new optimization ideas.
24653         * aot.c: Move AOT module loading logic here from mono_assembly_open.
24655         * aot.c: Save the optimization flags used to compile the code into
24656         the AOT module.
24658         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
24659         support emitting domain specific code.
24660         
24661         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
24662         no longer domain neutral. It can be made domain neutral by compiling 
24663         with --optimize=shared.
24665         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
24666         between appdomains.
24668         * driver.c mini.h mini.c: New --no-aot debugging option which disables
24669         loading of AOT code.
24671         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
24672         
24673         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
24674         if there is no domain neutrality information.
24676 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
24678         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
24679         format version into the generated library.
24681         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
24682         callee method into the caller since one of them could be shared.
24684         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
24685         system exceptions from AOT code now works.
24687         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
24688         method if it is domain neutral and the callee is not.
24690         * graph.c (cfg_emit_one_loop_level): Fix warning.
24692 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
24694         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
24695         last checkin.
24697 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
24699         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
24700         is needed  by code which is executed before mono_runtime_init ().
24701         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
24702         
24703         * mini.c (mono_thread_abort): Fix warning.
24704         (mono_jit_compile_method): Call static constructor in the AOT case too.
24706         * aot.c (mono_compile_assembly): Fix warning.
24708 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24710         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
24712 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
24714         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
24716         * cpu-pentium.md: Fix the length of call opcodes so they include the
24717         ESP restoring instruction. Fixes #47968.
24719 2003-08-28  Martin Baulig  <martin@ximian.com>
24721         * mini-x86.c (mono_arch_call_opcode): Added support for
24722         MONO_TYPE_GENERICINST.
24724         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
24726 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
24728         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
24729         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
24731         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
24732         metadata_section.
24734 2003-08-26  Martin Baulig  <martin@ximian.com>
24736         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
24737         when reporting an error, set this to the actual error location.
24738         (mono_method_to_ir): Report the correct error location if
24739         get_basic_blocks() returned an error.
24741 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
24743         * mini.c (mono_type_blittable): OBJECT is not blittable.
24744         (mono_method_blittable): Methods which have marshalling descriptors
24745         are not blittable either. Fixes #47842.
24747 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
24749         * driver.c mini.c: Use an environment variable instead of a global 
24750         variable. Also fix the build.
24752         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
24753         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
24754         reporting this. 
24756         * driver.c mini.c: Added --with-valgrind option to turn off some
24757         code which prevents mono from running under valgrind.
24759         * mini.c (mono_emit_call_args): Fixed warning.
24761         * mini.c (mono_emulate_opcode): Fixed warning.
24763 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24765         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
24766         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
24767         regalloc.c, regalloc.h: specify available registers in arch-specific
24768         code and support floats in the regallocator (patch by Laurent Morichetti 
24769         <l_m@pacbell.net>)
24771 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
24773         * mini.c: mono_thread_current() can be called only after
24774         mono_runtime_init(): rearrange code to not call it early on.
24776 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24778         * mini.c: allocate jump tables in the code mempools.
24780 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24782         * mini.c, mini.h: make sure per-thread data allocated by the jit is
24783         freed.
24785 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
24787         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
24788         12 to 16.  This fixes bug #47453.
24791 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
24793         * mini-ppc.c: fixed indexed load and unsigned compares.
24795 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
24797         * mini.c: reenabled installation of handler for
24798           thread abort signal.
24800 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24802         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
24803         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
24804         until it's fixed and actually useful.
24806 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24808         * inssel-long32.brg: couple more opcodes implemented.
24810 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
24811         
24812         * mini-sparc.c: Even more opcodes implemeted.
24814 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
24816         * mini-sparc.c: More opcodes implemented.
24818 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
24820         * mini-sparc.c: More opcodes implemented.
24822 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
24824         * inssel-sparc.brg: Add some needed rules.  Direct
24825         copy from PPC.
24826         * Makefile.am: Use inssel-sparc.brg
24827         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
24828         an assert happy for now.
24830 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
24832         * mini-sparc.c: Fixed compile errors.
24833         * exceptions-sparc.c: Same.  We now produce a mono binary 
24834         on sparc-linux.  Yea.
24836 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
24838         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
24839         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
24840         They compile, but do not work.
24842 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24844         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
24845         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
24846         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
24847         (ct@gentoo.org).
24849 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24851         * mini.c: more opcodes implemented and better support for generics.
24853 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
24855         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
24856         * mini.c, mini.h: first cut at generics support: some new instructions 
24857         added and changed the behaviour of some of the existing ones.
24859 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
24861         * mini.c: Removed definition of metadata_shared mutex here.
24863 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
24865         * mini-x86.c: make vararg calls work for instance methods.
24867 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24869         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
24870         returns the arguments in a separte list, now.
24872 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
24874         * aot.c, mini.c: updates for array type representation changes.
24876 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
24878         * mini.c: register function to perform jit shutdown.
24880 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24882         * mini.c: use a faster allocator if possible.
24884 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24886         * aot.c: some cleanups and portability changes.
24888 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24890         * mini.c: use faster allocation for CEE_BOX if possible.
24892 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
24894         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
24895         Moved inlined mempcy code to its own function so that is can be
24896         reused. Added an inline memset function as well (optimized initobj).
24897         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
24899 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24901         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
24903 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
24905         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
24906         arch code can setup the cpu for CLR execution, if needed.
24907         We use it on x86 to set the precision of FP operations.
24909 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24911         * mini.c: disable some optimizations if we can guess they'll cost too
24912         much for a given method.
24914 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
24916         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
24917         
24918 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
24919         * mini.h mini.c mini-x86.c: Added instruction level coverage 
24920         info collection support.
24922 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
24924         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
24925         is now implemented in the profiling API. Get rid of a couple of
24926         unnecessary global variables.
24928 2003-06-15  Nick Drochak <ndrochak@gol.com>
24930         * basic-long.cs: tests for negative values for bigmul, and unsigned.
24931         * cpu-g4.md: add op_bigmul and op_bigmul_un
24932         * cpu_pentium.md: add op_bigmul_un
24933         * inssel-long32.brg: add rule for unsigned bigmul
24934         * mini-ops.h: define OP_BIGMUL_UN
24935         * mini-x86.c: THE BUG: handle (un)signed properly
24936         * mini.c: choose unsigned opcode if needed.
24937         This set of patches fixes bug #44291
24939 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
24941         * mini.c (optimize_branches): improved to handle all kinds of
24942         conditional branches.
24944 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
24946         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
24947         don't raise exceptions.
24949 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24951         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
24952         to arch-specific files.
24954 2003-06-09  Martin Baulig  <martin@ximian.com>
24956         * Makefile.am (libs): Added $(LIBGC_LIBS).
24958 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
24960         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
24961         and OP_ATAN (fixes bug#44293).
24963 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
24965         * Makefile.am, mini-x86.c: rename cpu description array to
24966         pentium_desc, since some compilers define the 'pentium' preprocessor
24967         symbol.
24969 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
24971         * mini.c (mini_select_instructions): add explicit branch if the
24972         following block is not the false target of a conditional branch -
24973         we need this with any optimization that reorder or remove bblocks
24975         * mini.c (optimize_branches): bug fixes
24977 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
24979         * mini.c (mono_method_to_ir): inline static readonly fields
24981         * ssa.c (fold_tree): start cfold support for long (very simple
24982         cases only)
24984         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
24986 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
24988         * inssel.brg: fixed memcpy (bug #44219).
24990 2003-06-05  Dick Porter  <dick@ximian.com>
24992         * driver.c: Set the glib log levels to not abort if g_message
24993         recurses.
24995         g_set_prgname() has to happen before mini_init() so that the
24996         process handle gets the info.
24997         
24998 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25000         * driver.c: add intrins to the default optimizations to get wider
25001         exposure.
25003 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
25005         * mini.h: some large basic blocks will overflow a 16-bit
25006         integers for symbolic registers.
25008 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
25010         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
25011         (mono_arch_output_basic_block): fix bug 43499 
25013 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
25015         * mini.c: kill duplicated definition of mono_debug_format.
25017 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
25019         * mini-x86.c, arrays.cs: fixed register allocation bug.
25021 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
25023         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
25025         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
25027 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25029         * mini.c:
25030         (print_method_from_ip): also print source location information if
25031         available.
25033 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
25035         * mini.c (mono_find_block_region): bug fix in region code
25036         (mini_method_compile): enable removing unreachable code again, but
25037         only in methods without exception clauses.
25039 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
25041         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
25042         Implemented arglist opcode and handling of TypedReference type.
25043         Fixed x86 call convention when a structure is returned.
25044         Minimal support for calling static vararg methods.
25046 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
25048         * mini.c (mini_method_compile):  always remove unreachable code,
25049         because the code in them may be inconsistent  (access to dead
25050         variables for example).
25052 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
25054         * driver.c, debug-mini.c: warning fixes.
25056 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
25058         * Makefile.am, jit.h, mini.h: install header for embedding mono.
25060 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
25062         * mini.c: thread-static fields are registered in mono_class_vtable(),
25063         so ensure the function is called before checking for them.
25065 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
25067         * mini.c (optimize_branches): fix for bug 43586
25069         * jit-icalls.c (mono_llmult_ovf): added an additional check for
25070         overflow (fixes Bug #43639)
25072 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25074         * mini.c, objects.cs: allow the use of stobj for primitive types.
25076 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25078         * mini.c: be less strict about argument checking until we support
25079         running the verifier.
25081 2003-05-27  Nick Drochak <ndrochak@gol.com>
25083         * basic-long.cs: tests for (ulong)int * (ulong)int also
25084         * mini.c: use the same trick for (ulong)int * (ulong)int
25086 2003-05-27  Nick Drochak <ndrochak@gol.com>
25088         * basic-long.cs: add regression test for (long)int * (long)int
25089         * cpu-pentium.md: add op_bigmul specification
25090         * inssel-long32.brg: add OP_BIGMUL rule
25091         * mini-ops.h: add OP_BIGMUL
25092         * mini-x86.c: register allocator: handle case where src1 needs to be
25093         in EAX.
25094         * mini.c: substitute special BIGMUL opcode in the tree for 
25095         (long)int * (long)int
25097 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
25099         * jit-icalls.c: call the type ctor on field access if needed.
25101 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
25103         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
25104         to a method (including results of ldelema, bug#43207).
25106 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
25108         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
25109         colors to show exception handler blocks.
25111         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
25112         (fix for pinvoke7.cs).
25114 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25116         * mini.h, mini.c: ensure correct initialization order for types that
25117         require it. Prepare for lazy compilation of jit icall wrappers.
25118         Provide a name for opcode emulation to reduce unneeded mallocing.
25120 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
25122         * mini-x86.c: better register restoring code and profiling
25123         support for tail calls.
25125 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25127         * mini.h, driver.c: prepare for leaf methods optimization.
25129 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
25131         * mini.c: get targets of branches before converting a method.
25133 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
25135         * mini.c (optimize_branches): added some experimental code (disbaled) 
25137 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
25139         * mini.c (optimize_branches): fix branch to branch optimization 
25141         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
25143         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
25145         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
25147         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
25148         if needed.
25150 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
25152         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
25153         enable use of interface variables again.
25155         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
25156         I1 to registers because there is no simply way to sign extend 8bit
25157         quantities in caller saved registers on x86.
25159         * inssel-float.brg: set costs of some rules to 2 so
25160         that monobure always select the arch. specific ones if supplied,
25161         regardless of the order we pass the files to monoburg.
25163 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
25165         * mini.c, mini-x86.c: since the magic trampoline for jumps
25166         can't patch the code directly, we do it as soon as the
25167         method gets compiled.
25169 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
25171         * mini-x86.c, mini.h: introduce a new patching method
25172         to support CEE_JMP and tail calls.
25173         * mini.c: obey tail.call. Don't precompile methods target
25174         of CEE_JMP.
25175         * tramp-x86.c: new trampoline code to handle methods
25176         reached through a jump.
25178 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
25180         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
25181         bit values to registers
25183 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
25185         * mini.c (mono_compile_get_interface_var): share interface
25186         variables if possible.
25188 2003-05-16  Martin Baulig  <martin@ximian.com>
25190         * debug-mini.c (mono_init_debugger): New function to initialize
25191         the debugger.  This is not in the debugger since it needs to
25192         access some of mini's internals.
25194 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
25196         * mini.c (mono_method_to_ir): inlining fixes/cleanups
25198 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
25200         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
25201         for value type handling.
25203 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
25205         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
25206         (mono_method_check_inlining): enable inlining of all kinds of wrappers
25208 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
25210         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
25211           the constructor through a proxy.
25213 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
25215         * jit-icalls.c, inssel.brg: fixes to array element address
25216         calculations.
25218 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
25220         * mini-x86.c (is_regsize_var): allocate pointer to registers
25222 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
25224         * driver.c: fixed typo, added intrins to the set of optimizations
25225         tested with regressions.
25227 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
25229         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
25230         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
25231         test case.
25233 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
25235         * inssel.brg: remove some common pop instructions without side effects
25237 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
25239         * inssel-x86.brg: fixed thinko in int to double conversions.
25241 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
25243         * mini.c, jit-icalls.c: added runtime thread-static variable support.
25245 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
25247         * inssel-long32.brg: two more missing instructions.
25249 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
25251         * mini.c (mono_emit_call_args): set the cil_code for all arguments
25252         if not already set.
25254 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
25256         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
25257         correctly.
25259         * basic-float.cs: Added tests for negative zero.
25261 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
25263         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
25264         a couple of missing operations for long casts, with test cases.
25266 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25268         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
25270 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
25272         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
25273         code size estimation.
25275 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
25277         * mini.c (mono_jit_create_remoting_trampoline): make it work with
25278         abstract methods (fix bug 42542)
25280         * aot.c: add ability to handle array types
25281         
25282 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
25284         * mini.c: Call the _specific versions of the object allocation
25285         functions if possible.
25287 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
25289         * driver.c: call setlocale ().
25291 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
25293         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
25294         windows build.
25296 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
25298         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
25300         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
25301         wrappers (fix bug 42122)
25303 2003-05-04  Martin Baulig  <martin@ximian.com>
25305         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
25307         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
25308         s/mini_set_defaults/mono_set_defaults/g.
25310 2003-05-04  Martin Baulig  <martin@ximian.com>
25312         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
25314 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
25316         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
25317         (reported by Don Roberts).
25319 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
25321         * mini.c: temporarily work around two bugs for this release.
25323 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25325         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
25326         that contains -export-dynamic and it makes using the ld script
25327         useless.
25328         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
25330 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
25332         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
25333         specific cpu.
25335 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
25337         * mini.c: make sure leave calls all the needed finally blocks,
25338         even when the target jumps out of multiple exception clauses.
25340 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
25342         * ldscript, Makefile.am: add linker script to reduce the number of
25343         exported symbols (should also fix the issues with libwine defining
25344         some of the same symbols in io-layer).
25346 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
25348         * driver.c (mini_main): Avoid assertion when no file name is given on 
25349         the command line.
25351 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
25353         * driver.c: added --version/-V command line option.
25354         Added the inline optimization in the regression tests.
25356 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
25358         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
25359         to the type in the method signature (fixes bug#42134).
25361 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
25363         * mini.c: when inlining, check this is not null only when needed (bug #42135).
25365 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
25367         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
25369 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25371         * driver.c: fixed bug #42100.
25373 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
25375         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
25377 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
25379         * mini.c: moved most of the code required to do inlining to its own
25380         function so it can be reused. Inline also ctors if appropriate.
25382 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
25384         * Makefile.am: Link with -export-dynamic so shared libs loaded by
25385         the runtime can call mono API functions.
25387 2003-04-27  Martin Baulig  <martin@ximian.com>
25389         * debug-mini.c (mono_debug_init_method): Added
25390         `guint32 breakpoint_id' argument; if the method has a breakpoint,
25391         send a notification to the debugger.
25393         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
25394         running in the Mono Debugger, just pass the breakpoint number to
25395         mono_debug_init_method().
25397         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
25399 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
25401         * mini.c: allow some more unsafe compares.
25403 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
25405         * mini-x86.c, Makefile.am: make distcheck works (partially from
25406         a patch by Richard Lee <r.h.lee@attbi.com>).
25407         * regset.c, regset.h: removed, they are unused.
25409 2003-04-25  Dick Porter  <dick@ximian.com>
25411         * driver.c: Usage reports the name as 'mono' not 'mini'
25412         * exceptions-x86.c: Build and run on freebsd
25414 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
25416         * Makefile.am: install the program with the 'mono' name and
25417         the library as libmono instead of mini and libmini.
25419 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
25421         * driver.c: provide the APIs for the embedding interface of the old jit.
25423 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
25425         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
25427 2003-04-23  Martin Baulig  <martin@ximian.com>
25429         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
25431         * driver.c: Added `--debug' command line argument to enable
25432         debugging support.
25434 2003-04-23  Martin Baulig  <martin@ximian.com>
25436         * debug.[ch]: Removed.  The code is now in
25437         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
25439         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
25440         last six months.
25442 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
25444         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
25446 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25448         * mini.c:
25449         (mini_cleanup): moved mono_runtime_cleanup call after the call to
25450         mono_domain_finalize.
25451         (mini_method_compile): use mono_method_profile* if the the option is
25452         enabled.
25454 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
25456         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
25457         methods with their wrapper.
25459         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
25460         methods with their wrapper.
25462         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
25463         their wrapper.
25465         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
25466         wrapper.
25468         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
25469         methods.
25471 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
25473         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
25475 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
25477         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
25478         of the mempool. This is slightly faster and uses less memory
25480 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
25482         * mini.c: avoid O(n) allocation for variables.
25484 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
25486         * mini.c: handle items on the stack after inlining methods.
25488 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
25490         * mini.c: make the method->opcode optimization dependent
25491         on MONO_OPT_INSTRINS and do it lazily.
25493 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
25495         * driver.c: print overall results at the end of regression run.
25497 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
25499         * inssel.brg: don't overwrite symbolic registers.
25501 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
25503         * inssel-x86.brg: fix conversion from long to float.
25505 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
25507         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
25509 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
25511         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
25513         * driver.c: Added --print-vtable option as in the old JIT.
25515 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
25517         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
25519 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
25521         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
25523 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
25525         * mini.c regalloc.c regalloc.h: Fix memory leak.
25527 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
25529         * aot.c (mono_aot_get_method): register all used strings
25531 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
25533         * mini.c: always intern strings references with ldstr at compile time.
25535 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
25537         * Makefile.am: add BUILT_SOURCES.
25539 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
25541         * driver.c: give a better error message when the assembly to execute
25542         doesn't have an entry point.
25544 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
25546         * Makefile.am: added hack for automake
25548         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
25549         correct sematics.
25551         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
25553 22003-04-07  Martin Baulig  <martin@ximian.com>
25555         * Makefile.am: Added Makefile.am.
25557         * debugger-main.c: Removed, this is now in the debugger where it
25558         belongs.
25560         * mini.pc.in: Call this package `mini' for the moment.