2008-01-18 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
index 2d2feb93d5be104f50d4187723824ebebb41b70f..52e2e2db7f16549593f5d937a9391ebb2977e215 100644 (file)
@@ -1,3 +1,309 @@
+2008-01-18  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
+       profiling is enabled.
+       
+       * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
+       the end.
+       (mono_arch_emit_prolog): Add more first bblock optimizations.
+
+       * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
+       in order if possible.
+       (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
+       bblock, since the arguments are still in their original registers.
+
+       * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
+
+2008-01-17  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
+       as well.
+
+       * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
+       offset 0.
+
+       * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
+
+       * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
+       process async exceptions received while in unmanaged code.
+
+       * mini.c (mini_init): Install a callback with the runtime which will be called
+       when a thread receives an async exception while in unmanaged code.
+
+       * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
+
+       * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
+
+2008-01-16  Wade Berrier  <wberrier@novell.com>
+
+       * cpu-g4.md:
+       * cpu-arm.md:
+       * cpu-s390x.md:
+       fix build
+
+2008-01-16  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
+       compilation with sun cc.
+
+       * cpu-*.md: Fix the build.
+
+       * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
+
+       * mini-amd64.h: Add some comments to the MonoLMF structure.
+
+       * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
+       
+       * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
+       in the LMF structure if possible. This saves two instructions in the
+       managed->native wrappers.
+
+       * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
+
+2008-01-16  Mark Probst  <mark.probst@gmail.com>
+
+       * generic-sharing.c: New type argument lookup code which uses the
+       runtime generic context template.
+
+2008-01-15  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
+
+       * mini-arm.c (add_general): Fix arm eabi parameter passing.
+       (mono_arch_output_basic_block): Fix localloc implementation.
+
+       * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
+
+       * mini-ia64.c (peephole_pass): Fix ia64 build.
+
+       * mini-amd64.c (peephole_pass): Fix a warning.
+       
+       * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
+       at a constant offset from sp/fp.
+
+       * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
+       instead of obtaining it from *lmf in the managed method case.
+
+2008-01-14  Zoltan Varga  <vargaz@gmail.com>
+
+       * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
+
+Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
+
+       * mini.h (MonoInstList): New type.
+       (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
+       __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
+       MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
+       __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
+       MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
+       MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
+       MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
+       MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
+       MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
+       MONO_INST_LIST_FOR_EACH_PREV_SAFE,
+       MONO_INST_LIST_FOR_EACH_ENTRY,
+       MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
+       MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
+       mono_inst_list_first, mono_inst_list_last,
+       mono_inst_list_next, mono_inst_list_prev): New instruction
+       list handling interfaces.
+       (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
+       list head 'ins_list'.
+       (MonoInst): Replace next pointer with list head 'node'.
+       (MonoCallInst): Make 'out_args' a MonoInstList.
+       (MONO_INST_NEW_CALL): Explicitly init ->out_args.
+       (MonoCompile): Delete reverse_inst_list and
+       reverse_inst_list_len.
+       * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
+       mono_arch_lowering_pass, mono_arch_local_regalloc,
+       mono_arch_output_basic_block, mono_arch_emit_prolog):
+       Convert to new instruction lists.
+       (insert_after_ins): Delete.
+       * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
+       instruction lists.
+       * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
+       * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
+       split_bblock, mono_add_ins_to_end, mono_emit_call_args,
+       mono_emulate_opcode, mono_emit_load_got_addr,
+       inline_method, mono_method_to_ir, mono_print_bb_code,
+       print_dfn, decompose_pass, nullify_basic_block,
+       replace_out_block_in_code, remove_block_if_useless,
+       merge_basic_blocks, move_basic_block_to_end,
+       try_unsigned_compare, optimize_branches, mono_print_code,
+       mini_select_instructions, remove_critical_edges): Likewise.
+       * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
+       peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
+       mono_arch_output_basic_block, mono_arch_emit_prolog):
+       Likewise.
+       * mini-mips.c (mono_arch_call_opcode, peephole_pass,
+       NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
+       mono_arch_output_basic_block): Likewise.
+       (inst_list_prepend, insert_after_ins): Delete.
+       * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
+       MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
+       instruction lists.
+       * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
+       peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
+       mono_arch_emit_prolog): Likewise.
+       * cfold.c (mono_constant_fold): Likewise.
+       * liveness.c (visit_bb, mono_analyze_liveness,
+       optimize_initlocals): Likewise.
+       * ssapre.c (dump_code, process_bb, code_motion): Likewise.
+       * graph.c (mono_draw_code_cfg): Likewise.
+       * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
+       mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
+       mono_ssa_cprop): Likewise.
+       * abcremoval (get_relations_from_previous_bb, process_block):
+       Likewise.
+       * local-propagation (mono_cprop_invalidate_values,
+       mono_local_cprop_bb): Likewise.
+       * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
+       peephole_pass, mono_arch_output_basic_block,
+       mono_arch_emit_prolog): Likewise.
+       * mini-arm.c (mono_arch_call_opcode, peephole_pass,
+       NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
+       mono_arch_emit_prolog): Likewise.
+       (insert_after_ins): Delete.
+       * aliasing.c (print_code_with_aliasing_information,
+       mono_build_aliasing_information, mono_aliasing_deadce):
+       Convert to new instruction lists.
+       * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
+       peephole_pass, NEW_INS, mono_arch_lowering_pass,
+       mono_arch_local_regalloc, mono_arch_output_basic_block):
+       Likewise.
+       (insert_after_ins): Delete.
+       * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
+       peephole_pass, mono_arch_output_basic_block): Convert to
+       new instruction lists.
+       * mini-codegen (InstList, inst_list_prepend,
+       insert_after_ins): Delete.
+       (insert_before_ins, get_register_force_spilling,
+       get_register_spilling, free_up_ireg, free_up_reg,
+       create_copy_ins, create_spilled_store, alloc_int_reg,
+       alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
+       to new instruction lists.
+       * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
+       NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
+       mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
+       (insert_after_ins): Delete.
+       * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
+       mono_arch_local_regalloc, mono_arch_output_basic_block,
+       mono_arch_call_opcode): Convert to new instruction lists.
+       (insert_after_ins): Delete.
+       * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
+       peephole_pass, mono_arch_output_basic_block,
+       mono_arch_emit_prolog): Convert to new instruction lists.
+
+2008-01-11  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
+
+       * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
+       Fixes #353182.
+
+       * Makefile.am (version.h): Make this work with non-bash shells.
+
+2008-01-10  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
+
+2008-01-08  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
+       the InitializeArray optimization.
+
+2008-01-06  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c driver.c: Don't include os/gc_wrapper.h.
+
+2008-01-05  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (print_jit_stats): Print GC statistics if available.
+
+2008-01-04  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
+
+2007-12-29  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
+
+2007-12-26  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
+       
+       * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
+
+       * driver.c (mono_main): Ditto.
+
+2007-12-23  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
+
+       * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
+       in the vtable can't be encoded.
+       (compile_method): Ditto.
+
+2007-12-21  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
+       defined.
+
+       * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
+       lmf->rbp.
+
+       * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
+       the top LMF entry belongs to the current method.
+
+       * mini.c: Update after renaming of mono_thread_get_pending_exception ().
+
+2007-12-20  Zoltan Varga  <vargaz@gmail.com>
+
+       * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
+       
+       * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
+
+       * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
+
+       * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
+
+       * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
+
+       * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
+       implementation.
+
+       * basic-float.cs: Add an ulong->double cast test.
+
+2007-12-15  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini.c (mono_method_to_ir): Fix a warning.
+
+2007-12-14  Zoltan Varga  <vargaz@gmail.com>
+
+       * mini-ops.h: Add OP_SWITCH.
+
+       * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
+       CEE_SWITCH in back-end code, use OP_SWITCH instead.
+
+2007-12-11  Geoff Norton  <gnorton@novell.com>
+
+       * mini-s390x.c: Minor change to the MAX() define to allow
+       it to compile with other gcc versions.
+
+2007-12-11  Geoff Norton  <gnorton@novell.com>
+
+       * cpu-s390x.md:
+       * mini-s390x.c: Implement sext_i4 to fix the build on s390x
+
+2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
+
+       exceptions-arm.c (mono_arch_get_restore_context): Restore
+       the frame pointer.
+
+       exceptions-arm.c (throw_exception): Save the frame pointer.
+       This is a partial fix for #323747. Only the client side is
+       fixed.
+
 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
 
        * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ