2009-06-15 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
index da067ca0b34e3626e9be46c22dea9773d1de33dd..413f76f89a82efed515ac05215887c77ad487bbf 100644 (file)
@@ -1,5 +1,458 @@
+2009-06-15  Zoltan Varga  <vargaz@gmail.com>
+
+       * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
+       mips build.
+
+2009-06-13  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
+       'has_call_handler' fields.
+
+       * method-to-ir.c (mono_method_to_ir): Set them if needed.
+
+       * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
+       first bblock if not needed. Fixes #512790.
+       
+2009-06-11  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (mono_compile_assembly): Fix a warning.
+       
+       * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
+       wrappers.
+
+       * aot-runtime.c (mono_aot_get_method): Use the original method's code for
+       remoting-invoke-with-check wrappers, which are not needed when running with
+       full-aot, since it doesn't support remoting.
+       
+2009-06-10  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
+
+       * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
+       method info, it is not used anymore.
+
+       * mini.h: Bump AOT file format version.
+       
+       * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
+       word smaller.
+
+       * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
+       change above.
+       
+       * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
+
+       * mini.h: Bump AOT file format version.
+       
+2009-06-10  Zoltan Varga  <vargaz@gmail.com>
+
+       * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
+       TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
+       iphone.
+
+       * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
+       of CKFINITE and FBGE for VFP.
+
+2009-06-09  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c: Don't align code to 16 bytes on arm.
+       
+       * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
+       before the methods they belong to.
+
+       * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
+       the full-aot case if possible, since the trampoline will be called right 
+       away.
+
+       * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
+       trampolines to 1024 after the change above.
+
+       * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
+       trampoline to save 8 bytes per trampoline.
+
+       * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
+       change above.
+
+2009-06-08  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
+
+2009-06-08  Martin Baulig  <martin@ximian.com>
+
+       * debug-mini.c
+       (MonoDebuggerExceptionAction): Moved into debug-mini.h.
+       (_mono_debugger_throw_exception): Don't make this static.
+       (_mono_debugger_unhandled_exception): Likewise.
+       (mono_debugger_handle_exception): Moved to mini-exceptions.c
+
+       * debug-mini.c
+       (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
+       (_mono_debugger_throw_exception): Add function prototype.
+       (_mono_debugger_unhandled_exception): Likewise.
+
+       * mini-exceptions.c
+       (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
+       arg; return the first exception handler if the exception is caught
+       and we're running inside the debugger.
+       (mono_debugger_handle_exception): Moved here from debug-mini.c;
+       improve exception handle inside runtime-invoke, check whether the
+       exception is actually caught in the method being invoked and not
+       by the runtime-invoke-wrapper.
+
+2009-06-08  Zoltan Varga  <vargaz@gmail.com>
+
+       * image-writer.c: Improve support for the osx assembler.
+
+       * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
+       support them.
+
+2009-06-07  Zoltan Varga  <vargaz@gmail.com>
+
+       * image-writer.c (append_subsection): Don't align subsections of the
+       debug_line section as a workaround.
+
+       * dwarfwriter.c: Emit line number info in the AOT case as well.
+
+2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
+
+       This patch is contributed under the terms of the MIT/X11 license
+
+       * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
+       code_len <= code_size
+
+2009-06-06  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
+
+2009-06-04  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c aot-runtime.c: Delete references to static rgctx
+       invoke wrappers, we now use trampolines instead.
+
+2009-06-04  Mark Probst  <mark.probst@gmail.com>
+
+       * mini-darwin.c: The exception thread must not be registered with
+       the GC.
+
+2009-06-04  Mark Probst  <mark.probst@gmail.com>
+
+       * mini-gc.c: Disable the code because it makes SGen crash.
+
+2009-06-03  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
+       instead of asserting.
+
+2009-05-31  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (mono_compile_assembly): Move the creation of the
+       output file after the code has been compiled.
+
+2009-05-30  Zoltan Varga  <vargaz@gmail.com>
+
+       * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
+
+2009-05-31  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
+       entries distinction to simplify the code.
+
+       * mini.h: Bump AOT file format version.
+       
+2009-05-28  Zoltan Varga  <vargaz@gmail.com>
+
+       * objects.cs: Fix the signature of one of the tests.
+
+       * mini.c (mini_create_ftnptr): New helper function, moved here from
+       object.c.
+       (mini_get_addr_from_ftnptr): Ditto.
+       (mini_init): Install the new helpers.
+
+2009-05-28  Martin Baulig  <martin@ximian.com>
+
+       Correctly initialize the debugger when embedding Mono.
+
+       * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
+       `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
+       see documentation in mini_debug_running_inside_mdb().
+
+       * debug-debugger.c
+       (mini_debug_running_inside_mdb): New function to check whether
+       we're running inside mdb.
+
+       * mini.c (mini_init): Call mini_debugger_init() if we're running
+       inside the debugger.
+
+       * driver.c (mono_main): Moved the call to mini_debugger_init()
+       into mini_init() to make this work when embedding Mono.
+
+       * debug-debugger.c (mini_debugger_init): Warn about duplicate
+       calls to mini_debugger_init().
+
+       * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
+       mono_debugger_main() -> mini_debugger_main() and put them inside a
+       `MONO_DEBUGGER_SUPPORTED' conditional.
+
+2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
+       this is no longer in use.
+       * mini.h: Same.
+
+2009-05-26  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-sparc.c (add_outarg_load): Fix the sparc build.
+
+       * aot-compiler.c (emit_method_code): Always write out C style symbols for
+       methods.
+
+2009-05-27  Martin Baulig  <martin@ximian.com>
+
+2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
+       long_conv_to_r_un to 64 bits.
+
+       * cpu-x86.md: Increase the instruction size due to the changes.
+
+       * iltests.il.in: Add regression test.
+
+       Fixes #467201.
+
+2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * objects.cs: Move the previous test from basic.cs to here.
+
+2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * basic.cs: Add regression test for #506915.
+
+2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
+       optimization we must check the bb of the first byte of stobj as
+       it's the only one set in cil_offset_to_bb.
+
+       Fixes #506915.  
+
+2009-05-25  Zoltan Varga  <vargaz@gmail.com>
+
+       * image-writer.c: Fix pointer directive on ppc64.
+
+2009-05-24  Zoltan Varga  <vargaz@gmail.com>
+
+       * image-writer.c (asm_writer_emit_section_change): Avoid using
+       .bss subsections on ppc too.
+
+2009-05-23  Zoltan Varga  <vargaz@gmail.com>
+
+       * image-writer.c: Fix the definition of TARGET_ASM_....
+       
+       * image-writer.c: Fix the emission of assembler directives in the last
+       change.
+
+       * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
+       exception throwing code to accomodate ppc64.
+
+       * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
+       size to work on ppc64 too.
+
+       * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
+       too.
+
+       * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
+       the assembler dialect instead of using platform specific defines.
+
+2009-05-22  Geoff Norton  <gnorton@novell.com>
+
+       * mini-arm.c (get_call_info): If a structure is split between the stack
+       and argument registers, we should not advance the stack pointer by the entire
+       native size, but just by the amount that spilled.
+
+2009-05-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-arm.c (get_call_info): Handle structures with alignment requirements
+       correctly.
+
+2009-05-21  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
+       wrappers normally.
+       
+       * aot-compiler.c (add_extra_method): Fix up the collection of extra
+       methods so wrapper don't get added twice.
+       (add_generic_instances): Don't add methods of arrays.
+
+       * generics.cs: Mark one test as !FULLAOT.
+
+2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * mini-x86.c (emit_move_return_value): Remove unused vars.
+
+2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * mini-x86.c (mono_arch_emit_call): The decompose code now supports
+       decomposing 8 bytes structs into a LCALL.
+
+       * mini-x86.c (emit_move_return_value): We no longer push the vtype
+       pointer for where to store the returned regs.
+
+       * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
+       state the concern.
+
+       Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
+
+2009-05-20  Miguel de Icaza  <miguel@novell.com>
+
+       * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
+       without getenv.
+
+2009-05-21  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
+
+       * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
+       generics.
+
+2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * local-propagation.c (mono_local_cprop): Avoid local propagation
+       across paired add/sub if the first instruction dest reg is it's
+       source reg. For example:
+
+       int_add_imm R12 <- R12 [1] clobbers: 1
+       int_sub_imm R42 <- R12 [1] clobbers: 1
+
+       The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
+       maintain the math identify.
+
+       Fixes #505375.
+
+2009-05-20  Andreia Gaita  <avidigal@novell.com>
+
+       * Makefile.am: avoid going on the network just to get the revision,
+       use git log instead
+
+2009-05-19  Massimiliano Mantione  <massi@ximian.com>
+
+       Fixed estimate for short branches on amd64 (they were off mark, and
+       enabling call prolog-epilog instrumentations caused assertions).
+       * mini.h (struct MonoBasicBlock): added max_length field to hold the
+       estimate for the maximum length of this basic block.
+       * mini-amd64.c:
+       - mono_arch_emit_prolog: compute max_length for each basic block
+         (instead of max_offset), and inflate size estimate also for entry bb
+         in case of code instrumentation.
+       - mono_arch_output_basic_block: get rid of "cpos" (the current
+         estimated "position" in the code), and always use "offset" instead,
+         which is accurate; at the beginning of the function quickly recompute
+         max_offset for all the remaining blocks, starting from the current
+         cfg->code_len (which is correct, and not estimated) and using the
+         estimated block lengths computed previously.
+
+2009-05-17  Zoltan Varga  <vargaz@gmail.com>
+
+       * exceptions-ppc.c: Remove the caching from the trampoline creation 
+       functions, it is already done in the caller.
+
+       * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
+
+       * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
+       MONO_ARCH_GSHARED_SUPPORTED define.
+
+       * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
+
+       * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
+       function.
+
+2009-05-16  Zoltan Varga  <vargaz@gmail.com>
+
+       * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
+       call to mono_marshal_get_rgctx_invoke ().
+
+       * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
+       mono_marshal_get_static_rgctx_invoke (), all platforms which support
+       gshared use the static rgctx trampolines now.
+       
+       * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
+       platform supports it.
+
+2009-05-15  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
+
+       * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
+
+2009-05-15  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
+
+       * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
+       for ppc.
+
+2009-05-15  Massimiliano Mantione  <massi@ximian.com>
+
+       Made it possible for mono_arch_instrument_epilog to preserve
+       argument registers, otherwise instrumenting the "epilogue" before
+       a tail call would clobber them.
+       * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
+       if like mono_arch_instrument_epilog but with an additional parameter
+       that states if argument registers must be preserved.
+       * mini.c: implemented mono_arch_instrument_epilog as a call to
+       mono_arch_instrument_epilog_full without asking to preserve argument
+       registers (this makes the existing code work as usual).
+       * mini-amd64.c:
+       - mono_arch_instrument_epilog: add parameter to transform it into
+       mono_arch_instrument_epilog_full, and preserve argument registers
+       when required.
+       - mono_arch_output_basic_block, OP_TAILCALL case: call
+       mono_arch_instrument_epilog_full.
+       * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
+       mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
+       only transformed mono_arch_instrument_epilog into
+       mono_arch_instrument_epilog_full.
+
+2009-05-15  Geoff Norton  <gnorton@novell.com>
+
+       * mini-darwin.c: This works on arm now.
+
+2009-05-14  Geoff Norton  <gnorton@novell.com>
+
+       * jit.h, driver.c: Allow full-aot to be decided programatically by the
+       embedding api.
+
+2009-05-15  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
+       label names.
+
+       * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
+       wrappers during full aot mode correctly.
+
+       * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
+       methods correctly.
+
+       * aot-compiler.c (mono_aot_method_hash): Use our internal version of
+       mono_metadata_type_hash ().
+
+2009-05-14  Massimiliano Mantione  <massi@ximian.com>
+
+       * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
+       mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
+       mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
+       Removed MONO_INST_BRLABEL from the instruction flags, and the
+       remaining code that used it, because we do not support branches inside
+       basic blocks (and branch target labels) anymore.
+       * Makefile.am: As part of the above cleanup, remove reference to
+       BURG files which don't exist anymore.
+
 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
 
+       * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
+       osx.
+
+       * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
+       to use mono_arch_throw_corlib_exception.
+
        * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
        mono_arch_throw_corlib_exception for throwing corlib exceptions.