2010-02-08 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
index 86bb9c7e48298305eaf08e577ddfcd9fab1c68a9..2c309f9f1f98ea29641b56dcc6fb3d8136c782fd 100755 (executable)
@@ -1,3 +1,374 @@
+2010-02-08  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (emit_code): Create the ut trampolines here, so they work for
+       llvm methods too.
+
+       * aot-compiler.c (emit_code): Don't add the llvm label prefix to 'methods', since
+       it is not an LLVM generated symbol.
+
+       * mini-llvm.c (emit_entry_bb): Fix the handling of simd types.
+
+       * method-to-ir.c (handle_castclass): Turn off the more efficient isinst/castclass
+       implementation in gshared mode because it causes regressions.
+
+       * mini-trampolines.c: Add a stat for the number of calls to trampolines.
+
+       * image-writer.c (asm_writer_emit_global): Don't prepend the global prefix, it
+       should be done by the caller.
+
+       * mini-llvm.c (mono_llvm_emit_method): Don't make the debug symbols global.
+
+       * aot-compiler.c (emit_code): Add the llvm label prefix before 'methods'.
+
+       * mini-exceptions.c (mini_jit_info_table_find): Search the root domain as well,
+       since mono_jit_info_table_find () doesn't do it anymore.
+
+       * mini-generic-sharing.c debugger-agent.c: Call mini_jit_info_table_find ()
+       instead of mono_jit_info_table_find ().
+
+2010-02-07  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c aot-runtime.c: Add support for MONO_WRAPPER_WRITE_BARRIER.
+
+       * aot-compiler.c (encode_method_ref): Update after the removal of
+       mono_gc_get_managed_allocator_type ().
+
+       * method-to-ir.c (mono_method_to_ir): Place a seq point just before a RET.
+       Fixes #564538.
+
+2010-02-06  Zoltan Varga  <vargaz@gmail.com>
+
+       * method-to-ir.c (handle_castclass): Use the icall for classes with variant
+       generic params as well.
+       (handle_isinst): Ditto.
+
+       * method-to-ir.c: Make isninst/castclass checks in gshared code more efficient
+       instead of always calling an icall.
+
+       * aot-compiler.c (emit_llvm_file): Take into account trampolines etc when
+       computing the size of the got.
+
+       * aot-compiler.c (emit_code): Change the way the 'methods' symbol is emitted
+       when using LLVM. Instead of emitting it as an LLVM method, emit it using
+       the assembly directive '.set' so it points to the first LLVM emitted method.
+
+2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * mini.c (mini_method_verify): Report the method which failed to verify.
+
+2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * method-to-ir.c (mono_method_to_ir): Use the new basic block formation pass
+       to avoid JIT'ng dead basic blocks. This is the same behavior as the
+       runtime MS verifier.
+
+2010-02-04  Zoltan Varga  <vargaz@gmail.com>
+
+       * debugger-agent.c (decode_value): Fix decoding of vtype instances. Fixes
+       #561962.
+
+2010-02-04  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-llvm.c: Init the jit module only when first JITting.
+
+       * aot-compiler.c (emit_plt): Fix the naming of plt entries of llvm+darwin.
+
+       * mini-llvm.c (get_plt_entry): Make the plt entries have hidden visibility.
+
+       * mini-llvm.c (mono_llvm_emit_aot_module): Remove the dummy got after it is
+       replaced with the real got.
+
+       * debugger-agent.c (type_commands): Return the enumness if the type as well.
+
+       * image-writer.c: Reduce the amount of #ifdefs a bit.
+
+       * aot-compiler.c: Reduce the amount of #ifdefs. Add beginnings of support for
+       llvm on darwin/arm.
+
+       * aot-compiler.c (mono_compile_assembly): Handle asmonly+llvm mode.
+
+       * mini-llvm.c (mono_llvm_emit_method): Don't make the 'type_info' symbols
+       global.
+
+2010-02-02  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-llvm.c (mono_llvm_emit_method): Add support for unaligned loads.
+       (mono_llvm_emit_method): Fix unaligned stores too.
+
+       * mini-amd64.c (mono_arch_emit_prolog): Initialize lmf->rsp in the prolog too
+       so async stack walks don't crash.
+
+2010-02-02  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-trampolines.c (common_call_trampoline): Fix a problem where the callsite
+       was not patched if the callee needed an rgctx trampoline.
+
+2010-02-01  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-ppc.c (mono_arch_get_global_int_regs): Reserve r29 for holding the
+       vtable address in AOT code.
+
+2010-02-01  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-codegen.c: Remove support for CEE_ opcodes which cannot occur in
+       MonoInst's.
+
+Mon Feb 1 16:29:10 CET 2010 Paolo Molaro <lupus@ximian.com>
+
+       * genmdesc.pl: remove dependency on external cpp.
+
+2010-02-01  Zoltan Varga  <vargaz@gmail.com>
+
+       * method-to-ir.c (mini_emit_ldelema_1_ins): Avoid emitting an OP_SEXT_I4 when
+       using LLVM, its not needed, and abcrem can't handle it.
+
+Mon Feb 1 14:29:43 CET 2010 Paolo Molaro <lupus@ximian.com>
+
+       * genmdesc.c, genmdesc.pl, cpu-x86.md: introduced templates to make
+       it easier to group instructions and reduce duplication.
+
+2010-02-01  Zoltan Varga  <vargaz@gmail.com>
+
+       * decompose.c: Move the array/soft float decompose routines here from
+       method-to-ir.c.
+
+       * method-to-ir.c: Export a few functions so they can be used from decompose.c.
+
+2010-01-31  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-llvm.c (mono_llvm_emit_method): Add a call to llvm.invariant.start
+       to tell LLVM that the got is constant, not used yet.
+
+       * aot-compiler.c: Pass more optimization flags to llvm's 'opt'.
+
+2010-01-30  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-ppc.c (mono_arch_emit_prolog): Fix full aot support for native to
+       managed wrappers.
+
+2010-01-30  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (add_wrappers): Commit the hack which generates
+       native-to-managed wrappers for methods decorated with the MonoPInvokeCallback
+       custom attribute.
+
+2010-01-29  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.h (MONO_INST_FAULT): New instruction flag for loads which can cause
+       a fault, only used by the LLVM backend.
+
+       * ir-emit.h: Add _FAULT variants of the LOAD_MEMBASE macros. Mark
+       OP_CHECK_THIS with OP_IMPLICIT_EXCEPTION.
+
+       * method-to-ir.c: Use the new LOAD_MEMBASE_FAULT opcodes, get rid of the
+       calls to MONO_EMIT_NULL_CHECK which is automatically done by the new macros.
+
+       * mini-llvm.c: Only generate volatile loads from load instructions which have
+       the MONO_INST_FAULT flag set.
+
+2010-01-29  Zoltan Varga  <vargaz@gmail.com>
+
+       * unwind.c (mono_unwind_decode_fde): Fix the decoding of the LSDA offset on
+       64 bit platforms.
+
+2010-01-28  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (mono_save_seq_point_info): Fix the handling of bblocks without
+       sequence points. Fixes #571236.
+
+2010-01-28  Zoltan Varga  <vargaz@gmail.com>
+
+       * debugger-agent.c (mono_debugger_agent_init): Call appdomain_unload at the
+       end of the appdomain unload process, after assemblies have been unloaded.
+       Fixes #574842.
+
+2010-01-27  Zoltan Varga  <vargaz@gmail.com>
+
+       * abcremoval.c (process_block): Fix the if (region) check so abcrem actually
+       works.
+
+       * mini-amd64.c: Make the soft debugger work on platforms without MAP_32BIT.
+       Fixes #573988.
+
+2010-01-26  Zoltan Varga  <vargaz@gmail.com>
+
+       * dwarfwriter.c (emit_type): Treat MONO_TYPE_PTR as 'I' not 'I4'.
+
+2010-01-26  Geoff Norton  <gnorton@novell.com>
+
+       * aot-compiler.c: Fix a logic error introduced when guarding against enums
+       with struct marshalability.
+
+2010-01-24  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (mini_method_compile): Improve the processing MONO_VERBOSE_METHOD so
+       it supports class names as well.
+
+       * mini.h (MonoCompile): Add a few flags to control JIT behavior which are
+       needed by the GC map code.
+
+       * mini.c (mini_method_compile): Call a function in mini-gc.c to set the new
+       flags if needed.
+
+       * method-to-ir.c (mono_method_to_ir): Emit initialization code for ref variables
+       if cfg->init_ref_vars is set.
+
+       * liveness.c (optimize_initlocals): Disable the initlocals opt for ref vars if
+       cfg->disable_initlocals_op_refs is set.
+
+       * method-to-ir.c (mono_spill_global_vars): Compute more precise live ranges
+       using liveness info if cfg->compute_precise_live_ranges is set.
+
+       * mini-gc.c: Ongoing work. Improve logging and debugging support. Handle
+       volatile variables correctly. Add comments about the live ranges. Not enabled
+       yet.
+
+2010-01-24  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.h (MonoDebugOptions): Add an option to init stack frames by writing
+       0x2a into them in method prologs.
+
+       * mini-amd64.c (mono_arch_emit_prolog): Implement it.
+
+2010-01-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-llvm-cpp.cpp: Remove uses of dynamic_cast, it no longer works with llvm
+       classes, since llvm is compiled with -fno-rtti.
+
+       * mini.h (COMPILE_SOFT_FLOAT): New macro, similar to COMPILE_LLVM.
+
+       * method-to-ir.c ir-emit.h: Use if (COMPILE_SOFT_FLOAT) in a few places since
+       llvm does not require it.
+
+       * aot-runtime.c (load_method): Print the full name of the last aot method.
+
+2010-01-21  Zoltan Varga  <vargaz@gmail.com>
+
+       * exceptions-amd64.c (mono_arch_notify_pending_exc): Avoid a crash if the
+       thread has not fully started yet.
+
+2010-01-21  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (can_marshal_struct): Allow marshalling enums.
+
+2010-01-21  Miguel de Icaza  <miguel@novell.com>
+
+       * driver.c: Do not abort if LLVM is not supported, print a
+       warning and add the information to the Mono JIT information.
+
+2010-01-21  Zoltan Varga  <vargaz@gmail.com>
+
+       * ir-emit.h (MONO_EMIT_NULL_CHECK): Don't emit an OP_IMPLICIT_EXCEPTION when
+       using explicit null checks.
+
+2010-01-20  Zoltan Varga  <vargaz@gmail.com>
+
+       * xdebug.c: New file extracted from aot-compiler.c, containing the XDEBUG
+       related code.
+
+       * aot-compiler.c (encode_method_ref): Use mono_marshal_wrapper_info_from_wrapper
+       () in one place.
+       (mono_aot_wrapper_name): Remove the special handling of delegate invoke wrappers,
+       its no longer needed.
+
+       * method-to-ir.c (mono_method_to_ir): Fix a warning.
+
+       * exceptions-<ARCH>.c: Introduce a MONO_ARCH_HAVE_THROW_EXCEPTION_BY_NAME
+       define for platforms still using it (s390). Get rid of the
+       mono_arch_get_throw_exception_by_name () routines on all other platforms.
+
+       * exceptions-x86.c: Rework the throw trampolines so there is only one function
+       which can generate throw/rethrow/corlib trampolines for llvm/not llvm code.
+
+       * exceptions-x86.c: Add LLVM specific throw trampolines which doesn't assume
+       the caller pushed the arguments.
+
+       * mini-llvm.c: Enable throwing exceptions on x86.
+
+       * mini-posix.c (SIG_HANDLER_SIGNATURE): Avoid
+       "Thread (nil) may have been prematurely finalized" messages if this is called
+       on a thread not registered with the runtime.
+
+       * mini-exceptions.c (mono_handle_native_sigsegv): Ditto.
+
+2010-01-19  Zoltan Varga  <vargaz@gmail.com>
+
+       * jit-icalls.c (mono_array_new_3): New jit icall.
+
+       * aot-compiler.c aot-runtime.c: Add support for ElementAddr wrappers.
+
+       * arrays.cs: Add a test for 3 dimensional arrays.
+
+2010-01-19  Zoltan Varga  <vargaz@gmail.com>
+
+       * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Emit xdebug info.
+       (mono_arch_find_jit_info_ext): Disable the popping of arguments when LLVM is
+       used.
+
+       * mini-llvm.c (emit_cond_system_exception): Abort when an implicit exception is
+       thrown on x86.
+
+       * unwind.c (mono_unwind_decode_fde): Fix an assert on x86.
+
+       * mini-x86.h (MONO_CONTEXT_SET_LLVM_EXC_REG): Define this for x86.
+
+       * mini-llvm.c: Disable OP_THROW on x86, it doesn't work yet.
+
+2010-01-18  Bill Holmes  <billholmes54@gmail.com>
+
+       * debugger-agent.c : Changing the PLATFORM_WIN32 preprocessor check to
+         HOST_WIN32.  Also including winsock2. to define struct in_addr.
+
+       * mini-amd64.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
+
+       * mini-x86.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
+
+       Code is contributed under MIT/X11 license.
+
+2010-01-18  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.h (MonoCompile): Add 'disable_out_of_line_bblocks' flag.
+
+       * branch-opts.c (mono_optimize_branches): Honor the new flag.
+
+       * mini.c (mini_method_compile): Set the new flag when running under the
+       debugger.
+
+2010-01-18  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-gc.c: Change the GC map to use a ref/noref/pin value instead of just
+       a ref/noref value + a global pin flag, so parts of stack frames can still be
+       precisely marked even if they include stuff which needs pinning. Improve logging.
+       Fix many bugs. Not enabled yet.
+
+       * gc-test.cs: Add a few tests.
+
+       * liveness.c (mono_analyze_liveness): Make the debug output controllable by
+       the normal -v options. Avoid propagating liveness information through bblocks
+       which end with a NOT_REACHED opcode.
+
+       * mini.c (mono_jit_compile_method_inner): Avoid reading cfg->prof_options
+       after cfg has been freed.
+
+2010-01-17  Zoltan Varga  <vargaz@gmail.com>
+
+       * branch-opts.c (mono_branch_optimize_exception_target): Stop the optimization
+       if a clause is skipped because it uses the exception object, since it could
+       have caught the exception.
+
+       * exceptions.cs: Add a test.
+
+2010-01-16  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-trampolines.c (mono_create_static_rgctx_trampoline): Add an assert.
+
+        * aot-runtime.c (mono_aot_get_method): Handle ftnptr's correctly for the
+        ICollection<T> wrappers.
+
+2010-01-16  Zoltan Varga  <vargaz@gmail.com>
+
+       * debugger-agent.c (decode_value): Fix the decoding of I/U/PTR.
+
 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
 
        * mini-amd64.c (emit_call_body): Always use near calls when AOTing even if