2007-11-30 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
index ab505ed99d3cdf1b28d11a1e10bed0d1628335c8..4497d71c77d1ad30733d78153c71f336e4d3ff89 100644 (file)
@@ -1,3 +1,418 @@
+2007-11-30  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
+       
+       * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
+
+       * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
+
+       * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
+
+       * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
+       is created by the inlined delegate ctor.
+
+       * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
+
+       * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
+
+2007-11-29  Zoltan Varga  <vargaz@gmail.com>
+
+       * cpu-x86.md: Fix the length of ckfinite.
+
+2007-11-28  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
+       
+       * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
+       (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
+
+       * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
+
+       * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
+       OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
+
+2007-11-28  Martin Baulig  <martin@ximian.com>
+
+       * mini-x86.c
+       (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
+       after creating the trampoline.
+
+2007-11-27  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-runtime.c (load_aot_module): Check runtime version if needed.
+
+       * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
+       the same version.
+
+       * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
+       instead of the calling method to help AOT.
+
+       * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
+
+2007-11-26  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
+       is defined.
+
+2007-11-23  Zoltan Varga  <vargaz@gmail.com>
+
+       * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
+       
+       * aot-compiler.c (compile_method): Correct check for generic method definitions.
+       (encode_method_ref): No need to handle generic method definitions specially.
+
+       * mini.h (MONO_AOT_FILE_VERSION): Bump this.
+
+       * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
+       decode_klass_info.
+
+       * aot-compiler.c (encode_klass_ref): Clean this up and rename from
+       encode_klass_info.
+       (compile_method): Enable generic sharing.
+
+2007-11-22  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
+       (mini_method_compile): Add preliminary support for AOTing shared generic code.
+
+       * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
+       generic code.
+
+       * mini-trampolines.c: Fix a warning.
+
+       * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
+       NEW_PCONST.
+       (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
+       (generic_class_is_reference_type): Remove unused function.
+
+       * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
+       in the generic vtable trampoline case.
+
+       * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
+       
+       * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
+       return an AOT method based on a vtable slot.
+
+       * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
+
+       * mini.c (mini_get_vtable_trampoline): Export this.
+
+2007-11-22  Martin Baulig  <martin@ximian.com>
+
+       * debug-debugger.h
+       (MonoDebuggerInfo): Move `debugger_version' up.
+
+2007-11-22  Martin Baulig  <martin@ximian.com>
+
+       * mini-amd64.c
+       (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
+
+       * mini-trampolines.c
+       (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
+       after compiling the method.
+
+2007-11-20  Martin Baulig  <martin@ximian.com>
+
+       * debug-mini.c
+       (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
+       (mono_debugger_remove_breakpoint): Likewise.
+       (mono_debugger_check_breakpoints): Likewise.
+
+       * debug-debugger.c: Implement the new breakpoint interface here.
+
+2007-11-18  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
+       CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
+
+       * mini-x86.c (mono_arch_output_basic_block): Ditto.     
+
+2007-11-17  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
+
+       * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
+       mini.c.
+
+       * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
+       mini.c.
+
+       * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
+       returning a vtype in a register.
+
+       * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
+       here from the arch specific code.
+
+       * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
+       mini.c.
+
+       * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
+       (mono_arch_emit_prolog): Increment maximum prolog size.
+
+       * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
+       START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
+
+       * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
+       MonoGenericSharingContext.
+
+       * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
+       MonoGenericSharingContext. Allocate memory from the cfg mempool.
+
+2007-11-15  Mark Probst  <mark.probst@gmail.com>
+
+       * mini.c, mini.h, generic-sharing.c: Functions for producing code
+       which extract fields out of the runtime generic context.  Full
+       sharing of the NEWARR opcode.
+
+Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
+       --enable-minimal=ssa.
+
+2007-11-13  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-trampolines.c (mono_delegate_trampoline): Update after 
+       mono_marshal_get_delegate_invoke () signature change.
+
+2007-11-13  Mark Probst  <mark.probst@gmail.com>
+
+       * mini.c: Removed the shared context in favor of the generic
+       sharing context.  Allocate the MonoJitInfo structure with room for
+       the generic sharing context if it's needed.
+
+       * mini.h: Remove MonoGenericSharingContext declaration.  It's in
+       domain-internals.h now.
+
+       * mini-x86.c: Pass the generic sharing context to get_call_info ().
+
+       * generic-sharing.c: Several changes for working without a shared
+       context and instead operating on open types instead.
+
+2007-11-12  David S. Miller  <davem@davemloft.net>
+
+       * inssel-sparc.brg: Fix double instruction emit.
+
+2007-11-12  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
+       Get/Set/Address methods.
+       
+       * mini.c debug-debugger.c mini-trampolines.c: Update after 
+       mono_marshal_get_delegate_invoke signature change.
+
+2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
+       This can happens with dynamic methods. Fixes the other bug in #322722.
+
+2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * tramp-arm.c (mono_arch_patch_callsite): Support patching
+       BX call sequence.
+
+       * mini-arm.c (arm_patch): Implement patching of BX call
+       sequence. Fixes one of the bugs in #322722.
+
+2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
+
+       * mini-sparc.c (mono_arch_flush_icache): Make more efficient
+       under Linux.  We only need to flush every 32-byte cache line.   
+
+2007-11-07  Massimiliano Mantione  <massi@ximian.com>
+
+       * mini.c:
+       move_basic_block_to_end: Add branches when needed, eventually creating
+       a new BB.
+       optimize_branches: added a parameter that tells if it's ok to create
+       new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
+       and avoid calling move_basic_block_to_end when it's not ok.
+       Fixes bug 318677.
+
+2007-11-07  Mark Probst  <mark.probst@gmail.com>
+
+       * mini.c: Abort inlining call to InitializeArray if something
+       looks wrong.  Let the icall handle it, which now has proper safety
+       checks.
+
+2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * mini.c (mono_spill_call): add support for soft-float.
+
+       * mini.c (mono_method_to_ir): add support for soft-float
+       to inlined functions that return float.
+
+       * mini.c (mono_method_to_ir): add support for soft-float
+       to cee_stsfld opcode on float fields.
+
+2007-11-05  Geoff Norton  <gnorton@novell.com>
+
+       * mini-x86.h: Fix the structure access for X86 Leopard.
+
+
+2007-11-05  Martin Baulig  <martin@ximian.com>
+
+       * mini-trampolines.c
+       (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
+       after compiling the method to notify the debugger.
+
+2007-11-05  Martin Baulig  <martin@ximian.com>
+
+       * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
+
+2007-11-02  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
+       David Miller <davem@davemloft.net>. Allow larger offsets in branches.
+
+2007-11-01  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
+       native-to-managed wrappers.
+       
+2007-11-01  Geoff Norton  <gnorton@novell.com>
+
+       * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
+       members.
+
+Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * mini.c, mini-x86.c: when getting back from unmanaged code
+       to managed via a marshaled delegate we also need to set the
+       right domain.
+
+Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
+       for amd64.
+
+Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
+
+       * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
+       let the debugger or other external agents to tell the JIT when
+       a sw breakpoint has been inserted in the code that the JIT needs
+       to be able to inspect.
+
+2007-10-31  Martin Baulig  <martin@ximian.com>
+
+       * debug-debugger.h
+       (MonoDebuggerInfo): Remove `runtime_class_init'.
+
+2007-10-30  Martin Baulig  <martin@ximian.com>
+
+       * debug-mini.h
+       (mono_debugger_thread_created): Added `MonoThread *' argument.
+       (mono_debugger_extended_notification): New public method.
+       (mono_debugger_trampoline_compiled): New public method.
+
+       * debug-mini.c
+       (MonoDebuggerThreadInfo): Added `thread' and
+       `extended_notifications' fields.
+
+       * debug-debugger.c
+       (debugger_executable_code_buffer): New static variable.
+
+       * debug-debugger.h
+       (MonoDebuggerInfo): Added `executable_code_buffer',
+       `executable_code_buffer_size', `breakpoint_info_area',
+       `breakpoint_table' and `breakpoint_table_size'.
+
+2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
+       that IP  either is an unused value or the vtable pointer. IMT 
+       calls use vtable + offset now. Reduced by almost half the size
+       of IMT entries.
+
+2007-10-26  Jonathan Chambers <joncham@gmail.com>
+
+       * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
+       defines to access param registers. Replace long usage with
+       gsize as sizeof(long) != sizeof(void*) on Win64.
+
+       * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
+       on Win64. Fix intrinsic, use _AddressOfReturnAddress
+       instead of non-existant _GetAddressOfReturnAddress.
+
+       * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
+       param registers. Save/restore %rdi and %rsi in MonoLMF.
+
+       * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
+       param registers. Modify (throw_exception) signature to take 
+       %rdi and %rsi on Win64. 
+
+       Code is contributed under MIT/X11 license.
+
+Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * helpers.c: unlink debugging output files.
+
+2007-10-25  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c: Move mono_create_ftnptr () to object.c.
+
+2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * helpers.c (mono_disassemble_code): MonoCompile parameter is now
+       optional. This function can now be used to disassemble code generated
+       outside the JIT such as trampolines and IMT thunks.
+
+       * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
+
+       * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
+       vtable pointer from a ldr instruction.
+
+       * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
+       new IMT call sequence.
+
+       * mini-arm.c (mono_arch_output_basic_block): emit the IMT
+       call sequence for interface invocations.
+
+       * mini-arm.c (mono_arch_emit_imt_argument): added, required
+       for imt support. This function is empty since IMT on ARM requires no
+       special handling on the IR side.
+
+       * mini-arm.c (mono_arch_find_imt_method): added, required for
+       imt support.
+
+       * mini-arm.c (mono_arch_find_this_argument): added, required
+       for imt support.
+
+       * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
+       a ldr instruction to load a value stored in the code stream.
+
+       * mini-arm.c (mono_arch_build_imt_thunk):added, required
+       for imt support.
+
+
+2007-10-23  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (mini_init): Install the jump trampoline callback.
+
+Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * mini-trampolines.c: handle synchronized methods with the common
+       vtable trampoline (bug #335601).
+
+2007-10-17  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
+
+       * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
+       64 bit platforms.
+
+       * mini-ia64.h mini-ia64.c: Add support for IMT.
+
+       * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
+       prolog. Fixes #331958.
+
+2007-10-15  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
+
+Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
+
+       * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
+       trampoline.
 
 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>