1 2009-02-09 Zoltan Varga <vargaz@gmail.com>
3 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
5 * aot-runtime.c (is_shared_got_patch): Ditto.
7 * aot-runtime.c (load_named_code): Cope with the fact that
8 decode_got_entry () won't decode the patch fully if its corresponding got
9 entry is already filled.
11 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full):
13 (mono_arch_create_monitor_exit_trampoline_full): Ditto.
15 * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
16 as the moving pointer instead of 'buf' for consistency with the rest of the
18 (mono_arch_create_monitor_exit_trampoline): Ditto.
20 * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
21 generic_class_init trampolines.
22 (add_generic_class): Extract some code from add_generic_instances () into a
23 separate function so it can be called from other places too.
24 (compile_method): Call add_generic_class () for the classes of inflated methods
25 referenced by the method.
26 (can_encode_patch): Allow references to generic parameters.
28 * aot-runtime.c: Add support the patches required by the new trampolines.
30 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
33 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
36 * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
37 this from get_throw_pending_exception, make the signature full aot compatible.
39 * Makefile.am (fullaotcheck): New target to run full-aot tests.
41 * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
43 * exceptions.cs: Add a test.
45 2009-02-07 Zoltan Varga <vargaz@gmail.com>
47 * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
48 use the DWARF_DATA_ALIGN constant instead.
50 * exception-<ARCH>.c: Update after the above change.
52 * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
55 * mini-arm.c: Enable the dwarf unwinder.
57 * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
58 instead of mono_class_setup_vtable ().
60 2009-02-07 Zoltan Varga <vargaz@gmail.com>
62 * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
65 * mini-x86.h: Enable the dwarf unwinder.
67 2009-02-06 Raja R Harinath <harinath@hurrynot.org>
69 Fix mcs/tests/test-7.cs
70 * mini-amd64.c (mono_arch_allocate_vars): Revert change from
73 2009-02-06 Zoltan Varga <vargaz@gmail.com>
75 * mini.c (print_jit_stats): Remove some unused statistics.
77 2009-02-05 Zoltan Varga <vargaz@gmail.com>
79 * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
81 2009-02-05 Mark Probst <mark.probst@gmail.com>
83 * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
84 the method we get from mono_object_get_virtual_method() because
85 that function does it properly, now.
87 2009-02-05 Zoltan Varga <vargaz@gmail.com>
89 * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
90 opcodes. Fixes #472775.
92 2009-02-05 Mark Probst <mark.probst@gmail.com>
94 * mini-exceptions.c (ves_icall_get_frame_info): Account for the
95 fact that mono_find_jit_info() sometimes returns the context
96 corresponding to the jit info in new_ctx. Fixes #472600.
98 2009-02-05 Zoltan Varga <vargaz@gmail.com>
100 * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
101 mini-s390.c: Use mono_class_enum_basetype () instead of accessing
102 klass->enum_basetype directly.
104 * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
107 * unwind.c: Avoid 0 sized arrays.
109 2009-02-04 Zoltan Varga <vargaz@gmail.com>
111 * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
112 size on systems with 64k pages. Fixes #471389.
114 2009-02-04 Mark Probst <mark.probst@gmail.com>
116 Contributed under the terms of the MIT/X11 license by Steven
117 Munroe <munroesj@us.ibm.com>.
119 * mini-ppc.c (mono_arch_output_basic_block): Generate better code
120 for LOADI4_MEMBASE. Use addi instead of addic if it's not
123 2009-02-04 Mark Probst <mark.probst@gmail.com>
125 Contributed under the terms of the MIT/X11 license by Steven
126 Munroe <munroesj@us.ibm.com>.
128 * exceptions-ppc.c (mono_arch_get_restore_context): Code size
131 * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
132 The trampoline can be longer on PPC64.
134 2009-02-04 Mark Probst <mark.probst@gmail.com>
136 Contributed under the terms of the MIT/X11 license by Steven
137 Munroe <munroesj@us.ibm.com>.
139 * mini-ppc.c: Compiler warning fixes and trivial code
142 2009-02-04 Zoltan Varga <vargaz@gmail.com>
144 * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
145 ins->dreg which could be a hardware register, not a vreg.
147 * aot-compiler.c (emit_method_dwarf_info): Ditto.
149 * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
150 (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
152 * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
154 * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
155 ->dreg, that is not the vreg we are looking for.
157 * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
159 * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
162 * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
165 2009-02-03 Zoltan Varga <vargaz@gmail.com>
167 * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
169 * aot-compiler.c (emit_line_number_info): Fix line number emission when
172 * aot-compiler.c: Add xdebug support on x86.
174 * unwind.c: Add x86 support.
176 * aot-compiler.c (emit_exception_debug_info): Control the emission of
177 unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
179 * mini.c (mini_method_compile): Ditto.
181 * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
184 * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
185 which mimic .push_section/.pop_section in GAS.
187 * aot-compiler.c: Emit precise live range information for variables.
189 * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
191 * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
192 the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
195 * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
196 the live ranges of variables.
198 * mini.h (struct MonoMethodVar): Add two fields containing the live range
199 of the variable in terms of native offsets.
201 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
203 * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
205 2009-02-02 Mark Probst <mark.probst@gmail.com>
207 Contributed under the terms of the MIT/X11 license by Steven
208 Munroe <munroesj@us.ibm.com>.
210 * exceptions-ppc.c (restore_regs_from_context): Correct operand
211 order (offset then base reg) for ppc_load_multiple_regs.
212 (emit_save_saved_regs) Correct operand order for
213 ppc_store_multiple_regs.
214 (mono_arch_get_call_filter): Correct operand order for
215 ppc_load_multiple_regs.
217 * mini-ppc.c (emit_memcpy): Fix operand order for
218 ppc_load_reg_update and ppc_store_reg_update.
219 (mono_arch_output_basic_block): Correct operand order for ppc_lha.
220 (mono_arch_emit_epilog): Correct operand order for
221 ppc_load_multiple_regs.
223 * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
224 order for ppc_store_multiple_regs and ppc_load_multiple_regs.
226 2009-02-02 Mark Probst <mark.probst@gmail.com>
228 * cpu-ppc64.md: Fixed storer4_memindex length.
230 2009-02-02 Zoltan Varga <vargaz@gmail.com>
232 * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
235 * aot-compiler.c (emit_line_number_info): Optimize this.
237 2009-02-01 Zoltan Varga <vargaz@gmail.com>
239 * aot-compiler.c: Disassemble tokens in the IL disassembly.
241 * aot-compiler.c: Add debug info for methods without debug info by
242 emitting an IL file and having the line number info referencing that file.
244 * aot-compiler.c: Optimize the size of the generated line number info.
246 * aot-compiler.c: Emit line number info in xdebug mode.
248 * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
251 2009-01-31 Zoltan Varga <vargaz@gmail.com>
253 * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
255 * driver.c (mono_main): Enable debugging support automatically if XDEBUG
258 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
260 * basic-calls.cs: Test for the weird crash found on arm.
262 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
264 * cpu-arm.md: Increase the size of storer8_membase_reg and
265 loadr8_membase_reg to 24 bytes to accomodate the extra add.
267 * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
268 OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
269 reg to LR otherwise we'll be loading/storing from just the offset.
271 2009-01-30 Miguel de Icaza <miguel@novell.com>
273 Question: if we are storing gint32's inside the "*native_offset",
274 should we change the signature to "gint32 *native_offset" to
275 ensure that we do not have type definition problems?
277 * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
278 an int * as this is what the other function expects, causes
279 problems with Freescale's compiler that defined int32_t to be a
280 long and makes int incompatible
282 2009-01-30 Miguel de Icaza <miguel@novell.com>
284 * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
285 filename conflict with bjam.
287 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
289 * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
290 as it might use decomposed ops.
292 2009-01-30 Zoltan Varga <vargaz@gmail.com>
294 * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
296 * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
299 * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
301 * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
304 * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
305 way registers are stored in MonoContext on arm.
307 * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
308 instead of locking so mono_get_cached_unwind_info () becomes signal safe.
310 * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
312 * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
314 * mini.c (mini_init): Register mono_isfinite.
316 * jit-icalls.c (mono_isfinite): New jit icall.
318 * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
320 * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
321 set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
324 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
326 * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
327 separate frame and stack pointers, so we must use FP to find the register
329 The FP reg is retrieved from the MonoContext::regs array.
331 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
333 * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
336 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
338 * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
339 return R4 and R8 when not running under softfloat.
341 Fixes basic-calls.exe
343 2009-01-30 Zoltan Varga <vargaz@gmail.com>
345 * mini-arm.c: Implement some overflow opcodes.
347 2009-01-29 Miguel de Icaza <miguel@novell.com>
349 * ssa.c: handle another alloca.h
351 * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
352 PLATFORM_WIN32 for detecting if we have sigaction. Instead use
353 MONO_ARCH_USE_SIGACTION.
355 * aot-runtime.c, mini-exceptions.c: Replace platform define with
358 * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
360 * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
361 PPC targets as sigaction does not exist on all platforms, define
362 this on a per-platform basis.
364 Instead of erroring out if the platform is not defined, include
365 mini-ppc-os.h, and expect that the OS specific setting provides
366 the required information.
368 2009-01-30 Zoltan Varga <vargaz@gmail.com>
370 * aot-compiler.c: Fix --enable-minimal=aot.
372 2009-01-30 Zoltan Varga <vargaz@gmail.com>
374 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
377 2009-01-29 Zoltan Varga <vargaz@gmail.com>
379 * exceptions-arm.c: Fix warnings.
381 * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
384 * mini-x86.c: Fix --enable-minimal=jit build.
386 * mini.c: Really fix --enable-minimal=jit build.
388 * mini.c (construct_object_context_for_method): Move this outside
389 the DISABLE_JIT block to fix the --enable-minimal=jit build.
391 "Backported" of r124984 from 2.0 branch.
393 * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
395 "Backport" of r124977 + r124978 from 2.0 branch.
397 * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
398 to avoid calling mono_exception_from_token () from the throw trampoline.
399 (mono_arch_get_throw_exception_generic): call throw_exception_by_token
400 for throwing corlib exceptions, this fixes full-aot support for corlib
403 * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
405 2009-01-29 Miguel de Icaza <miguel@novell.com>
407 * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
408 part of the changes to split the code in mini into operating
409 system specific files.
411 This patch was done by copying mini.c to the respective files to
412 preserve SVN history.
414 2009-01-29 Zoltan Varga <vargaz@gmail.com>
416 * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
418 2009-01-28 Zoltan Varga <vargaz@gmail.com>
420 * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
421 remoting-invoke-with-check wrappers of shared methods.
423 * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
425 2009-01-27 Mark Probst <mark.probst@gmail.com>
427 * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
428 optimization if the top of stack is the last instruction in the
429 bblock. Otherwise it might have been used after its definition.
432 2009-01-27 Zoltan Varga <vargaz@gmail.com>
434 * mini-trampolines.c (mono_magic_trampoline): Print out the caller
435 method as well when get_vcall_slot () fails to match a code sequence.
437 * mini-arm.c: Fix the android build, which doesn't have
440 2009-01-26 Zoltan Varga <vargaz@gmail.com>
442 * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
445 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
447 * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
449 2009-01-26 Zoltan Varga <vargaz@gmail.com>
451 * mini.c (mini_method_compile): Save the unwind info generated by the JIT
452 and put its id into jinfo->used_regs. This is only used on amd64,
453 which is currently the only platform generating unwind info.
455 * exceptions-amd64.c: Instead of unwinding based on a register mask, use
456 the dwarf unwinder. This is required to correctly handle async exceptions
457 like thread abort and stack overflows, which can happen while a method
458 is in the middle of its prolog or epilog.
460 * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
461 the unwind info belonging to an AOTed method.
463 * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
464 into cfg->unwind_ops.
466 * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
468 * mini.c (mini_init): Call mono_unwind_init ().
469 (mini_cleanup): Call mono_unwind_cleanup ().
471 * unwind.c: Add functions for managing a set of unwind info entries, allowing
472 unwind info to be shared between methods.
474 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
477 * exceptions-amd64.c (mono_arch_exceptions_init): Call
478 get_throw_pending_exception () to avoid initialization races.
480 * mini-exceptions.c (mono_exceptions_init): Call an arch specific
481 mono_arch_exceptions_init () function.
483 * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
485 2009-01-25 Zoltan Varga <vargaz@gmail.com>
487 * mini.c (mono_get_domain_intrinsic): New helper function.
488 (mono_get_thread_intrinsic): Ditto.
490 * mini-arm.c mini-ia64.c: Use the new helper functions.
492 * method-to-ir.c (mono_method_to_ir): Fix the comment for
493 the last constrained_call change, since it is needed in the non-AOT
496 * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
498 * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of
499 mono_get_lmf_addr () on arm eabi linux.
501 2009-01-24 Zoltan Varga <vargaz@gmail.com>
503 * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
504 code sequence which matches a non-virtual call.
506 2009-01-23 Mark Probst <mark.probst@gmail.com>
508 * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
511 2009-01-23 Zoltan Varga <vargaz@gmail.com>
513 * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
514 runtime-invoke wrappers, since they are also shared based on signature.
516 2009-01-22 Mark Probst <mark.probst@gmail.com>
518 * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
519 info from the (correct) context.
521 2009-01-22 Zoltan Varga <vargaz@gmail.com>
523 * unwind.c (mono_unwind_frame): Remove a stray g_free ().
525 * unwind.c (mono_unwind_frame): New function to unwind through a frame
526 using dwarf unwinding info. Not yet used.
528 * mini.c (mini_init): When using xdebug, disable freeing of domains.
530 2009-01-21 Mark Probst <mark.probst@gmail.com>
532 * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
535 * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
536 special case and handle mono_arch_delegate_invoke_impl() returning
537 function descriptors.
539 * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
540 trampolines return function descriptors, too.
542 2009-01-21 Zoltan Varga <vargaz@gmail.com>
544 * method-to-ir.c (handle_alloc): Avoid generic instances in the
545 out_of_line optimization.
547 2009-01-21 Martin Baulig <martin@ximian.com>
550 (MonoCompile): Added `disable_deadce_vars' to disable removing
554 (mini_method_compile): Set `cfg->disable_deadce_vars' when running
557 * liveness.c (mono_analyze_liveness): Don't remove any unused
558 variables if `cfg->disable_deadce_vars' is set.
560 2009-01-21 Mark Probst <mark.probst@gmail.com>
562 * method-to-ir.c: Only apply exception constructor optimization if
563 the the method actually belongs to an exception class. Fixes
566 2009-01-21 Zoltan Varga <vargaz@gmail.com>
568 * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
569 change inside a #ifdef __mono_ppc64__.
571 * aot-compiler.c (compile_method): Remove the previous limitation.
573 * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
574 on type variables in AOTed code.
576 * aot-compiler.c (compile_method): Skip generic methods having type
577 constraints on their generic parameters.
579 * aot-compiler.c (compile_method): Check for methods which cannot be
580 encoded inside RGCTX_FETCH patches as well.
582 * mini-exceptions.c (mono_print_thread_dump): Fix the windows
585 2009-01-20 Mark Probst <mark.probst@gmail.com>
587 * method-to-ir.c: Force the vtable variable in shared generic code
588 for the case that they might show up on a stack trace where they
591 * mini-exceptions.c: Save and use generic sharing info as well as
592 IP in stack traces to resolve shared generic instantiations.
594 2009-01-20 Zoltan Varga <vargaz@gmail.com>
596 * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
597 added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
599 2009-01-20 Mark Probst <mark.probst@gmail.com>
601 * method-to-ir.c: Do generic sharing for array constructors.
603 2009-01-20 Rodrigo Kumpera <rkumpera@novell.com>
605 * mini-exceptions.c (mono_print_thread_dump): Add information
606 about the thread state using wapi_current_thread_desc.
608 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
610 * basic-simd.cs: Tests for the new constructors.
612 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
614 * mini-ops.h: Added OP_EXPAND_*
618 * mini-x86.c (mono_arch_output_basic_block): Same.
620 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
622 2009-01-19 Zoltan Varga <vargaz@gmail.com>
624 * iltests.il.in: Add a test for #467385.
626 2009-01-18 Rodrigo Kumpera <rkumpera@novell.com>
628 * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
629 thread been cleaned up is not the same currently in execution.
631 Fixes appdomain-unload crashes on windows, osx and linux variants
632 without the __thread keyword.
634 2009-01-18 Zoltan Varga <vargaz@gmail.com>
636 * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
637 (koush@koushikdutta.com). Implement this for android.
639 * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
642 * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
643 mono_marshal_get_write_barrier ().
645 2009-01-17 Rodrigo Kumpera <rkumpera@novell.com>
647 * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
648 of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
649 that pass them on a register pair.
651 This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
652 test was crashing due to that.
654 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
656 * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
657 trampoline code. Include ucontext.h only if available.
659 2009-01-15 Mark Probst <mark.probst@gmail.com>
661 * mini.c: mono_domain_lookup_shared_generic() takes an open method
662 and doesn't check whether it's sharable, like it was before
663 removing the shared generics hash. This brings IronPython
664 performance back to what it was before that change.
666 2009-01-14 Mark Probst <mark.probst@gmail.com>
668 * method-to-ir.c: Handle delegate invocation optimization earlier,
669 otherwise it would be handled (much more slowly) by the
670 final/sealed optimization.
672 2009-01-13 Zoltan Varga <vargaz@gmail.com>
674 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
675 domain is not set. Fixes #465864.
677 2009-01-12 Mark Probst <mark.probst@gmail.com>
679 * method-to-ir.c: Don't stop sharing of generic methods with catch
680 clauses - we already handle those.
682 2009-01-12 Mark Probst <mark.probst@gmail.com>
684 * mini.c, mini.h: lookup_generic_method() is now
685 mono_domain_lookup_shared_generic() and uses the jit_code_hash,
686 making the shared_generics_hash obsolete.
688 2009-01-12 Mark Probst <mark.probst@gmail.com>
690 * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
691 use the red zone. Make room on the stack first and then use it,
692 not the other way around.
694 2009-01-12 Zoltan Varga <vargaz@gmail.com>
696 * mini.c (mini_init): Call mono_xdebug_init ().
698 * aot-compiler.c (mono_xdebug_init): Make this non-static.
700 2009-01-11 Zoltan Varga <vargaz@gmail.com>
702 * TestDriver.cs: Add an --iter argument to run tests multiple times.
704 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
707 * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
708 debug+unwind info for trampolines.
710 * mini.c (mono_create_unwind_op): New helper function.
712 * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
714 2009-01-10 Zoltan Varga <vargaz@gmail.com>
716 * aot-compiler.c: Fix the build.
718 2009-01-09 Zoltan Varga <vargaz@gmail.com>
720 * Makefile.am: Update dtrace-prelink.sh location.
722 2009-01-08 Zoltan Varga <vargaz@gmail.com>
724 * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr
725 optimization. Fixes #464520.
727 2009-01-07 Bill Holmes <billholmes54@gmail.com>
729 * mini-amd64.c : Adding code to save/restore non-volatile registers
732 * exceptions-amd64.c : Adding code to save/restore non-volatile
735 Contributed under MIT/X11 license.
737 2009-01-07 Zoltan Varga <vargaz@gmail.com>
739 * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
740 __GNUC_MINOR__ which can break when the major version changes.
742 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
744 * basic-simd.cs: Add tests for usage of the sizeof opcode.
746 2009-01-07 Geoff Norton <gnorton@novell.com>
748 * helpers.c: Allow mono -v -v -v to work on darwin.
750 2009-01-05 Bill Holmes <billholmes54@gmail.com>
752 * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
755 Contributed under MIT/X11 license.
757 2009-01-05 Zoltan Varga <vargaz@gmail.com>
759 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
760 instead of directly accessing type->data.klass. Fixes #462016.
761 (mono_allocate_stack_slots_full): Ditto.
763 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
764 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
766 * aot-compiler.c (emit_plt): Fix ARM build.
768 2009-01-04 Zoltan Varga <vargaz@gmail.com>
770 * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
772 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
775 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
776 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
779 * iltests.il.in: Add a regression test.
781 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
783 * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
785 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
787 * basic-simd.cs: Add a regression test for #462457.
789 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
791 * mini-ops.h: Add a definition of XPHI.
793 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
795 * ssa.c (op_phi_to_move): Handle XPHI.
797 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
801 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
803 * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
805 2008-12-31 Geoff Norton <gnorton@novell.com>
807 * mini-ppc.c: The prolog size allocated can be too small for darwin
808 ppc32 under certain circumstances. Also fix a small logic bug.
810 2008-12-29 Zoltan Varga <vargaz@gmail.com>
812 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
813 while loading AOT methods.
815 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
816 since only the former is nulled out after a successful cast. This prevents
817 crashes with rethrown exceptions when using --debug=casts.
819 2008-12-24 Mark Probst <mark.probst@gmail.com>
821 * mini.h: New macro for checking whether a method is final,
822 i.e. whether the method or its class is marked final.
824 * method-to-ir.c: Use the new macro for all final-checks
825 consistently. Fixes the crash in the System.ServiceModel tests.
827 2008-12-23 Mark Probst <mark.probst@gmail.com>
829 * mini-exceptions.c (get_exception_catch_class): Corrected another
830 overly strict assertion.
832 2008-12-23 Mark Probst <mark.probst@gmail.com>
834 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
835 Clobbering it is not allowed because the caller might use it as
836 the vtable register in the interface call.
838 2008-12-19 Mark Probst <mark.probst@gmail.com>
840 * mini-exceptions.c (get_exception_catch_class): Corrected an
841 overly strict assertion.
843 2008-12-18 Mark Mason <mmason@upwardaccess.com>
845 * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
847 * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
849 * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
851 * cpu-mips.md: correct lengths for certain long_ opcodes.
853 * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
855 * 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().
857 2008-12-17 Mark Mason <mmason@upwardaccess.com>
859 * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
861 2008-12-17 Mark Mason <mmason@upwardaccess.com>
863 * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
865 2008-12-16 Rodrigo Kumpera <rkumpera@novell.com>
867 * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
870 2008-12-16 Mark Mason <mmason@upwardaccess.com>
872 * 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
874 * 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)
876 2008-12-15 Mark Mason <mmason@upwardaccess.com>
878 * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
880 2008-12-14 Zoltan Varga <vargaz@gmail.com>
882 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
883 gshared code. Fixes #458947.
885 * generics.cs: Add a test.
887 2008-12-12 Mark Mason <mmason@upwardaccess.com>
889 * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
891 * mini-mips.c: first pass n32 code generation.
893 * mini-mips.h: datatypes and defines for n32 support.
895 * exceptions-mips.c: first pass n32 code generation.
897 * tramp-mips.c: first pass n32 code generation.
899 * cpu-mips.md: add long_ opcodes.
901 2008-12-12 Mark Mason <mmason@upwardaccess.com>
903 * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
905 * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
907 * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
909 * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
911 * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
913 * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
915 * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
917 * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
919 * helpers.c: for mips/n32, don't pass -mips32 to objdump
921 2008-12-12 Zoltan Varga <vargaz@gmail.com>
923 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
925 2008-12-12 Andrés G. Aragoneses <aaragoneses@novell.com>
927 * driver.c: Sync --help-trace with man page (EXPR,EXPR).
929 2008-12-12 Mark Probst <mark.probst@gmail.com>
931 * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
932 descriptors for helper functions directly in front of the code.
934 2008-12-11 Mark Probst <mark.probst@gmail.com>
936 * method-to-ir.c: Removed an unnecessary assertion.
938 2008-12-10 Zoltan Varga <vargaz@gmail.com>
940 * method-to-ir.c: Merge SGEN changes from the old JIT.
942 2008-12-10 Zoltan Varga <vargaz@gmail.com>
944 * driver.c (compile_all_methods_thread_main): Handle failure of
947 2008-12-10 Mark Probst <mark.probst@gmail.com>
949 * mini-ppc.c: Merged with mini-ppc64.c.
951 * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
953 * Makefile.am: Use the same sources for PPC and PPC64.
955 * mini-ppc64.c: Removed.
957 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
959 * branch-opts.c (remove_block_if_useless): Extract fall through detection
960 code to mono_bb_is_fall_through.
962 * branch-opts.c (mono_remove_critical_edges): Same.
964 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
966 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
967 expect that an OP_BR_REG will be there.
969 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
971 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
972 for the many branch ops. The original check miss OP_BR_REG.
976 2008-12-09 Mark Mason <mmason@upwardaccess.com>
978 * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
980 2008-12-09 Zoltan Varga <vargaz@gmail.com>
982 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
983 while holding the aot lock.
985 2008-12-09 Mark Mason <mmason@upwardaccess.com>
987 * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
989 2008-12-09 Bill Holmes <billholmes54@gmail.com>
991 * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws
992 to release all runtime callable wrappers held by the runtime.
994 Contributed under MIT/X11 license.
996 2008-12-09 Bill Holmes <billholmes54@gmail.com>
998 * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
1001 Contributed under MIT/X11 license.
1003 2008-12-09 Zoltan Varga <vargaz@gmail.com>
1005 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
1006 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
1008 2008-12-09 Mark Mason <mmason@upwardaccess.com>
1010 * cpu-mips.md: fix ckfinite length
1012 * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
1013 (mono_arch_lowering_pass): cleanup, rearrange for clarity
1014 (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
1016 2008-12-08 Mark Mason <mmason@upwardaccess.com>
1018 * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
1020 2008-12-08 Geoff Norton <gnorton@novell.com>
1022 * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
1023 size by 8 bytes as well.
1025 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1027 * basic-simd.cs: Fix method names for Vector16b.
1029 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1031 * basic-simd.cs: Fix method names for Vector16sb.
1033 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1035 * basic-simd.cs: Fix method names for Vector8us.
1037 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1039 * basic-simd.cs: Fix method names for Vector8s.
1041 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1043 * basic-simd.cs: Fix method names for Vector4ui.
1045 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1047 * basic-simd.cs: Fix method names for Vector2l.
1049 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1051 * basic-simd.cs: Fix method names for Vector2d.
1053 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1055 * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
1056 that are extension methods.
1058 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
1060 * basic-simd.cs: Fix method names for Vector4f.
1062 2008-12-08 Zoltan Varga <vargaz@gmail.com>
1064 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
1065 as such. Fixes #456669.
1067 2008-12-07 Mark Mason <mmason@upwardaccess.com>
1069 * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
1071 2008-12-07 Mark Mason <mmason@upwardaccess.com>
1073 * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
1074 (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
1075 (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
1076 (mips_adjust_stackframe): handle FP spills
1078 * mini-ops.h: add mips_mtc1_s2
1080 * cpu-mips.md: add mips_mtc1_s2
1082 2008-12-07 Zoltan Varga <vargaz@gmail.com>
1084 * unwind.c: New file, move the unwind info encoding functions here from
1085 aot-compiler.c, so they could be used at runtime too.
1087 2008-12-05 Mark Mason <mmason@upwardaccess.com>
1089 * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
1090 (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
1092 2008-12-05 Mark Mason <mmason@upwardaccess.com>
1094 * mini-mips.c: cleanup warnings
1095 (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
1096 (mips_adjust_stackframe): handle case of taking the address of stack locals
1098 2008-12-05 Zoltan Varga <vargaz@gmail.com>
1100 * aot-compiler.c: Implement a few functions missing from the asm writer.
1101 (emit_method_code): Only write symbols for methods when using the bin
1102 writer, since the assembler can't deal with the characters in our method
1105 * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
1107 * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
1110 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
1111 a bit to also restore %rax.
1113 2008-12-05 Mark Probst <mark.probst@gmail.com>
1115 * mini-ppc.c: Some simple merges from mini-ppc64.c.
1117 2008-12-05 Zoltan Varga <vargaz@gmail.com>
1119 * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
1122 2008-12-05 Mark Probst <mark.probst@gmail.com>
1124 * exceptions-ppc.c: Merged with exceptions-ppc64.c.
1126 * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
1127 MONO_ARCH_FRAME_ALIGNMENT. Struct for PPC64 function descriptors.
1129 * exceptions-ppc64.c: Removed.
1131 * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
1133 2008-12-05 Mark Probst <mark.probst@gmail.com>
1135 * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
1138 * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
1140 * tramp-ppc64.c: Removed.
1142 2008-12-05 Zoltan Varga <vargaz@gmail.com>
1144 * aot-compiler.c (add_generic_instances): Skip non-generic classes in
1147 2008-12-05 Mark Probst <mark.probst@gmail.com>
1149 * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
1151 * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
1152 mini-ppc.h instead of mini-ppc64.h.
1154 * mini-ppc64.h: Removed.
1156 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1158 * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
1160 * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
1162 2008-12-05 Mark Probst <mark.probst@gmail.com>
1164 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
1165 Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
1168 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1170 * basic-simd.cs: Tests for operator == and != on Vector8us and Vector16b.
1172 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1174 * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
1176 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1178 * basic-simd.cs: Tests for operator == and != on Vector4f.
1180 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1182 * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
1184 * simd-intrinsics.c: Kill useless enum.
1186 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1188 * cpu-mips.md: add long_conv_to_ovf_i4_2
1189 * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
1191 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1193 * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
1195 * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
1197 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1199 * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
1201 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1203 * basic-simd.cs: Add tests for new methods.
1205 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1207 * simd-intrinsics.c: Add support for operator == and !=
1210 * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
1212 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1214 * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
1216 2008-12-04 Zoltan Varga <vargaz@gmail.com>
1218 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
1220 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
1221 MONO_PATCH_INFO_ICALL_ADDR.
1223 * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
1225 * aot-compiler.c: Resurrect full-aot support.
1227 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1229 * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
1231 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1233 * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
1235 2008-12-03 Rodrigo Kumpera <rkumpera@novell.com>
1237 * basic-simd.cs: Fix tests to work under ppc.
1238 Remove tests for methods that will be removed.
1240 2008-12-03 Mark Probst <mark.probst@gmail.com>
1242 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
1243 generic type (via a typedef or typeref) correctly.
1245 2008-12-03 Zoltan Varga <vargaz@gmail.com>
1247 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
1248 diagnose an assertion failure.
1250 2008-12-02 Mark Probst <mark.probst@gmail.com>
1252 * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
1253 Fix trampoline size.
1255 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
1256 conversion opcodes are implemented natively instead via emulation.
1258 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1260 * cpu-mips.md: remove mips_xori
1262 * mini-ops.h: remove mips_xori
1264 * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
1266 * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
1268 * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
1270 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1272 * cpu-mips.md: fix instruction lengths.
1274 * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
1276 * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
1278 * mini-ops.h: fix slti / sltiu op profiles.
1280 2008-12-02 Martin Baulig <martin@ximian.com>
1282 * method-to-ir.c (mono_method_to_ir): Disable debugging
1283 information for the init locals block to make the debugger stop
1284 after all locals have been initalized.
1286 2008-12-02 Martin Baulig <martin@ximian.com>
1288 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
1289 running inside the debugger.
1291 2008-12-01 Zoltan Varga <vargaz@gmail.com>
1293 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
1296 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
1297 alu->alu imm optimization which only shows if deadce is disabled.
1299 * aot-compiler.c: Rename the function names for the binary and asm writers
1300 so they can coexist in the same process. Rework the xdebug code to use the
1301 asm writer. This avoids the need to call into the runtime to dump the
1302 debugging info. Add more debugging info for types.
1304 * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
1306 * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
1307 cpu description tables, they can't occur in cpu-<ARCH>.md.
1309 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
1310 the stack in CEE_LDFLDA. Fixes #450542.
1312 * generics.cs: Add a new test.
1314 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1316 * mini-ops.h: updated MIPS opcodes
1317 * mini-mips.c: decompose long opts
1318 * mini-mips.h: decompose long opts
1320 2008-11-29 Mark Mason <mmason@upwardaccess.com>
1322 * cpu-mips.md: fix length on int_rem_un
1323 * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
1325 2008-11-29 Zoltan Varga <vargaz@gmail.com>
1327 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
1329 * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
1331 2008-11-29 Martin Baulig <martin@ximian.com>
1333 * mini-exceptions.c (mono_handle_native_sigsegv): Check
1334 mono_debug_using_mono_debugger() in addition to the
1335 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
1337 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1339 * mini-ops.h: updated more MIPS opcodes
1340 * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
1341 * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
1343 2008-11-28 Mark Probst <mark.probst@gmail.com>
1345 * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
1347 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1349 * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
1350 * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
1351 * mini-ops.h: correct selected mips opcode entries
1353 2008-11-28 Mark Probst <mark.probst@gmail.com>
1355 * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
1358 2008-11-28 Mark Probst <mark.probst@gmail.com>
1360 * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
1362 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1364 * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
1365 * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
1366 * mini-mips.h: disable IMT
1367 * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
1369 2008-11-28 Mark Probst <mark.probst@gmail.com>
1371 * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
1373 2008-11-28 Mark Probst <mark.probst@gmail.com>
1375 * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
1377 2008-11-28 Zoltan Varga <vargaz@gmail.com>
1379 * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
1382 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1384 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1385 for Set/GetVector aligned versions.
1387 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1389 * basic-simd.cs: Add tests for Get/SetVector.
1391 2008-11-27 Mark Probst <mark.probst@gmail.com>
1393 * mini.c: Removed g_slist_append_mempool(). Now in
1396 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1398 * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
1399 size properly and make the bounds check optional.
1401 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1402 for SetVector and IsAligned.
1404 2008-11-27 Zoltan Varga <vargaz@gmail.com>
1406 * mini.c: Remove unused mono_normalize_opcodes () function.
1408 2008-11-26 Mark Probst <mark.probst@gmail.com>
1410 * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
1411 using the new atomic add ops now.
1413 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
1416 2008-11-26 Mark Probst <mark.probst@gmail.com>
1418 * mini-ppc64.c: Several fixes.
1420 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1422 * cpu-mips.md: added jump_table
1423 * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.
1425 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1427 * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
1429 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1431 * mini-ops.h: corrected a handful of MIPS opcodes.
1433 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1435 * aot-compiler.c: MIPS to use ELF writer
1437 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1439 * mini-codegen.c: remove MIPS specific assert.
1441 2008-11-25 Mark Probst <mark.probst@gmail.com>
1443 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
1444 fixes. PPC64 now passes most of the runtime regressions.
1446 2008-11-24 Zoltan Varga <vargaz@gmail.com>
1448 * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
1449 volatile intervals a bit.
1451 2008-11-24 Mark Probst <mark.probst@gmail.com>
1453 * basic-long.cs: New test case.
1455 2008-11-23 Zoltan Varga <vargaz@gmail.com>
1457 * mini.c (mini_method_compile): Disable globalra for large methods for
1460 * regalloc2.c (order_moves): Add fp support.
1462 * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
1463 source bblock ends with an OP_BR_REG.
1465 * ratests.cs: Add a new test.
1467 2008-11-23 Mark Probst <mark.probst@gmail.com>
1469 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
1470 sharing. PPC64 now passes generics.exe.
1472 2008-11-23 Mark Probst <mark.probst@gmail.com>
1474 * mini-ppc64.c: Several fixes. PPC64 now runs iltests.exe.
1476 2008-11-23 Zoltan Varga <vargaz@gmail.com>
1478 * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
1479 memory when mono_jit_info_table_find () can't find the method in the
1482 * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
1485 * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
1488 2008-11-23 Mark Probst <mark.probst@gmail.com>
1490 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
1491 Several fixes. PPC64 now runs exceptions.exe and
1492 devirtualization.exe.
1494 2008-11-22 Mark Probst <mark.probst@gmail.com>
1496 * mini-ppc64.c, tramp-ppc64.c: Small fixes. PPC64 now runs
1497 arrays.exe and basic-math.exe.
1499 2008-11-22 Mark Probst <mark.probst@gmail.com>
1501 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
1502 cpu-ppc64.md: Several fixes. PPC64 now runs objects.exe.
1504 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1506 * simd-intrinsics.c: Add support ArrayExtension intrinsics.
1508 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1510 * method-to-ir.c: Move bounds checking macros to ir-emit.h
1512 * ir-emit.h: Move macros from method-to-ir.c to here.
1514 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1516 * mini-ops.h: Correct the long simd ops to use LREG.
1518 2008-11-21 Zoltan Varga <vargaz@gmail.com>
1520 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
1522 * mini-ops.h: Correct the dreg type of a few long opcodes.
1524 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
1527 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
1529 * mini-ppc.c: remove negative stack references in epilog
1530 for platforms that don't support the red zone.
1532 2008-11-21 Mark Probst <mark.probst@gmail.com>
1534 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
1535 point regs. Now PPC64 passes basic-calls.exe.
1537 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1539 * basic-simd.cs: Add tests for accessors of Vector2l.
1541 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1543 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
1545 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
1547 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
1549 2008-11-21 Mark Probst <mark.probst@gmail.com>
1551 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
1552 PPC64 passes basic-long.exe.
1554 2008-11-20 Mark Probst <mark.probst@gmail.com>
1556 * decompose.c: Decompose carry and overflow add on PPC64 like on
1557 other 64 bit archs. Don't decompose sub at all on PPC64.
1559 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
1560 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
1563 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1565 * basic-simd.cs: Add tests for accessors of Vector2d.
1567 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1569 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
1573 * mini-x86.c (mono_arch_output_basic_block): Same.
1575 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
1577 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1579 * basic-simd.cs: Add tests for accessors of Vector4f.
1581 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1583 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
1587 * mini-x86.c (mono_arch_output_basic_block): Same.
1589 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
1591 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1593 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
1595 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1597 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
1601 * mini-x86.c (mono_arch_output_basic_block): Same.
1603 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
1605 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1607 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
1609 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1611 * simd-intrinsics.c: Enable setters for Vector16sb.
1613 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1615 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
1619 * mini-x86.c (mono_arch_output_basic_block): Same.
1621 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
1623 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
1625 * simd-intrinsics.c: Implement setter for Vector8us.
1627 2008-11-19 Zoltan Varga <vargaz@gmail.com>
1629 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
1632 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1634 * mini-ppc.c: remove references to the red zone in the prolog
1635 (for systems that don't support it).
1637 2008-11-19 Mark Probst <mark.probst@gmail.com>
1639 * cpu-ppc64.md: Fixed a few instruction lengths.
1641 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
1644 2008-11-19 Mark Probst <mark.probst@gmail.com>
1646 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
1649 2008-11-19 Zoltan Varga <vargaz@gmail.com>
1651 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
1653 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
1655 * mini-ops.h: Added OP_INSERT_I2.
1659 * mini-x86.c (mono_arch_output_basic_block): Same.
1661 * simd-intrinsics.c: Implement setter for Vector8s.
1663 * simd-methods.h: Add the names of get setters of Vector8s.
1665 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1667 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
1669 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
1672 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1674 2008-11-18 Mark Probst <mark.probst@gmail.com>
1676 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
1677 for PPC64. An empty program runs now.
1679 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1681 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1683 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
1684 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
1685 info for JITted code is emitted into a shared library, loadable into gdb.
1687 2008-11-18 Mark Probst <mark.probst@gmail.com>
1689 * Makefile.am: Changes to build PPC64.
1691 * mini-arch.h: Include mini-ppc64.h on PPC64.
1693 2008-11-18 Mark Probst <mark.probst@gmail.com>
1695 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
1696 in PPC code up to r119147.
1698 2008-11-18 Mark Probst <mark.probst@gmail.com>
1700 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1701 cpu-ppc64.md: Changes for PPC64.
1703 Based on code submitted by andreas.faerber@web.de at
1704 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
1707 2008-11-18 Mark Probst <mark.probst@gmail.com>
1709 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1710 cpu-ppc64.md: Copied from the corresponding PPC files from
1713 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
1715 * mini-ops.h: Added OP_ROUND.
1717 * cpu-x86.md: Added round.
1719 * mini-x86.c: Added support for intrinsicing Math.Round (double).
1721 * basic-math.cs: Added test_0_round to test rounding.
1723 Contributed under MIT/X11 license.
1725 2008-11-17 Bill Holmes <billholmes54@gmail.com>
1727 * aot-compiler.c : Fix the Winx64 build.
1729 Contributed under MIT/X11 license.
1731 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1733 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
1734 in OP_EXTRACT_R8 to avoid possible stack corruption.
1736 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1738 * mini-ops.h: Added OP_EXTRACT_R8/I8.
1740 * cpu-x86.md: Added extract_r8.
1742 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
1744 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
1745 a couple of OP_EXTRACT_I4.
1747 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
1749 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
1751 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1753 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
1756 2008-11-17 Zoltan Varga <vargaz@gmail.com>
1758 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
1759 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
1761 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
1762 are not needed any more.
1764 * mini.h: Remove the unused INS_LIST macros.
1766 * mini.c (mini_method_compile): Remove a disable globalra case which is no
1769 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
1772 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
1773 mono_alloc_ireg () instead.
1775 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
1778 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
1781 * aot-runtime.c (load_aot_module): Disable AOT when running under
1784 * mini-amd64.h: Change the monitor fastpath defines to check for
1785 !PLATFORM_WIN32 so they work on *bsd too.
1787 * mini.h mini.c mini-hhpa.c: Remove more unused code.
1789 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
1791 * mini.h (MonoCompile): Remove new_ir flag.
1793 * regalloc.h regalloc.c: Remove unused code.
1795 * cpu-*.md: Remove more unused opcodes.
1797 * simple-cee-ops.h simple-mini-ops.h: Removed.
1799 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
1801 2008-11-17 Zoltan Varga <vargaz@gmail.com>
1803 * aliasing.h: Removed.
1805 * *.c: Remove references to aliasing.h and inssel.h.
1807 * mini.c: Remove additional unused functions.
1809 * mini-ops.h cpu-*.md: Remove unused opcodes.
1811 2008-11-16 Zoltan Varga <vargaz@gmail.com>
1813 Remove the old JIT code.
1815 * inssel*.brg: Removed.
1817 * ssa.c abcremoval.c aliasing.c: Removed.
1819 * ssa2.c: Renamed to ssa.c.
1821 * abcremoval2.c: Renamed to abcremoval.c.
1823 * *.c: Removed all !cfg->new_ir code.
1825 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
1826 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
1828 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
1830 2008-11-16 Zoltan Varga <vargaz@gmail.com>
1832 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
1833 to simplify the code and cut back on the number of global symbols in the AOT
1836 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
1838 2008-11-15 Zoltan Varga <vargaz@gmail.com>
1840 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
1841 with the got/got_info tables.
1843 * mini.h: Bump AOT file format version.
1845 * unwind.h: New file, contains definitions for stack unwinding.
1847 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
1850 * aot-compiler.c: Generalize the emitting of unwind information to use the
1851 information in cfg->unwind_ops.
1853 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
1855 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
1856 AOT method frames. Enable writing symbols for methods by default.
1858 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
1860 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
1861 and make it work with vectors of element sizes 1, 2 and 4.
1863 * simd-intrinsics.c: Enable getter for all vectors with element size
1866 * simd-methods.h: Add the names of other getters.
1868 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
1874 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
1876 * mini-ppc.h: portability fix.
1878 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1880 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
1881 buggy and will overwrite it.
1883 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1885 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
1886 Use it to emit local symbols for all methods so AOTed methods show up with
1887 their full name in gdb/valgrind output.
1889 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1891 * mini-ppc.c: portability fixes.
1893 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1895 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
1896 entries out of the if (!generic_shared...) code so it is always done.
1897 (mono_class_init_trampoline): Do the patching when running under valgrind
1898 too, newer versions of valgrind have no problems with it.
1900 2008-11-13 Zoltan Varga <vargaz@gmail.com>
1902 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
1905 2008-11-13 Mark Probst <mark.probst@gmail.com>
1907 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
1910 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1912 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
1914 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1916 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
1922 * simd-intrinsics.c: Same.
1924 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1926 * simd-intrinsics.c: Enable constructor intrinsics for all types.
1928 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1930 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
1931 to work with more Vector types.
1933 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1935 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
1936 store the elemens directly instead of using and intermediate.
1938 2008-11-13 Zoltan Varga <vargaz@gmail.com>
1940 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
1942 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
1943 to preserve %eax for aot plt trampolines.
1945 * aot-compiler.c (compile_method): Don't skip synchronized methods.
1946 (encode_method_ref): Flag synchronized methods so they won't go through
1949 * aot-compiler.c: Additional work to support AOTing synchronized methods/
1952 * cpu-ia64.md (jmp): Increase max length.
1954 2008-11-12 Zoltan Varga <vargaz@gmail.com>
1956 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
1957 open generic classes.
1959 * aot-compiler.c: Enable the ELF writer on ELF platforms.
1961 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
1962 box+brtrue optimization since it causes test failures on x86.
1964 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
1966 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
1972 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
1973 for simd ctor values.
1975 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
1976 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
1978 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
1980 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
1983 * simd-instrincs.c: Same.
1985 * basic-simd.cs: Same.
1987 2008-11-12 Zoltan Varga <vargaz@gmail.com>
1989 * ratests.cs: Add more tests.
1991 * regalloc2.c (add_spill_code): Handle more corner cases.
1993 2008-11-11 Zoltan Varga <vargaz@gmail.com>
1995 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
1996 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
1997 both the source an destination of an instruction.
1999 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
2001 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
2002 wapihandles.c: more portability changes.
2004 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
2006 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
2007 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
2008 safe to execute in a signal handler and the kernel provides better
2009 the info in /proc/self/smaps. Avoid the assert on sigaction during
2012 2008-11-11 Zoltan Varga <vargaz@gmail.com>
2014 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
2015 do the bblock linking hack if it is actually needed.
2017 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
2020 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
2021 crash problem is fixed.
2023 * branch-opts.c (mono_remove_critical_edges): Link up newly added
2026 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
2028 (mini_method_compile): Set the starting value of next_vreg to
2029 MAX_IREGS + MAX_FREGS when using globalra.
2031 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
2032 filter clauses with BB_EXCEPTION_HANDLER.
2034 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
2036 2008-11-10 Mark Probst <mark.probst@gmail.com>
2038 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
2039 space for stdcall. Fixes regressions on Win32.
2041 2008-11-10 Zoltan Varga <vargaz@gmail.com>
2043 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
2045 (linear_scan): Remove an assert which doesn't seem to be needed.
2047 * local-propagation.c (mono_local_deadce): Avoid a call to
2048 MONO_DELETE_INS which would screw up the instruction linking.
2050 * mini.c (mono_decompose_op_imm): Make this work with globalra.
2052 * regalloc2.c: Upgrade to work the current JIT code.
2054 2008-11-09 Zoltan Varga <vargaz@gmail.com>
2056 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
2059 * aot-runtime.c: Remove some dead code.
2061 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
2063 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
2065 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
2066 trampolines using sscanf since atoi doesn't work on large unsigned values.
2068 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
2069 Initialize code_size.
2071 2008-11-08 Mark Probst <mark.probst@gmail.com>
2073 * method-to-ir.c (mini_emit_inst_for_method): Make
2074 Interlocked.CompareExchange work for Int arguments on 32 bit
2077 2008-11-07 Mark Probst <mark.probst@gmail.com>
2079 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
2081 2008-11-06 Bill Holmes <billholmes54@gmail.com>
2083 * main.c Fix MSVC build.
2085 Contributed under MIT/X11 license.
2087 2008-11-06 Mark Probst <mark.probst@gmail.com>
2089 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
2090 alignment larger than 8 bytes are aligned correctly, too.
2092 * mini.c: Honor the min_align field of MonoClass when laying out
2095 2008-11-06 Zoltan Varga <vargaz@gmail.com>
2097 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
2099 * aot-compiler.c (emit_plt): Fix a warning.
2101 * aot-compiler.c: Implement ARM support in the binary writer.
2103 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2105 * basic-simd.cs: Add test for getter with byref arg.
2106 Fix the naming of a few tests.
2107 Add missing checks to a test.
2109 2008-11-05 Zoltan Varga <vargaz@gmail.com>
2111 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
2113 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
2114 most of the full-aot support for monitor enter/exit trampolines.
2116 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
2117 enter/exit trampoline creation functions.
2119 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
2122 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
2124 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
2125 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
2126 implement the needed functionality without adding crap to the runtime.
2128 2008-11-05 Zoltan Varga <vargaz@gmail.com>
2130 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
2133 * mini.c (mono_build_date): New global version holding the build date in
2136 * Makefile.am (buildver.c): Generate a file containing the build date.
2138 * main.c: Set the build date from the generated file.
2140 * mini.c (mono_get_runtime_build_info): New helper function returning build
2141 information in a string format.
2143 * driver.c (mono_main): Print the build date in --version.
2145 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
2146 file when the bind-to-runtime-version option is used.
2148 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2150 * simd-intrinsics.c: Fix bug when using getters and byref args.
2152 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
2154 * simd-methods.h: Rename prefetch methods.
2156 * simd-intrinsics.c: Same.
2158 2008-11-05 Mark Probst <mark.probst@gmail.com>
2160 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
2163 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2165 * aot-compiler.c: Use the bundled elf header files instead of depending on
2168 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
2171 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
2174 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2176 * cpu-x86.md: Add store nta ops.
2182 * mini.h: Add an enum for simd prefetch modes.
2184 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
2185 of store. Use the changed code to support store nta.
2187 * simd-intrinsics.c: Add prefetch ops for all vector types.
2189 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2191 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
2194 * aot-compiler.c: Use statically allocated buffers for constructing symbol
2197 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
2200 2008-11-04 Mark Probst <mark.probst@gmail.com>
2202 * mini-x86.c: Fixed commit.
2204 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2206 * aot-compiler.c (emit_plt): Align the plt section only on x86.
2208 2008-11-04 Mark Probst <mark.probst@gmail.com>
2210 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
2211 and MONITOR_EXIT, for the ASM fastpaths.
2213 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
2216 * mini.c, patch-info.h: Signature and patch infos for
2217 Monitor.Enter/Exit trampolines.
2219 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
2221 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
2222 Monitor.Enter/Exit ASM fastpath for Linux.
2224 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2226 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
2228 * objects.cs: Add a new test.
2230 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
2232 * aot-runtime.c (load_method): Run class initialization in the PLT case even
2233 if MONO_LOG_LEVEL is set.
2235 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
2237 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
2239 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
2241 * aot-compiler.c: Change the relocation code to use virtual addresses instead
2242 of file offsets. Align the sections belonging to the data segment to
2245 2008-11-03 Zoltan Varga <vargaz@gmail.com>
2247 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
2248 elf.h. Port it to amd64.
2250 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2252 * driver.c: Enable SIMD by default.
2254 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2256 * cpu-x86.md: Add prefetch op.
2262 * mini.h: Add an enum for simd prefetch modes.
2264 * simd-methods.h: Add prefetch function names.
2266 * simd-intrinsics.c: Add prefetch ops for all vector types.
2268 2008-11-03 Zoltan Varga <vargaz@gmail.com>
2270 * aot-compiler.c (emit_bytes): Speed this up a little.
2272 2008-11-02 Zoltan Varga <vargaz@gmail.com>
2274 * aot-compiler.c: Add JIT time etc. statistics.
2276 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
2278 * mini.h (MonoCompile): Add 'got_offset' field.
2280 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
2281 method_got_offsets array.
2283 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
2286 * aot-compiler.c (compile_method): Add generic method instances referenced
2287 by the method to the list of methods to be compiled, this is required so if
2288 A<T> references B<T>, and another assembly references A<int>, then it will
2289 also get a copy of B<int>.
2291 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
2292 when checking for monitor enter/exit.
2294 2008-10-30 Mark Probst <mark.probst@gmail.com>
2296 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
2297 for Monitor.Enter and Monitor.Exit if enabled.
2299 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
2302 2008-10-30 Zoltan Varga <vargaz@gmail.com>
2304 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
2305 of an OP_MOVE. Fixes #440046.
2307 * basic-long.cs: Add a new test.
2309 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
2311 * mini.h: Add synchronization note for the managed counter-part.
2313 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
2314 returns the simd caps of the current cpu.
2316 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
2318 * basic-simd.cs: Remove Console.WriteLine.
2320 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2322 * basic-simd.cs: New tests for Vector2ul.
2324 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2326 * simd-intrinsics.c: Add new vector type Vector2ul.
2328 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2330 * basic-simd.cs: New tests for Vector2l.
2332 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2334 * cpu-x86.md: Add long version of most packed int ops.
2340 * simd-intrinsics.c: Add new vector type Vector2l.
2342 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2344 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
2346 * simd-methods.h: Remove SN_op_BitwiseXor.
2348 2008-10-28 Zoltan Varga <vargaz@gmail.com>
2350 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
2353 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2355 * basic-simd.cs: Test for Vector2d.
2357 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
2360 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2362 * cpu-x86.md: Add double version of all packed float ops.
2368 * simd-intrinsics.c: Add new vector type Vector2d.
2370 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
2372 * simd-methods.h: Add Duplicate.
2374 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2376 * basic-simd.cs: Test for packing with signed saturation.
2378 2008-10-28 Zoltan Varga <vargaz@gmail.com>
2380 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
2381 found in the TYPESPEC table.
2383 2008-10-26 Zoltan Varga <vargaz@gmail.com>
2385 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
2388 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2390 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
2391 instead of the RVA, since the RVA can be changed by tools like the cil
2394 * method-to-ir.c (mono_method_to_ir2): Ditto.
2396 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
2397 (deserialize_variable): Ditto.
2399 2008-10-25 Martin Baulig <martin@ximian.com>
2401 * debug-mini.c (write_variable): Use
2402 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
2404 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2406 * cpu-x86.md: Add unsigned variants of packd and packw.
2410 * mini-x86.h: Emit the right instruction for packd and packw.
2411 Add unsigned variants of packd and packw.
2413 * simd-intrinsics.c: Packd and packw were used in place of their
2414 unsigned variants. Change that.
2415 Add intrinsics for (Signed)PackWithSignedSaturation.
2417 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
2419 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2421 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
2423 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2425 * mini-ops.h: Remove dword packed add/sub with saturation ops.
2427 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
2429 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
2432 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
2434 2008-10-24 Mark Probst <mark.probst@gmail.com>
2436 * method-to-ir.c, mini.c: Special casing for the synchronized
2437 wrapper for the ldtoken+GetTypeFromHandle case.
2439 2008-10-24 Zoltan Varga <vargaz@gmail.com>
2441 * mini.c (mono_replace_ins): Move this to branch-opts.c.
2443 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
2444 created/split bblocks.
2446 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2448 * mini-ops.h: Add packed signed mul high.
2452 * mini-x86.c (mono_arch_output_basic_block): Same.
2454 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
2456 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
2458 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2460 * basic-simd.cs: Tests for Vector16sb.
2462 2008-10-24 Zoltan Varga <vargaz@gmail.com>
2464 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
2466 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2468 * mini-ops.h: Add packed signed min, max and compare greater.
2472 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
2475 * simd-methods.h: Add CompareGreaterThan.
2477 * simd-methods.h: Remove CompareEquals.
2479 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
2481 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
2483 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
2486 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2488 * basic-simd.cs: Fix tests due to change in the API.
2490 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2492 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
2494 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2496 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
2498 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
2499 inst_offset as this has invalid values for LDADDR.
2501 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2503 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2505 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
2507 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2509 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
2510 for accessing field->data.
2512 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2514 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2516 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2518 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
2520 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
2522 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2524 * dominators.c (mono_compute_natural_loops): Allocate GList enties
2525 from the cfg mempool.
2527 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
2529 * basic-simd.cs: Tests for new methods in Vector8us.
2531 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
2533 * mini-ops.h: Add multiply and store high.
2537 * mini-x86.c (mono_arch_output_basic_block): Same.
2539 * simd-methods.h: Same.
2541 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
2544 2008-10-19 Zoltan Varga <vargaz@gmail.com>
2546 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
2547 mono_class_setup_vtable ().
2549 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
2550 mono_class_get_vtable_entry () for accessing klass->vtable.
2552 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
2554 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
2557 * method-to-ir.c (mono_save_token_info): Don't save references made from
2560 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
2561 of generic instances.
2563 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
2565 2008-10-19 Mark Probst <mark.probst@gmail.com>
2567 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
2568 OP_JMP depends on the method signature. Calculate it properly.
2570 2008-10-19 Zoltan Varga <vargaz@gmail.com>
2572 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
2575 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
2577 (emit_extra_methods): Add another table mapping method indexes to
2578 offsets in the extra_method_info table.
2580 * mini.h: Bump AOT file format version.
2582 * aot-runtime.c: Merge most of the code from mono_aot_get_method
2583 and mono_aot_get_method_from_token () into one function.
2585 2008-10-19 Mark Probst <mark.probst@gmail.com>
2587 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
2590 2008-10-18 Zoltan Varga <vargaz@gmail.com>
2592 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
2595 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
2598 * mini.c (mono_patch_info_equal): Compare the generic context as well.
2600 * mini.h: Bump aot file format version.
2602 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
2603 AOT file can contain native code for methods which are not in the METHOD
2604 table. Generate code for non-sharable generic instances of generic methods
2605 found in the METHODSPEC table.
2607 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
2608 encoding generic type handles.
2610 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
2611 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
2613 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
2614 macros + MONO_ADD_INS.
2616 * mini.c (mono_jump_info_token_new2): New function which takes a generic
2619 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
2621 * mini.h: Bump aot file format version.
2623 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
2625 2008-10-17 Mark Probst <mark.probst@gmail.com>
2627 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
2628 platforms, with definable stack alignment value. Set to 16 now
2631 * mini.c, mini.h, driver.c: Command line option for disabling
2634 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2636 * basic-simd.cs: Tests for new methods in Vector4ui.
2638 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2640 * mini-ops.h: Add packed int shuffle.
2644 * mini-x86.c (mono_arch_output_basic_block): Same.
2646 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
2647 extract mask, max, min, shuffle.
2649 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
2651 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2653 * basic-simd.cs: Tests for new methods in Vector8us.
2655 2008-10-17 Mark Probst <mark.probst@gmail.com>
2657 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
2658 RuntimeTypeHandle, not a TypedReference.
2660 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
2662 * simd-intrinsics.c: remove relocations.
2664 2008-10-17 Zoltan Varga <vargaz@gmail.com>
2666 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
2667 optimizations from the x86 backend.
2669 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
2671 * simd-methods.h, simd-intrinsics.c: debloat method names and
2672 prepare for no relocations.
2674 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2676 * mini-ops.h: Add packed min/equal and sum of absolute differences.
2680 * mini-x86.c (mono_arch_output_basic_block): Same.
2682 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
2683 extract mask, max, min and sum of absolute differences.
2685 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
2688 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2690 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
2691 Renamed one test for consistency.
2693 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2695 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
2696 fix to the code that deal with other blocks.
2698 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2700 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
2702 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2704 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
2705 that deals with vreg interference. Explicitly check for OP_LDADDR to be
2706 able to process the source reg.
2708 2008-10-16 Martin Baulig <martin@ximian.com>
2710 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
2712 * inssel.brg: Add `OP_HARD_NOP'.
2714 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
2716 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
2717 `OP_HARD_NOP' instruction when running inside the debugger.
2719 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
2720 `OP_HARD_NOP' instruction when running inside the debugger.
2722 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2724 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
2725 now works. The issue with the regalloc tripping up no longer
2728 * simd-intrinsics.c (load_simd_vreg): Same.
2730 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2732 * basic-simd.cs: Tests for new Vector8ui methods.
2734 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2736 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
2737 only for type. This fixes crashes where MonoInst::klass is checked
2738 for ops of type != VTYPE or OBJ.
2740 * simd-intrinsics.c (load_simd_vreg): Same.
2742 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2744 * mini-ops.h: Add ops for packed shuffle/max/avg and
2749 * mini-x86.c (mono_arch_output_basic_block): Same.
2751 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
2754 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
2755 to emit extract mask op.
2757 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
2758 to emit word shuffles.
2760 2008-10-15 Mark Probst <mark.probst@gmail.com>
2762 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
2763 the largest alignment needed by a variable, but at least
2766 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2768 * basic-simd.cs: Tests for the fixes in the last commit.
2770 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2772 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
2773 no longer handles STACK_PTR input.
2775 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
2777 * simd-intrinsics.c (load_simd_vreg): New function that works like
2778 get_simd_vreg but handles STACK_PTR input.
2780 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
2781 as the input can be an arbitrary pointer.
2783 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
2784 LDADDR local optimization directly otherwise use a store op.
2786 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2788 * basic-simd.cs: Tests for dup low and dup high.
2790 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2792 * mini-ops.h: Add dup low and dup high ops.
2796 * mini-x86.c (mono_arch_output_basic_block): Same.
2798 * simd-intrinsics.c (vector4f_intrinsics): Same.
2800 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2802 * basic-simd.cs: Tests for recently added functionality.
2804 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2806 * mini-ops.h: Add remaining sse1 fp ops.
2808 * cpu-x86.md: Add remaining sse1 fp ops.
2810 * mini-x86.c (mono_arch_output_basic_block): Same.
2812 * mini.h: Add enum for simd FP compare conditions.
2814 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
2816 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
2817 so the backed can generate the appropriate op.
2819 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2820 This patch squeese one more byte from the SimdIntrinsc struct.
2822 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
2823 a a shift amount intead of simply or'ing it.
2825 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
2827 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
2828 byte so we can have an aditional flags field without increasing struct size.
2830 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
2831 against the simd_supported_versions bitmask.
2833 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
2835 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
2837 * mini.c: remove rawbuffer code (the only use here is unsafe because
2838 it takes locks during signal handling and the kernel now provides much
2839 better info in proc/pid/smaps these days).
2841 2008-10-13 Zoltan Varga <vargaz@gmail.com>
2843 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
2844 OP_X86_PUSH_OBJ. Fixes #434620.
2846 * objects.cs: Add a test.
2848 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
2850 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
2851 that the packuswb/packusdw don't work with unsigned numbers for what
2852 would be negative numbers in signed format.
2854 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
2855 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
2857 * mini-ops.h: Add doubleword forms of many ops and packing ones.
2859 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
2861 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
2863 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
2865 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
2868 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
2869 version as the enum in mini.h.
2871 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
2872 for sse3 ops, check the simd_version field if present. This way the code
2873 works with all versions of sse.
2875 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2877 * simd-intrinsics.c: Fixed intrinsic name typo.
2879 * mini.h: Added missing simd exported function.
2881 * basic-simd.cs: Added tests for Vector4ui.
2882 Fixed broken test for Vector16b.
2884 2008-10-10 Zoltan Varga <vargaz@gmail.com>
2886 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
2887 the max length to 64.
2889 2008-10-10 Mark Probst <mark.probst@gmail.com>
2891 * method-to-ir.c: Only do the fast virtual generic method call for
2892 non-wrapper methods.
2894 * mini.h, mini-trampolines.c: The new generic virtual remoting
2895 trampoline handles virtual method calls via the vtable (as done by
2896 the fast virtual generic method calls) to remoting proxies.
2898 * mini.c (mono_jit_create_remoting_trampoline): For generic
2899 methods reate a generic virtual remoting trampoline.
2901 * mini-amd64.h: Enable fast virtual generic method calls again.
2903 2008-10-10 Mark Probst <mark.probst@gmail.com>
2905 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
2906 restore registers when doing tail calls.
2908 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2910 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
2913 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2915 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
2917 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2919 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
2921 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2923 * basic-simd.cs: Retrofit for API changes.
2925 2008-10-10 Mark Probst <mark.probst@gmail.com>
2927 * mini-ppc.c: Handle integer stack arguments for tail calls.
2929 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2931 * optflags-def.h: Removed sse3 optimization.
2935 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
2938 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
2940 * mini.h: Added enumeration with simd versions.
2942 * simd-intrinsics.c (emit_intrinsics): Use the new static var
2945 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
2947 * mini.c (mini_init): Call mono_simd_intrinsics_init.
2949 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2951 * basic-simd.cs: Added tests for Vector8u and Vector16u.
2953 * basic-simd.cs: Fixed test naming.
2955 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2957 * mini-ops.h: Added ops for packed and saturated math, shifts
2958 and packing/unpacking.
2960 * cpu-x86.md: Added descriptors for the above ops.
2962 * mini-x86.c: Added code to emmit the above ops.
2964 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
2966 2008-10-08 Zoltan Varga <vargaz@gmail.com>
2968 * aot-compiler.c (compile_method): Enable AOT for generic code.
2970 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
2972 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
2974 * mini.c: add a workaround for a common screwup that ends up blamed
2975 to mono (other processes blocking signal delivery).
2977 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2979 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
2980 in the LDFLD/STFLD opcodes. Fixes #432673.
2982 * iltests.il.in: Add a new test.
2984 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
2986 * mini-arm.c: attach the thread in unmanaged->managed transitions
2987 using delegates (bug #433148).
2989 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
2991 * basic-simd.cs: Use new ShuffleSel constants.
2993 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
2995 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
2997 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
2998 only disable simd intrinsics if no sse2 is detected.
3000 * optflags-def.h: Added sse3.
3002 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
3005 2008-10-07 Zoltan Varga <vargaz@gmail.com>
3007 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
3008 when adding delegate-invoke wrappers.
3010 2008-10-07 Zoltan Varga <vargaz@gmail.com>
3012 * Makefile.am: Reenable the simd tests.
3014 2008-10-07 Bill Holmes <billholmes54@gmail.com>
3016 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
3017 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
3018 other vreg is allocated to that hreg.
3020 Contributed under MIT/X11 license.
3022 2008-10-07 Zoltan Varga <vargaz@gmail.com>
3024 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
3027 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
3029 * basic-simd.cs: New test suite for SIMD intrinsics.
3031 * Makefile.am: Added new tests.
3033 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
3035 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
3039 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
3041 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
3042 using SSE2 aware opcodes.
3044 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
3045 is enabled, this code path is only reachable if conversion ops are emmited after
3048 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
3050 This optimization saves 6 bytes per conversion against the old version.
3052 2008-10-06 Zoltan Varga <vargaz@gmail.com>
3054 * aot-compiler.c (compile_method): Don't skip methods referencing
3055 generic methods without a corresponding entry in token_info_hash, since
3056 encode_method_ref () can handle all generic methods now.
3058 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
3059 generic context is set.
3061 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
3062 generic sharing of LDTOKEN.
3064 2008-10-06 Mark Probst <mark.probst@gmail.com>
3066 * mini-amd64.h: Temporarily disabled fast virtual generic method
3067 calls because it breaks the System.Runtime.Remoting tests.
3069 2008-10-06 Zoltan Varga <vargaz@gmail.com>
3071 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
3073 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
3074 so inlining actually works.
3075 (check_inline_caller_method_name_limit): Ditto.
3077 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
3079 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
3080 64 bit safety (from Olaf Hering and Andreas Färber).
3082 2008-10-06 Zoltan Varga <vargaz@gmail.com>
3084 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
3085 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
3086 unused virtual call support code.
3088 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
3090 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
3091 which can't use aot trampolines.
3092 (decode_patch): Don't create aot trampolines for methods which can't use
3095 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
3096 use aot trampolines.
3098 * mini.h: Bump AOT image format version.
3100 2008-10-05 Zoltan Varga <vargaz@gmail.com>
3102 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
3103 to save_token_info () since cmethod is inflated for constrained calls.
3105 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
3107 2008-10-04 Andreas Färber <andreas.faerber@web.de>
3109 * Makefile.am: Add build rules for ppc64.
3110 This avoids the build failing at pedump with unresolved symbols
3111 due to lack of arch_sources. Instead it will now fail earlier
3112 due to lack of cpu-ppc64.md.
3114 Contributed under MIT/X11 license.
3116 2008-10-04 Mark Probst <mark.probst@gmail.com>
3118 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
3121 * iltests.il.in: Add test case for tail call with many arguments.
3123 2008-10-03 Zoltan Varga <vargaz@gmail.com>
3125 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
3126 to the fast virtual generic method code until the aot case is fixed.
3128 2008-10-03 Mark Probst <mark.probst@gmail.com>
3130 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
3132 2008-10-03 Mark Probst <mark.probst@gmail.com>
3134 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
3137 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
3139 * simd-intrinsics.c: Forgot to add this one.
3141 * mini-codegen.c: Fix macro in case SIMD is not supported.
3143 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
3145 This patch land initial JIT support for simd intrinsics.
3147 * mini-x86.h: Added new define to make --enable_minimal work on x86.
3149 * Makefile.am: Added simd-intrinsics.c
3151 * simd-intrinsics.c: New file with simd instrinsic related
3154 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
3156 * cpu-x86.md: Add simd related instructions.
3158 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
3160 * driver.c: Added two new --regression variants.
3162 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
3164 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
3166 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
3167 extract some complicated logic to helper functions.
3169 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
3171 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
3173 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
3174 the specialized simplification pass.
3176 * method-to-ir.c (mono_spill_global_vars): Use new macro.
3178 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
3180 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
3183 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
3184 if MONO_ARCH_NEED_SIMD_BANK is defined.
3186 * mini-ops.h: Added the new simd ops.
3188 * mini-x86.c: Added mono_arch_xregname.
3190 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
3192 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
3194 * mini-x86.h: Define simd related MONO_ARCH macros.
3196 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
3198 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
3200 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
3201 MONO_CLASS_IS_SIMD to deal with simd related IR.
3203 * mini.h (MonoInst): Added spill_var to the backend union.
3205 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
3207 * mini.h: Added forward declarations of the new simd fuctions.
3209 * optflags-def.h: Added new optimization names SIMD.
3211 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
3213 * regalloc.h: Added support for working with 3 register banks.
3215 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
3217 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
3219 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
3221 * mini-exceptions.c: remove 64 bit related ifdef clutter.
3223 2008-10-03 Zoltan Varga <vargaz@gmail.com>
3225 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
3226 instead of one on 64 bit systems.
3228 * method-to-ir.c: Remove unused includes.
3230 2008-10-02 Zoltan Varga <vargaz@gmail.com>
3232 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
3233 cfg->used_int_regs, since the two are different on arm.
3235 2008-10-02 Mark Probst <mark.probst@gmail.com>
3237 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
3238 mono_method_get_vtable_index() to get the vtable index.
3240 2008-10-02 Mark Probst <mark.probst@gmail.com>
3242 * method-to-ir.c (mono_method_to_ir2): Don't create native
3243 wrappers for array methods, because they're never called (and if
3244 they were called they wouldn't work).
3246 2008-10-02 Mark Probst <mark.probst@gmail.com>
3248 * method-to-ir.c (mono_method_to_ir2): Array methods are
3249 special-cased and must not be invoked indirectly via the (M)RGCTX
3250 when generic sharing is turned on. Fixes #431413.
3252 2008-10-01 Mark Probst <mark.probst@gmail.com>
3254 * method-to-ir.c: When generic sharing is active, call
3255 non-interface virtual generic methods via the standard trampoline.
3257 * mini-trampolines.c: Handle virtual generic shared methods.
3259 * mini.h, mini-x86.c, mini-x86.h: New argument for
3260 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
3261 method thunks and which is the trampoline to call if the lookup
3262 fails. Enable the virtual generic method thunk for x86.
3264 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
3265 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
3266 argument but assert that it's NULL, because these archs don't yet
3267 implement the virtual generic method thunk. Changes in the IMT
3268 thunk data structures.
3270 2008-10-01 Zoltan Varga <vargaz@gmail.com>
3272 * aot-compiler.c (emit_globals): Avoid invalid characters in
3273 the static linking symbol.
3275 * objects.cs: Add a test for the range check optimization. Fix warnings.
3277 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
3278 optimization from the current JIT.
3280 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
3281 later in decompose_array_access_opts () to allow more optimizations.
3283 * method-to-ir.c (mono_handle_soft_float): Rename this to
3284 mono_decompose_soft_float () for consistency.
3286 * mini-ops.h: Fix arguments of OP_STRLEN.
3288 * method-to-ir.c (save_cast_details): Extract the cast details saving code
3289 into a separate function.
3290 (reset_cast_details): Ditto.
3291 (handle_unbox): Save cast details. Fixes #431254.
3293 * method-to-ir.c: Remove some obsolete FIXMEs.
3295 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3297 * ir-emit.h (alloc_dreg): Write a warning before crashing.
3299 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3301 * mini-codegen.c: More work on macros to make them
3302 ready for multiple regbanks.
3304 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3306 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
3308 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
3310 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3312 * mini-codegen.c (mono_spillvar_offset): Proper support for
3315 2008-09-30 Zoltan Varga <vargaz@gmail.com>
3317 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
3318 the stack overflow changes.
3320 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3322 * mini-codegen.c: Make all bank macros depend on reg_bank.
3324 * mini-codegen.c (mono_local_regalloc): Make free mask
3325 initialization regbank aware.
3327 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3329 * mini-codegen.c (mono_local_regalloc): Extract callee
3330 mask selection to a function and make it regbank aware.
3332 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3334 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
3335 code to deal with many regbanks.
3337 2008-09-30 Zoltan Varga <vargaz@gmail.com>
3339 * mini-codegen.c: More fp->regbank changes.
3341 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
3343 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
3344 of a hardcoded constant.
3346 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
3348 * method-to-ir.c (type_from_stack_type): Fix typo.
3350 2008-09-29 Zoltan Varga <vargaz@gmail.com>
3352 * mini-ia64.c (emit_move_return_value): Convert float return values to
3355 * objects.cs: Add a new test.
3357 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
3358 VARARG methods to fix an assert later.
3360 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
3361 end so it at least compiles.
3363 2008-09-28 Zoltan Varga <vargaz@gmail.com>
3365 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
3367 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
3369 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
3370 optimization to a new function (emit_optimized_ldloca_ir) and enable
3371 it for both ldloca and ldloca_s.
3373 2008-09-28 Zoltan Varga <vargaz@gmail.com>
3375 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
3376 gshared CASTCLASS code.
3378 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
3379 amd64, where the libc stack unwinder encounters stack frames referring to
3380 native code in unmapped memory.
3382 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
3385 * generics.cs: Add new test.
3387 2008-09-27 Zoltan Varga <vargaz@gmail.com>
3389 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
3390 add a check that one of the ARM_FPU_ constants is defined.
3392 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
3394 * mini-exceptions.c: Fix build on non-altstack platforms.
3396 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
3399 * ir-emit.h: Add a comment to NEW_PCONST.
3401 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
3403 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
3405 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
3406 after the changes to MonoJitDomainInfo.
3408 2008-09-27 Mark Probst <mark.probst@gmail.com>
3410 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
3412 2008-09-27 Mark Probst <mark.probst@gmail.com>
3414 * mini-ppc.c: Compiler warning fixes.
3416 2008-09-27 Mark Probst <mark.probst@gmail.com>
3418 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
3421 2008-09-27 Mark Probst <mark.probst@gmail.com>
3423 * exceptions-ppc.c, mini-ppc.h: Compile
3424 mono_arch_handle_altstack_exception() on Darwin, too.
3426 2008-09-27 Mark Probst <mark.probst@gmail.com>
3428 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
3429 work on archs which don't have generic sharing implemented, only
3430 without the vtable_arg.
3432 2008-09-26 Mark Probst <mark.probst@gmail.com>
3434 * mini.c: Added comment explaining why delegate ctor icall
3435 wrappers are compiled.
3437 2008-09-26 Mark Probst <mark.probst@gmail.com>
3439 * mini.c: Don't produce trampolines to delegate ctor icall
3440 wrappers but compile them upfront.
3442 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
3444 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
3445 runtime-set function when going back to managed code. Currently this
3446 is used to set back the protection on the soft ovf pages and/or to
3447 throw the stack overflow exception that happened in unmanaged code.
3449 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
3451 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
3452 runtime-set function when going back to managed code. Currently this
3453 is used to set back the protection on the soft ovf pages and/or to
3454 throw the stack overflow exception that happened in unmanaged code.
3456 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3458 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
3459 the support code for restoring stack protection after stack overflows
3460 that happen in unmanaged code. Don't set the exec permission on the
3463 2008-09-26 Zoltan Varga <vargaz@gmail.com>
3465 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
3466 delegate->method_ptr is set. Fixes #428054.
3468 2008-09-25 Zoltan Varga <vargaz@gmail.com>
3470 * tests.cs: Rename to ratests.cs.
3472 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
3473 emit_get_rgctx_... functions.
3475 2008-09-25 Mark Probst <mark.probst@gmail.com>
3477 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
3479 2008-09-25 Mark Probst <mark.probst@gmail.com>
3481 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
3482 before asserting that method is sharable.
3484 2008-09-25 Mark Probst <mark.probst@gmail.com>
3486 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
3487 whether method needs a static RGCTX wrapper used instead of
3490 * generic-sharing.c, mini.h: A few functions moved to
3491 metadata/generic-sharing.c.
3493 2008-09-25 Mark Probst <mark.probst@gmail.com>
3495 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
3496 Generic code sharing for value types, which essentially means
3497 treating value type methods like static methods. The RGCTX is
3498 passed in the same way.
3500 2008-09-25 Zoltan Varga <vargaz@gmail.com>
3502 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
3503 opcode when creating multi-dimensional arrays of open types.
3505 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
3508 * generics.cs: Add a test.
3510 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
3512 2008-09-24 Zoltan Varga <vargaz@gmail.com>
3514 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
3516 * mini.c (mini_method_compile): Set it when running under the debugger.
3518 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
3519 vreg optimization if the flag is set.
3521 * driver.c (mono_main): Add --attach= option to pass options to
3524 * mini.c (sigquit_signal_handler): Start the attach agent.
3526 * ssapre.c: Disable this to save space since it is not yet ported to
3529 * regalloc2.c: Disable this to save space.
3531 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
3533 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
3535 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
3536 the -v option useful again.
3538 2008-09-24 Zoltan Varga <vargaz@gmail.com>
3540 * mini-amd64.c (mono_arch_output_basic_block): Add support for
3543 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
3544 arrays of arrays. Fixes #428406.
3546 * method-to-ir.c (mini_emit_castclass): Ditto.
3548 * objects.cs: Add new test.
3550 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
3552 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
3553 was wrong at it choked against target_type_is_incompatible for byref types.
3555 2008-09-23 Zoltan Varga <vargaz@gmail.com>
3557 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
3560 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
3562 * mini-exceptions.c: update a few more exceptions-related counters.
3564 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
3566 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
3567 new functions to allocate from persistent mempools.
3569 2008-09-23 Zoltan Varga <vargaz@gmail.com>
3571 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
3572 multiple register banks in the future.
3574 * mini-codegen.c (mono_local_regalloc): Fix a warning.
3576 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
3578 * mini.c (type_to_eval_stack_type): Remove duplicated function.
3580 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
3582 * mini.h: Export type_to_eval_stack_type.
3584 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
3585 is only ins->klass of byref types.
3587 2008-09-22 Zoltan Varga <vargaz@gmail.com>
3589 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
3590 (mini_emit_memcpy2): Ditto.
3592 * mini-amd64.c: Fix a warning.
3594 2008-09-21 Mark Probst <mark.probst@gmail.com>
3596 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
3599 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
3601 * method-to-ir.c: Extract stloc micro-optimization to a
3602 function and apply it to all cases.
3604 2008-09-19 Mark Probst <mark.probst@gmail.com>
3606 * method-to-ir.c: Don't fail generic code sharing in cases we
3609 2008-09-18 Mark Probst <mark.probst@gmail.com>
3611 * mini-ppc.c: Handle structs in tailcalls on Darwin.
3613 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
3615 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
3618 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
3620 * trace.c: make tracing more useful and correct, with per-thread
3623 2008-09-15 Mark Probst <mark.probst@gmail.com>
3625 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
3626 doing a method call and the argument is an R4.
3628 2008-09-14 Zoltan Varga <vargaz@gmail.com>
3630 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
3633 2008-09-13 Mark Probst <mark.probst@gmail.com>
3635 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
3637 2008-09-12 Zoltan Varga <vargaz@gmail.com>
3639 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
3640 (MONO_JUMP_TABLE_FROM_INS): Ditto.
3642 2008-09-11 Zoltan Varga <vargaz@gmail.com>
3644 * driver.c: Add a --agent argument (not supported yet) to load managed
3645 agent assemblies before loading the main assembly, similarly to how the
3646 Java VM handles agents.
3648 2008-09-11 Mark Probst <mark.probst@gmail.com>
3650 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
3651 function to do stack layout of local variables.
3653 2008-09-11 Mark Probst <mark.probst@gmail.com>
3655 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
3658 2008-09-11 Zoltan Varga <vargaz@gmail.com>
3660 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
3661 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
3662 JIT if DISABLE_JIT is defined.
3664 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
3667 2008-09-10 Mark Probst <mark.probst@gmail.com>
3669 * iltests.il.in: Disable the fconv test on PPC (the result is
3670 undefined according to ECMA).
3672 2008-09-10 Mark Probst <mark.probst@gmail.com>
3674 * iltests.il.in: Enable tail call tests for PPC.
3676 * mini.h: Add variable for storing incoming valuetype argument
3677 addresses for tail calls.
3679 * mini-ppc.c: Implement valuetype arguments and return values for
3682 2008-09-09 Mark Probst <mark.probst@gmail.com>
3684 * mini-ppc.c: Partially implement tail calls (struct arguments and
3685 return values not supported).
3687 * method-to-ir.c: Enable tail calls on PPC.
3689 2008-09-08 Zoltan Varga <vargaz@gmail.com>
3691 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
3692 runtime-invoke wrappers to work around the problem of them getting
3693 assigned to a random class.
3695 * aot-runtime.c (mono_aot_get_method): Ditto.
3697 2008-09-07 Zoltan Varga <vargaz@gmail.com>
3699 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
3700 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
3702 2008-09-07 Mark Probst <mark.probst@gmail.com>
3704 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
3705 until they're implemented properly.
3707 * exceptions-ppc.c: Use arch-independent exception-handling code
3708 instead of custom one.
3710 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
3713 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
3715 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
3716 applies when __powerpc__ is defined.
3718 2008-09-06 Zoltan Varga <vargaz@gmail.com>
3720 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
3721 methods to their code to avoid computing the full name of wrappers and
3722 doing a lookup in a string hash table.
3724 2008-09-05 Zoltan Varga <vargaz@gmail.com>
3726 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
3727 we identify bblocks before method_to_ir () is ran.
3729 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
3730 Also avoid optimizing branches pointing to themselves.
3732 * mini.c (mini_method_compile): Ditto. Fixes #422947.
3734 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
3736 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
3738 2008-09-05 Zoltan Varga <vargaz@gmail.com>
3740 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
3741 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
3742 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
3745 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
3746 jumped to the same entry in plt_jump_table.
3748 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3750 * method-to-ir.c (initialize_array_data): Handle field with RVA from
3753 2008-08-31 Zoltan Varga <vargaz@gmail.com>
3755 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
3756 other assignment can be if converted. Saves 1.5% on corlib size and fixes
3759 2008-08-29 Geoff Norton <gnorton@novell.com>
3761 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
3762 segment, and doesn't properly handle .space as .text. Fixes
3765 2008-08-29 Geoff Norton <gnorton@novell.com>
3767 * mini.c: Disable the mach exception handler when running on
3770 2008-08-29 Geoff Norton <gnorton@novell.com>
3772 * aot-compiler.c: Patch from Renaldas Zioma to properly register
3773 globals on Darwin/ARM
3775 2008-08-28 Zoltan Varga <vargaz@gmail.com>
3777 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
3778 since too many things depend on it. Instead, call
3779 mono_runtime_set_no_exec ().
3781 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
3784 * aot-compiler.c: Add an 'asm-only' AOT option.
3786 * mini.c: Avoid initializing the runtime when doing AOT compilation.
3788 * aot-compiler.c (compile_method): Disable gshared support for now as it
3791 2008-08-27 Bill Holmes <billholmes54@gmail.com>
3793 * mini-amd64.h : Fix a compiler warning.
3795 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
3796 Changed to use a callback function to retrieve the unwind info.
3797 This avoids problems observed when code blocks were removed by
3798 unloading an app domain.
3800 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
3801 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
3804 Contributed under MIT/X11 license.
3806 2008-08-27 Bill Holmes <billholmes54@gmail.com>
3808 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
3809 case to keep the stack aligned to 8.
3811 Contributed under MIT/X11 license.
3813 2008-08-26 Zoltan Varga <vargaz@gmail.com>
3815 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
3816 avoid repeated linear searches.
3818 2008-08-25 Zoltan Varga <vargaz@gmail.com>
3820 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
3821 methods it can't handle.
3823 * aot-compiler.c (add_method): Avoid adding a method twice.
3824 (add_wrappers): Add runtime invoke wrappers for all methods.
3826 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
3827 function to create an aot-compatible version of this trampoline.
3829 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
3831 2008-08-24 Zoltan Varga <vargaz@gmail.com>
3833 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
3835 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
3836 with a generic sharing failure.
3838 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
3840 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
3841 CEE_RETHROW. Fixes #419634.
3843 * mini.c (mono_method_to_ir): Ditto.
3845 * exceptions.cs: Add a new test.
3847 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
3848 to mono_type_stack_size_internal () since some callers might not pass in
3851 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
3852 instrument_prolog. Fixes #419878.
3854 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
3855 doubles in soft float mode volatile.
3857 2008-08-23 Zoltan Varga <vargaz@gmail.com>
3859 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
3861 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
3862 to handle soft float correctly.
3864 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
3867 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
3869 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
3870 to sp, since the generics catch code requires it.
3872 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
3875 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
3876 mono_arch_emit_imt_argument ().
3878 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
3880 * mini-arm.c tramp-arm.c: Generic sharing updates.
3882 2008-08-22 Zoltan Varga <vargaz@gmail.com>
3884 * mini-arm.c: Fix the arm build.
3886 * generic-sharing.c (mini_type_get_underlying_type): New helper function
3887 handling enums, generic instances and generic sharing.
3888 (mini_type_stack_size_full): Ditto.
3890 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
3892 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
3894 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
3896 * tramp-arm.c: Implement the rgctx fetch and the generic class init
3899 * mini-arm.c: Various small generic sharing changes.
3901 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
3903 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
3906 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
3907 helper function to return a generic class init trampoline.
3909 * method-to-ir.c mini.c: Use it.
3911 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
3912 arch-specfic function to return a generic class init trampoline.
3914 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
3915 the GENERIC_CLASS_INIT custom code.
3917 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
3918 a fatal error, not a sharing failure.
3920 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
3923 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
3924 trampoline argument from MONO_ARCH_VTABLE_REG.
3926 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3927 order of the arguments to the C trampoline: pass 'slot' as the trampoline
3928 argument, and pass the vtable in VTABLE_REG.
3930 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3931 order of the arguments to the C trampoline: pass 'slot' as the trampoline
3932 argument, and pass the vtable in VTABLE_REG.
3933 (mono_arch_create_trampoline_code_full): Remove some special casing for
3934 the rgctx fetch trampoline.
3936 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
3939 * iltests.il: Add a test for it.
3941 2008-08-21 Zoltan Varga <vargaz@gmail.com>
3943 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
3945 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
3948 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
3949 use mono_jit_info_table_find () to avoid recursion.
3950 (mono_delegate_trampoline): Add a sync wrapper here.
3952 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
3955 * mini.c (mono_method_to_ir): Ditto.
3957 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
3958 add_sync_wrapper argument. Don't add a sync wrapper here.
3959 (mono_create_jump_trampoline): Don't add a sync wrapper here.
3961 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
3963 2008-08-20 Bill Holmes <billholmes54@gmail.com>
3965 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
3966 of nonvolatile registers back from MonoContext to CONTEXT.
3968 Contributed under MIT/X11 license.
3970 2008-08-20 Bill Holmes <billholmes54@gmail.com>
3972 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
3973 arguments on Winx64 there are only 4 argument registers. For this
3974 logic to work the last argument must be pulled from the stack.
3976 Contributed under MIT/X11 license.
3978 2008-08-20 Zoltan Varga <vargaz@gmail.com>
3980 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3982 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
3983 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
3984 encode/decode_method_ref ().
3986 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
3988 * aot-runtime.c (decode_patch): Ditto.
3990 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
3991 MONO_PATCH_INFO_METHOD.
3993 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
3996 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
3999 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
4001 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
4002 one from the caller.
4004 * aot-runtime.c (decode_generic_inst): New function to decode and
4005 return a interned generic inst.
4006 (decode_klass_ref): Use it.
4007 (decode_method_ref): Ditto.
4009 * aot-compiler.c (emit_exception_debug_info): Save
4010 jinfo->has_generic_jit_info too.
4012 2008-08-19 Zoltan Varga <vargaz@gmail.com>
4014 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
4016 * iltests.il.in: Add a test for fconv_to_i.
4018 * liveness.c: Disable the liveness2 pass for now to save space.
4020 * regalloc2.c: Include mempool-internals.h to fix warnings.
4022 * aot-compiler.c (encode_method_ref): Encode the context of generic
4025 * aot-runtime.c (decode_method_ref): Inflate generic methods using
4026 the context saved in the aot file.
4028 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4030 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
4032 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
4033 volatile so they won't be optimized away.
4035 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
4041 * dominators.c: Remove duplicated functions that now are in
4042 mempool-internals.h.
4044 2008-08-19 Zoltan Varga <vargaz@gmail.com>
4046 * aot-compiler.c: Fix warnings.
4048 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
4050 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
4052 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
4055 * mini.c (mono_resolve_patch_target): Ditto.
4057 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
4058 (encode_klass_ref): Add support for encoding VARs/MVARs.
4060 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
4062 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
4063 the handling of the got entries into a separate 'decode_got_entry' function.
4064 Add support for RGCTX_FETCH.
4066 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
4067 clobbered by the trampoline code.
4069 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
4070 not clobbered by the indirect calling code.
4072 2008-08-18 Zoltan Varga <vargaz@gmail.com>
4074 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
4077 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
4079 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
4080 signature using the compilation mempool otherwise we would leak it.
4082 2008-08-18 Zoltan Varga <vargaz@gmail.com>
4084 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
4085 mono_emit_abs_call ().
4087 * patch-info.h: Add GENERIC_CLASS_INIT.
4089 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
4091 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
4092 as their target as a near call.
4094 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
4096 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
4098 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
4099 call to a runtime function described by a patch.
4101 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
4102 mono_emit_abs_call, this has the advantage that the ABS handling code in
4103 mono_codegen () can handle them both, and can handle other stuff in the
4104 future without additional code.
4106 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
4108 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
4111 * mini.h: Add missing bblock related prototypes.
4113 * mini.h (MonoCompile): Remove unused reverse_inst_list and
4114 reverse_inst_list_len fields.
4116 * mini.c: Refactor this file a bit by moving branch optimizations to
4119 * method-to-ir.c: Merge generic sharing changes missed earlier.
4121 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
4123 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
4124 shared patches. Process METHODCONST as a shared patch.
4126 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
4127 as it crashes on the 2.0 mscorlib.
4129 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
4132 * aot-compiler.c: Use is_plt_patch () in a few additional places.
4133 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
4136 * aot-compiler.c: Reorganize the got handling code to be a bit more
4139 2008-08-17 Zoltan Varga <vargaz@gmail.com>
4141 * aot-compiler.c: Make the patch_to_plt_offset hash table use
4142 mono_patch_info_equals/hash, and use it to massively simplify
4145 * mini.c (mono_patch_info_hash): Simplify this and add support for
4148 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
4150 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
4151 handling code, since an offset is not enough to identify a trampoline.
4153 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
4155 2008-08-17 Mark Probst <mark.probst@gmail.com>
4157 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
4159 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
4161 * mini-ops.h: Argument and result types for OVF_CARRY ops.
4163 * decompose.c: PPC decompositions for various ops.
4165 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
4167 2008-08-17 Zoltan Varga <vargaz@gmail.com>
4169 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
4170 call the generic trampoline code using a call, instead of a jump, to
4171 remove some special casing from the generic trampoline code.
4173 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
4174 (mono_codegen): Ditto.
4176 * aot-compiler.c aot-runtime.c: Ditto.
4178 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
4180 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
4181 helper function to find the offset corresponding to a lazy fetch trampoline.
4183 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
4184 when doing generic sharing.
4186 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
4189 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
4190 mini-trampolines.c to be with the other trampoline creation functions.
4192 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
4193 as it is equal to method->signature in most cases, add a
4194 mono_emit_method_call_full variant which takes a signature and an imt
4197 2008-08-16 Zoltan Varga <vargaz@gmail.com>
4199 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
4200 to this function, since it could be computed easily from the method
4202 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
4205 * method-to-ir.c mini.c: Remove references to
4206 compile_generic_method_wo_context.
4208 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
4209 generic method calls.
4211 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
4212 dimensional non-szarrays.
4214 * mini.c (mini_init): Register mono_array_new_1.
4216 * jit-icalls.c (mono_array_new_1): New jit icall.
4218 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
4219 pointing to the method.
4221 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
4222 method addresses belonging to METHOD_JUMP patches in the
4223 jump_target_got_slot_hash.
4224 (mono_aot_load_method): Ditto.
4226 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
4227 METHOD_JUMP patches.
4229 * mini.c (mini_create_jit_domain_info): New helper function which
4230 initializes/frees domain->runtime_info.
4231 (mini_free_jit_domain_info): Ditto.
4232 (mini_init): Install the domain hook functions with the runtime.
4234 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
4235 information maintained by the JIT.
4237 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
4238 insertion into jump_table_hash into mono_codegen (), also implement proper
4241 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
4242 tail calls, it is already done by the aot code.
4244 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
4247 * iltests.il.in: Make the jmp test a bit more complex.
4249 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
4250 generic instances which doesn't have a token.
4252 * aot-runtime.c (decode_method_ref): Ditto.
4254 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
4255 can handle this case now.
4256 (handle_box): Ditto.
4258 2008-08-15 Geoff Norton <gnorton@novell.com>
4260 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
4263 2008-08-15 Zoltan Varga <vargaz@gmail.com>
4265 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
4266 calling generic methods.
4268 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
4270 * aot-runtime.c (decode_patch_info): Ditto.
4272 * mini.c (mono_resolve_patch_target): Ditto.
4274 * patch-info.h: Add METHOD_RGCTX.
4276 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
4278 2008-08-14 Zoltan Varga <vargaz@gmail.com>
4280 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
4281 arguments in registers.
4283 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
4284 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
4286 * mini.c (mini_method_compile): Abort aot compilation for generic
4287 methods if generic sharing is disabled.
4289 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
4292 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
4293 requiring an mrgctx.
4295 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
4296 store instructions when converting a vcall to a normal call.
4298 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
4299 mono_arch_find_jit_info.
4301 2008-08-13 Zoltan Varga <vargaz@gmail.com>
4303 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
4304 avoid calling mono_method_full_name () for every method even if the
4306 (check_inline_caller_method_name_limit): Ditto.
4308 2008-08-12 Zoltan Varga <vargaz@gmail.com>
4310 * driver.c (main_thread_handler): Allow AOT compilation of multiple
4311 assemblies in one run.
4313 * aot-compiler.c (mono_compile_assembly): Only print out a count of
4314 skipped methods if it is not 0.
4316 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
4318 2008-08-12 Bill Holmes <billholmes54@gmail.com>
4320 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
4321 MONO_ARCH_HAVE_UNWIND_TABLE.
4323 Contributed under MIT/X11 license.
4325 2008-08-12 Bill Holmes <billholmes54@gmail.com>
4327 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
4328 from default optimizaton list on Winx64.
4330 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
4332 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
4333 the LMF from the MonoJitTlsData structure.
4335 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
4337 Contributed under MIT/X11 license.
4339 2008-08-12 Zoltan Varga <vargaz@gmail.com>
4341 * mini.c (sigsegv_signal_handler): Fix the build.
4343 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
4344 assembly->aot_module.
4346 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
4347 hash table. This simplifies and speeds up a lot of code, and fixes support
4350 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
4353 * mini-exceptions.c: Ditto.
4355 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
4356 'native_offset' argument, since these are computed in the
4357 mono_find_jit_info () function.
4359 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
4360 is used by exceptions-ppc.c.
4362 * exceptions-ppc.c: Call mono_find_jit_info () instead of
4363 mono_arch_find_jit_info ().
4365 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
4366 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
4367 generic code in mini-exceptions.c.
4369 2008-08-11 Zoltan Varga <vargaz@gmail.com>
4371 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
4373 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
4375 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
4376 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
4377 called while holding the loader lock. Fixes #415608.
4378 (mono_aot_get_method_from_token_inner): Ditto.
4380 2008-08-09 Zoltan Varga <vargaz@gmail.com>
4382 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
4383 to reduce differences between this and the generic implementation in
4385 (ves_icall_get_frame_info): Ditto.
4387 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
4389 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
4392 * exceptions-ppc.c (arch_get_call_filter): Rename this to
4393 mono_arch_get_call_filter () and make it non-static, for consistency with the
4394 other architectures.
4396 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
4399 * local-propagation.c:
4400 * mini-x86.c: Correct the name of arch defines.
4402 2008-08-09 Zoltan Varga <vargaz@gmail.com>
4404 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
4405 NO_EMULATE_LONG_SHIFT_OPS define.
4407 2008-08-08 Zoltan Varga <vargaz@gmail.com>
4409 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
4410 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
4412 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
4413 MACH fixes. Merged from the 2.0 branch.
4415 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
4417 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
4418 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
4420 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
4422 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
4423 mono_marshal_get_native_wrapper () signature changes.
4425 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
4427 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
4428 conversion bug under arm.
4430 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
4432 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
4434 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
4435 with overflow checking.
4437 2008-08-05 Marek Habersack <mhabersack@novell.com>
4439 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
4440 to the genmdesc.pl file
4442 2008-08-05 Zoltan Varga <vargaz@gmail.com>
4444 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
4445 arg_array in the soft-float versions of the LOAD/STORE macros.
4447 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
4450 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
4452 2008-08-02 Zoltan Varga <vargaz@gmail.com>
4454 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
4455 a float HFA. Fixes #413621.
4457 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
4459 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
4460 frame_size to args_size. Fixes build.
4462 2008-08-02 Zoltan Varga <vargaz@gmail.com>
4464 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
4465 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
4467 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
4468 the stack are not unaligned. Fixes #413247.
4470 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
4472 * mini.c: update jitted methods performance counters.
4474 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4476 * mini-exceptions.c: increase the exceptions thrown performance
4477 counter in mono_handle_exception ().
4479 2008-07-29 Zoltan Varga <vargaz@gmail.com>
4481 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
4482 can work with netmodules.
4484 2008-07-28 Geoff Norton <gnorton@novell.com>
4486 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
4489 2008-07-28 Zoltan Varga <vargaz@gmail.com>
4491 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
4494 2008-07-28 Bill Holmes <billholmes54@gmail.com>
4496 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4497 The float param registers and other param registers must be the
4498 same index on Windows x64.
4500 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
4501 ArgValuetypeAddrInIReg argument case. Setting the argument
4502 op to OP_VTARG_ADDR (OP_REGOFFSET)).
4504 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
4505 variable computed above as the copy length for arguments of storage
4506 type ArgValuetypeAddrInIReg.
4508 * mini-amd64.c (mono_arch_emit_call) : Implementing the
4509 ArgValuetypeAddrInIReg argument case. This case will rely on
4510 mono_arch_emit_outarg_vt to emit the correct code later in the process.
4512 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
4513 a 32 byte stack allocation for all calls. We will omit the adjustment for
4514 jump and tail call instructoins as they do not follow the typical call behavior.
4516 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
4517 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
4518 local variable and pass the local variable by reference to the called method.
4520 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
4521 Implementing the ArgValuetypeAddrInIReg argument case. When the address
4522 of a struct is passed in a register it must be saved with the other
4523 volatile argument on the stack.
4525 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
4526 frame pointer the stack adjustment value must be saved to the unwind
4529 Contributed under MIT/X11 license.
4531 2008-07-28 Zoltan Varga <vargaz@gmail.com>
4533 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
4534 which got lost in the merge.
4536 2008-07-27 Zoltan Varga <vargaz@gmail.com>
4538 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
4541 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
4543 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
4544 icalls, since they won't be patched.
4546 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
4547 different code sequence when running under valgrind to prevent some valgrind
4550 * iltests.il.in: Add new regression test.
4552 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
4555 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
4556 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
4558 * iltests.il.in: Add new test.
4560 * aot-compiler.c: Fix some warnings.
4562 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
4565 2008-07-27 Zoltan Varga <vargaz@gmail.com>
4567 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
4568 (mini_usage_jitdeveloper): Add a missing --wapi option.
4570 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4572 * mini-codegen.c: Simplify the is_fp macros.
4573 (free_up_ireg): Remove, use free_up_reg instead.
4574 (free_up_reg): Fix the fp case.
4576 2008-07-26 Zoltan Varga <vargaz@gmail.com>
4578 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
4581 * exceptions-x86.c: Merge some changes which seemed to have got lost
4582 in the linear-ir merge.
4584 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
4586 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
4587 long vreg volatile even if the variable was already created.
4589 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
4592 2008-07-26 Zoltan Varga <vargaz@gmail.com>
4594 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
4596 * mini.c (mono_jit_compile_method_inner): Add support for
4597 MONO_EXCEPTION_BAD_IMAGE.
4599 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
4600 mini_method_get_context () returns NULL. Fixes #356531.
4602 * mini.c (mono_method_to_ir): Ditto.
4604 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
4605 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
4607 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4609 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
4610 in the LDFTN implementation.
4612 2008-07-25 Mark Probst <mark.probst@gmail.com>
4614 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
4615 code, patch calls to icalls, too, even if they're not in the
4616 shared generic code hash. Fixes #411962.
4618 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4620 * cpu-x86.md: Increase the length of the fcall opcodes.
4622 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
4623 calls returning floats.
4625 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
4628 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
4631 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
4632 into the domain->method_code_hash.
4634 * aot-compiler.c: Fix win32 build.
4636 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
4638 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
4639 gshared NEWARR implementation.
4641 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
4643 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
4644 can be used outside of method_to_ir.
4646 * mini.h (MonoCompile): Add arg_types field.
4648 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
4650 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
4651 the values of the local arg_array and param_types array.
4653 2008-07-24 Zoltan Varga <vargaz@gmail.com>
4655 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
4656 got accesses might only get generated later when NEWOBJ is decomposed.
4658 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
4659 looking up the native code of the target method when a delegate is called
4662 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
4665 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
4667 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
4668 AOT work on platforms without a working dlsym implementation.
4670 * mini.h: Bump AOT image format version.
4672 2008-07-24 Mark Probst <mark.probst@gmail.com>
4674 * mini-exceptions.c: Free a MonoType with
4675 mono_metadata_free_type() instead of g_free().
4677 * aot-runtime.c: Free a MonoType.
4679 2008-07-24 Zoltan Varga <vargaz@gmail.com>
4681 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
4684 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
4687 2008-07-23 Massimiliano Mantione <massi@ximian.com>
4688 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
4691 2008-07-23 Zoltan Varga <vargaz@gmail.com>
4693 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
4694 NEWOBJ calls on valuetypes.
4696 * iltests.il.in: Add new test.
4698 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
4700 2008-07-22 Zoltan Varga <vargaz@gmail.com>
4702 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
4703 is no longer needed.
4705 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
4706 non register sized integer arguments.
4707 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
4708 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
4711 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
4714 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
4715 two a binop with different sized arguments is emitted.
4717 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
4718 instruction in the ins==NULL case.
4720 2008-07-23 Zoltan Varga <vargaz@gmail.com>
4722 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
4724 * mini-x86.c: Fix osx build.
4726 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
4729 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
4730 instruction for non int sized variables.
4732 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
4735 2008-07-23 Robert Jordan <robertj@gmx.net>
4737 * method-to-ir.c: Fix MSVC build.
4739 2008-07-22 Zoltan Varga <vargaz@gmail.com>
4741 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
4742 a non int sized type, widen it to an int since newer versions of gcc seem to
4743 generate code which needs this.
4745 * ssa2.c abcremoval2.c: Fix warnings.
4747 * *: Merge the Linear IR branch.
4749 The original branch is at trunk/branches/vargaz/mini-linear-il, and
4750 the ChangeLog file there describes all the changes done over the years.
4751 Further documentation can be found at www.mono-project.com/Linear_IL.
4753 2008-07-21 Bill Holmes <billholmes54@gmail.com>
4755 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4756 The float param registers and other param registers must be the
4757 same index on Windows x64.
4759 Contributed under MIT/X11 license.
4761 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
4763 * mini.c: Make the previous fix GC safe.
4765 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
4767 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
4769 2008-07-21 Bill Holmes <billholmes54@gmail.com>
4771 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
4772 on Winx64. This type will not be passed on the stack (ArgOnStack), but
4773 ArgValuetypeAddrInIReg instead.
4775 Contributed under MIT/X11 license.
4777 2008-07-21 Zoltan Varga <vargaz@gmail.com>
4779 * mini-codegen.c (get_register_spilling): Fix a warning.
4781 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
4783 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
4784 for types which the initialization fails. Raises the provided exception
4785 at the right stop after cleanup.
4787 2008-07-16 Zoltan Varga <vargaz@gmail.com>
4789 * aot-compiler.c: Free most of the memory allocated during compilation.
4791 * mini.c (mini_parse_debug_options): Fix a leak.
4793 * mini.c (mini_method_compile): Don't add the method to the jit info tables
4794 during aot compilation.
4796 2008-07-14 Zoltan Varga <vargaz@gmail.com>
4798 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
4799 it has too much register pressure.
4801 2008-07-13 Zoltan Varga <vargaz@gmail.com>
4803 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
4805 2008-07-12 Zoltan Varga <vargaz@gmail.com>
4807 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4810 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4811 on amd64 similar to the way it is done on arm.
4813 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4815 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
4816 consistency, normalize error messages, avoid loading aot-only modules in
4819 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
4822 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
4824 2008-07-11 Martin Baulig <martin@ximian.com>
4827 (MonoDebuggerInfo): Add `interruption_request'.
4829 2008-07-12 Zoltan Varga <vargaz@gmail.com>
4831 * aot-compiler.c (emit_plt): Remove some dead code.
4833 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
4835 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
4836 return the plt info offset belonging to a given plt entry.
4838 * mini-trampolines.c (mono_aot_plt_trampoline): Use
4839 mono_aot_get_plt_info_offset.
4841 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
4842 similar to the amd64 code by makeing jumps through a separate jump table
4843 instead of embedding the jump addresses into the code.
4845 2008-07-11 Zoltan Varga <vargaz@gmail.com>
4847 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
4850 2008-07-10 Martin Baulig <martin@ximian.com>
4852 * mini.c (mini_method_compile): Disable generics sharing when
4853 running in the debugger.
4855 2008-07-10 Zoltan Varga <vargaz@gmail.com>
4857 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
4859 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
4860 the local register allocator from running out of registers on x86 when
4863 2008-07-10 Bill Holmes <billholmes54@gmail.com>
4865 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
4866 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
4869 Contributed under MIT/X11 license.
4871 2008-07-10 Zoltan Varga <vargaz@gmail.com>
4873 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
4874 speed up the assembler.
4876 2008-07-09 Zoltan Varga <vargaz@gmail.com>
4878 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
4881 * mini.c: Move the soft float handling macros a bit earlier, add
4882 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
4885 * mini.h: Add prototype for mono_arch_fixup_jinfo.
4887 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
4888 read-only to help catch code allocation requests.
4890 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
4891 and turn it off when using --aot-only or when compiling with --aot=full.
4893 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
4894 jump table for switches from the normal domain mempool, not the code
4897 * mini-trampolines.c (get_unbox_trampoline): New function to return an
4898 unbox trampoline which handles aot-only mode too.
4900 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
4901 an AOTed unbox trampoline.
4903 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
4905 2008-07-09 Bill Holmes <billholmes54@gmail.com>
4907 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
4910 Contributed under MIT/X11 license.
4912 2008-07-09 Bill Holmes <billholmes54@gmail.com>
4914 * mini.c (mono_codegen): Allocate space at the end of the code block and store
4915 the unwind information for the method at the end of the allocated block.
4917 * mini-amd64.h: Added declarations for the unwind routines and adding field to
4918 MonoCompileArch to hold the unwind info for SEH on Winx64
4920 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
4921 frame pointer info for the method being compiled.
4923 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
4924 the call to mono_exception_from_token.
4926 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
4927 storing the method prolog information in a format that the Winx64 SEH can understand. This
4928 information is stored a the end of the method block because it is all 32-bit offset based.
4930 Contributed under MIT/X11 license.
4932 2008-07-09 Zoltan Varga <vargaz@gmail.com>
4934 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
4936 * wapihandles.c: Fix warnings.
4938 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
4941 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
4942 mono_jit_compile_method in aot-only mode since that calls the type
4945 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
4946 get_delegate_invoke_impl in aot-only mode.
4948 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
4950 2008-07-08 Zoltan Varga <vargaz@gmail.com>
4952 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
4954 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
4957 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
4959 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
4960 init trampoline from the AOT file as well.
4962 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
4963 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
4966 * mini.c (mini_init): Move the call to mono_exceptions_init () after
4969 * exceptions-amd64.c: Add _full variants for the remaining exception code
4970 creation functions as well, allow emission of relocatable code, remove
4971 caching since that is now done by the caller.
4973 * mini-exceptions.c: Add _full variants for the remaining exception code
4974 creation functions as well, add aot-only support.
4976 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
4977 if we can determine a proper token for them.
4978 (add_wrappers): Add a few more wrappers.
4979 (emit_method_code): Remove some dead code.
4980 (emit_trampolines): Emit exception code too.
4982 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
4984 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
4985 mono_array_new_va which avoids varargs.
4987 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
4989 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
4990 mono_arch_create_specific_trampoline () in all places.
4992 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
4993 a bit so it can be used for other things as well.
4995 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
4998 * exceptions-amd64.c: Rename the caching from the exception code creation
4999 functions, it is done by the caller instead.
5001 * exceptions-amd64.c: Change the signature of the exception code creation
5002 functions to allow the creation of relocatable code later.
5004 * mini-exceptions.c: Add a set of functions to query the various
5005 runtime-generated exception functions.
5007 * mini.c mini-exceptions.c: Use the newly added functions instead of the
5008 mono_arch_.. () functions.
5010 2008-07-07 Zoltan Varga <vargaz@gmail.com>
5012 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
5014 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
5016 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
5017 (mini_get_vtable_trampoline): Ditto.
5019 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
5020 code in the AOT case by returning the code size and a list of relocations to
5023 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
5025 2008-07-07 Bill Holmes <billholmes54@gmail.com>
5027 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
5030 Contributed under MIT/X11 license.
5032 2008-07-07 Zoltan Varga <vargaz@gmail.com>
5034 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
5035 so the buffer size can be computed correctly. Fixes #404735.
5037 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
5038 normally as cfg->debug_info is already freed.
5040 2008-07-06 Zoltan Varga <vargaz@gmail.com>
5042 * mini-amd64.c: For calls returning vtypes in registers, don't store
5043 the return address on the stack, instead allocate a separate local for
5046 2008-07-05 Mark Probst <mark.probst@gmail.com>
5048 * mini-trampolines.c, mini.h: Add an argument to
5049 mono_create_jit_trampoline_in_domain() for turning off the adding
5050 of the sync wrapper.
5052 * mini.c: Use the JIT trampoline without sync instead of
5053 ldftn_nosync in static RGCTX invoke wrappers so that the call can
5056 2008-07-04 Mark Probst <mark.probst@gmail.com>
5058 * driver.c: Turn on GSHARED optimization by default.
5060 2008-07-04 Zoltan Varga <vargaz@gmail.com>
5062 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
5063 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
5065 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
5066 create a variant of the generic trampoline code callable from AOTed trampolines.
5068 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
5069 trampoline code callable from AOTed trampolines.
5071 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
5073 2008-07-04 Mark Probst <mark.probst@gmail.com>
5075 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
5076 pass-through manner.
5078 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
5079 and don't fail sharing for them anymore.
5081 * mini-exceptions.c: Handle exceptions in shared generic methods.
5083 * generic-sharing.c: When checking the context of a generic
5084 method, also check its class's context. Don't treat wrappers as
5087 * mini-trampolines.c: Some code factored out to
5088 metadata/generic-sharing.c. Handle the MRGCTX case.
5090 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
5091 we must deal with the method being of another instantiation of the
5092 class. Add static rgctx invoke wrappers to generic methods.
5094 2008-07-04 Mark Probst <mark.probst@gmail.com>
5096 * mini.c: Provide all jit infos of generic shared methods with a
5099 * mini-exceptions.c: Handle the new situation that a generic info
5100 might be available, but not info about the this/vtable/mrgctx
5103 2008-07-03 Mark Probst <mark.probst@gmail.com>
5105 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
5108 2008-07-03 Zoltan Varga <vargaz@gmail.com>
5110 * dominators.c (check_dominance_frontier): Fix a warning.
5112 * mini.h: Add some missing prototypes.
5114 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
5116 * driver.c (mono_jit_init_version): Correct the comments since the first
5117 argument should be the name of the root domain, not a filename.
5119 * aot-runtime.c (make_writable): Error out if this is called while running
5121 (load_aot_module): Ditto.
5123 * aot-compiler.c: Really fix the computation of method indexes.
5125 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
5126 optimizations as this is no longer called frequently.
5128 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
5129 method and the invoke impl code and pass it to the delegate trampoline instead of
5130 just the delegate class.
5132 2008-07-02 Zoltan Varga <vargaz@gmail.com>
5134 * aot-compiler.c: Fixup the computation of method indexes.
5135 (add_wrappers): Create the base methods of the runtime invoke wrappers using
5136 the method builder infrastructure.
5138 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
5141 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
5142 mode, load the method right away instead of creating a trampoline.
5144 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
5146 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
5149 2008-07-01 Zoltan Varga <vargaz@gmail.com>
5151 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
5152 (mono_aot_load_method): Use method_index instead of method->token.
5154 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
5155 can handle icalls etc. properly.
5157 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5159 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
5161 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
5162 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
5163 JIT_ICALL_ADDR patch type.
5165 * patch-info.h: Add JIT_ICALL_ADDR patch type.
5167 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
5169 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
5171 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
5173 2008-06-30 Zoltan Varga <vargaz@gmail.com>
5175 * mini.c: Use domain->jit_code_hash_lock for controlling access to
5176 domain->jit_code_hash.
5178 2008-06-29 Zoltan Varga <vargaz@gmail.com>
5180 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
5182 2008-06-27 Zoltan Varga <vargaz@gmail.com>
5184 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
5185 get_this_arg_from_call, let it compute it when needed.
5187 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
5188 gsctx from code only when needed.
5190 * mini-trampolines.c (get_generic_context): Rename this to
5191 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
5192 it can be called by the arch backends.
5194 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
5196 2008-06-26 Zoltan Varga <vargaz@gmail.com>
5198 * driver.c (mono_main): Add experimental --aot-only command line option.
5200 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
5203 2008-06-26 Kornél Pál <kornelpal@gmail.com>
5205 * driver.c (DllMain): Remove mono_module_handle.
5207 Contributed under MIT/X11 license.
5209 2008-06-25 Zoltan Varga <vargaz@gmail.com>
5211 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
5212 for emitting methods which are not in the source assembly. Detect and report
5213 failure of assembling+linking.
5215 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
5217 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
5219 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
5221 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
5223 2008-06-24 Zoltan Varga <vargaz@gmail.com>
5225 * mini.h: Remove some obsolete prototypes.
5227 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
5229 2008-06-24 Mark Probst <mark.probst@gmail.com>
5231 * mini.c (get_object_generic_inst): Variable-sized arrays are not
5232 supported by Visual Studio, so use alloca().
5234 2008-06-23 Zoltan Varga <vargaz@gmail.com>
5236 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
5239 2008-06-23 Mark Probst <mark.probst@gmail.com>
5241 * mini.c: Fail sharing of a generic method if it contains an open
5242 catch clause (because we don't pass MRGCTXs yet).
5244 2008-06-23 Mark Probst <mark.probst@gmail.com>
5246 * mini.c: When compiling a method with generic sharing, insert the
5247 method instantiated with an all-Object generic context into the
5248 jit info table, instead of the context of the first instantiation
5249 of the method we happen to compile.
5251 2008-06-18 Martin Baulig <martin@ximian.com>
5253 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
5254 `major_version' and `minor_version'.
5256 2008-06-17 Mark Probst <mark.probst@gmail.com>
5258 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
5259 mono_method_is_generic_sharable_impl() takes an additional
5260 argument specifying whether to treat type variables as reference
5263 2008-06-17 Mark Probst <mark.probst@gmail.com>
5265 * mini.h: Removed obsolete prototypes.
5267 2008-06-17 Mark Probst <mark.probst@gmail.com>
5269 * mini.c: Don't fail generic sharing for initobj and sizeof - we
5270 already handle them.
5272 2008-06-17 Mark Probst <mark.probst@gmail.com>
5274 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
5275 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
5276 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
5277 tramp-x86.c: Added a MonoGenericContext* argument to
5278 mono_arch_get_unbox_trampoline() so that it can call other
5279 functions which require it.
5281 2008-06-17 Mark Probst <mark.probst@gmail.com>
5283 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
5284 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
5285 mono_arch_get_this_arg_from_call() takes a
5286 MonoGenericSharingContext* as well.
5288 2008-06-17 Mark Probst <mark.probst@gmail.com>
5290 * mini.c: Factor out code for emitting unbox into emit_unbox() and
5291 implement generic sharing of unbox.
5293 2008-06-17 Mark Probst <mark.probst@gmail.com>
5295 * mini.c: Don't compute the vtable to determine whether a field is
5296 special static, because it might not work for open types.
5298 2008-06-17 Mark Probst <mark.probst@gmail.com>
5300 * mini.c: Removed the unused token_type and token_source arguments
5301 from get_runtime_generic_context_ptr().
5303 2008-06-17 Marek Habersack <mhabersack@novell.com>
5305 * mini.c (ADD_BINOP): fix the build
5307 2008-06-16 Zoltan Varga <vargaz@gmail.com>
5309 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
5312 2008-06-16 Mark Probst <mark.probst@gmail.com>
5314 * mini.h: Removed class relations enum that's not used anymore.
5316 2008-06-16 Mark Probst <mark.probst@gmail.com>
5318 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
5320 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
5321 the lazy fetch trampoline access code.
5323 2008-06-15 Zoltan Varga <vargaz@gmail.com>
5325 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
5327 2008-06-14 Zoltan Varga <vargaz@gmail.com>
5329 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
5331 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
5333 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
5335 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5337 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
5340 * mini-ops.h: Add MIN/MAX_UN opcodes.
5342 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
5345 * basic-math.cs: Add more min/max tests.
5347 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5349 2008-06-13 Mark Probst <mark.probst@gmail.com>
5351 * mini.c: Small fix in the prologue of emit_castclass.
5353 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5355 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5357 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
5358 do not work even for unsigned types. Fixes #400014.
5360 * basic-math.cs: Add regression tests for unsigned Min/Max.
5362 2008-06-13 Mark Probst <mark.probst@gmail.com>
5364 * mini.c: Added additional context_used argument to several
5365 functions, which will be needed for sharing generic methods. Use
5366 GET_RGCTX macro wherever appropriate. Declare only one
5367 context_used in mono_method_to_ir().
5369 2008-06-13 Mark Probst <mark.probst@gmail.com>
5371 * mini.c, generic-sharing.c: Removed generic class relations.
5373 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
5374 functions due to MRGCTX changes.
5376 2008-06-13 Mark Probst <mark.probst@gmail.com>
5378 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
5379 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
5380 with calculated IMT.
5382 * mini.c: Generic sharing of calls via generic interfaces.
5384 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
5385 generic method with non-constant MonoGenericContext*. Instead,
5386 the context is taken out of the method itself.
5388 2008-06-13 Mark Probst <mark.probst@gmail.com>
5390 * mini.c: Generic sharing of ldvirtftn.
5392 2008-06-13 Mark Probst <mark.probst@gmail.com>
5394 * mini.c: Generic sharing of ldftn.
5396 2008-06-13 Mark Probst <mark.probst@gmail.com>
5398 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
5400 2008-06-13 Mark Probst <mark.probst@gmail.com>
5402 * mini.c: Generic sharing of the special case of ldtoken followed
5403 by a call to GetTypeFromHandle.
5405 2008-06-13 Mark Probst <mark.probst@gmail.com>
5407 * mini.c: Generic sharing of box for nullable types.
5409 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5411 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
5412 are passed on the stack. Fixes #324807.
5414 2008-06-12 Bill Holmes <billholmes54@gmail.com>
5416 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
5417 for the ArgValuetypeAddrInIReg case.
5419 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
5420 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
5422 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
5423 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
5424 local variable and pass the local variable by reference to the called method.
5426 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
5427 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
5429 Contributed under MIT/X11 license.
5431 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
5433 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
5435 * debug-mini.c (mono_debug_print_vars): Release memory after printing
5438 2008-06-10 Martin Baulig <martin@ximian.com>
5441 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
5443 2008-06-09 Kornél Pál <kornelpal@gmail.com>
5445 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
5446 possible error when no arguments are passed.
5448 Contributed under MIT/X11 license.
5450 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
5452 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
5453 where the file name is NULL.
5455 2008-06-09 Zoltan Varga <vargaz@gmail.com>
5457 * mini.c: Fix s390 build.
5459 2008-06-08 Zoltan Varga <vargaz@gmail.com>
5461 * trace.c (mono_trace_parse_options): Fix warnings.
5463 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
5465 2008-06-07 Zoltan Varga <vargaz@gmail.com>
5467 * mini.c (remove_block_if_useless): Avoid printing the method name.
5469 * mini.c: Remove needless setting of ins->cil_code which is now done by
5472 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
5475 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
5476 translated code after it has been patched.
5478 2008-06-06 Zoltan Varga <vargaz@gmail.com>
5480 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
5481 avoid problems during code patching on SMP systems.
5482 (emit_call): Avoid adding a patch info which is already added by
5484 (mono_arch_emit_exceptions): Ditto.
5486 2008-06-05 Zoltan Varga <vargaz@gmail.com>
5488 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
5489 MONO_TYPE_ISSTRUCT already checks for it.
5491 2008-06-05 Bill Holmes <billholmes54@gmail.com>
5493 * mini-amd64.c:merge_argument_class_from_type: When marshaling
5494 structs with floats on Winx64 the float registers are not used.
5495 The integer registers are always used..
5496 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
5497 only one register will be used and only if the size of the struct
5498 is 1,2,4, or 8 bytes.
5500 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
5503 Contributed under MIT/X11 license.
5505 2008-06-05 Martin Baulig <martin@ximian.com>
5507 * debug-debugger.c (debugger_lookup_class): Also call
5508 mono_class_setup_methods() here; we're only called from RTI.
5510 2008-06-05 Andreas Färber <andreas.faerber@web.de>
5512 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
5513 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
5514 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
5515 Post-process object files and add dtrace-generated object, if necessary.
5517 Contributed under MIT/X11 license.
5519 2008-06-04 Mark Probst <mark.probst@gmail.com>
5521 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
5524 * mini.c: Generic sharing for unbox.any and castclass.
5526 2008-06-04 Mark Probst <mark.probst@gmail.com>
5528 * mini.c: Ignore tailcall prefix in shared generic code and when
5529 doing calls which require a vtable/rgctx argument.
5531 2008-06-04 Mark Probst <mark.probst@gmail.com>
5533 * mini.c: Don't free the JIT info.
5535 * driver.c: Changes in the JIT info table testing code.
5537 2008-06-03 Zoltan Varga <vargaz@gmail.com>
5539 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
5540 interruption. Fix some warnings.
5542 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
5543 interruption_checkpoint.
5545 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5547 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
5548 from embedding applications.
5550 2008-06-02 William Holmes <billholmes54@gmail.com>
5552 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
5553 reserving 32 bytes on the stack when making calls.
5555 Contributed under MIT/X11 license.
5557 2008-06-01 Zoltan Varga <vargaz@gmail.com>
5559 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
5560 the linear IL branch.
5562 * driver.c: Print out more information for --version on arm.
5564 2008-05-30 Zoltan Varga <vargaz@gmail.com>
5566 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
5567 bb_exit instead, since out of line bblocks might not actually be emitted
5570 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
5571 maximum epilog size for out of line bblocks if tracing is enabled.
5573 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
5575 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
5577 * arrays.cs: Regression tests for allocating arrays with negative sizes.
5579 2008-05-28 Zoltan Varga <vargaz@gmail.com>
5581 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
5582 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
5585 2008-05-27 Zoltan Varga <vargaz@gmail.com>
5587 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
5588 the 'value' to store is a constant.
5590 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
5592 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
5593 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
5595 2008-05-26 Zoltan Varga <vargaz@gmail.com>
5597 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
5598 for accessing method->generic_container.
5600 2008-05-24 Zoltan Varga <vargaz@gmail.com>
5602 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
5604 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
5606 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
5608 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
5611 2008-05-23 Zoltan Varga <vargaz@gmail.com>
5613 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
5615 * mini.c: Handle the case when mono_class_vtable () fails.
5617 2008-05-23 Massimiliano Mantione <massi@ximian.com>
5618 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
5621 2008-05-22 Mark Probst <mark.probst@gmail.com>
5623 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
5624 together with domain sharing.
5626 2008-05-22 Mark Probst <mark.probst@gmail.com>
5628 * mini.c: Treat callvirts to final methods like non-virtual calls
5629 when doing generic sharing, i.e. look them up in the runtime
5632 2008-05-22 Mark Probst <mark.probst@gmail.com>
5634 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
5635 with computed types (for generic sharing).
5637 * mini.c: Generic sharing for mkrefany and refanyval.
5639 2008-05-22 Zoltan Varga <vargaz@gmail.com>
5641 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
5644 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
5645 the generic sharing code.
5647 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
5650 2008-05-21 Zoltan Varga <vargaz@gmail.com>
5652 * mini.h: Remove the declaration of mono_aot_init_vtable ().
5654 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
5656 * driver.c: updated copyright date
5658 2008-05-21 Zoltan Varga <vargaz@gmail.com>
5660 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
5663 2008-05-19 Martin Baulig <martin@ximian.com>
5665 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
5666 pointing to the new `_mono_debug_using_mono_debugger' variable.
5669 (mono_main): Check mono_debug_using_mono_debugger() rather than
5670 the `MONO_INSIDE_MDB' environment variable to check whether we're
5671 inside the debugger.
5673 2008-05-19 Zoltan Varga <vargaz@gmail.com>
5675 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
5678 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
5680 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
5682 * mini.c: Added mini_assembly_can_skip_verification. This
5683 function checks if the assembly requested to skip verification.
5684 Fixes part of #387274.
5686 2008-05-07 Zoltan Varga <vargaz@gmail.com>
5688 * mini.c (mini_get_method): Disable the check for open generic classes when
5689 using generic sharing.
5691 * generics.cs: Add a test for #387034.
5693 * mini.c (mini_get_method): Check whenever the method class is an open generic
5694 type, and return NULL in that case, causing a verification error. Fixes
5697 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5699 * driver.c (mono_main): Revert r102623. The right
5700 thing to do is to enable the verifier under verifiable
5701 unless a --security flag was passed.
5703 We need this non-trivial behavior for --verify-all otherwise
5704 mcs-compileall won't be able to use it. As it needs everything to
5705 be verified under validil.
5707 2008-05-06 Martin Baulig <martin@ximian.com>
5711 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
5712 (mono_debugger_thread_cleanup): Likewise.
5713 (mono_debugger_extended_notification): Likewise.
5715 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5717 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
5718 against both inflated and non-inflated methods. We need to check against the
5719 generic definition for cases where the instantiated method is not visible.
5720 We need to check against the inflated types for cases where the instantiation
5721 changes any super type. This fixes #382986.
5723 Note that this doesn't need to be applied to other parts of mono_method_to_ir
5724 that check for visibiliy as generic params only appears as the type subject
5725 of tokens on call opcodes. Field manipulation and ldftn must always
5726 target an exact type.
5728 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5730 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
5731 if no related --security flag is passed.
5733 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5735 * mini-arch.h: Prepare support for ppc64.
5737 Contributed under MIT/X11 license.
5739 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5741 * aot-runtime.c: Prepare support for ppc64.
5743 Contributed under MIT/X11 license.
5745 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5747 * mini-ops.h: Prepare support for ppc64.
5749 Contributed under MIT/X11 license.
5751 2008-05-04 Andreas Färber <andreas.faerber@web.de>
5753 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
5755 Contributed under MIT/X11 license.
5757 2008-05-03 Zoltan Varga <vargaz@gmail.com>
5759 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
5760 assemblies, since aot_name is not a full path, causing us to load MS.NET
5761 assemblies on windows.
5763 2008-04-28 Kornél Pál <kornelpal@gmail.com>
5765 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
5766 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
5767 * main.c: Use UTF-8 encoded command line instead of Windows default code
5768 page on Windows to support Unicode.
5769 * driver.c (DllMain): New function for mixed-mode assembly support.
5770 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
5771 export __stdcall functions without decoration.
5773 Contributed under MIT/X11 license.
5775 2008-04-28 Mark Probst <mark.probst@gmail.com>
5777 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
5778 saving it very early.
5780 2008-04-28 Mark Probst <mark.probst@gmail.com>
5782 * mini.h, mini.c: Lots of code for accessing the old RGCTX
5783 deleted. The only way to access the new RGCTX is via the
5786 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
5787 vtable instead of the RGCTX to static methods.
5789 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
5790 accessing the new RGCTX.
5792 * generic-sharing.c: There is no separation between self, type
5793 arguments and other types in the RGCTX anymore.
5795 2008-04-25 Jonathan Chambers <joncham@gmail.com>
5797 * mini-amd64.c (add_general): Remove previous stack adjustment.
5798 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
5799 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
5800 for 32 bytes of stack space reserved for all calls.
5802 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
5803 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
5806 Code contributed under MIT/X11 license.
5808 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5810 * mini.c (mini_method_verify): Only verify non-inflated methods, check
5811 against the root definition, peeling out method and type instantiations.
5812 Cache verify success results, code that fails verification is still
5813 checked multiple times.
5815 2008-04-23 Zoltan Varga <vargaz@gmail.com>
5817 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
5819 2008-04-23 Jonathan Chambers <joncham@gmail.com>
5821 * mini-amd64.c (add_general): Always increment stack on Win64.
5822 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
5825 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
5826 stack based argument handling on Win64.
5828 Code contributed under MIT/X11 license.
5830 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
5832 * Makefile.am (version.h): Add support for git-svn.
5834 2008-04-22 Zoltan Varga <vargaz@gmail.com>
5836 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
5837 so instead of calling g_spawn_command_line_sync, we do everything by hand,
5838 avoiding allocations and libc functions which might deadlock.
5840 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
5841 'no-gdb-backtrace' option is set.
5843 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
5845 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
5847 2008-04-21 Martin Baulig <martin@ximian.com>
5849 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
5850 and `get_lmf_addr'; `notification_address' is no longer a pointer.
5852 2008-04-21 Martin Baulig <martin@ximian.com>
5854 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
5855 `thread_vtable', `event_handler_ptr' and `event_handler'.
5857 2008-04-21 Martin Baulig <martin@ximian.com>
5859 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
5860 allows delayed initialization of the `executable_code_buffer' when
5863 2008-04-21 Martin Baulig <martin@ximian.com>
5865 * mini.h (mono_debugger_create_notification_function): Removed.
5866 * tramp-*.c (mono_debugger_create_notification_function): Removed.
5868 * mdb-debug-info64.s
5869 (MONO_DEBUGGER__notification_function): Added this in the .text section.
5871 * mdb-debug-info32.s
5872 (MONO_DEBUGGER__notification_function): Added this in the .text section.
5874 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
5875 currently only works on x86 and x86_64, so don't create it on ppc.
5877 2008-04-21 Martin Baulig <martin@ximian.com>
5879 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
5882 (mini_method_compile): In the fp elimination check, check
5883 `debug_options.mdb_optimizations' in addition to
5884 mono_debug_using_mono_debugger().
5886 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
5887 disable some JIT optimizations which are only disabled when
5888 running inside the debugger.
5889 Added `--help-debug' option to describe the debugging options.
5890 (parse_debug_options): New static function to parse the `--debug'
5891 options, so we can easily add more stuff in future.
5893 2008-04-20 Zoltan Varga <vargaz@gmail.com>
5895 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
5896 the method has no body.
5898 2008-04-19 Jonathan Chambers <joncham@gmail.com>
5900 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
5901 assembly is not allowed in MSVC 64-bit compiler.
5902 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
5903 as we get floating point exceptions everywhere.
5905 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
5906 correctly align arguments for call to throw_exception.
5907 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
5909 Code contributed under MIT/X11 license.
5911 2008-04-19 Zoltan Varga <vargaz@gmail.com>
5913 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
5915 2008-04-17 Zoltan Varga <vargaz@gmail.com>
5917 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
5919 * mini-amd64.c (NEW_INS): Set cil_code.
5921 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
5922 from mini-amd64.c so all debugger related logic is in one place.
5924 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
5925 later won't have a random ip assigned to them.
5927 2008-04-16 Zoltan Varga <vargaz@gmail.com>
5929 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
5930 the arch specific function initializes code_size.
5931 (mono_create_delegate_trampoline): Ditto.
5933 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
5934 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
5937 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
5938 running under the debugger.
5940 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
5943 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
5944 debugger. Also move the disabling of optimizations here from driver.c.
5945 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
5948 * mini.h (MonoCompile): Add a few new flags.
5950 2008-04-15 Zoltan Varga <vargaz@gmail.com>
5952 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
5953 so the cil_code field of created MonoInst's is properly set.
5954 (mini_select_instructions): Ditto.
5956 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
5957 (MONO_INST_NEW_CALL): Ditto.
5959 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
5960 in many places so the ins->cil_code field is properly initialized.
5962 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
5965 2008-04-14 Zoltan Varga <vargaz@gmail.com>
5967 * mini.c (mini_method_compile): Print a different message when compiling a
5970 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
5973 2008-04-11 Zoltan Varga <vargaz@gmail.com>
5975 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
5978 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
5980 2008-04-11 Zoltan Varga <vargaz@gmail.com>
5982 * mini.c (handle_stack_args): Make this return void since its return value was
5983 never used. Also set cfg->unverifiable for invalid IL instead of calling
5986 2008-04-10 Mark Probst <mark.probst@gmail.com>
5988 * mini.c: Make sure "this" is live in catch clauses with type
5989 variables in shared generic code.
5991 2008-04-08 Mark Probst <mark.probst@gmail.com>
5993 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
5994 generic_class_is_reference_type() to ensure the proper behaviour
5995 when sharing generic code and the type in question is a type
5998 2008-04-08 Zoltan Varga <vargaz@gmail.com>
6000 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
6001 race conditions when printing thread dumps. Fixes #377738.
6003 2008-04-08 Massimiliano Mantione <massi@ximian.com>
6005 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
6006 shows up when both MonoInst arguments can cause aliasig.
6007 There is likely no way in the current JIT to trigger this problem, but
6008 it showed up in the development of generics sharing, when in a new
6009 opcode both args of an OP_GROUP can be aliases (addresses of a local).
6010 When the generics sharing code will be committed, its tests will be
6011 valid also for this bug.
6013 2008-04-08 Zoltan Varga <vargaz@gmail.com>
6015 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
6018 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
6021 2008-04-07 Zoltan Varga <vargaz@gmail.com>
6023 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
6024 use a more detailed exception message for InvalidCastException.
6026 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
6028 * driver.c (mono_main): Add --debug=casts option to turn on better
6029 InvalidCastException message details.
6031 * mini.c (mini_get_debug_options): New helper function to return the address of
6032 the debug_options variable.
6034 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
6035 the jit_tls TLS variable.
6037 * mini.c (mono_jit_tls): New TLS variable.
6039 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
6042 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
6044 * mini.h: Removed verifer related stuff. This code was moved to verify.c
6046 * mini.c: Removed verifer related stuff, code moved to verify.c.
6048 * driver.c: Using code from verify.c instead of mini.c.
6050 2008-04-05 Zoltan Varga <vargaz@gmail.com>
6052 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
6055 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
6057 * mini.c (check_for_method_verify): Enabling verification of
6058 corlib if mono_verify_all is set. Bugs in the verifier preventing that
6061 2008-04-04 Zoltan Varga <vargaz@gmail.com>
6063 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
6064 caller saved registers as well.
6066 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
6067 saved registers as well.
6069 2008-03-30 Zoltan Varga <vargaz@gmail.com>
6071 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
6073 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
6076 2008-03-27 Zoltan Varga <vargaz@gmail.com>
6078 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
6080 (get_call_info): Take a gsctx argument instead of 'cfg'.
6082 2008-03-26 Zoltan Varga <vargaz@gmail.com>
6084 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
6085 mono_verify_all is set.
6087 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
6089 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
6091 2008-03-25 Zoltan Varga <vargaz@gmail.com>
6093 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
6096 * driver.c mini.c mini.h: Add a --verify-all development option to test the
6097 verifier and the code generated by the compiler.
6099 2008-03-25 Mark Probst <mark.probst@gmail.com>
6101 * mini.c: Generic sharing of the non-nullable case of the box
6104 2008-03-24 Zoltan Varga <vargaz@gmail.com>
6106 * inssel.brg: Fix the build.
6108 * iltests.il.in: Add a test for lconv.ovf.u8.un.
6110 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
6112 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
6113 Array:Address. Fixes #372410.
6115 * iltests.il.in: New tests for readonly prefix.
6117 2008-03-23 Zoltan Varga <vargaz@gmail.com>
6119 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
6122 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
6125 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
6127 * mini.c (mono_decompose_op_imm): New helper function.
6129 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
6130 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6133 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
6134 mono_arch_output_basic_block. Fix warnings.
6136 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
6139 2008-03-22 Zoltan Varga <vargaz@gmail.com>
6141 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
6142 since the extra frame is now detected automatically inside the loop.
6144 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
6145 opts which are now in mono_peephole_ins ().
6147 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
6149 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
6150 frames and skip duplicate managed-to-native frames. Fixes #367665.
6152 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
6153 opts which are now in mono_peephole_ins ().
6154 (mono_arch_peephole_pass_2): Ditto.
6156 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
6158 * mini-codegen.c (mono_peephole_ins): New helper function containing the
6159 arch independent peephole optimizations.
6161 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
6162 opts which are now in mono_peephole_ins ().
6164 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
6166 * mini-s390.c (mono_arch_output_basic_block): Fix build.
6168 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
6171 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
6172 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
6175 2008-03-21 Zoltan Varga <vargaz@gmail.com>
6177 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
6178 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6181 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
6182 mono_arch_output_basic_block. Fix warnings.
6184 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6186 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6189 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6191 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6194 * iltests.il: Add new tests.
6196 2008-03-20 Kornél Pál <kornelpal@gmail.com>
6198 * mini.c: Removed Windows version macros.
6200 2008-03-20 Mark Probst <mark.probst@gmail.com>
6202 * generic-sharing.c: Put reflection types in the extensible part
6203 of the runtime generic context.
6205 * mini.c: Generic sharing of the GetTypeHandle special case of the
6206 ldtoken instruction.
6208 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6210 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
6212 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
6214 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
6215 consistency with the other version on the linear IR branch.
6217 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
6219 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
6221 * iltests.il.in: Add new tests.
6223 2008-03-19 Zoltan Varga <vargaz@gmail.com>
6225 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
6227 * iltests.il.in: Add new tests.
6229 2008-03-19 Mark Probst <mark.probst@gmail.com>
6231 * mini.c: Two variables with the same name were declared in
6232 nesting contexts and one wasn't initialized. Fixed.
6234 2008-03-19 Mark Probst <mark.probst@gmail.com>
6236 * mini.c: Generic sharing of the initobj instruction.
6238 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6240 * mini.c: make the test to optimize ldtoken from typeof() more
6243 2008-03-18 Mark Probst <mark.probst@gmail.com>
6245 * mini.c: Generic sharing of the initobj instruction for reference
6248 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
6250 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
6251 the mono_breakpoint_clean_code() code to perform bound checks.
6253 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
6255 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
6256 mono_arch_patch_callsite() to include the start of the managed method
6257 to be able to perform bound checks.
6259 2008-03-17 Mark Probst <mark.probst@gmail.com>
6261 * mini.c: Generic sharing for the isinst instruction.
6263 2008-03-17 Mark Probst <mark.probst@gmail.com>
6265 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6266 inssel-long32-mips.brg: Added opcodes for doing indirect calls
6267 with the runtime generic context argument.
6269 * mini.c: Share calls to several types of unsharable methods by
6270 putting the address of the method code in the runtime generic
6271 context and doing an indirect call.
6273 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6276 2008-03-16 Mark Probst <mark.probst@gmail.com>
6278 * generic-sharing.c: Change due to a change in the runtime genric
6281 2008-03-15 Martin Baulig <martin@ximian.com>
6284 (mono_arch_nullify_class_init_trampoline): Add call to
6285 mono_breakpoint_clean_code() to make things work when running
6286 inside the debugger.
6289 (mono_arch_nullify_class_init_trampoline): Add call to
6290 mono_breakpoint_clean_code() to make things work when running
6291 inside the debugger.
6293 2008-03-14 Zoltan Varga <vargaz@gmail.com>
6295 * inssel-long.brg (reg): Fix 64 bit build.
6297 2008-03-14 Mark Probst <mark.probst@gmail.com>
6299 * mini.c, mini.h: Share static generic code by passing it an
6300 implicit argument pointing to the runtime generic context.
6302 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6303 inssel-long32-mips.brg: New opcodes for calling shared static,
6304 which need to be passed the runtime generic context.
6306 * mini-amd64.c, mini-x86.c: Save the runtime generic context
6307 argument on the stack in the prologue if needed. New function for
6308 finding the runtime generic context argument from the registers
6309 saved by the trampoline.
6311 * mini-amd64.h, mini-x86.h: Specify which register to use for the
6312 runtime generic context argument.
6314 * tramp-amd64.c: Also restore the register used for the runtime
6315 generic context argument.
6317 * mini-trampoline.c: Resolve shared static calls by consulting the
6318 runtime generic context via the new argument.
6320 * generic-sharing.c: Add an argument to sharability-checking
6321 functions that specifies whether type variables should be treated
6322 as sharable type arguments.
6324 * inssel-x86.brg: Removed a superfluous, buggy rule.
6326 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6329 2008-03-14 Martin Baulig <martin@ximian.com>
6331 * debug-debugger.c (main_thread_handler): Call
6332 mono_runtime_run_main() without sending any notifications.
6334 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
6336 2008-03-14 Zoltan Varga <vargaz@gmail.com>
6338 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
6340 2008-03-14 Mark Probst <mark.probst@gmail.com>
6342 * tramp-x86.c: Fixed register restore offsets in the trampoline
6343 code for ECX and EDX.
6345 2008-03-12 Geoff Norton <gnorton@novell.com>
6347 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
6348 different ucontext_t implementations.
6349 * exceptions-arm.c: Use the above defines to get exceptions working on
6350 iPhone (based on a patch by Luke Howard lukeh@padl.com)
6351 * mini-arm.c: Implement iPhone icache support (based on a patch by
6352 Luke Howard lukeh@padl.com)
6354 2008-03-12 Mark Probst <mark.probst@gmail.com>
6356 * mini.c: Enable generic sharing of calls to non-static
6357 non-interface non-generic non-value-type methods.
6359 * mini-trampolines.c: Resolve calls from shared generic code.
6361 2008-03-11 Zoltan Varga <vargaz@gmail.com>
6363 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
6365 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
6367 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
6369 * mini.c: some fixes for the AOT compiler.
6371 2008-03-07 Zoltan Varga <vargaz@gmail.com>
6373 * cpu-amd64.md: Add clob:1 to some float opcodes.
6375 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
6377 * mini.h: Added MiniVerifierMode enumeration.
6379 * mini.c: Added mini_verifier_set_mode to control
6380 the usage of the new verifier.
6382 * mini.c (mono_method): Integrated the new verifier.
6384 * driver.c: Extended --security option with validil and
6385 verifiable options to activate the new verifier.
6387 2008-03-07 Zoltan Varga <vargaz@gmail.com>
6389 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
6390 optimization to ctors taking 0 or 2 arguments too.
6392 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
6395 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
6397 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
6399 2008-03-06 Zoltan Varga <vargaz@gmail.com>
6401 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
6402 non-aot case as well.
6404 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
6406 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
6409 * aot-compiler.c (encode_patch): Ditto.
6411 * mini.h (G_MININT32): Fix the definition of this.
6413 2008-03-05 Zoltan Varga <vargaz@gmail.com>
6415 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
6417 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
6419 2008-03-04 Zoltan Varga <vargaz@gmail.com>
6421 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
6422 methods returning vtypes in registers.
6423 (mono_arch_allocate_vars): Ditto.
6425 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
6427 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
6429 * generics.cs: Add a test from the linear IR branch.
6431 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
6433 * mini.c (inline_method): Cache failed inline attempts.
6435 2008-03-04 Mark Probst <mark.probst@gmail.com>
6437 * mini.c: For shared methods of generic classes put the location
6438 of "this" into the MonoGenericJitInfo.
6440 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
6441 register out of a MonoContext by register number. Add the generic
6442 sharing context as an argument to mono_arch_find_this_argument().
6444 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
6445 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
6446 for new arch function.
6448 * mini-exception.c: Handle open exception clauses in shared
6451 * mini-trampolines.c: Supply additional argument to
6452 mono_arch_find_this_argument().
6454 2008-03-04 Zoltan Varga <vargaz@gmail.com>
6456 * Makefile.am (regtests): Run the bench.exe tests last.
6458 2008-03-03 Zoltan Varga <vargaz@gmail.com>
6460 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
6463 2008-03-02 Zoltan Varga <vargaz@gmail.com>
6465 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
6468 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
6470 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
6472 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
6473 whose class has no cctor.
6475 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
6477 2008-03-01 Zoltan Varga <vargaz@gmail.com>
6479 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
6482 2008-02-29 Zoltan Varga <vargaz@gmail.com>
6484 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
6485 to be in sync with the code on the linear IR branch.
6487 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
6489 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
6491 2008-02-27 Zoltan Varga <vargaz@gmail.com>
6493 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
6495 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
6497 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
6499 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
6501 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
6503 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
6506 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
6508 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
6509 OP_LOADR4_MEMBASE emission.
6511 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
6512 (mono_spillvar_offset_float): Ditto.
6514 * mini-mips.c (mono_arch_emit_prolog): Ditto.
6516 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
6519 * basic-long.cs: Add regression tests for them.
6521 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
6523 (mono_arch_allocate_vars): Fix representation of single-precision float
6525 (mono_arch_output_basic_block): Ditto.
6527 * inssel-mips.brg: Ditto, remove duplicate items.
6529 * mini-mips.c (emit_load_volatile_arguments): New function to handle
6530 arguments of tail calls as on other platforms.
6531 (mono_arch_output_basic_block): Handle tail calls.
6533 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
6536 * objects.cs (test_5_pass_static_struct): Add test for it.
6538 Contributed under MIT/X11 license.
6540 2008-02-26 Zoltan Varga <vargaz@gmail.com>
6542 * Makefile.am: Use gmcs for compiling the regression tests.
6544 * *.2.cs *.2.il: Rename to *.cs and *.il.
6546 2008-02-24 Zoltan Varga <vargaz@gmail.com>
6548 * regalloc.h: Make the vassign array smaller.
6550 * mini.c (mini_method_compile): Remove an unused field in cfg.
6552 * mini-codegen.c: Add a bunch of micro optimizations.
6554 2008-02-23 Zoltan Varga <vargaz@gmail.com>
6556 * regalloc.h: Remove some unused fields.
6558 2008-02-22 Zoltan Varga <vargaz@gmail.com>
6560 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
6562 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
6564 2008-02-22 Mark Probst <mark.probst@gmail.com>
6566 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
6568 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
6569 trampoline: Fetch an entry from the runtime generic context. If
6570 it's NULL, jump to the actual trampoline to fill the runtime
6571 generic context. Otherwise, return it.
6573 * mini.c: Call the lazy fetch trampoline to get entries out of the
6574 runtime generic context.
6576 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
6577 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
6578 tramp-sparc.c: Stubs for the lazy fetch trampoline.
6580 2008-02-21 Mark Probst <mark.probst@gmail.com>
6582 * mini.c: Fetch data out of the extensible part of the runtime
6583 generic context instead of calling a helper function.
6585 * generic-sharing.c: Some functions moved into
6586 metadata/generic-sharing.c. Helper function for fetching other
6587 types now checks and asserts against extensible rgctx (just for
6588 debugging purposes - the helper function isn't called anymore
6589 unless for debugging).
6591 2008-02-21 Zoltan Varga <vargaz@gmail.com>
6593 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
6594 for tail calls up to the point that the tests in iltests.exe run. Also add a
6595 dummy CKFINITE implementation.
6596 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
6597 needed for trampoline LMF frames.
6599 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
6600 trampoline LMF frames.
6602 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
6604 * mini.c (inline_method): clean any pending loader error when inlining fail.
6605 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
6607 2008-02-21 Zoltan Varga <vargaz@gmail.com>
6609 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
6611 * aot-runtime.c (decode_patch_info): Ditto.
6613 * mini.c (mono_resolve_patch_target): Ditto.
6615 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
6618 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
6620 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
6621 if it references an icall address.
6623 2008-02-20 Zoltan Varga <vargaz@gmail.com>
6625 * cpu-s390x.md: Remove some more unused opcodes.
6627 * cpu-s390x.md: Remove some unused opcodes.
6629 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
6630 mono_op_imm_to_op ().
6632 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
6633 instead of a switch statement.
6635 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
6636 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
6638 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
6640 * mini-codegen.c: Remove unused mono_regstate2_... functions.
6642 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
6645 2008-02-19 Zoltan Varga <vargaz@gmail.com>
6647 * driver.c (mono_main): Improve error reporting when an assembly cannot be
6648 opened. Fixes #362607.
6650 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
6652 * iltests.il.in: Add a test for static methods in interfaces.
6654 2008-02-18 Zoltan Varga <vargaz@gmail.com>
6656 * genmdesc.c (build_table): Fix a crash on older glib versions.
6658 * cpu-sparc.md: Remove some unused opcodes.
6660 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
6661 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
6663 * cpu-amd64.md: Remove some unused opcodes.
6665 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
6666 like the other opcodes.
6668 2008-02-17 Zoltan Varga <vargaz@gmail.com>
6670 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
6672 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
6674 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
6675 variables 'cfg' instead of 'm' for consistency.
6677 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
6679 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
6680 argument holding the vtype return address, to avoid the ambigious use of
6681 cfg->ret for this purpose.
6683 * mini.c (NEW_RETLOADA): Use vret_addr if set.
6685 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
6687 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
6688 new mono_print_ins () function which only takes one argument.
6690 2008-02-15 Zoltan Varga <vargaz@gmail.com>
6692 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
6695 2008-02-14 Zoltan Varga <vargaz@gmail.com>
6697 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
6699 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
6701 * mini-x86.c: Sync with the version on the linear IR branch by adding new
6702 opcodes and other small changes.
6704 * mini-ops.h: Add some new opcodes from the linear IR branch.
6706 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
6708 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
6709 opcodes, use the REG_MEMBASE opcodes instead.
6711 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
6712 opcodes, use the REG_MEMBASE opcodes instead.
6714 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
6717 * mini.c (mono_op_imm_to_op): New helper function.
6719 * mini-ops.h: Add some opcodes from linear IR branch.
6721 2008-02-13 Zoltan Varga <vargaz@gmail.com>
6723 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
6726 2008-02-12 Zoltan Varga <vargaz@gmail.com>
6728 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
6731 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
6733 2008-02-09 Zoltan Varga <vargaz@gmail.com>
6735 * aot-compiler.c (emit_method_code): Add an assert.
6737 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
6738 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
6741 2008-02-08 Zoltan Varga <vargaz@gmail.com>
6743 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
6744 some load/store opcodes so they are consistent.
6745 (mono_arch_emit_prolog): Simplify some code.
6747 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
6749 * objects.cs: Add tests for large argument offsets on ARM.
6751 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
6752 stack offsets. Fixes #359651.
6754 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
6756 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
6758 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
6760 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
6762 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
6764 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
6765 rid of CEE_CONV_R_UN.
6767 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
6769 2008-02-07 Zoltan Varga <vargaz@gmail.com>
6771 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
6773 * mini.c (mono_normalize_opcodes): Add some more opcodes.
6775 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
6777 * cpu-amd64.md: Remove some unused opcodes.
6779 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
6781 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
6783 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
6784 arch specific functions for its parts. Call the peephole pass after local
6785 regalloc so the prolog can compute a more accurate max_offset.
6787 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
6788 the corresponding OP_I/OP_L opcodes.
6790 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
6792 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
6794 2008-02-06 Zoltan Varga <vargaz@gmail.com>
6796 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
6797 as they are handled in mini.c.
6799 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
6801 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
6802 case since it is handled in mini.c.
6804 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
6806 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
6808 * *.c: Use the new opcodes in the IR and back end code.
6810 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
6812 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
6814 2008-02-06 Mark Probst <mark.probst@gmail.com>
6816 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
6817 an assert because it has a race condition.
6819 2008-02-06 Zoltan Varga <vargaz@gmail.com>
6821 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
6823 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
6825 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
6827 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
6828 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
6830 2008-02-05 Zoltan Varga <vargaz@gmail.com>
6832 * cpu-amd64.md (move): Correct the maximum size of move.
6834 2008-02-05 Mark Probst <mark.probst@gmail.com>
6836 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
6837 the generic class init trampoline to return quickly if the class
6840 2008-02-04 Zoltan Varga <vargaz@gmail.com>
6842 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
6843 issues where an 32 bit callsite cannot be patched by a 64 bit address.
6845 2008-02-03 Zoltan Varga <vargaz@gmail.com>
6847 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
6850 2008-01-31 Zoltan Varga <vargaz@gmail.com>
6852 * objects.cs: Add some soft-float tests.
6854 * mini.c: Fix a couple more soft-float issues.
6856 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
6858 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
6861 2008-01-30 Zoltan Varga <vargaz@gmail.com>
6863 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
6864 exception happens while compiling a virtual method.
6866 2008-01-29 Zoltan Varga <vargaz@gmail.com>
6868 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
6870 * mini-sparc.c: Fix build.
6872 * mini-sparc.c (get_call_info): Add support for generic sharing.
6874 * mini-exceptions.c: Add a FIXME.
6876 2008-01-27 Zoltan Varga <vargaz@gmail.com>
6878 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
6879 altstack handling code.
6881 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
6883 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
6885 * mini-s390.c: Add support for generic sharing.
6887 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
6889 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6891 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
6893 * mini-s390x.c: Add support for generic sharing.
6895 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
6897 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6899 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
6900 can be used since it takes a 16 bit signed immediate.
6902 * inssel-s390x.brg: Fix OP_SETRET.
6904 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
6906 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
6908 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
6910 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
6912 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
6915 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
6918 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
6919 of the unused mono_arch_patch_delegate_trampoline stuff.
6921 2008-01-26 Zoltan Varga <vargaz@gmail.com>
6923 * basic-long.cs: Move the fp related tests to basic-float.cs.
6925 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
6927 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
6929 * basic-calls.cs: Add a test for proper float argument passing.
6931 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
6932 if the context corresponds to an exception received through a signal.
6934 * exceptions.cs: Add a test for nullref handling at the start of a try
6937 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
6939 * jit-icalls.c (mono_break): New JIT icall.
6941 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
6943 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
6945 2008-01-25 Zoltan Varga <vargaz@gmail.com>
6947 * cpu-*.md: Get rid of unused opcodes.
6949 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
6951 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
6954 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
6957 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
6958 the arch independent trampoline code in mini-trampolines.c.
6960 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
6962 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
6964 * mini-s390.h: Remove an unused define.
6966 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
6967 the arch independent trampoline code in mini-trampolines.c.
6969 * mini-arm.c (mono_arch_emit_prolog): Fix build.
6971 2008-01-24 Zoltan Varga <vargaz@gmail.com>
6973 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
6975 * mini-s390.c (mono_arch_emit_prolog): Fix build.
6977 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
6979 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
6981 * cpu-amd64.md: Use smaller sizes for int opcodes.
6983 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
6985 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
6988 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
6991 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
6992 instead of though a pointer to save an indirection when accessing elements of
6995 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
6997 (NOT_IMPLEMENTED): New helper macro.
6998 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
7001 * *.c: Use the new helper macro.
7003 2008-01-21 Zoltan Varga <vargaz@gmail.com>
7005 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
7007 2008-01-20 Zoltan Varga <vargaz@gmail.com>
7009 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
7012 2008-01-18 Zoltan Varga <vargaz@gmail.com>
7014 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
7015 profiling is enabled.
7017 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
7019 (mono_arch_emit_prolog): Add more first bblock optimizations.
7021 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
7022 in order if possible.
7023 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
7024 bblock, since the arguments are still in their original registers.
7026 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
7028 2008-01-17 Zoltan Varga <vargaz@gmail.com>
7030 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
7033 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
7036 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
7038 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
7039 process async exceptions received while in unmanaged code.
7041 * mini.c (mini_init): Install a callback with the runtime which will be called
7042 when a thread receives an async exception while in unmanaged code.
7044 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
7046 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
7048 2008-01-16 Wade Berrier <wberrier@novell.com>
7055 2008-01-16 Zoltan Varga <vargaz@gmail.com>
7057 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
7058 compilation with sun cc.
7060 * cpu-*.md: Fix the build.
7062 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
7064 * mini-amd64.h: Add some comments to the MonoLMF structure.
7066 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
7068 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
7069 in the LMF structure if possible. This saves two instructions in the
7070 managed->native wrappers.
7072 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
7074 2008-01-16 Mark Probst <mark.probst@gmail.com>
7076 * generic-sharing.c: New type argument lookup code which uses the
7077 runtime generic context template.
7079 2008-01-15 Zoltan Varga <vargaz@gmail.com>
7081 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
7083 * mini-arm.c (add_general): Fix arm eabi parameter passing.
7084 (mono_arch_output_basic_block): Fix localloc implementation.
7086 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
7088 * mini-ia64.c (peephole_pass): Fix ia64 build.
7090 * mini-amd64.c (peephole_pass): Fix a warning.
7092 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
7093 at a constant offset from sp/fp.
7095 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
7096 instead of obtaining it from *lmf in the managed method case.
7098 2008-01-14 Zoltan Varga <vargaz@gmail.com>
7100 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
7102 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
7104 * mini.h (MonoInstList): New type.
7105 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
7106 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
7107 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
7108 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
7109 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
7110 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
7111 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
7112 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
7113 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
7114 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
7115 MONO_INST_LIST_FOR_EACH_ENTRY,
7116 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
7117 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
7118 mono_inst_list_first, mono_inst_list_last,
7119 mono_inst_list_next, mono_inst_list_prev): New instruction
7120 list handling interfaces.
7121 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
7122 list head 'ins_list'.
7123 (MonoInst): Replace next pointer with list head 'node'.
7124 (MonoCallInst): Make 'out_args' a MonoInstList.
7125 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
7126 (MonoCompile): Delete reverse_inst_list and
7127 reverse_inst_list_len.
7128 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
7129 mono_arch_lowering_pass, mono_arch_local_regalloc,
7130 mono_arch_output_basic_block, mono_arch_emit_prolog):
7131 Convert to new instruction lists.
7132 (insert_after_ins): Delete.
7133 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
7135 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
7136 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
7137 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
7138 mono_emulate_opcode, mono_emit_load_got_addr,
7139 inline_method, mono_method_to_ir, mono_print_bb_code,
7140 print_dfn, decompose_pass, nullify_basic_block,
7141 replace_out_block_in_code, remove_block_if_useless,
7142 merge_basic_blocks, move_basic_block_to_end,
7143 try_unsigned_compare, optimize_branches, mono_print_code,
7144 mini_select_instructions, remove_critical_edges): Likewise.
7145 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
7146 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
7147 mono_arch_output_basic_block, mono_arch_emit_prolog):
7149 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
7150 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7151 mono_arch_output_basic_block): Likewise.
7152 (inst_list_prepend, insert_after_ins): Delete.
7153 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
7154 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
7156 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
7157 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
7158 mono_arch_emit_prolog): Likewise.
7159 * cfold.c (mono_constant_fold): Likewise.
7160 * liveness.c (visit_bb, mono_analyze_liveness,
7161 optimize_initlocals): Likewise.
7162 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
7163 * graph.c (mono_draw_code_cfg): Likewise.
7164 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
7165 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
7166 mono_ssa_cprop): Likewise.
7167 * abcremoval (get_relations_from_previous_bb, process_block):
7169 * local-propagation (mono_cprop_invalidate_values,
7170 mono_local_cprop_bb): Likewise.
7171 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
7172 peephole_pass, mono_arch_output_basic_block,
7173 mono_arch_emit_prolog): Likewise.
7174 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
7175 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7176 mono_arch_emit_prolog): Likewise.
7177 (insert_after_ins): Delete.
7178 * aliasing.c (print_code_with_aliasing_information,
7179 mono_build_aliasing_information, mono_aliasing_deadce):
7180 Convert to new instruction lists.
7181 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
7182 peephole_pass, NEW_INS, mono_arch_lowering_pass,
7183 mono_arch_local_regalloc, mono_arch_output_basic_block):
7185 (insert_after_ins): Delete.
7186 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
7187 peephole_pass, mono_arch_output_basic_block): Convert to
7188 new instruction lists.
7189 * mini-codegen (InstList, inst_list_prepend,
7190 insert_after_ins): Delete.
7191 (insert_before_ins, get_register_force_spilling,
7192 get_register_spilling, free_up_ireg, free_up_reg,
7193 create_copy_ins, create_spilled_store, alloc_int_reg,
7194 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
7195 to new instruction lists.
7196 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
7197 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7198 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
7199 (insert_after_ins): Delete.
7200 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
7201 mono_arch_local_regalloc, mono_arch_output_basic_block,
7202 mono_arch_call_opcode): Convert to new instruction lists.
7203 (insert_after_ins): Delete.
7204 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
7205 peephole_pass, mono_arch_output_basic_block,
7206 mono_arch_emit_prolog): Convert to new instruction lists.
7208 2008-01-11 Zoltan Varga <vargaz@gmail.com>
7210 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
7212 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
7215 * Makefile.am (version.h): Make this work with non-bash shells.
7217 2008-01-10 Zoltan Varga <vargaz@gmail.com>
7219 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
7221 2008-01-08 Zoltan Varga <vargaz@gmail.com>
7223 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
7224 the InitializeArray optimization.
7226 2008-01-06 Zoltan Varga <vargaz@gmail.com>
7228 * mini.c driver.c: Don't include os/gc_wrapper.h.
7230 2008-01-05 Zoltan Varga <vargaz@gmail.com>
7232 * mini.c (print_jit_stats): Print GC statistics if available.
7234 2008-01-04 Zoltan Varga <vargaz@gmail.com>
7236 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
7238 2007-12-29 Zoltan Varga <vargaz@gmail.com>
7240 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
7242 2007-12-26 Zoltan Varga <vargaz@gmail.com>
7244 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
7246 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7248 * driver.c (mono_main): Ditto.
7250 2007-12-23 Zoltan Varga <vargaz@gmail.com>
7252 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
7254 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
7255 in the vtable can't be encoded.
7256 (compile_method): Ditto.
7258 2007-12-21 Zoltan Varga <vargaz@gmail.com>
7260 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
7263 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
7266 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
7267 the top LMF entry belongs to the current method.
7269 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
7271 2007-12-20 Zoltan Varga <vargaz@gmail.com>
7273 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
7275 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
7277 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
7279 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
7281 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
7283 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
7286 * basic-float.cs: Add an ulong->double cast test.
7288 2007-12-15 Zoltan Varga <vargaz@gmail.com>
7290 * mini.c (mono_method_to_ir): Fix a warning.
7292 2007-12-14 Zoltan Varga <vargaz@gmail.com>
7294 * mini-ops.h: Add OP_SWITCH.
7296 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
7297 CEE_SWITCH in back-end code, use OP_SWITCH instead.
7299 2007-12-11 Geoff Norton <gnorton@novell.com>
7301 * mini-s390x.c: Minor change to the MAX() define to allow
7302 it to compile with other gcc versions.
7304 2007-12-11 Geoff Norton <gnorton@novell.com>
7307 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
7309 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
7311 exceptions-arm.c (mono_arch_get_restore_context): Restore
7314 exceptions-arm.c (throw_exception): Save the frame pointer.
7315 This is a partial fix for #323747. Only the client side is
7318 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
7320 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
7321 was using an unrelated variable to log the class which
7322 needed the cctor to be called. This was crashing on arm.
7324 2007-12-09 Robert Jordan <robertj@gmx.net>
7326 * mini-x86.c (mono_arch_emit_epilog):
7327 Consider all kinds of 64-bit types. Fixes #323114.
7329 2007-12-08 Zoltan Varga <vargaz@gmail.com>
7331 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
7333 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7335 * mini-amd64.c (peephole_pass): Add a missing instruction check.
7337 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7339 * mini.c: run type ctor before allocating an object, not only
7340 when running it's constructor method (fixes at least part of bug #342507).
7342 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7344 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
7346 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
7347 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
7350 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
7351 mono_generic_class_init_trampoline () the same as it is done with the other
7354 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
7355 aot-runtime.c aot-compiler.c: Implement AOT support.
7357 2007-12-07 Mark Probst <mark.probst@gmail.com>
7359 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
7360 build for archs which don't have the vtable trampoline defined
7363 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7365 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
7367 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
7369 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
7371 * tramp-<ARCH>.c: Use the new helper function.
7373 2007-12-07 Mark Probst <mark.probst@gmail.com>
7375 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
7376 trampoline call, which takes a vtable argument.
7378 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
7379 OP_TRAMPCALL_VTABLEs like other calls.
7381 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
7382 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
7383 call. Implemented a support function which fetches the vtable
7384 from a register set.
7386 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
7387 Implemented a generic class init trampoline, using the
7388 OP_TRAMPCALL_VTABLE opcode.
7390 * mini.c: Implemented static field access when sharing generic
7391 code. This implies initing the class using the new
7392 OP_TRAMPCALL_VTABLE call.
7394 2007-12-07 Mark Probst <mark.probst@gmail.com>
7396 * mini.c: Don't compile methods with sharing enabled if their
7397 classes are disabled for sharing.
7399 2007-12-06 Zoltan Varga <vargaz@gmail.com>
7401 * inssel.brg: Add a missing sign extension to the GETCHR and array access
7402 opcodes. Fixes #346563.
7404 * objects.cs: Add a new test.
7406 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
7408 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
7409 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
7411 2007-12-06 Zoltan Varga <vargaz@gmail.com>
7413 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
7415 2007-12-03 Zoltan Varga <vargaz@gmail.com>
7417 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
7420 2007-12-02 Zoltan Varga <vargaz@gmail.com>
7422 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
7424 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
7425 optimization in the AOT case.
7427 2007-11-30 Zoltan Varga <vargaz@gmail.com>
7429 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
7431 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
7433 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
7435 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
7437 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
7438 is created by the inlined delegate ctor.
7440 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7442 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
7444 2007-11-29 Zoltan Varga <vargaz@gmail.com>
7446 * cpu-x86.md: Fix the length of ckfinite.
7448 2007-11-28 Zoltan Varga <vargaz@gmail.com>
7450 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7452 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
7453 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
7455 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
7457 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
7458 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
7460 2007-11-28 Martin Baulig <martin@ximian.com>
7463 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
7464 after creating the trampoline.
7466 2007-11-27 Zoltan Varga <vargaz@gmail.com>
7468 * aot-runtime.c (load_aot_module): Check runtime version if needed.
7470 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
7473 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
7474 instead of the calling method to help AOT.
7476 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
7478 2007-11-26 Zoltan Varga <vargaz@gmail.com>
7480 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
7483 2007-11-23 Zoltan Varga <vargaz@gmail.com>
7485 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
7487 * aot-compiler.c (compile_method): Correct check for generic method definitions.
7488 (encode_method_ref): No need to handle generic method definitions specially.
7490 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
7492 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
7495 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
7497 (compile_method): Enable generic sharing.
7499 2007-11-22 Zoltan Varga <vargaz@gmail.com>
7501 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
7502 (mini_method_compile): Add preliminary support for AOTing shared generic code.
7504 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
7507 * mini-trampolines.c: Fix a warning.
7509 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
7511 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
7512 (generic_class_is_reference_type): Remove unused function.
7514 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
7515 in the generic vtable trampoline case.
7517 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
7519 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
7520 return an AOT method based on a vtable slot.
7522 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
7524 * mini.c (mini_get_vtable_trampoline): Export this.
7526 2007-11-22 Martin Baulig <martin@ximian.com>
7529 (MonoDebuggerInfo): Move `debugger_version' up.
7531 2007-11-22 Martin Baulig <martin@ximian.com>
7534 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
7536 * mini-trampolines.c
7537 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
7538 after compiling the method.
7540 2007-11-20 Martin Baulig <martin@ximian.com>
7543 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
7544 (mono_debugger_remove_breakpoint): Likewise.
7545 (mono_debugger_check_breakpoints): Likewise.
7547 * debug-debugger.c: Implement the new breakpoint interface here.
7549 2007-11-18 Zoltan Varga <vargaz@gmail.com>
7551 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
7552 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
7554 * mini-x86.c (mono_arch_output_basic_block): Ditto.
7556 2007-11-17 Zoltan Varga <vargaz@gmail.com>
7558 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
7560 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
7563 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
7566 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
7567 returning a vtype in a register.
7569 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
7570 here from the arch specific code.
7572 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
7575 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
7576 (mono_arch_emit_prolog): Increment maximum prolog size.
7578 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
7579 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
7581 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
7582 MonoGenericSharingContext.
7584 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
7585 MonoGenericSharingContext. Allocate memory from the cfg mempool.
7587 2007-11-15 Mark Probst <mark.probst@gmail.com>
7589 * mini.c, mini.h, generic-sharing.c: Functions for producing code
7590 which extract fields out of the runtime generic context. Full
7591 sharing of the NEWARR opcode.
7593 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
7595 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
7596 --enable-minimal=ssa.
7598 2007-11-13 Zoltan Varga <vargaz@gmail.com>
7600 * mini-trampolines.c (mono_delegate_trampoline): Update after
7601 mono_marshal_get_delegate_invoke () signature change.
7603 2007-11-13 Mark Probst <mark.probst@gmail.com>
7605 * mini.c: Removed the shared context in favor of the generic
7606 sharing context. Allocate the MonoJitInfo structure with room for
7607 the generic sharing context if it's needed.
7609 * mini.h: Remove MonoGenericSharingContext declaration. It's in
7610 domain-internals.h now.
7612 * mini-x86.c: Pass the generic sharing context to get_call_info ().
7614 * generic-sharing.c: Several changes for working without a shared
7615 context and instead operating on open types instead.
7617 2007-11-12 David S. Miller <davem@davemloft.net>
7619 * inssel-sparc.brg: Fix double instruction emit.
7621 2007-11-12 Zoltan Varga <vargaz@gmail.com>
7623 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
7624 Get/Set/Address methods.
7626 * mini.c debug-debugger.c mini-trampolines.c: Update after
7627 mono_marshal_get_delegate_invoke signature change.
7629 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
7631 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
7632 This can happens with dynamic methods. Fixes the other bug in #322722.
7634 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
7636 * tramp-arm.c (mono_arch_patch_callsite): Support patching
7639 * mini-arm.c (arm_patch): Implement patching of BX call
7640 sequence. Fixes one of the bugs in #322722.
7642 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
7644 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
7645 under Linux. We only need to flush every 32-byte cache line.
7647 2007-11-07 Massimiliano Mantione <massi@ximian.com>
7650 move_basic_block_to_end: Add branches when needed, eventually creating
7652 optimize_branches: added a parameter that tells if it's ok to create
7653 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
7654 and avoid calling move_basic_block_to_end when it's not ok.
7657 2007-11-07 Mark Probst <mark.probst@gmail.com>
7659 * mini.c: Abort inlining call to InitializeArray if something
7660 looks wrong. Let the icall handle it, which now has proper safety
7663 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
7665 * mini.c (mono_spill_call): add support for soft-float.
7667 * mini.c (mono_method_to_ir): add support for soft-float
7668 to inlined functions that return float.
7670 * mini.c (mono_method_to_ir): add support for soft-float
7671 to cee_stsfld opcode on float fields.
7673 2007-11-05 Geoff Norton <gnorton@novell.com>
7675 * mini-x86.h: Fix the structure access for X86 Leopard.
7678 2007-11-05 Martin Baulig <martin@ximian.com>
7680 * mini-trampolines.c
7681 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
7682 after compiling the method to notify the debugger.
7684 2007-11-05 Martin Baulig <martin@ximian.com>
7686 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
7688 2007-11-02 Zoltan Varga <vargaz@gmail.com>
7690 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
7691 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
7693 2007-11-01 Zoltan Varga <vargaz@gmail.com>
7695 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
7696 native-to-managed wrappers.
7698 2007-11-01 Geoff Norton <gnorton@novell.com>
7700 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
7703 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7705 * mini.c, mini-x86.c: when getting back from unmanaged code
7706 to managed via a marshaled delegate we also need to set the
7709 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7711 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
7714 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7716 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
7717 let the debugger or other external agents to tell the JIT when
7718 a sw breakpoint has been inserted in the code that the JIT needs
7719 to be able to inspect.
7721 2007-10-31 Martin Baulig <martin@ximian.com>
7724 (MonoDebuggerInfo): Remove `runtime_class_init'.
7726 2007-10-30 Martin Baulig <martin@ximian.com>
7729 (mono_debugger_thread_created): Added `MonoThread *' argument.
7730 (mono_debugger_extended_notification): New public method.
7731 (mono_debugger_trampoline_compiled): New public method.
7734 (MonoDebuggerThreadInfo): Added `thread' and
7735 `extended_notifications' fields.
7738 (debugger_executable_code_buffer): New static variable.
7741 (MonoDebuggerInfo): Added `executable_code_buffer',
7742 `executable_code_buffer_size', `breakpoint_info_area',
7743 `breakpoint_table' and `breakpoint_table_size'.
7745 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
7747 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
7748 that IP either is an unused value or the vtable pointer. IMT
7749 calls use vtable + offset now. Reduced by almost half the size
7752 2007-10-26 Jonathan Chambers <joncham@gmail.com>
7754 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
7755 defines to access param registers. Replace long usage with
7756 gsize as sizeof(long) != sizeof(void*) on Win64.
7758 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
7759 on Win64. Fix intrinsic, use _AddressOfReturnAddress
7760 instead of non-existant _GetAddressOfReturnAddress.
7762 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
7763 param registers. Save/restore %rdi and %rsi in MonoLMF.
7765 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
7766 param registers. Modify (throw_exception) signature to take
7767 %rdi and %rsi on Win64.
7769 Code is contributed under MIT/X11 license.
7771 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7773 * helpers.c: unlink debugging output files.
7775 2007-10-25 Zoltan Varga <vargaz@gmail.com>
7777 * mini.c: Move mono_create_ftnptr () to object.c.
7779 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
7781 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
7782 optional. This function can now be used to disassemble code generated
7783 outside the JIT such as trampolines and IMT thunks.
7785 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
7787 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
7788 vtable pointer from a ldr instruction.
7790 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
7791 new IMT call sequence.
7793 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
7794 call sequence for interface invocations.
7796 * mini-arm.c (mono_arch_emit_imt_argument): added, required
7797 for imt support. This function is empty since IMT on ARM requires no
7798 special handling on the IR side.
7800 * mini-arm.c (mono_arch_find_imt_method): added, required for
7803 * mini-arm.c (mono_arch_find_this_argument): added, required
7806 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
7807 a ldr instruction to load a value stored in the code stream.
7809 * mini-arm.c (mono_arch_build_imt_thunk):added, required
7813 2007-10-23 Zoltan Varga <vargaz@gmail.com>
7815 * mini.c (mini_init): Install the jump trampoline callback.
7817 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7819 * mini-trampolines.c: handle synchronized methods with the common
7820 vtable trampoline (bug #335601).
7822 2007-10-17 Zoltan Varga <vargaz@gmail.com>
7824 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
7826 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
7829 * mini-ia64.h mini-ia64.c: Add support for IMT.
7831 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
7832 prolog. Fixes #331958.
7834 2007-10-15 Zoltan Varga <vargaz@gmail.com>
7836 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
7838 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7840 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
7843 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7845 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
7848 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
7850 * mini-x86.c, mini-x86.h: x86 support for the common vtable
7853 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
7855 * mini-trampolines.c: changed the magic rampoline to understand
7856 the common vtable trampoline method: the method to invoke is
7857 determined by the vtable displacement of the call.
7859 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7861 * mini.c, mini.h: register the common vtable trampoline if the
7862 architecture supports it.
7864 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7866 * cpu-amd64.md: use the correct max length for tls_get.
7868 2007-10-14 Zoltan Varga <vargaz@gmail.com>
7870 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
7871 CEE_STELEM_ANY. Fixes #333696.
7873 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7875 * exceptions-x86.c: provide more graceful handling of the case where
7876 we followed a bogus function pointer from managed code (bug #332866).
7878 2007-10-11 Mark Probst <mark.probst@gmail.com>
7880 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
7881 replaces the generic_shared flag and will carry more information
7884 * generic-sharing.c: Added mini_type_stack_size() which allows
7885 allows open types if given a generic sharing context.
7886 mini_get_basic_type_from_generic() takes a
7887 MonoGenericSharingContext* instead of a MonoCompile* now.
7889 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
7890 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
7891 mini-sparc.c, mini-x86.c: Trivial changes required by the two
7892 changes above. Just passing arguments through to the right
7895 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7897 * mini-arm.c: unify the call emission to emit_code_seq().
7899 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
7901 * tramp-arm.c: reduced the trampoline size.
7903 2007-10-10 Mark Probst <mark.probst@gmail.com>
7905 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
7906 variable handling out of arch-specific code.
7908 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7910 * mini-arm.c: implemented fast delegate dispatch.
7912 2007-10-09 Zoltan Varga <vargaz@gmail.com>
7914 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
7915 that fp elimination is turned off if the space required by locals is too
7918 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7920 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
7921 ARM to the new style trampoline.
7923 2007-10-09 Zoltan Varga <vargaz@gmail.com>
7925 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
7927 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
7929 2007-10-09 Martin Baulig <martin@ximian.com>
7932 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
7933 `field_info_offset_offset'.
7935 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7937 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
7938 removed more internal usage of the r11 register and made it available
7939 to the register allocator.
7941 2007-10-08 Mark Probst <mark.probst@gmail.com>
7943 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
7944 when sharing generics and treat type variables as references.
7946 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7948 * mini-ppc.c: started removing the internal uses of register r11
7949 to eventually allow the register allocator to manage it as an
7950 additional available register.
7952 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7954 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
7956 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7958 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
7959 specific trampolines as they are not performance critical as a jump
7960 target (maybe align as before only for AOT code?). This saves about
7961 200 KB of native code on x86 for monodevelop startup.
7963 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7965 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
7966 monodevelop startup.
7968 2007-10-06 Zoltan Varga <vargaz@gmail.com>
7970 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
7972 * mini-sparc.h mini-sparc.c: Implement IMT support.
7974 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
7975 its smaller and doesn't clobber sparc_g1.
7977 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
7979 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7981 * mini-ppc.c: optimized the size of the IMT thunks a bit.
7983 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7985 * mini-ppc.c: implemented fast delegate invocation.
7987 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
7989 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
7991 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7993 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
7994 code to the new style trampoline in preparation for IMT support.
7996 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
7998 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
7999 systems already. This also reduces the specific trampiline sizes and
8000 prepares for the use of r12 as the IMT identifier register.
8002 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8004 * mini-mips.h: endianess fix (simplified from a patch by
8005 Thomas Kunze <thommy@tabao.de>, bug #323737).
8007 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
8009 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
8010 to access ucontext fields and enable netbsd support
8011 (partially from Magnus Henoch <mange@freemail.hu>).
8013 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8015 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
8016 use the preprocessor from the CPP env var if it is set.
8018 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
8020 * mini-trampolines.c: fixed an assertion and moved it earlier in the
8021 code, before interface_offset gets used.
8023 2007-10-02 Zoltan Varga <vargaz@gmail.com>
8025 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
8026 mono_class_setup_vtable () before accessing klass->vtable.
8028 2007-10-01 Zoltan Varga <vargaz@gmail.com>
8030 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
8033 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8035 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
8036 IMT slots (this saves hundreds of KB of memory in programs like
8037 IronPython and Monodevelop).
8039 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8041 * mini.c: print the delegate counter.
8043 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
8045 * mini-x86.c: make it easier to enable the debugging code for IMT
8048 2007-09-28 Martin Baulig <martin@ximian.com>
8051 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
8052 `mono_method_klass_offset' and `mono_method_token_offset'.
8054 2007-09-20 Mark Probst <mark.probst@gmail.com>
8056 * mini.c: First generics sharing implementation. Can only share
8057 in very simple cases. If sharing doesn't work it falls back to
8058 dedicated compilation.
8060 * mini.h: Flag in MonoCompile to specify whether generic
8061 compilation is shared. Flags enum for marking which generic inst
8062 of a context is used. Prototypes for helper functions.
8064 * generic-sharing.c: Helper functions for generic method sharing.
8066 * optflags-def.h: Optimization flag (gshared) for enabling generic
8067 method sharing added.
8069 * Makefile.am: generic-sharing.c added.
8071 2007-09-19 Daniel Nauck <dna@mono-project.de>
8073 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
8075 2007-09-19 Massimiliano Mantione <massi@ximian.com>
8076 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
8079 2007-09-19 Martin Baulig <martin@ximian.com>
8081 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
8082 mono_debug_cleanup() is now part of mono_cleanup().
8084 2007-09-18 Zoltan Varga <vargaz@gmail.com>
8086 * driver.c (mono_main): Fix a warning.
8088 2007-09-17 Zoltan Varga <vargaz@gmail.com>
8090 * aot-compiler.c: Optimize various parts when processing large assemblies.
8093 * mini.c (mono_patch_info_hash): Improve hash function.
8095 2007-09-14 Jonathan Chambers <joncham@gmail.com>
8097 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
8099 Code is contributed under MIT/X11 license.
8101 2007-09-14 Zoltan Varga <vargaz@gmail.com>
8103 * mini.c (mini_init): Fix a leak.
8105 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
8107 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8109 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
8111 2007-09-14 Zoltan Varga <vargaz@gmail.com>
8113 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
8115 2007-09-13 Zoltan Varga <vargaz@gmail.com>
8117 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
8120 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
8122 * mini.c (handle_alloc): Enable managed allocators in AOT code.
8124 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
8126 * aot-runtime.c (decode_patch_info): Ditto.
8128 2007-09-12 Jonathan Chambers <joncham@gmail.com>
8130 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
8131 static case. Cache delegates in architecture specific code,
8132 based on number of parameters.
8134 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
8135 in architecture specific code, based on number of parameters.
8137 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
8138 caching happen in architecture specific code now.
8140 Code is contributed under MIT/X11 license.
8142 2007-09-12 Jonathan Chambers <joncham@gmail.com>
8144 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
8145 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
8146 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
8148 Code is contributed under MIT/X11 license.
8150 2007-05-15 Massimiliano Mantione <massi@ximian.com>
8151 * mini.c: (mono_thread_abort) Fixed bug #82416.
8153 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8155 * mini.: hook the new managed GC allocation feature into the JIT.
8157 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8159 * mini.c: implementation for the new runtime tls opcode.
8161 2007-09-11 Martin Baulig <martin@ximian.com>
8164 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
8165 `mono_method_inflated_offset'.
8167 2007-09-07 Zoltan Varga <vargaz@gmail.com>
8169 * driver.c mini.h mini.c: Add a new devel command line option for injecting
8170 async exceptions into a method.
8172 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
8173 purpose of testing whenever the unwinder works at every instruction.
8175 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8177 * mini.c: check accessibility of method used in ldftn (fixes
8180 2007-09-04 Zoltan Varga <vargaz@gmail.com>
8182 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
8184 * inssel.brg: Fix a warning.
8186 2007-09-03 Martin Baulig <martin@ximian.com>
8188 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
8189 now takes the `main_method' as argument.
8191 2007-09-02 Zoltan Varga <vargaz@gmail.com>
8193 * cpu-sparc.md (endfilter): Add missing src1:i argument.
8195 2007-08-30 Jonathan Chambers <joncham@gmail.com>
8197 * driver.c: include the cil-coff.h header on Windows.
8199 Code is contributed under MIT/X11 license.
8201 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8203 * mini.c, driver.c: don't include the cil-coff.h header.
8205 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8207 * mini.c: flag places that needs fixes fo soft-float support.
8209 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
8211 * mini.h, inssel-float.brg: fix soft-float constant loads on big
8212 endian systems (partially from Dean Jenkins, bug #81924).
8214 2007-08-28 Mark Probst <mark.probst@gmail.com>
8216 * mini.c (check_linkdemand): Remove embedded reference object in
8217 call to LinkDemandSecurityException.
8218 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
8219 with an IntPtr instead of a reference object.
8221 2007-08-28 Zoltan Varga <vargaz@gmail.com>
8223 * mini.c (handle_initobj): Handle alignment properly.
8225 * inssel.brg (mini_emit_memset): Ditto.
8227 * inssel.brg (mini_emit_memcpy): Ditto.
8229 * inssel-sparc.brg: Ditto.
8231 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
8233 2007-08-26 Zoltan Varga <vargaz@gmail.com>
8235 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
8236 exceptions raised in unmanaged code. Fixes part of #82594.
8238 2007-08-24 Mark Probst <mark.probst@gmail.com>
8240 * mini.c (mono_method_to_ir), declsec.c
8241 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
8243 2007-08-22 Martin Baulig <martin@ximian.com>
8246 (MonoDebuggerThreadInfo): New typedef.
8247 (mono_debugger_thread_table): New global variable.
8248 (mono_debugger_thread_created): New public function.
8249 (mono_debugger_thread_cleanup): New public function.
8253 - removed `get_current_thread' and `lookup_assembly'.
8254 - removed `data_table'.
8255 - added `thread_table'.
8258 (mono_thread_start_cb): Call mono_debugger_thread_created().
8259 (mono_thread_attach_cb): Likewise.
8260 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
8261 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
8264 * driver.c (mono_main): Move mono_debug_init() up, before calling
8265 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
8267 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8269 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
8270 together when passing several arguments of type double (gives a small
8271 speedup and saves a few bytes of generated code).
8273 2007-08-20 Jb Evain <jbevain@novell.com>
8275 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
8277 2007-08-20 Jb Evain <jbevain@novell.com>
8279 * mini.c (mono_method_to_ir): throw MethodAccessException
8280 and FieldAccessException instead of InvalidProgramException.
8282 2007-08-20 Mark Probst <mark.probst@gmail.com>
8284 * mini.c: CoreCLR security checks.
8286 * mini.h: Removed MonoSecurityMode (moved to
8287 metadata/security-manager.h) and mono_security_mode global var
8288 (replaced by set/get functions in security-manager.h).
8290 * driver.c: Added "core-clr-test" security mode for testing. Used
8291 set-function for setting security mode.
8293 2007-08-17 Mark Probst <mark.probst@gmail.com>
8295 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
8296 the new jit_info_table.
8298 * driver.c: Test code for the new jit_info_table (enabled by the
8299 define MONO_JIT_INFO_TABLE_TEST).
8301 2007-08-14 Zoltan Varga <vargaz@gmail.com>
8303 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8304 detection of call <REG> instruction sequence. Fixes build on freebsd.
8306 2007-08-13 Zoltan Varga <vargaz@gmail.com>
8308 * mini-exceptions.c: Fix a warning.
8310 2007-08-11 Zoltan Varga <vargaz@gmail.com>
8312 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
8313 stack overflow handling code on amd64 too.
8315 * mini-exceptions.c (mono_setup_altstack): Make this use
8316 mono_thread_get_stack_bounds ().
8318 * mini-x86.h: Disable sigaltstack on solaris x86.
8320 2007-08-10 Zoltan Varga <vargaz@gmail.com>
8322 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
8324 2007-08-10 Geoff Norton <gnorton@customerdna.com>
8326 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
8328 2007-08-08 Zoltan Varga <vargaz@gmail.com>
8330 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
8332 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
8334 2007-08-03 Neale Ferguson <neale@sinenomine.net>
8336 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
8339 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8341 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
8342 to be emitted (bug #82281).
8344 2007-08-01 Martin Baulig <martin@ximian.com>
8346 Merged the `debugger-dublin' branch.
8348 * debug-debugger.h (MonoDebuggerInfo):
8349 Removed the `old_*' compatibility entries.
8350 Added `debugger_version' and `data_table'.
8351 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
8352 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
8355 (MiniDebugMethodBreakpointInfo): Add `address_list'.
8356 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
8357 instead of a `gconstpointer'.
8358 (mono_debugger_insert_method_breakpoint): Return a
8359 `MonoDebugMethodAddressList *'.
8361 2007-06-28 Martin Baulig <martin@ximian.com>
8363 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8365 2007-08-01 Zoltan Varga <vargaz@gmail.com>
8367 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
8368 __builtin_frame_address () since it is broken on older gcc versions.
8370 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8372 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
8373 on the stack overflow handling and made the managed stack overflows
8374 catchable in most cases using soft guard pages.
8375 * exceptions-x86.c: added code to restore the protection in the soft
8376 guard pages at the end of exception handling.
8378 2007-07-31 Zoltan Varga <vargaz@gmail.com>
8380 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
8382 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8384 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
8387 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8389 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
8390 signal handling support until it has been ported to the new mechanism.
8391 * mini.c: fixed stack overflow detection and use the new
8392 architecture code to handle signals on the altstack.
8394 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8396 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
8397 stack overflows on the alt stack.
8399 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
8401 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
8402 stack overflows on the alt stack.
8404 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
8406 * exceptions-ppc.c: cleanup preparing for altstack support.
8408 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8410 * exceptions-arm.c: cleanup preparing for altstack support.
8412 2007-07-27 Mark Probst <mark.probst@gmail.com>
8414 * mini.c (print_jit_stats): Output hazard pointer stats.
8416 2007-07-26 Mark Probst <mark.probst@gmail.com>
8418 * driver.c, mini.c: Replaced security mode flags with a single
8421 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8423 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
8425 2007-07-25 Mark Probst <mark.probst@gmail.com>
8427 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
8428 (which doesn't do anything yet) for activating Core CLR
8429 (Silverlight) security.
8431 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8433 * mini-codegen.c: work around a possible gcc bug on arm.
8435 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8437 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
8438 message for platforms that don't support AOT compilation.
8440 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8442 * mini.h, mini.c, driver.c: temporary smcs hack.
8444 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
8446 * mini-arm.h, mini-arm.c: arm EABI fixes.
8448 2007-07-22 Zoltan Varga <vargaz@gmail.com>
8450 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
8453 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
8454 trampolines taking a method argument.
8456 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
8458 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
8459 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
8461 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
8462 JIT compilation throws an exception. Fixes #82050.
8464 2007-07-19 Mark Probst <mark.probst@gmail.com>
8466 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
8467 with the MONO_EXCEPTION_ defines.
8469 2007-07-17 Zoltan Varga <vargaz@gmail.com>
8471 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
8474 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
8475 the cause of an assertion.
8477 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
8479 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
8482 2007-07-15 Zoltan Varga <vargaz@gmail.com>
8484 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
8485 assert. Should fix #82103.
8487 2007-07-14 Zoltan Varga <vargaz@gmail.com>
8489 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
8490 here too. Fixes #82095.
8492 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
8495 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
8497 * mini-amd64.h: Enable IMT for amd64.
8499 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
8501 2007-07-12 Zoltan Varga <vargaz@gmail.com>
8503 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
8505 2007-07-12 Mark Probst <mark.probst@gmail.com>
8507 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
8508 as soon as check_linkdemand sets an exception_type.
8510 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8512 * mini-x86.c: fixed offsets for IMT call sequence.
8513 * mini-x86.h: enable IMT again.
8515 2007-07-11 Zoltan Varga <vargaz@gmail.com>
8517 * trace.c (mono_trace_enter_method): Decode MonoType too.
8519 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
8521 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
8523 * mini-amd64.c: Add preliminary IMT implementation.
8525 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8527 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
8528 understand the new IMT-base interface invocation (thanks to
8529 Daniel Nauck for the report and the remote debugging session).
8531 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8533 * mini-x86.c: size and speed optimizations for the IMT bsearch.
8535 2007-07-11 Zoltan Varga <vargaz@gmail.com>
8537 * Makefile.am (aotcheck): Make this actually use the AOTed code.
8539 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
8541 * mini-trampolines.c: implement AOT IMT support.
8542 * mini-x86.h: enable IMT support for wider testing.
8544 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8546 * inssel.brg (emit_imt_argument): Add aot support here.
8548 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
8550 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8552 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
8553 of the IMT implementation, partially from massi, with my
8554 implementation of the bsearch sequence. Disabled by default until
8555 the AOT code is implemented.
8557 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8559 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
8561 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
8563 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8565 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
8566 arch-independent IMT JIT code from Massimiliano
8567 Mantione (massi@ximian.com) with small cleanups from me.
8569 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8571 * Makefile.am: fix svn invocation to get the svn revision to be
8572 independent of the local language (build fix).
8574 2007-07-09 Mark Probst <mark.probst@gmail.com>
8576 * mini.c (inline_method): Reset cfg->exception_type if the
8577 inlining is aborted. Fixes: 82049.
8579 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
8581 * mini.c: remove assert from exception handling code when exception_ptr
8584 2007-07-05 Zoltan Varga <vargaz@gmail.com>
8586 * mini.c (mono_codegen): Add an assert.
8588 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
8589 enter and leave code.
8590 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
8592 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8594 * mini-ppc.c: fixed memory corruption for localloc(0)
8597 2007-07-05 Zoltan Varga <vargaz@gmail.com>
8599 * mini.c: Fix warnings.
8601 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
8603 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
8604 to emit better double->int conversions.
8606 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8608 * mini.c: the provided Min/Max optimizations are valid for unisgned
8611 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
8613 * 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
8615 2007-06-28 Miguel de Icaza <miguel@novell.com>
8617 * mini.c (mono_running_on_valgrind): Add support for reporting the
8618 method and its boundaries to valgrind.
8620 2007-06-28 Martin Baulig <martin@ximian.com>
8622 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8624 2007-06-25 Zoltan Varga <vargaz@gmail.com>
8626 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
8628 * generic.2.cs: Add new test case.
8630 2007-06-25 Martin Baulig <martin@ximian.com>
8632 Merged the `debugger-dublin' branch.
8635 (mono_debugger_insert_method_breakpoint): New public method.
8636 (mono_debugger_remove_method_breakpoint): Likewise.
8637 (mono_debugger_check_breakpoints): New static method.
8638 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
8640 * debug-debugger.h (MonoDebuggerInfo):
8641 Renamed (to keep backward compatibility in the vtable):
8642 `insert_breakpoint' -> `old_insert_breakpoint'.
8643 `remove_breakpoint' -> `old_remove_breakpoint'.
8644 `create_string' -> `old_create_string'.
8645 `lookup_class' -> `old_lookup_class'.
8646 `lookup_type' -> removed; changed into a dummy field.
8647 `lookup_assembly' -> `old_lookup_assembly'.
8648 Added (same functionality, but different signature):
8649 `create_string', `lookup_class', `lookup_assembly'
8651 `get_method_addr_or_bpt', `remove_method_breakpoint',
8652 `runtime_class_init'.
8654 * debug-debugger.c: Merged the `debugger-dublin' branch.
8656 2007-06-23 Zoltan Varga <vargaz@gmail.com>
8658 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
8660 (peephole_pass): Likewise.
8662 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
8664 * driver.c: hopefully make setaffinity work also for ancient
8667 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
8669 * driver.c : win32 build fix.
8671 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8673 * driver.c: check for the MONO_NO_SMP env var and bind to a single
8674 processor if it is set.
8676 2007-06-21 Martin Baulig <martin@ximian.com>
8678 * debug-mini.h: New file.
8681 (mono_debugger_insert_breakpoint_full): Moved here from
8682 ../metadata/mono-debug-debugger.c.
8683 (mono_debugger_remove_breakpoint): Likewise.
8684 (mono_debugger_breakpoint_callback): Likewise.
8686 2007-06-15 Raja R Harinath <rharinath@novell.com>
8688 * jit-icalls.c (mono_helper_compile_generic_method): Update to
8689 changes in MonoGenericClass.
8691 2007-06-14 Zoltan Varga <vargaz@gmail.com>
8693 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
8695 2007-06-14 Raja R Harinath <rharinath@novell.com>
8697 * jit-icalls.c (mono_helper_compile_generic_method): Update to
8698 removal of MonoGenericMethod.
8700 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8702 * mini-exceptions.c: hooks for the exception events profiling API.
8704 2007-06-14 Randolph Chung <tausq@debian.org>
8706 * Makefile.ma: Add hppa target.
8707 * mini-arch.h: Include mini-hppa.h
8708 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
8709 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
8710 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8712 2007-06-14 Randolph Chung <tausq@debian.org>
8714 * inssel.brg: Add rules for "chained" compare-branch operations so that
8715 a single compare op can affect multiple branches. Adjust cost for
8716 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
8717 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
8718 cost for some rules so that they can more easily be overridden by
8719 per-arch rules (with fixes from lupus).
8720 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8722 2007-06-13 Randolph Chung <tausq@debian.org>
8724 * mini-ops.h: Reorder branch ops so that they match the order of the
8725 corresponding CEE_* ops. The code expects them this way.
8726 Add new ops for HPPA target.
8727 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8729 2007-06-13 Randolph Chung <tausq@debian.org>
8731 * mini-exceptions.c: Handle cases where the stack grows towards
8733 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8735 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8737 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
8739 * driver.c: explain where a non-matching corlib is found.
8741 2007-06-13 Mark Probst <mark.probst@gmail.com>
8743 * mini.c (print_jit_stats): Output dynamic code allocation stats.
8745 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
8747 * mini-exceptions.c: Generate a method profile leave event during
8748 an exception to ensure that the profiler gets notified.
8750 2007-06-07 Zoltan Varga <vargaz@gmail.com>
8752 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
8755 * cpu-amd64.md: Add long_and/or/xor opcodes.
8757 2007-06-06 Wade Berrier <wberrier@novell.com>
8759 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
8760 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
8761 length of instruction shr_imm (expected 8, got 10)
8763 2007-06-06 Zoltan Varga <vargaz@gmail.com>
8765 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
8767 2007-06-06 Mark Probst <mark.probst@gmail.com>
8769 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8770 MonoInternalHashTable again (fixed bug in the internal hash table
8773 2007-06-06 Mark Probst <mark.probst@gmail.com>
8775 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
8776 Have to figure out what makes it crash the SWF regression.
8778 2007-06-05 Zoltan Varga <vargaz@gmail.com>
8780 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
8782 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8784 * mini.c: optimize out the type check when storing null in a
8787 2007-06-04 Mark Probst <mark.probst@gmail.com>
8789 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8790 MonoInternalHashTable.
8792 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8794 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
8795 signed integer methods.
8797 2007-06-02 Zoltan Varga <vargaz@gmail.com>
8799 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
8800 permanently since the current approach doesn't work.
8802 2007-06-02 Zoltan Varga <vargaz@gmail.com>
8804 * inssel.brg (stmt): Only call delegate->invoke_impl if
8805 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
8807 2007-06-01 Zoltan Varga <vargaz@gmail.com>
8809 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
8810 the sreg2==rdx case.
8812 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
8813 account if it contains a rex prefix.
8814 (peephole_pass): Handle OP_FMOVE as well.
8816 2007-06-01 Zoltan Varga <vargaz@gmail.com>
8818 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
8819 as it causes regressions.
8821 2007-05-31 Zoltan Varga <vargaz@gmail.com>
8823 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
8824 static case as well.
8826 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
8828 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8829 (mono_arch_get_this_arg_from_call): Ditto.
8831 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
8833 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
8836 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8837 (mono_arch_get_this_arg_from_call): Ditto.
8839 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
8841 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
8842 try to create optimized invoke code and use that for further invocations.
8843 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
8845 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
8847 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
8849 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
8850 sealed classes or methods.
8851 *devirtualization.cs: tests for the new optimization
8853 2007-05-29 Zoltan Varga <vargaz@gmail.com>
8855 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
8856 by the update_volatile () function.
8858 2007-05-27 Zoltan Varga <vargaz@gmail.com>
8860 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
8863 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
8865 2007-05-24 Jonathan Chambers <joncham@gmail.com>
8867 * mini.c: Add configure checks for header files.
8868 * mini-x86.c: Add configure checks for header files.
8869 * trace.c: Add configure checks for header files.
8870 * aot-runtime.c: Add configure checks for header files.
8871 * aot-compiler.c: Add configure checks for header files.
8872 * driver.c: Add configure checks for header files.
8873 * mini-codegen.c: Add configure checks for header files.
8875 Code is contributed under MIT/X11 license.
8877 2007-05-22 Zoltan Varga <vargaz@gmail.com>
8879 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
8880 icompare_imm -128 + op_iclt. Fixes #81703.
8882 2007-05-19 Zoltan Varga <vargaz@gmail.com>
8884 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
8886 2007-05-15 Massimiliano Mantione <massi@ximian.com>
8888 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
8889 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
8890 so that all isinst checks now use "interface_bitmap".
8892 2007-05-15 Zoltan Varga <vargaz@gmail.com>
8894 * cpu-amd64.md (jmp): Fix a warning.
8896 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
8898 * basic.cs: Add new regression test.
8900 * basic.cs: Remove test which is now in basic-long.cs.
8902 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
8904 * basic-long.cs: Add new test.
8906 2007-05-13 Zoltan Varga <vargaz@gmail.com>
8908 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
8910 2007-05-12 Zoltan Varga <vargaz@gmail.com>
8912 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
8914 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
8917 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
8918 throwing code a bit.
8920 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
8921 the exception throwing code a bit.
8923 * mini-x86.c (get_call_info): Allocate result from a mempool.
8925 2007-05-11 Zoltan Varga <vargaz@gmail.com>
8927 * aot-compiler.c (find_typespec_for_class): Fix the assert.
8929 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8931 * mini.h (MonoCompile): Add 'token_info_hash' field.
8933 * mini.c: Save token->method associations during compilation so the AOT
8934 compiler can use it.
8936 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
8937 which reference generic classes and methods.
8939 2007-05-10 Zoltan Varga <vargaz@gmail.com>
8941 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
8943 * aot-compiler.c (compile_method): Fix a typo in a comment.
8945 * aot-runtime.c (decode_cached_class_info): Skip generic types.
8947 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
8950 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
8952 2007-05-09 Zoltan Varga <vargaz@gmail.com>
8954 * mini.h (MonoCompile): Add 'args' field.
8956 * mini.c (mono_compile_create_vars): Store variables representing the arguments
8959 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
8961 2007-05-08 Zoltan Varga <vargaz@gmail.com>
8963 * mini.c (mono_compile_get_interface_var): Remove this unused function.
8965 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
8967 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
8968 opcodes for some opcodes.
8970 * mini.h *.brg *.c: Use the new opcodes.
8972 2007-05-08 Massimiliano Mantione <massi@ximian.com>
8974 * mini.h: Bumped aot revision.
8976 * inssel.brg: modified code generation of type checks for interfaces
8977 to use the new "MonoClass.interface_bitmap" instead of the old
8978 "MonoClass.interface_offsets".
8980 2007-04-30 Zoltan Varga <vargaz@gmail.com>
8982 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
8984 2007-04-29 Zoltan Varga <vargaz@gmail.com>
8986 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
8989 2007-04-27 Neale Ferguson <neale@sinenomine.net>
8991 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
8993 2007-04-27 Wade Berrier <wberrier@novell.com>
8995 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
8996 mini.h) to fix build.
8998 2007-04-26 Zoltan Varga <vargaz@gmail.com>
9000 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
9002 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
9003 causes the corlib unit tests to fail.
9005 2007-04-25 Zoltan Varga <vargaz@gmail.com>
9007 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
9009 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
9011 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
9012 opcodes to the comparison relations.
9014 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
9015 opcodes to their types.
9017 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
9019 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
9020 it in cfg->arch.cinfo.
9022 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
9024 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
9025 cfg->cil_offset_to_bb.
9027 2007-04-24 Zoltan Varga <vargaz@gmail.com>
9029 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
9030 created becase of initlocals.
9032 2007-04-23 Zoltan Varga <vargaz@gmail.com>
9034 * mini-alpha.c cpu-alpha.md: More alpha port work from
9035 Sergey Tikhonov <tsv@solvo.ru>.
9037 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
9039 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
9041 2007-04-19 Zoltan Varga <vargaz@gmail.com>
9043 * cpu-s390.md (break): Correct the length of break instruction.
9045 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9047 * mini.c: fix a couple of soft-float issues and comments.
9049 2007-04-15 Miguel de Icaza <miguel@novell.com>
9051 * trace.c (is_filenamechar): - is also a filename char.
9053 2007-04-15 Neale Ferguson <neale@sinenomine.net>
9055 * mini-s390.c: Correct checking for enum type in return value processing.
9057 2007-04-14 Raja R Harinath <rharinath@novell.com>
9059 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
9060 (version.h): Makefile is in the build directory.
9062 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
9064 * mini-amd64.h: fix for assertion failure on Solaris/amd64
9066 2007-04-11 Martin Baulig <martin@ximian.com>
9068 * mini.c (can_access_member): Fix handling of generic classes;
9071 2007-04-10 Zoltan Varga <vargaz@gmail.com>
9073 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
9075 2007-04-05 Zoltan Varga <vargaz@gmail.com>
9077 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
9079 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9081 * mini-codegen.c: make sure the right spill amount is
9082 used for fp or integer registers (fixes the float_sub_spill() on ppc).
9084 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
9086 * mini-ppc.c: fixes for the fp_branch_nan test.
9088 2007-03-23 Zoltan Varga <vargaz@gmail.com>
9090 * basic.cs: Comment out new test which still fails on ia64.
9092 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9094 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
9096 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9098 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
9100 2007-03-22 Zoltan Varga <vargaz@gmail.com>
9102 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
9103 on 64 bit machines. Fixes part of #80738.
9105 * basic.cs: Add regression test.
9107 2007-03-17 Zoltan Varga <vargaz@gmail.com>
9109 * inssel.brg basic.cs: Revert previous change to fix build.
9111 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
9114 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
9116 * basic.cs: Add new regression test.
9118 2007-03-17 Zoltan Varga <vargaz@gmail.com>
9120 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
9123 2007-03-16 Neale Ferguson <neale@sinenomine.net>
9125 * cpu-s390x.md: Correct length of break instruction.
9127 2007-03-16 Neale Ferguson <neale@sinenomine.net>
9129 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
9130 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
9132 2007-03-15 Jonathan Chambers <joncham@gmail.com>
9134 * *.c: Begin WIN64 port.
9135 * mini.c: Use correct register in profiler.
9136 * mini-amd64.c: No inline assembly on Win64.
9137 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
9138 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
9139 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
9140 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
9141 mono_arch_ip_from_context for Win64.
9143 Contributed under MIT/X11 license.
9145 2007-03-15 Zoltan Varga <vargaz@gmail.com>
9147 * exceptions-amd64.c (seh_handler): Ditto.
9149 * exceptions-x86.c (seh_handler): Fix a memory leak.
9151 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
9153 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
9154 mini-s390x.c: fixed peephole optimizations to deal
9155 correctly with 1 and 2 byte reload avoidance.
9157 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
9159 * cpu-s390.md, cpu-s390x.md: update localloc length.
9161 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9163 * cpu-g4.md: added missing descriptions.
9165 2007-03-14 Miguel de Icaza <miguel@novell.com>
9167 * Makefile.am: Add support so the tail tests are not executed on
9168 PowerPC as that is a known limitation of the PowerPC port.
9170 2007-03-13 Jonathan Chambers <joncham@gmail.com>
9172 * runmdesc.bat: Move to msvc directory.
9174 2007-03-13 Jonathan Chambers <joncham@gmail.com>
9176 * runmdesc.bat: Run executable that was produced by the current
9177 target and sent via an argument.
9179 2007-03-11 Zoltan Varga <vargaz@gmail.com>
9181 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
9184 * generics.2.cs: Add regression test.
9186 2007-03-09 Wade berrier <wberrier@novell.com>
9188 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
9190 2007-03-09 Zoltan Varga <vargaz@gmail.com>
9192 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
9193 AOT code depends on this.
9195 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9197 * mini.c: more precise tracking of types in the eval stack
9198 (part of fix for bug #81044).
9200 2007-03-07 Zoltan Varga <vargaz@gmail.com>
9202 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
9204 * aot-compiler.c (encode_patch): Remove an obsolete comment.
9206 2007-03-06 Zoltan Varga <vargaz@gmail.com>
9208 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
9210 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
9212 2007-02-22 Zoltan Varga <vargaz@gmail.com>
9214 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
9215 a pointer on 64 bit systems. Fixes #80190.
9217 * iltests.il: Add new regression test.
9219 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9221 * mini.c: inline a constant for Environment.IsRunningOnWindows.
9223 2007-02-19 Geoff Norton <gnorton@customerdna.com>
9225 * trace.c: Remove an erroneous alignemnt check when tracing.
9226 Fixes --trace on OSX86.
9228 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9230 * mini-$(arch).h: initialize SP in context for all the archs.
9232 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
9234 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
9235 regressions in the thread tests.
9237 2007-02-14 Zoltan Varga <vargaz@gmail.com>
9239 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
9240 - fixed implementation of LOCALLOC opcode
9241 - implemented non-un compare for floats
9243 - implementation of FDIV and CKFINITE opcodes
9244 - fixes for latest mono updates
9245 - additional arch opcodes
9247 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9249 * Makefile.am: simplify and merge rules for cross-compilation.
9251 2007-02-07 Massimiliano Mantione <massi@ximian.com>
9253 * local-propagation.c: Actually *apply* the fix for bug 80591...
9255 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9257 * mini-exceptions.c: backuot part of the last change
9258 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
9260 2007-02-06 Massimiliano Mantione <massi@ximian.com>
9261 * inssel.brg: Fix bug 59286.
9264 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
9266 * mini-exceptions.c: patch from Zoltan to correctly check for
9267 stack boundaries (using the stack register, not the frame register),
9268 fixes bugs #80724, #79717.
9270 2007-02-03 Zoltan Varga <vargaz@gmail.com>
9272 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
9273 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
9275 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
9276 presence of frame pointer elimination.
9278 2007-02-01 Geoff Norton <gnorton@customerdna.com>
9280 * mini-x86.h: NetBSD UCONTEX_REG defines.
9282 2007-02-01 Zoltan Varga <vargaz@gmail.com>
9284 * inssel-amd64.brg: Fix amd64 build.
9286 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
9288 * mini.h: remove extern to workaround what looks likes gcc bug 26905
9291 2007-01-31 Zoltan Varga <vargaz@gmail.com>
9293 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
9296 * mini-<ARCH>.c: Use mono_is_regsize_var ().
9298 2007-01-30 Mark Mason <mason@broadcom.com>
9300 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
9301 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
9302 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
9303 beginning support for CEE_JMP [not quite working yet]
9304 * tramp-mips.c: LMF handling now works
9306 2007-01-30 Zoltan Varga <vargaz@gmail.com>
9308 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
9310 * mini.h (NULLIFY_INS): New macro.
9312 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9314 * mini.c: statistical profiler fix for windows, patch
9315 from Tor Lillqvist (tml@novell.com).
9317 2007-01-30 Massimiliano Mantione <massi@ximian.com>
9318 * local-propagation.c: Fix bug 80591.
9320 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9322 * Makefile.am: put back the --export-dynamic option as with
9323 the previous gmodule flags (thanks to Robert Jordan).
9325 2007-01-28 Zoltan Varga <vargaz@gmail.com>
9327 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
9329 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
9330 simplify and speed up the local register allocator. Also rename some fields
9331 like iassign->vassign.
9333 * regalloc.c: Remove some functions which are no longer used since their
9334 inlined version is in mini-codegen.c.
9336 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
9338 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
9340 2007-01-27 Zoltan Varga <vargaz@gmail.com>
9342 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
9343 narrowing. Fixes #80622.
9345 * iltests.il: Add new regresssion test.
9347 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9349 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
9350 debug-debugger.c, debug-debugger.h: warning fixes.
9351 * driver.c: updated copyright year and made it fit in one line.
9353 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
9355 * aot-runtime.c: updated to use mono-dl instead of gmodule.
9357 2007-01-25 Zoltan Varga <vargaz@gmail.com>
9359 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
9361 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
9363 * iltests.il: Add new test for bug #80507.
9365 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9367 * mini-arm.h: use soft-float also on vfp for now.
9369 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9371 * mini.c: fix some more soft-float issues.
9373 2007-01-24 Zoltan Varga <vargaz@gmail.com>
9375 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
9377 2007-01-24 Massimiliano Mantione <massi@ximian.com>
9378 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
9379 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
9380 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
9382 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
9384 * mini-arm.c: typo fix.
9386 2007-01-23 Neale Ferguson <neale@sinenomine.net>
9388 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
9390 2007-01-21 Zoltan Varga <vargaz@gmail.com>
9392 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
9393 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
9395 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
9397 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
9399 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
9401 * inssel.brg: Fix a warning.
9403 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
9405 * abcremoval.c ssa.c ssapre.c: Update after this change.
9407 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
9409 * dominators.c (df_set): Use mono_bitset_union_fast.
9411 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9413 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
9414 mini-codegen.c: reduce relocations and memory usage for the cpu
9417 2007-01-20 Zoltan Varga <vargaz@gmail.com>
9419 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
9421 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
9422 to reduce their size.
9424 2007-01-19 Mark Mason <mason@broadcom.com>
9426 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
9427 * mini-mips.c: more configuration macros, support long conditional branches, additional
9428 asserts, fix epilog instrumentation.
9429 * mini-mips.h: use standard stack walk
9430 * cpu-mips.md: increase size of div, rem and conditional branches
9432 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
9434 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
9437 2007-01-19 Zoltan Varga <vargaz@gmail.com>
9439 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
9440 (compile_method): Ditto.
9442 * aot-runtime.c (decode_klass_info): Ditto.
9444 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
9445 needed by the code generated by inssel.brg. Also fix a warning.
9447 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
9449 * mini.c: deal with enums that become genericinsts by
9450 being nested in a generic class (bug #79956).
9452 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9454 * mini.c: match the generic definition to check for
9455 private access with generic types (bug #78431).
9457 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9459 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
9460 to make life easier for people cross-compiling that insist on not
9463 2007-01-17 Mark Mason <mason@broadcom.com>
9465 * inssel-long.brg: patch to deal with mips missing flags
9466 * inssel-long32-mips.brg: implement overflow checks
9467 * insset-mips.brg: implement overflow checks
9468 * mini-mips.h: implement conditional exception handling
9469 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
9470 Remove unused code, minor cleanups.
9471 * exceptions-mips.c: minor cleanups
9472 * mini-ops.h: add mips conditional exception ops
9473 * cpu-mips.md: add mips conditional exception ops
9476 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9478 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
9479 to deal with mips missing of flags.
9481 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9483 * exceptions-ppc.c: execute fault handlers.
9485 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
9487 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
9489 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9491 * mini.c: handle also floating point values in initialize_array.
9493 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9495 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
9496 array initialization and make it conditional on the intrins option.
9498 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9500 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
9501 relocations and put the patch info names close to the enum definition.
9503 2007-01-15 Mark Mason <mason@broadcom.com>
9505 * basic.cs, exceptions.cs: break up large tests to increase debugability.
9507 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9509 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
9511 2007-01-12 Raja R Harinath <rharinath@novell.com>
9513 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
9515 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9517 * Makefile.am: distribute the mips sources.
9519 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9521 * mini-codegen.h: handle bug #80489 here, by excluding ecx
9524 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
9526 * cpu-x86.md: back out for now as this triggers other regressions.
9528 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9530 * cpu-x86.md: force src1 and dest regpair for long shift instructions
9531 to eax:edx, so ecx can't get allocated to them (bug #80489).
9533 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
9535 * mini.c, mini-exceptions.c: enabled running fault handlers
9538 2007-01-03 Miguel de Icaza <miguel@novell.com>
9540 * driver.c: If nothing fail, do not use the string "failed",
9541 because it makes it very annoying to view test result logs on the
9544 2006-12-30 Miguel de Icaza <miguel@novell.com>
9546 * debug-debugger.c (mono_debugger_main): Rename "main" to
9547 "main_method" to prevent a warning.
9549 Remove a warning for unused field.
9551 2006-12-28 Martin Baulig <martin@ximian.com>
9554 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
9556 2006-12-22 Martin Baulig <martin@ximian.com>
9558 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
9559 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
9560 seperate `.mdb_debug_info' section, so we can access it from the
9561 debugger even if the binary is stripped.
9563 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
9564 from the `.mdb_debug_info' here to prevent the linker from
9565 removing that section.
9567 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
9570 2006-12-19 Robert Jordan <robertj@gmx.net>
9572 * mini-x86: enable the code to return small structures in
9573 registers for FreeBSD as well. Fixes bug #80278.
9574 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
9576 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9578 * mini-x86.c: align the stack when calling the profiler
9579 function instrumenting the prolog (on OSX).
9581 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9583 * mini.c: emit a break opcode where Debugger.Break () is called.
9585 2006-12-13 Miguel de Icaza <miguel@novell.com>
9587 * mini.c (mono_method_to_ir): Provide useful information on this
9588 assert, to prevent others from debugging like I did.
9590 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9592 * mini.c: enable code which was incorrectly commented
9595 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9597 * mini-x86.c: enable on OSX, too, the code to return small
9598 structures in registers.
9600 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9602 * mini-x86.c: remove the use of the dynamic code manager here, too.
9604 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9606 * mini.h, debug-debugger.c, tramp-*.c: fixed
9607 mono_debugger_create_notification_function() to use
9608 mono_global_codeman_reserve () instead of a dynamic code manager.
9610 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
9612 * mini.c, jit-icalls.h, jit-icalls.c: remove the
9613 ves_array_element_address() jit icall and use a generated
9614 managed method instead (which is about 4 times faster for a rank 3
9617 2006-11-29 Mark Mason <mason@broadcom.com>
9619 * basic-calls.cs: additional tests for passing
9620 structures as function arguments.
9622 2006-11-29 Mark Mason <mason@broadcom.com>
9624 * mini-mips.h: disable custom exception handling
9625 * mini-mips.c: throw/rethrow should use jalr to call
9626 exception stubs. Fixed bug with passing structures
9627 by value. More support for tracing floating point
9630 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9632 * mini.c: fixed typo in the soft-float ldind.r4 handling
9635 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9637 * mini.c, mini.h, driver.c: added --runtime command line
9638 option to select a different runtime than the autodetected one.
9639 * jit.h: added API for embedders to initialize with a specific
9642 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9644 * mini.c: handle also boxing of r4 values (bug #80024).
9646 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9648 * mini-ppc.c: force indirect calls until we reserve
9649 enough address space for all the generated code.
9651 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
9653 * exceptions-arm.c: workaround bugs in the libc definition
9656 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9658 * inssel.brg: fixes from me and Mark Mason.
9660 2006-11-23 Dick Porter <dick@ximian.com>
9662 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
9663 semaphore display now we've fixed the initial value
9665 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9667 * inssel.brg: partially revert the last change to fix the build.
9669 2006-11-21 Mark Mason <mason@broadcom.com>
9671 * inssel.brg: Add and use compare-and-branch macros to support
9672 architectures that do not have condition code registers (ie. MIPS).
9673 * *-mips.{c,brg,md}: Fix copyright statements
9675 2006-11-20 Mark Mason <mason@broadcom.com>
9677 * Makefile.am: remove mini-codegen.c from list of MIPS sources
9678 * mini.c: Allow GET_CONTEXT to be specified by the arch port
9679 * mini.h: Added declaration for mono_print_ins()
9680 * mini-codegen.c: added ins_spec initializer for MIPS
9681 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
9682 vreg to be virtual and hreg to be non-virtual.
9683 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
9684 is not yet working/implemented correctly.
9685 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
9686 non-static, fixup calls to print_ins() from other parts in the file.
9688 2006-11-20 Mark Mason <mason@broadcom.com>
9690 * basic-calls.cs: added tests for passing structures as arguments
9693 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9695 * inssel-long32.brg: optimize signed division by power of two.
9697 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9699 * mini-arm.c: added support for interworking with thumb code
9700 (mono must be still be built using the ARM instruction encoding).
9702 2006-11-19 Miguel de Icaza <miguel@novell.com>
9704 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
9705 verifier has different rules for it. Fixes a few verifier issues
9708 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
9709 at the end, so people know what happened.
9711 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9713 * brach-opts.c: in optimize_exception_target() make sure we
9714 are in a catch clause (fixes bug #79871).
9716 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9718 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
9719 more soft-float support fixes.
9721 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
9723 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
9724 that are passed half on the stack and half in registers.
9726 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
9728 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
9729 more mips integration work from Mark E Mason
9730 <mark.e.mason@broadcom.com>.
9732 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9734 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
9735 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
9736 tramp-mips.c: added sources for the mips port, not
9737 integrated in the build yet. Contributed by
9738 Mark E Mason <mark.e.mason@broadcom.com>.
9740 2006-11-14 Neale Ferguson <neale@sinenomine.net>
9742 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
9744 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9746 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
9747 put the soft-float rules in its own file since it seems to
9748 break s390 compilation.
9750 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9752 * mini-arm.c: fixed wrnings.
9754 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
9756 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
9757 inssel-arm.brg: ARM support for soft-float.
9759 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9761 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
9762 loads and stores of 32 bit fp values.
9764 2006-11-10 Zoltan Varga <vargaz@gmail.com>
9766 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
9768 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
9769 works. Fixes #79852 and #79463.
9771 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9773 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
9774 more soft-float support WIP and fixes.
9776 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
9778 * mini-arm.c: some VFP updates.
9780 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9782 * mini-exceptions.c: 0 is a valid local var offset in some
9783 architectures, don't assert (bug #78508).
9785 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
9787 * exceptions-arm.c: fixed off by one error in stack walk code.
9789 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9791 * mini.h, mini.c: more precise tracking of type load exceptions.
9793 2006-11-03 Robert Jordan <robertj@gmx.net>
9795 * Makefile.am: [WIN32] Add monow.exe target.
9796 * driver.c: [WIN32] Don't detach the console when debugging.
9799 2006-10-30 Miguel de Icaza <miguel@novell.com>
9801 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
9803 2006-10-23 Zoltan Varga <vargaz@gmail.com>
9805 * aot-compiler.c (emit_method_info): Add a case missed earlier.
9807 * driver.c (mini_regression): Fix --regression with AOT.
9809 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
9811 2006-10-17 Zoltan Varga <vargaz@gmail.com>
9813 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
9815 * mini-sparc.h: Don't use sigaction on sparc/linux.
9817 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
9819 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
9821 * mini-exceptions.c: Add proper include files for getpid ().
9823 2006-10-16 Zoltan Varga <vargaz@gmail.com>
9825 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
9826 address instead of a MonoJitInfo* to avoid decoding the exception info for the
9829 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
9830 name cache to reduce its size.
9832 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9834 2006-10-15 Zoltan Varga <vargaz@gmail.com>
9836 * mini-x86.c: Save/restore the current LMF structure more efficiently using
9837 the mono_lmf TLS variable.
9839 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
9840 trampoline lmf frames.
9842 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
9844 2006-10-14 Zoltan Varga <vargaz@gmail.com>
9846 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
9847 the mono_lmf TLS variable.
9849 * mini-exceptions.c: Access the LMF structure through accessors.
9851 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
9852 variable instead of in jit_tls->lmf.
9854 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
9856 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
9857 trampoline lmf frames.
9859 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
9861 2006-10-12 Zoltan Varga <vargaz@gmail.com>
9863 * mini.c trace.c mini-x86.c: Revert these too.
9865 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
9868 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
9870 * genmdesc.c: removed now dead code.
9872 2006-10-09 Robert Jordan <robertj@gmx.net>
9874 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
9876 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9878 * mini.h: do not leave gaps in the opcode values.
9880 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
9882 * jit-icalls.h: flag functions as internal here, too.
9884 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
9886 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
9887 functions with the internal attribute.
9889 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
9891 * aot-compiler.c: fclose the file descriptor in the profile read loop.
9893 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
9895 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
9898 2006-10-05 Zoltan Varga <vargaz@gmail.com>
9900 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
9901 tail calls as on other platforms.
9903 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
9905 * iltests.il: Add a few tailcall tests.
9907 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9909 * driver.c: fix loop for old compilers (bug #79521).
9911 2006-10-02 Zoltan Varga <vargaz@gmail.com>
9913 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
9915 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
9917 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
9918 metadata without any code.
9920 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
9921 more precise debugging information using gdb.
9923 2006-09-30 Zoltan Varga <vargaz@gmail.com>
9925 * inssel-ia64.brg: Make the helper methods static.
9927 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9929 * inssel-x86.brg: make the helper methods static.
9931 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
9933 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
9935 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9937 * mini.c: updates for monoburg changes.
9938 * inssel.brg: make a few helper functions static as they should.
9940 2006-09-27 Zoltan Varga <vargaz@gmail.com>
9942 * Makefile.am: Move mini-codegen.c to common_sources.
9944 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9946 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
9948 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
9949 mini-ppc.h: port to use the common local register allocator.
9951 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9953 * mini.h: Remove the comment too then.
9955 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
9957 * mini.h: put back backend.data which is to be used shortly and
9958 doesn't increase the size of MonoInst. If any 64 bit arch aligned
9959 pointers on 4 byte boundaries it'd have much bigger issues running
9960 and you can ifdef it out anyway.
9962 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9964 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
9965 MonoInst size by 4 bytes on 64 bit machines.
9967 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9969 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
9970 replacement with more meaningful field names. Arch maintainers, please
9971 check the assigned names are good enough for your arch.
9973 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9975 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
9976 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
9978 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
9980 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
9981 relocations and memory requirements, put the optimization flags
9982 definitions in their own file.
9984 2006-09-24 Zoltan Varga <vargaz@gmail.com>
9986 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
9988 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
9990 2006-09-22 Zoltan Varga <vargaz@gmail.com>
9992 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
9994 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
9996 * inssel.brg: use the correct function to get the size of an item
9997 in an array, given an element class.
9998 * aot-compiler.c: do not access class->class_size directly.
10000 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
10002 * mini.h, debug-mini.c: added a debugging function to print
10003 info about local variables and arguments in a jitted method.
10005 2006-09-20 Zoltan Varga <vargaz@gmail.com>
10007 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
10009 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
10011 2006-09-19 Zoltan Varga <vargaz@gmail.com>
10013 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
10014 inner and outer loops when passing vtypes.
10016 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
10018 * mini-ppc.c: take into account the cpu errata for cache flushing
10019 which caused some random errors (bug #79381).
10021 2006-09-19 Zoltan Varga <vargaz@gmail.com>
10023 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
10024 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
10026 2006-09-17 Zoltan Varga <vargaz@gmail.com>
10028 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
10031 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
10032 freebsd ports tree.
10034 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
10035 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
10037 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
10040 2006-09-13 Zoltan Varga <vargaz@gmail.com>
10042 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
10044 2006-09-12 Zoltan Varga <vargaz@gmail.com>
10046 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
10047 macro does not have to be changed during debugging.
10049 * 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>.
10051 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
10053 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
10055 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
10056 MONO_ARCH_NO_EMULATE_MUL is defined.
10058 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
10060 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
10062 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
10064 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
10066 2006-09-11 Zoltan Varga <vargaz@gmail.com>
10068 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
10069 stuff to mini-exceptions.c where it is used.
10071 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
10072 setup code, the real one is in mini-exceptions.c.
10074 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
10075 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
10076 some changes from the freebsd ports tree.
10078 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
10081 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
10083 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
10085 * mini.c: on Linux, check for /proc to be mounted
10086 (bug# 79351, novell bug#201204).
10088 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
10090 * mini.c: handle cases where pthread_attr_getstack() behaves
10091 incorrectly (bug #78096).
10093 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
10095 * mini-arm.c: support larger stack frames (bug #79272).
10097 2006-09-08 Zoltan Varga <vargaz@gmail.com>
10099 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
10101 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
10104 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
10105 mono_class_from_name () to find a class from its name.
10107 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
10109 2006-09-07 Zoltan Varga <vargaz@gmail.com>
10111 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
10113 2006-09-05 Kornél Pál <kornelpal@gmail.com>
10115 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
10117 2006-09-04 Zoltan Varga <vargaz@gmail.com>
10119 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
10120 callinfo->trampoline.
10122 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
10124 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
10127 2006-09-03 Zoltan Varga <vargaz@gmail.com>
10129 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
10131 2006-09-02 Zoltan Varga <vargaz@gmail.com>
10133 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
10134 stats.method_trampolines, it is already done by the generic trampoline code.
10136 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
10138 2006-09-01 Zoltan Varga <vargaz@gmail.com>
10140 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
10142 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
10144 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
10146 * mini.c (print_jit_stats): Print mscorlib mempool size too.
10148 * mini.c (print_jit_stats): Print new stats.
10150 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
10152 2006-08-31 Zoltan Varga <vargaz@gmail.com>
10154 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
10155 Address on two dimensional arrays. Fixes #78729.
10157 * mini.h (MonoCompile): Add a 'skip_visibility' field.
10159 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
10162 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
10164 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
10167 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
10169 (mini_get_ldelema_ins): Ditto.
10171 2006-08-30 Zoltan Varga <vargaz@gmail.com>
10173 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
10174 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
10177 2006-08-29 Neale Ferguson <neale@sinenomine.net>
10179 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
10180 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
10182 * exceptions-s390x.c: Cosmetic change.
10184 * tramp-s390.c: Fix warning.
10186 * cpu-s390.md: Correct length of mul_imm.
10188 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
10190 * aot-compiler.c: added binary writer with ELF backend
10191 implementation (only on Linux/x86 for now).
10193 2006-08-18 Zoltan Varga <vargaz@gmail.com>
10195 * Makefile.am: Don't run net 2.0 AOT tests.
10197 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
10198 (mono_compile_assembly): Skip net 2.0 assemblies as well.
10200 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
10202 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10204 * aot-compiler.c: simplified and refactored the asm-writing code
10205 to allow different backends.
10207 2006-08-18 Zoltan Varga <vargaz@gmail.com>
10209 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10211 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
10212 little. Share patches of type TYPE_FROM_HANDLE as well.
10214 * mini.c (mono_patch_info_equal): New helper function.
10215 (mono_patch_info_hash): Ditto.
10217 * aot-compiler.c (emit_method_code): Fix s390 build.
10219 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
10220 is not handled because it is stored as a flag and not as a type ctor. Fixes
10223 2006-08-17 Zoltan Varga <vargaz@gmail.com>
10225 * aot-compiler.c: Fix computation of GOT slot statistics.
10227 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
10228 Also remove support for not PIC AOT.
10230 * mini.h: Bump AOT file format version.
10232 * objects.cs: Add a test for #78990.
10234 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
10235 (peter.dettman@iinet.net.au). Fixes #79087.
10237 * basic-long.cs: Add a test for the above.
10239 2006-08-16 Zoltan Varga <vargaz@gmail.com>
10241 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
10243 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
10246 2006-08-15 Zoltan Varga <vargaz@gmail.com>
10248 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
10251 2006-08-10 Jonathan Chambers <joncham@gmail.com>
10253 * mini.c: Don't verify COM proxy invoke calls
10256 2006-08-10 Dick Porter <dick@ximian.com>
10258 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
10259 which process is holding semaphores locked.
10261 2006-08-08 Zoltan Varga <vargaz@gmail.com>
10263 * mini-ia64.c mini-amd64.c: Fix #79027.
10265 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
10267 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
10269 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
10270 implicit arguments in a vararg call. Fixes #79027.
10272 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
10274 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
10275 (mono_get_array_new_va_signature): Ditto.
10277 2006-08-05 Zoltan Varga <vargaz@gmail.com>
10279 * aot-runtime.c: Call init_plt lazily.
10281 * inssel-long.brg: Fix unsigned long->int conversion.
10283 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
10285 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
10286 that most data is now in the .rss/.data section.
10288 2006-08-04 Zoltan Varga <vargaz@gmail.com>
10290 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
10292 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
10294 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
10296 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
10298 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
10299 virtual call. Fixes #79010.
10301 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
10302 and use the result as the this argument in the real call.
10304 * generics.2.cs: Add a new test for #79010.
10306 2006-08-03 Zoltan Varga <vargaz@gmail.com>
10308 * mini-x86.c: Fix a warning.
10310 * aot-compiler.c: Add a bunch of statistics.
10312 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
10314 2006-08-02 Zoltan Varga <vargaz@gmail.com>
10316 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
10318 2006-08-01 Zoltan Varga <vargaz@gmail.com>
10320 * 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>.
10322 2006-07-13 Miguel de Icaza <miguel@novell.com>
10324 * mini.c (mono_method_to_ir): Obtain the original method in the
10325 CIL stream and use this to perform validation.
10329 2006-07-19 Zoltan Varga <vargaz@gmail.com>
10331 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
10332 (mono_arch_call_opcode): Ditto.
10334 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
10337 * mini.c (mono_patch_info_dup_mp): New helper function.
10339 * aot-compiler.c (compile_method): Fix some of the memory allocated during
10340 compilation. Fixes #78827.
10342 2006-07-18 Kornél Pál <kornelpal@gmail.com>
10344 * declsec.c: Use original security informations for
10345 MONO_WRAPPER_MANAGED_TO_MANAGED.
10347 2006-07-15 Jonathan Chambers <joncham@gmail.com>
10349 * mini.c: Allow Com Interop methods/classes and
10350 don't verify COM wrapper calls
10353 2006-07-13 Zoltan Varga <vargaz@gmail.com>
10355 * inssel-long32.brg: Fix long->i4 checked conversion.
10357 * exceptions.cs: Add a test for the above.
10359 2006-07-08 Zoltan Varga <vargaz@gmail.com>
10361 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
10363 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
10366 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
10369 2006-07-03 Zoltan Varga <vargaz@gmail.com>
10371 * mini.c: Fix solaris/x86 exception handling.
10373 * Makefile.am: Get rid of $(ICU_LIBS).
10375 2006-07-02 Zoltan Varga <vargaz@gmail.com>
10377 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
10378 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
10379 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
10381 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
10383 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
10384 this function causes a SIGSEGV.
10386 2006-06-22 Zoltan Varga <vargaz@gmail.com>
10388 * mini.c: Remove unused solaris/x86 includes.
10390 2006-06-21 Zoltan Varga <vargaz@gmail.com>
10392 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
10394 2006-06-20 Jb Evain <jbevain@gmail.com>
10396 * cpu-g4.md: fix max length of start_handler instruction.
10398 2006-06-20 Massimiliano Mantione <massi@ximian.com>
10399 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
10401 2006-06-16 Massimiliano Mantione <massi@ximian.com>
10402 * ssa.c: Fixed bug 78653 for SSA based deadce.
10403 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
10404 MonoInst.flags, used in SSA based deadce.
10405 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
10406 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
10408 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
10410 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
10411 it can end up using non executable memory on ppc64 systems
10412 running ppc32 userspace (fix from Johannes Berg).
10414 2006-06-14 Dick Porter <dick@ximian.com>
10416 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
10419 2006-06-13 Massimiliano Mantione <massi@ximian.com>
10420 * mini.c: Made so that inline is locally disabled if it would
10421 trigger a .cctor, because too many apps depend on this behavior
10422 (which seems to be also the one of the MS CLR).
10424 2006-06-13 Zoltan Varga <vargaz@gmail.com>
10426 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
10427 No idea why this worked before.
10429 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
10430 which branch to outer exception clauses since they could skip the
10431 inner finally clauses. Fixes #78633.
10433 * exceptions.cs: Add a test for the above.
10435 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
10438 * iltests.il: Add a test for the above.
10440 2006-06-12 Zoltan Varga <vargaz@gmail.com>
10442 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
10443 after the end of a try bblock, to prevent asserts in mini_method_compile ().
10445 * iltests.il: Add a test for the above.
10447 2006-06-10 Zoltan Varga <vargaz@gmail.com>
10449 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
10451 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
10452 methods as instrinsics.
10454 2006-06-09 Wade Berrier <wberrier@novell.com>
10456 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
10457 (simple-cee-ops.h ssapre-mini-ops.h)
10459 2006-06-09 Neale Ferguson <neale@sinenomine.net>
10461 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
10462 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
10464 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
10465 * cpu-s390x.md: Fix max. length values for a couple of instructions.
10467 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
10469 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
10471 2006-06-08 Massimiliano Mantione <massi@ximian.com>
10473 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
10474 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
10475 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
10476 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
10477 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
10478 of opcodes, so that bug 78549 should not happen again.
10479 * ssapre.c: Updated to use the renamed files.
10481 2006-06-08 Zoltan Varga <vargaz@gmail.com>
10483 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
10484 in OP_ATOMIC_EXCHANGE_I4.
10486 2006-06-07 Wade Berrier <wberrier@novell.com>
10488 * tramp-s390.c: Fix s390 build (add missing pointer declarations
10489 in mono_debugger_create_notification_function)
10491 2006-06-06 Zoltan Varga <vargaz@gmail.com>
10493 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
10495 * mini.c (type_from_stack_type): Disable some changes which do not
10498 * driver.c: Reenable opts.
10500 * mini.h (MonoStackSlot): New structure to keep track of the verification state
10501 of the evaluation stack.
10503 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
10504 evaluation stack trace at entry to the bblock.
10506 * mini.c (merge_stacks): New function to perform verification of stack merges.
10507 Turned off by default.
10509 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
10512 2006-06-06 Massimiliano Mantione <massi@ximian.com>
10514 * local-propagation.c: Fixed bug 78549.
10516 2006-06-04 Zoltan Varga <vargaz@gmail.com>
10518 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
10520 2006-06-02 Miguel de Icaza <miguel@novell.com>
10522 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
10523 tramp-arm.c, tramp-ia64.c
10524 (mono_debugger_create_notification_function): Update signature to
10525 new signature and use new protocol for creating the notification
10528 Should fix the build.
10530 2006-06-02 Geoff Norton <gnorton@customerdna.com>
10532 * exceptions-ppc.c (mono_jit_walk_stack)
10533 (ves_icall_get_frame_info): Fix the build
10535 2006-06-02 Zoltan Varga <vargaz@gmail.com>
10537 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
10539 2006-05-31 Raja R Harinath <rharinath@novell.com>
10541 * il2tests.2.il: New file for generics CIL tests. Add test for
10543 * Makefile.am: Update.
10546 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
10549 2006-05-30 Massimiliano Mantione <massi@ximian.com>
10551 * aliasing.c: Fixed bug 78311.
10553 2006-05-29 Martin Baulig <martin@ximian.com>
10555 * mini-exceptions.c (mono_find_jit_info): When computing the
10556 native offset, check whether we're actually inside the method's
10557 code; call mono_debug_print_stack_frame() to format the frame.
10558 (ves_icall_System_Exception_get_trace): Call
10559 mono_debug_print_stack_frame() to format the stack frame.
10560 (ves_icall_get_trace): Update to the new debugging API.
10561 (mono_jit_walk_stack_from_ctx): Likewise.
10562 (ves_icall_get_frame_info): Likewise.
10564 * mini.c (get_method_from_ip): Use the new debugging API.
10565 (mono_print_method_from_ip): Likewise.
10568 (mono_jit_walk_stack): Use the new debugging API.
10569 (ves_icall_get_frame_info): Likewise.
10571 2006-05-27 Zoltan Varga <vargaz@gmail.com>
10573 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
10575 2006-05-25 Massimiliano Mantione <massi@ximian.com>
10577 * mini.c: Added "limitator" to inline for debugging.
10579 2006-05-24 Martin Baulig <martin@ximian.com>
10581 * debug-debugger.c (mono_debugger_init): Create a private,
10582 malloc()-based code manager for the notification function and
10583 intentionally leak it on exit. This fixes the crash-on-exit race
10587 (mono_debugger_create_notification_function): Added
10588 `MonoCodeManager *' argument.
10591 (mono_debugger_create_notification_function): Added
10592 `MonoCodeManager *' argument.
10594 2006-05-23 Massimiliano Mantione <massi@ximian.com>
10596 * aliasing.c: Fixed 64 bit issue.
10597 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10598 default since all known bugs are fixed (one more time!).
10600 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10602 * mini.c: write barrier support.
10604 2006-05-23 Martin Baulig <martin@ximian.com>
10606 * debug-debugger.c: Revert Paolo's change. Add comment and #error
10607 check at the top of the file.
10609 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10611 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
10612 reverting changes without reason and without changelog entries.
10614 2006-05-18 Zoltan Varga <vargaz@gmail.com>
10616 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
10617 to a few opcodes. Fixes #78439.
10619 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
10620 consistency with other archs.
10622 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
10624 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10626 * debug-debugger.c: fix the build.
10628 2006-05-17 Martin Baulig <martin@ximian.com>
10631 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
10632 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
10633 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
10634 (debugger_attach): Call GC_mono_debugger_add_all_threads().
10636 2006-05-11 Zoltan Varga <vargaz@gmail.com>
10638 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
10640 2006-05-10 Zoltan Varga <vargaz@gmail.com>
10642 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
10643 MONO_TYPE_GENERICINST.
10645 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
10646 MONO_TYPE_GENERICINST.
10648 2006-05-09 Zoltan Varga <vargaz@gmail.com>
10650 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
10653 2006-05-08 Zoltan Varga <vargaz@gmail.com>
10655 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
10657 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
10659 2006-05-06 Zoltan Varga <vargaz@gmail.com>
10661 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
10662 mono_trace_cleanup ().
10664 * iltests.il: Fix problem with the newly added test.
10666 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
10667 due to register constraints, free up the previous hreg. Fixes #78314.
10669 * iltests.il: Add new test for #78314.
10671 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
10672 Interlocked.Add. Fixes #78312.
10674 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
10676 2006-05-05 Zoltan Varga <vargaz@gmail.com>
10678 * inssel.brg (mini_emit_virtual_call): Fix a warning.
10680 2006-05-05 Martin Baulig <martin@ximian.com>
10682 * debug-mini.c (mono_debug_open_block): New method.
10685 (mono_arch_output_basic_block): Call mono_debug_open_block() at
10686 the beginning of each basic block.
10689 (mono_arch_output_basic_block): Call mono_debug_open_block() at
10690 the beginning of each basic block.
10692 2006-05-04 Massimiliano Mantione <massi@ximian.com>
10694 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10695 default until I understand why they break the build on amd64.
10697 2006-05-04 Zoltan Varga <vargaz@gmail.com>
10699 * mini.c (mini_cleanup): Call mono_cleanup ().
10701 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
10704 2006-05-04 Massimiliano Mantione <massi@ximian.com>
10706 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
10707 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10708 default since all known bugs are fixed, and I cannot reproduce bug
10709 77944... I'm asking Matt Hargett to test again after this commit.
10711 2006-04-28 Massimiliano Mantione <massi@ximian.com>
10713 * mini-codegen.c: Fixed typo that thrashed inline.
10715 2006-04-28 Zoltan Varga <vargaz@gmail.com>
10717 * dominators.c (compute_dominators): Avoid using a worklist since
10718 it is not correct in some cases. Instead, iterate over all bblocks as
10719 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
10721 2006-04-28 Miguel de Icaza <miguel@novell.com>
10723 * mini.c (mono_jit_compile_method_inner): Use
10724 mono_prepare_exception_from_error that resets the value
10727 2006-04-27 Miguel de Icaza <miguel@novell.com>
10729 * mini.c: Move the mini_loader_error_to_exception to metadata.
10731 2006-04-27 Massimiliano Mantione <massi@ximian.com>
10733 * aliasing.c: Fixed bug 78210.
10735 2006-04-27 Massimiliano Mantione <massi@ximian.com>
10737 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10738 default until all their problems (or the ones they trigger) are fixed.
10740 2006-04-26 Zoltan Varga <vargaz@gmail.com>
10742 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
10744 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
10745 as loaded only after resolving patches since that could invoke the same method.
10747 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
10749 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
10752 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
10755 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
10758 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
10759 made from AOT code through the PLT table.
10761 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
10762 holding the plt offset when a call is made to the aot plt trampoline.
10764 2006-04-25 Zoltan Varga <vargaz@gmail.com>
10766 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
10769 * Makefile.am (common_sources): Fix build breakage.
10771 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
10772 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
10773 intra-assembly calls if possible.
10775 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
10777 * mini-trampolines.c: Handle PLT entries.
10779 * mini.c: Avoid creating a GOT var for calls.
10781 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
10782 from mscorlib code.
10784 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
10785 from mscorlib code.
10787 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
10790 * mini.h: Bump AOT file format version.
10792 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
10795 2006-04-25 Martin Baulig <martin@ximian.com>
10797 * driver.c: Disable copyprop, consprop and inline when running
10798 inside the debugger.
10800 2006-04-25 Martin Baulig <martin@ximian.com>
10802 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
10803 with `get_current_thread' and added `detach'.
10804 (MonoDebuggerMetadataInfo): Added `thread_size',
10805 `thread_tid_offset', `thread_stack_ptr_offset' and
10806 `thread_end_stack_offset'.
10808 2006-04-25 Zoltan Varga <vargaz@gmail.com>
10810 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
10813 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
10814 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
10816 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
10818 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
10820 * aot.c: Add support for ADJUSTED_IID.
10822 2006-04-24 Zoltan Varga <vargaz@gmail.com>
10824 * aot.c (emit_method_order): Don't align method_order_end.
10826 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
10827 the interface ID changes.
10829 2006-04-21 Dick Porter <dick@ximian.com>
10831 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
10832 cleaning up a thread. Fixes the new part of bug 77470.
10834 2006-04-20 Geoff Norton <gnorton@customerdna.com>
10836 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
10837 to managed wrapper.
10839 2006-04-19 Zoltan Varga <vargaz@gmail.com>
10841 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
10843 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
10844 SIGSEGV. Fixes #78072.
10846 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
10847 unregister our SIGABRT handler.
10849 2006-04-19 Massimiliano Mantione <massi@ximian.com>
10851 * mini.c: Disabled inline where it can alter the call stack in a
10852 way visible from managed code.
10853 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
10856 2006-04-16 Zoltan Varga <vargaz@gmail.com>
10858 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
10859 on other platforms. Fixes #78089.
10861 2006-04-13 Martin Baulig <martin@ximian.com>
10863 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
10864 determine whether we're inside the debugger.
10867 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
10869 2006-04-12 Zoltan Varga <vargaz@gmail.com>
10871 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
10872 handler clauses. Fixes #78024.
10874 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
10875 in the CALL_MEMBASE opcodes. Fixes #78088.
10876 (mono_arch_get_vcall_slot_addr): Ditto.
10878 2006-04-10 Martin Baulig <martin@ximian.com>
10880 * debug-debugger.c: The thread handling code has now been moved
10881 into ../metadata/threads.c.
10883 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10885 * driver.c (mono_main): Fix --with-gc=none build.
10887 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
10888 (mono_spillvar_offset_float): Ditto.
10889 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
10890 hreg, not when its !global, since on ia64, there is a third category: stacked
10893 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
10895 * mini.c: set MonoInst->klass for load field address and a few other
10898 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10900 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
10902 2006-04-07 Zoltan Varga <vargaz@gmail.com>
10904 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
10905 the branch opt changes.
10907 2006-04-06 Dick Porter <dick@ximian.com>
10909 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
10911 * wapihandles.c (mini_wapi_seminfo):
10912 * driver.c (mono_main): Add semaphore info option
10914 2006-04-05 Zoltan Varga <vargaz@gmail.com>
10916 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
10917 branch optimization changes. Fixes #78009.
10919 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10921 * mini.c: ignore accessibility of methods in managed->native wrappers.
10923 2006-04-04 Zoltan Varga <vargaz@gmail.com>
10925 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
10927 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
10929 2006-04-03 Zoltan Varga <vargaz@gmail.com>
10931 * mini.c: Modify the branch optimizations to preserve the invariant that
10932 the entries inside the in_bb and out_bb arrays are unique.
10933 (mono_unlink_bblock): Avoid creation of new arrays.
10935 2006-04-02 Zoltan Varga <vargaz@gmail.com>
10937 * mini.c (mono_unlink_bblock): Fix regression caused by previous
10940 2006-04-01 Zoltan Varga <vargaz@gmail.com>
10942 * mini.c (optimize_branches): Remove the "optimizations" in
10943 the cbranch1/cbranch2 -> branch cases which were causing several
10944 problems in the past. Fixes #77986.
10946 2006-03-31 Chris Toshok <toshok@ximian.com>
10948 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
10949 default optimizations :(
10951 2006-03-31 Zoltan Varga <vargaz@gmail.com>
10953 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
10956 2006-03-31 Massimiliano Mantione <massi@ximian.com>
10958 * local-propagation.c: Added comments to structs and removed
10959 "Mono" prefixes from local tree mover types.
10961 2006-03-30 Zoltan Varga <vargaz@gmail.com>
10963 * Makefile.am (arch_sources): Define this for each architecture so
10964 libmono_la_SOURCES is defined in one place.
10966 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
10968 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
10971 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
10973 * driver.c: print the GC name supplied by configure.
10975 2006-03-29 Massimiliano Mantione <massi@ximian.com>
10977 * local-propagation.c: Added tree mover, and moved here all the
10978 local propagation code from mini.c
10979 * mini.c: Added support for treeprop, and moved all the local
10980 propagation code to local-propagation.c
10981 * mini.h: Added support for treeprop
10982 * driver.c: Added support for treeprop, enabled consprop, copyprop,
10983 treeprop, inline and deadce by default
10984 * Makefile.am: Added local-propagation.c
10986 2006-03-25 Zoltan Varga <vargaz@gmail.com>
10988 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
10990 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
10992 * debug-debugger.c: make it compile without the Boehm GC.
10994 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10996 * mini.c: fixed issue with mismatch when an icall is registered
10997 with multiple names but same address.
10999 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11001 * declsec.c, mini-exceptions.c: use write barrier to set reference
11002 fields of managed objects.
11004 2006-03-19 Zoltan Varga <vargaz@gmail.com>
11006 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
11007 (can_access_internals): Fix a warning.
11009 * mini.c (print_method_from_ip): Rename this to
11010 mono_print_method_from_ip so it gets exported.
11012 * trace.c: Deal with strings inside StringBuilder's containing garbage
11013 and fix memory leaks. Fixes #77848.
11015 2006-03-19 Zoltan Varga <vargaz@gmail.com>
11017 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
11020 2006-03-16 Neale Ferguson <neale@sinenomine.net>
11022 * mini-s390.c: Remove OP_X86_TEST_NULL.
11024 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11026 * mini.c: use the correct GetHashCode() for the moving collector.
11028 2006-03-16 Massimiliano Mantione <massi@ximian.com>
11030 * liveness.c: Regalloc spill cost tuning.
11032 2006-03-15 Neale Ferguson <neale@sinenomine.net>
11034 * mini-s390x.h: Correct S390_LONG macro.
11036 * mini-s390x.c: Cleanup unused code.
11038 2006-03-15 Zoltan Varga <vargaz@gmail.com>
11040 * jit-icalls.h: New file.
11042 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
11043 icalls and include that instead of including jit-icalls.c.
11045 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
11048 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
11050 * mini.c: when checking for member accessibility, also check for
11051 friend assemblies and for explicit interface implementations.
11053 2006-03-14 Zoltan Varga <vargaz@gmail.com>
11055 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
11057 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
11059 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
11060 common cases are done first.
11062 * mini-ops.h: Only define platform specific opcodes on the given platform.
11064 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
11067 2006-03-14 Martin Baulig <martin@ximian.com>
11069 Revert Paolo's change from r57348:
11071 * mini.h: don't use gboolean for bitfields.
11072 * mini.c: verifier changes for fields and methods accessibility.
11074 2006-03-13 Neale Ferguson <neale@sinenomine.net>
11076 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
11078 * mini-s390x.c: Fix conv_r_un.
11080 * cpu-s390, cpu-s390x.md: Fix lengths.
11082 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
11084 * mini.c: nested types have access to all the nesting
11085 levels, not just the enclosing types.
11087 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
11089 * mini.c: added a few more verification checks.
11091 2006-03-12 Zoltan Varga <vargaz@gmail.com>
11093 * liveness.c: Merge optimizations from the linear-il branch.
11095 2006-03-11 Zoltan Varga <vargaz@gmail.com>
11097 * mini-ia64.c (emit_call): Add a comment.
11099 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
11101 * tramp-ia64.c: Fix some warnings.
11103 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
11105 * mini.h: don't use gboolean for bitfields.
11106 * mini.c: verifier changes for fields and methods accessibility.
11108 2006-03-11 Zoltan Varga <vargaz@gmail.com>
11110 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
11111 lazy icall wrapper changes.
11113 * dominators.c: Replace all the dominator algorithms with faster
11114 ones from the linear-il branch.
11116 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
11119 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
11120 common cases are done first.
11122 * mini-amd64.c: Fix some warnings.
11124 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
11127 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
11130 * mini.h: Add a missing prototype.
11132 2006-03-10 Zoltan Varga <vargaz@gmail.com>
11134 * mini.c: Compile icall wrappers lazily.
11136 * mini-codegen.c: Use printf instead of g_print since its much faster.
11138 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
11141 * mini.c (optimize_branches): Cache the negative result from
11142 remove_block_if_useless ().
11144 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
11145 Also fix some bblock linking issues.
11147 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
11150 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
11152 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
11153 accessed fields first, for better cache behavior.
11155 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
11157 * mini.c: speedup IList<T> array accesses.
11159 2006-03-09 Zoltan Varga <vargaz@gmail.com>
11161 * mini.c (mono_method_to_ir): Handle large methods overflowing the
11162 inline_costs counter. Fixes #77190.
11164 2006-03-06 Zoltan Varga <vargaz@gmail.com>
11166 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
11167 trace messages. Fixes #77706.
11169 2006-03-04 Martin Baulig <martin@ximian.com>
11171 * tramp-amd64.c, tramp-x86.c
11172 (mono_debugger_create_notification_function): Use
11173 mono_global_codeman_reserve() to allocate a buffer at runtime and
11176 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
11178 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
11179 notification function at runtime and then call `initialize' in the
11180 `MONO_DEBUGGER__debugger_info' vtable.
11182 2006-03-04 Zoltan Varga <vargaz@gmail.com>
11184 * iltests.il: Fix a visibility problem.
11186 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11188 * driver.c, mini.c: add hooks for the counters API.
11190 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11192 * driver.c: show disabled options.
11194 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11196 * linear-scan.c: always use cost-driven selection.
11198 2006-02-28 Raja R Harinath <rharinath@novell.com>
11200 * jit-icalls.c (helper_compile_generic_method): Revert change from
11203 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
11205 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
11207 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
11209 * inssel.brg: style fixes, mostly to force the updated monoburg
11210 to run for people using svn.
11212 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11214 * mini.c: match monoburg changes.
11216 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11218 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
11219 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
11220 declaration in the header file.
11222 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11224 * helpers.c: reduce relocations and mem usage.
11226 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11228 * mini.h, mini-codegen.c: disable logging features if
11229 requested by configure.
11231 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
11233 * mini.c: tiny verifier changes.
11235 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11237 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
11238 cpu-pentium.md: stack alignment changes for osx/x86,
11239 partially from Geoff Norton <gnorton@customerdna.com>.
11241 2006-02-24 Raja R Harinath <harinath@gmail.com>
11243 * jit-icalls.c (helper_compile_generic_method): Update to changes
11244 in metadata/class.c.
11246 2006-02-24 Zoltan Varga <vargaz@gmail.com>
11248 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
11250 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
11251 interface calls with large offsets.
11253 2006-02-23 Raja R Harinath <rharinath@novell.com>
11255 * jit-icalls.c (helper_compile_generic_method): Document the
11256 special-case we depend on so that we can inflate the method twice
11257 with the same context with no bad side-effects.
11259 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
11261 * mini-x86.c, mini-amd64.c: fix for case when xen support
11264 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
11266 * mini-x86.c, mini-amd64.c: generate code to access tls items
11267 in a faster way for Xen systems.
11269 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11271 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
11272 updates and compilation fixes for the OSX/x86 port, mostly from
11273 Geoff Norton <gnorton@customerdna.com>.
11275 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11277 * inssel.brg: faster interface call implementation
11278 to sync with the interface_offsets MonoVTable changes.
11280 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11282 * mini.c: more verification checks.
11284 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
11286 * mini.c: added a few more verification checks.
11288 2006-02-17 Neale Ferguson <neale@sinenomine.net>
11290 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
11291 facility on the processor and use it if available.
11293 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11295 * driver.c, aot.c, mini.c: throw exception if the IL code is
11296 invalid or unverifiable.
11298 2006-02-17 Raja R Harinath <rharinath@novell.com>
11300 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
11303 2006-02-16 Zoltan Varga <vargaz@gmail.com>
11305 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
11307 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11309 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
11310 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
11311 handling of instantiated generic valuetypes.
11313 2006-02-11 Zoltan Varga <vargaz@gmail.com>
11315 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
11316 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
11319 * generics.2.cs: Revert the nullable reftypes tests.
11321 2006-02-10 Zoltan Varga <vargaz@gmail.com>
11323 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
11324 using __builtin_frame_address (1) as it doesn't work in the presence
11325 of optimizations. Hopefully fixes #77273.
11327 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
11328 -> generics.cs change as it doesn't work with some automake versions.
11330 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11332 * mini.c: handle systems that sue a different way to
11333 retrieve the stack address of the current thread.
11335 2006-02-09 Zoltan Varga <vargaz@gmail.com>
11337 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
11338 it specially in the makefile.
11340 * generics.2.cs: Add tests for nullable reference types.
11342 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11344 * mini.c: always handle the case when mono_jit_init()
11345 is called in a thread different from the main thread,
11346 confusing libgc (bug #77309).
11348 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
11350 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
11352 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11354 * mini.c: change optimize_branches () to use a single loop
11355 and introduce a new optimization to simplify some range checks.
11357 2006-02-03 Martin Baulig <martin@ximian.com>
11359 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
11360 and merged with debugger_thread_manager_add_thread().
11361 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
11362 inform the debugger about the main thread.
11364 2006-02-03 Zoltan Varga <vargaz@gmail.com>
11366 * basic.cs: Add test for div.un/rem.un constant folding.
11368 2006-02-03 Neale Ferguson <neale@sinenomine.net>
11370 * cpu-s390x.md: correct int_xor_imm length
11372 2006-02-03 Zoltan Varga <vargaz@gmail.com>
11374 * generics.2.cs: New test for #77442.
11376 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
11379 2006-02-02 Martin Baulig <martin@ximian.com>
11381 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
11382 <mono/metadata/mono-debug-debugger.h>
11384 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
11386 2006-02-02 Martin Baulig <martin@ximian.com>
11388 * debug-debugger.h: New header file for debug-debugger.c.
11390 * debug-debugger.c: Big API cleanup; don't run the managed Main()
11391 function is a separate thread anymore; add support for attaching.
11393 2006-02-01 Zoltan Varga <vargaz@gmail.com>
11395 * tramp-x86.c: Fix a warning.
11397 2006-01-31 Zoltan Varga <vargaz@gmail.com>
11399 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
11400 on very large methods.
11402 * aot.c (load_patch_info): Fix a warning.
11404 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11406 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
11407 mini-ops.h: alu membase optimizations.
11409 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
11411 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
11412 to speedup StringBuilder.
11414 2006-01-27 Zoltan Varga <vargaz@gmail.com>
11416 * dominators.c (mono_compute_natural_loops): Fix detection of
11417 loop body start blocks.
11419 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
11421 2006-01-26 Zoltan Varga <vargaz@gmail.com>
11423 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
11426 2006-01-25 Massimiliano Mantione <massi@ximian.com>
11428 * aliasing.c: Fixed aliasing issue on 64 bit archs.
11430 2006-01-25 Martin Baulig <martin@ximian.com>
11432 * debug-debugger.c: Moved the `MonoDebuggerManager' and
11433 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
11434 started to cleanup this file a little bit.
11436 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
11438 * mini.c: optimize a codepath frequently happening in generics code.
11440 2006-01-23 Martin Baulig <martin@ximian.com>
11442 * Makefile.am: Only compile debug-debugger.c on supported platforms.
11444 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
11445 functions directly.
11447 * driver.c: debug-debugger.c is only available if
11448 `MONO_DEBUGGER_SUPPORTED' is defined.
11450 2006-01-23 Martin Baulig <martin@ximian.com>
11452 * debug-debugger.c: Only enable this on platforms where the Mono
11453 Debugger is working (x86 and x86_64).
11455 2006-01-21 Martin Baulig <martin@ximian.com>
11457 The Mono Debugger is now using the normal `mono' instead of the
11458 `mono-debugger-mini-wrapper' when executing managed code.
11460 * debug-debugger.c: New file; previously known as
11461 debugger/wrapper/wrapper.c.
11463 * debug-mini.c (mono_init_debugger): Removed.
11465 * driver.c (mono_main): Added new `--inside-mdb' command line
11466 argument which is used when running inside the debugger.
11468 2006-01-20 Zoltan Varga <vargaz@gmail.com>
11470 * liveness.c (mono_analyze_liveness): Remove some unused data
11473 2006-01-17 Zoltan Varga <vargaz@gmail.com>
11475 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
11477 2006-01-16 Zoltan Varga <vargaz@gmail.com>
11479 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
11480 depends on implementation details of monobitset.
11482 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
11485 2006-01-15 Zoltan Varga <vargaz@gmail.com>
11487 * liveness.c: Update after monobitset changes.
11489 2006-01-14 Zoltan Varga <vargaz@gmail.com>
11491 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
11493 2006-01-11 Neale Ferguson <neale@sinenomine.net>
11495 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
11497 * mini-s390x.c: Remove warning messages.
11499 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
11501 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
11503 2006-01-10 Zoltan Varga <vargaz@gmail.com>
11505 * generics.2.cs: Add ldelem/stelem_any test.
11507 2006-01-10 Neale Ferguson <neale@sinenomine.net>
11509 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
11511 2006-01-07 Zoltan Varga <vargaz@gmail.com>
11513 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
11515 2006-01-06 Zoltan Varga <vargaz@gmail.com>
11517 * generics.2.cs: Reenable vtype tests.
11519 * inssel-x86.brg: Remove an icorrect valuetype rule.
11521 2006-01-06 Neale Ferguson <neale@sinenomine.net>
11523 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
11524 initial support for OP_ABS.
11526 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11528 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
11530 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11532 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
11533 conversion and implement LADD/LSUB.
11535 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
11538 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11540 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
11542 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
11545 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11547 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
11548 localloc is encountered. Fixes crash in test-183.cs when using gmcs
11549 (stack walk problem).
11551 2006-01-04 Zoltan Varga <vargaz@gmail.com>
11553 * aot.c (mono_aot_load_method): Fix a warning.
11555 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11557 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
11559 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11561 * iltests.il: Add test for #77148.
11563 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
11566 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11568 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
11570 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11572 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
11573 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
11575 * basic-long.cs: Add lconv-to-r4/r8 tests.
11577 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11579 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
11581 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
11582 here as on other archs.
11584 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11586 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
11588 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11590 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
11592 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
11594 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
11595 instrument_prolog; Add memory_barrier instruction.
11597 2005-12-26 Zoltan Varga <vargaz@gmail.com>
11599 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
11601 2005-12-23 Zoltan Varga <vargaz@gmail.com>
11603 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
11605 * aliasing.c inssel.brg: Fix warnings.
11607 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
11608 could skip initialization of some parts of memory.
11610 * mini.c mini-ia64.c: Fix warnings.
11612 * inssel-sparc.brg: Add an implementation of lneg which actually works.
11614 2005-12-22 Zoltan Varga <vargaz@gmail.com>
11616 * aliasing.c (mono_build_aliasing_information): Add a workaround for
11617 a crash seen on sparc.
11619 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
11621 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
11623 2005-12-21 Neale Ferguson <neale@sinenomine.net>
11625 * mini-ops.h: Add s390_backchain instruction
11627 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
11629 * cpu-s390.md: Add s390_backchain instruction
11631 * mini-s390.c: Significant ABI changes
11633 * mini-s390.h: Cater for zero length structures
11635 2005-12-20 Neale Ferguson <neale@sinenomine.net>
11637 * mini-s390.c: ABI fixes
11639 * inssel-s390.brg: Remove debug statements
11641 * cpu-s390.md: Fix length of ATOMIC_xx operations
11643 2005-12-19 Zoltan Varga <vargaz@gmail.com>
11645 * basic-float.cs: Add float<->long conversion tests.
11647 2005-12-16 Neale Ferguson <neale@sinenomine.net>
11649 * mini-s390.c: Fix LOCALLOC processing.
11651 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
11653 2005-12-15 Zoltan Varga <vargaz@gmail.com>
11655 * iltests.il: Add tests for some opcodes not covered by the other
11658 2005-12-15 Neale Ferguson <neale@sinenomine.net>
11660 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
11661 register loading for Tail processing; Correct trace output.
11663 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
11665 * cpu-s390.md: Correct size of jmp instruction.
11667 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11669 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
11671 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11673 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
11674 Bring s390 up to current level.
11676 2005-12-12 Zltan Varga <vargaz@gmail.com>
11678 * generics.2.cs: Disable the newly added tests as they do not work yet.
11680 * generics.2.cs: Add valuetype tests.
11682 2005-12-09 Zoltan Varga <vargaz@gmail.com>
11684 * basic-long.cs: Add i4->u8 test.
11686 * objects.cs: Add tests for JIT intrinsic.
11688 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
11689 optimizations lost by a mistake.
11691 2005-12-07 Zoltan Varga <vargaz@gmail.com>
11693 * basic-long.cs: Remove a test moved to objects.cs.
11695 * arrays.cs: Add more array tests.
11697 2005-12-06 Zoltan Varga <vargaz@gmail.com>
11699 * arrays.cs: Add new tests for multi-dimensional arrays.
11701 2005-12-06 Raja R Harinath <rharinath@novell.com>
11703 * Makefile.am (test_sources2): Add generics.2.cs.
11704 (EXTRA_DIST): Add test_sources2.
11706 2005-12-05 Ben Maurer <bmaurer@ximian.com>
11708 Support for boxing and unboxing nullable types as well as the
11709 isinst operation on nullables, per the CLI ammendment.
11711 * inssel.brg (CEE_ISINST): Special case for nullable
11713 * mini.c (handle_unbox_nullable): new method
11714 (handle_box): Special case for nullable types
11715 (mono_method_to_ir): Call handle_unbox_nullable in correct
11718 * generics.2.cs: New test suite
11720 * Makefile.am: Support for regression tests with generics.
11722 2005-12-03 Zoltan Varga <vargaz@gmail.com>
11724 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
11725 allocated to registers. Fixes #76800.
11727 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
11729 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
11731 2005-11-30 Zoltan Varga <vargaz@gmail.com>
11733 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
11736 2005-11-29 Zoltan Varga <vargaz@gmail.com>
11738 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
11741 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
11743 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
11744 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
11746 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
11747 single precision before storing to a single precision location.
11749 2005-11-28 Raja R Harinath <rharinath@novell.com>
11751 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
11753 2005-11-27 Zoltan Varga <vargaz@gmail.com>
11755 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
11758 * basic.cs: Remove test_0_byte_compares test which was moved to
11759 objects.cs a long time ago.
11761 2005-11-22 Massimiliano Mantione <massi@ximian.com>
11763 * aliasing.c: Fixed aliasing issue on 64 bit archs.
11765 2005-11-20 Zoltan Varga <vargaz@gmail.com>
11767 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
11768 handlers are called.
11770 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
11773 * mini-ia64.c: Add support for the throw->branch exception
11776 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
11778 2005-11-18 Massimiliano Mantione <massi@ximian.com>
11780 * mini.c: Enabled "fastpath" deadce :-)
11782 2005-11-18 Massimiliano Mantione <massi@ximian.com>
11784 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
11785 alias analysis pass to support it.
11786 * mini.h: Likewise.
11788 * liveness.c: Likewise (liveness computation can use aliasing
11789 information to be more accurate).
11790 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
11791 moreover made so that "--compile-all" uses the given optimization
11792 flags and not the default ones.
11793 * aliasing.c: Alias analysis (new file).
11794 * aliasing.h: Likewise.
11795 * Makefile.am: added "aliasing.c" and "aliasing.h".
11797 2005-11-17 Zoltan Varga <vargaz@gmail.com>
11799 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
11802 2005-11-13 Zoltan Varga <vargaz@gmail.com>
11804 * mini-exceptions.c (mono_handle_exception_internal): Remove the
11805 fp >= end_of_stack exit condition, as it is not needed, and it might
11806 become true for fp eliminated frames.
11808 2005-11-11 Zoltan Varga <vargaz@gmail.com>
11810 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
11813 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
11815 * mini-arm.c: fixed alignment of doubles/longs to match
11816 the C ABI (bug #76635).
11818 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
11820 * aot.c: fix compilation with --enable-minimal=aot.
11822 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
11824 * mini-arm.c: fixed compatibility with the new
11825 floating point emulator package for compares.
11827 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
11829 * mini.c : reverted sig->pinvoke changes (r51396-51397).
11831 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
11833 * mini-exceptions.c (print_stack_frame): Output to stderr.
11834 (mono_handle_native_sigsegv): Ditto.
11836 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
11838 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
11839 OP_LCONV_TO_OVF_I implementation.
11841 * mini-amd64.c: Add support for the throw->branch exception
11844 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
11845 when the catch clause catches a more general exception, i.e. Object.
11847 2005-10-30 Zoltan Varga <vargaz@gmail.com>
11849 * cpu-ia64.md: Remove unused opcodes.
11851 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
11852 specific defines for architectures defining USE_SIGACTION.
11854 * mini-ia64.c: Fix some warnings.
11856 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
11857 version seemed to skip a frame.
11859 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
11861 * mini.c: Clean up the usage of sig->pinvoke flag. Now
11862 only calls which are made to native code use this flag.
11864 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
11866 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
11867 varargs methods as well.
11869 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
11870 which have save_lmf set. Reorganize methods prologs a bit.
11872 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
11873 debugger to the proper place.
11875 2005-10-29 Martin Baulig <martin@ximian.com>
11877 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
11878 when running inside the debugger until the debugger has support
11881 2005-10-26 Zoltan Varga <vargaz@gmail.com>
11883 * mini.h: Fix a warning.
11885 2005-10-24 Miguel de Icaza <miguel@novell.com>
11887 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
11888 we expose publicly, this returns the string.
11890 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
11892 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
11893 with fp elimination.
11895 2005-10-21 Zoltan Varga <vargaz@gmail.com>
11897 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
11898 native stacktrace using the glibc 'backtrace' function if available.
11900 2005-10-20 Zoltan Varga <vargaz@gmail.com>
11902 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
11904 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
11905 handle SIGSEGVs received while in native code.
11907 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
11908 code, call mono_handle_native_sigsegv which will abort the runtime
11909 after printing some diagnostics, instead of converting it into a
11910 confusing NullReferenceException.
11912 2005-10-18 Zoltan Varga <vargaz@gmail.com>
11914 * cpu-pentium.md: Remove unused opcodes.
11916 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
11918 * mini-amd64.h (MonoLMF): Add rsp field.
11920 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
11923 2005-10-17 Zoltan Varga <vargaz@gmail.com>
11925 * mini-codegen.c (get_register_spilling): Fix some warnings.
11927 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
11929 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
11930 elimination during exception handling. Enable fp elimination by
11933 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
11936 2005-10-16 Martin Baulig <martin@ximian.com>
11938 * mini-exceptions.c
11939 (mono_debugger_run_finally): New public method for the debugger.
11941 2005-10-10 Zoltan Varga <vargaz@gmail.com>
11943 * debug-mini.c (mono_debug_init_method): Fix warning.
11945 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
11946 the 'exname' parameter const to fix some warnings.
11948 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
11950 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
11951 introduced by the previous patch.
11953 2005-10-08 Zoltan Varga <vargaz@gmail.com>
11955 * basic-float.cs: Add test for precision of float arithmetic.
11957 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
11958 when loading/storing single values from/to memory.
11960 * mini.c (mono_jit_compile_method_with_opt): Create the function
11961 pointers in the correct domain.
11963 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
11965 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
11966 introduced by previous patch.
11968 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
11969 when out_filter_idx is NULL.
11971 * mini-exceptions.c: Don't run filter clauses twice during exception
11972 handling. Fixes #75755.
11974 2005-10-07 Zoltan Varga <vargaz@gmail.com>
11976 * aot.c: Add support for ldflda wrappers.
11978 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
11981 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
11983 * mini.c, mini.h: do not consider exception handlers blocks when
11984 setting up interface variables.
11986 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
11988 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
11990 2005-10-03 Zoltan Varga <vargaz@gmail.com>
11992 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
11993 causes a regression.
11995 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
11997 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
11999 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
12000 of the OP_P definitions.
12002 * TODO: Add a proposal for dealing with the CEE/OP mess.
12004 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
12005 optimizations from the x86 port.
12007 * cpu-amd64.md: Ditto.
12009 * basic.cs basic-long.cs: Add tests.
12011 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
12013 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
12014 Patrik Torstensson's implementation of my exception-handling
12015 optimization idea, when the exception object is not used
12018 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
12020 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
12021 of the mul_imm optimizations from the old jit.
12023 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
12025 * mini.c, liveness.c: patch by Patrik Torstensson and
12026 Zoltan Varga to improve performance in methods with
12029 2005-09-30 Zoltan Varga <vargaz@gmail.com>
12031 * driver.c: Remove 'Globalization' entry from --version.
12033 2005-09-28 Zoltan Varga <vargaz@gmail.com>
12035 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
12036 there is a profiler interested in JIT events.
12038 * aot.c: Load profile files produced by the AOT profiling module, and
12039 reorder methods based on the profiling info. Add a 'method_order' table
12040 to the AOT file to make mono_aot_find_jit_info work with the reordered
12043 * mini.h: Bump AOT file version info.
12045 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
12047 * mini-arm.h: work around what looks like a gcc bug when optimizations
12050 2005-09-28 Raja R Harinath <rharinath@novell.com>
12052 * Makefile.am (AM_CFLAGS): Don't use += to append inside
12053 conditionals. Use ...
12054 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
12056 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
12058 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
12059 to determine the amount of memory to copy when passing valuetypes.
12061 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
12062 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
12064 2005-09-27 Zoltan Varga <vargaz@gmail.com>
12066 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
12067 information about aot.
12069 2005-09-27 Ben Maurer <bmaurer@ximian.com>
12071 * *.c: Replace the use of {Enter,Leave}CriticalSection with
12072 macros. This will allow a deadlock debugger to easily be plugged
12075 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
12077 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
12079 2005-09-27 Raja R Harinath <rharinath@novell.com>
12081 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
12082 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
12083 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
12084 ($(arch_built)) [CROSS_COMPILING]: Error out.
12086 2005-09-26 Zoltan Varga <vargaz@gmail.com>
12088 * aot.c: Add support for the no_special_static flag for classes.
12090 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
12092 * Reapply reverted patches.
12094 * *: Revert r50174 as well.
12096 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
12098 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
12100 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
12102 2005-09-23 Miguel de Icaza <miguel@novell.com>
12104 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
12105 part of the SIG_HANDLER_SIGNATURE.
12107 2005-09-23 Zoltan Varga <vargaz@gmail.com>
12109 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
12112 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
12113 introduced by previous patch.
12115 2005-09-21 Zoltan Varga <vargaz@gmail.com>
12117 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
12118 saved registers too.
12120 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
12121 upon the information returned by get_call_info ().
12123 * mini-x86.c (add_float): Fix stack size calculation.
12124 (mono_arch_call_opcode): Rewrite this so it works based up the
12125 information returned by get_call_info ().
12126 (mono_arch_get_this_vret_args): Ditto.
12128 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
12130 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
12131 in cinfo to determine the registers which need to be used.
12133 2005-09-20 Miguel de Icaza <miguel@novell.com>
12135 * driver.c (mono_main): Add --server and --desktop flags.
12137 2005-09-16 Zoltan Varga <vargaz@gmail.com>
12139 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
12140 registers as global registers.
12142 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
12143 longer needed with the new register allocator.
12145 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
12147 * cpu-ia64.md: Remove unused opcodes.
12149 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
12151 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
12153 * cpu-amd64.md: Remove unused opcodes.
12155 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
12156 needed with the new register allocator.
12158 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
12161 2005-09-16 Raja R Harinath <rharinath@novell.com>
12163 * Makefile.am (check-local): Don't invoke semdel-wrapper.
12165 2005-09-16 Martin Baulig <martin@ximian.com>
12167 * exceptions-amd64.c
12168 (throw_exception): Don't call mono_debugger_throw_exception() if
12169 we're a rethrow - see the FIXME in the code.
12171 2005-09-15 Geoff Norton <gnorton@customerdna.com>
12173 * mini.c (mono_init_exceptions): This only works on some architectures.
12175 2005-09-15 Zoltan Varga <vargaz@gmail.com>
12177 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
12180 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
12182 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
12183 now in mini-exceptions.c.
12185 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
12187 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
12188 now in mini-exceptions.c.
12190 2005-09-15 Zoltan Varga <vargaz@gmail.com>
12192 * exceptions-x86.c: Applied patch from Patrik Torstensson
12193 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
12195 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
12196 code into mini-exceptions.c. Add some assertions to it.
12198 2005-09-12 Zoltan Varga <vargaz@gmail.com>
12200 * aot.c (emit_section_change): Applied patch from "The Software Team"
12201 (<software@solmersa.com>). Fix as errors on windows.
12203 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
12205 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
12206 method info into the LMF.
12208 2005-09-11 Zoltan Varga <vargaz@gmail.com>
12210 * mini-ia64.c: Add proper unwind info for method epilogs.
12212 * exceptions-ia64.c: Add some code to help debugging.
12214 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
12216 * mini-exceptions.c: Fix warning.
12218 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
12220 * mini.c: Really fix build.
12222 * mini-x86.c mini-amd64.c: Fix build.
12224 2005-09-11 Zoltan Varga <vargaz@gmail.com>
12226 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
12228 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
12229 some Interlocked methods as intrinsics.
12231 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
12232 for Thread methods as well.
12234 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
12236 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
12238 * mini-ia64.c mini-x86.c mini-amd64.c
12239 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
12242 * mini.c (mono_init_exceptions): Fix build breakage.
12244 2005-09-10 Zoltan Varga <vargaz@gmail.com>
12246 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
12247 of instructions. Use the new ia64_unw_op macros for emitting unwind
12250 * mini.c (mono_init_exceptions): Initialize exception handling
12251 related trampolines at startup.
12253 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
12255 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
12257 2005-09-09 Zoltan Varga <vargaz@gmail.com>
12259 * mini.c: Handle type loading errors gracefully during compilation and
12260 throw the appropriate exception.
12262 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
12264 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
12265 for the mono binary.
12267 2005-09-09 Martin Baulig <martin@ximian.com>
12269 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
12272 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12274 * mini-arm.h: use emulation for conv.r.un for the release.
12276 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12278 * mini-arm.c, objects.cs: more fixes and tests for them.
12280 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12282 * mini-arm.c: align structures to at least 4 bytes to be able
12283 to keep our current optimized memcpy.
12285 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
12287 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
12289 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12291 * mini.c: ignore SIGPIPE.
12293 2005-09-04 Zoltan Varga <vargaz@gmail.com>
12295 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
12297 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
12299 2005-09-02 Zoltan Varga <vargaz@gmail.com>
12301 * mini.h: Add prototype for mono_allocate_stack_slots_full.
12303 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12305 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
12306 exception handling support.
12307 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
12308 patch by Brian Koropoff <briank@marakicorp.com>).
12310 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
12312 * mini.c: revert another 'optimization' which breaks when
12313 items on the eval stack need to be saved at a basic block end
12316 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12318 * jit-icalls.c: for arrays, ensure we always provide
12321 2005-08-30 Zoltan Varga <vargaz@gmail.com>
12323 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
12325 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
12327 2005-08-29 Zoltan Varga <vargaz@gmail.com>
12329 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
12330 arguments in their original register.
12332 2005-08-28 Zoltan Varga <vargaz@gmail.com>
12334 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
12337 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
12338 when ssapre is enabled.
12340 * inssel-long.brg: Fix bug in previous patch.
12342 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
12343 multiplication by a constant.
12345 2005-08-27 Zoltan Varga <vargaz@gmail.com>
12347 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
12350 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
12353 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
12355 * inssel-arm.brg: apply changes tested by Brian Koropoff
12356 <briank@marakicorp.com>.
12358 2005-08-25 Zoltan Varga <vargaz@gmail.com>
12360 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
12362 2005-08-24 Zoltan Varga <vargaz@gmail.com>
12364 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
12365 to the same register if dreg is just a base register.
12366 (print_ins): Improve printing of membase opcodes.
12368 * inssel-x86.brg: Add optimized ldind(reg) rules.
12370 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
12372 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
12374 * mini.c: when running under valgrind, set the stack bottom for
12375 the GC at the actual approximate stack for the app (fixes running
12376 mono with valgrind).
12378 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
12380 * mini.c: do no break at the first valuetype to init found
12381 (fixes bug #75791).
12383 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
12385 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
12387 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
12389 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
12391 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
12393 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
12395 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12397 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
12399 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
12402 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
12405 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
12408 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
12410 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
12412 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12414 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
12415 in the tail recursion optimization.
12417 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
12418 debug info into the assembly file.
12420 * iltests.il: Add test for filter regions.
12422 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
12423 initial stack of filter regions. Fixes #75755.
12425 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
12427 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
12428 stack requirements.
12430 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12432 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
12433 the check for an already compiled method on non-ia64 platforms.
12434 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
12437 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
12439 * inssel-x86.brg: Add some optimized call rules.
12441 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
12443 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
12446 * mini.h mini-trampolines.c: Pass the trampoline argument to
12447 mono_arch_patch_delegate_trampoline.
12449 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
12451 * mini-trampolines.c: Fix build.
12453 * mini-amd64.h: Add delegate trampolines.
12455 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
12457 * inssel-amd64.brg: Add optimized call rules.
12459 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
12461 * inssel-ia64.brg: Add optimized ldind(reg) rules.
12463 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
12465 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
12468 * mini-ia64.c: Remove LMF fixmes.
12470 * mini-ia64.h: Remove most fields from LMF.
12472 * inssel-ia64.brg (stmt): Fix unaligned access errors.
12474 * mini-trampolines.c: Add support for IA64 function descriptors.
12476 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
12477 for IA64 function descriptors.
12479 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
12481 * tramp-arm.c: patch the vtable for virtual calls. Added
12482 support code to register/unregister the LMF.
12483 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
12486 2005-08-19 Dick Porter <dick@ximian.com>
12488 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
12489 bit value if needed.
12491 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
12493 * mini.c (mini_get_method): Move handling of wrapper data here.
12495 * mini.c (mono_method_to_ir): Add support for dynamic methods.
12497 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
12500 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
12501 bblock->code does not remain empty.
12503 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
12505 * arrays.cs: Add regression test for #75832.
12507 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
12508 rules. Fixes #75832.
12510 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
12511 instruction scheduling.
12513 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
12515 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
12517 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
12519 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
12521 * mini-codegen.c: Fix VC build.
12523 * cpu-pentium.md: Increase length of atomic_exhange_i4.
12525 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12527 * mini.h: fix signature for mono_register_opcode_emulation.
12529 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
12531 * mini.c: Get rid of most of the helper_sig_... constants using
12532 mono_create_icall_signature ().
12534 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
12536 * jit-icalls.c (helper_ldstr): New helper function.
12538 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
12540 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
12541 throw, load the string using a helper call instead of creating a string object.
12543 * aot.c: Update after LDSTR changes.
12545 * mini.h: Bump AOT file version.
12547 * aot.c: Save class size info into the AOT file. Print more statistics during
12550 * mini.h: Bump AOT file version.
12552 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
12553 ordering of disasm cases. Fixes #74957.
12555 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
12557 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
12558 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
12559 the generic code needed for the ARM port.
12561 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
12563 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
12564 inssel-arm.brg: more ARM features and fixes.
12566 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
12568 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
12569 ARM port work in progress.
12571 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
12573 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
12575 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
12577 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
12579 * inssel.brg (mini_emit_memset): Add support for unaligned access.
12581 * *-ia64.*: Ongoing IA64 work.
12583 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
12585 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
12587 * TODO: Remove out-of-data todo stuff.
12589 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
12592 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
12594 * mini.h: Bump corlib version.
12596 2005-07-27 Martin Baulig <martin@ximian.com>
12599 (create_copy_ins): Added `const unsigned char *ip' argument; set
12600 `copy->cil_code' from it.
12602 2005-07-27 Martin Baulig <martin@ximian.com>
12604 * mini-exceptions.c (mono_handle_exception): Don't call
12605 mono_debugger_handle_exception() for filters.
12607 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
12609 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
12612 2005-07-26 Martin Baulig <martin@ximian.com>
12614 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
12616 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
12617 helper_compile_generic_method() if the method is actually virtual
12620 2005-07-26 Martin Baulig <martin@ximian.com>
12623 (trampoline_code): Renamed to `mono_trampoline_code' and made it
12624 public; this is now accessed directly by the debugger.
12625 (mono_generic_trampoline_code): Removed.
12628 (mono_debug_init_method): Also add interncalls and wrappers.
12630 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
12632 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
12634 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
12636 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
12638 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
12640 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
12642 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
12644 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
12645 getting TLS offsets on AMD64 too.
12647 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
12649 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
12651 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
12653 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
12654 inssel-arm.brg, mini-arm.h: ARM port work in progress.
12656 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
12658 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
12660 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
12663 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
12664 mono_sparc_is_virtual_call ().
12666 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
12668 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
12669 trampoline parameters.
12671 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
12673 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
12674 to mono_arch_get_vcall_slot_addr.
12676 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
12679 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
12681 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
12683 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
12685 2005-07-19 Martin Baulig <martin@ximian.com>
12687 * exceptions-amd64.c (throw_exception): Call
12688 mono_debugger_throw_exception() here like we're doing it on i386.
12690 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
12692 * mini-ia64.c: Add optimized TLS access support.
12694 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
12696 * mini-exceptions.c: Ongoing IA64 work.
12698 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
12700 * mini.c: Use the default optimization set when embedding. Fixes
12703 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
12705 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
12706 of trampolines to a separate file.
12708 * mini-trampolines.c: New file.
12710 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
12713 * tramp-x86.c: Reorganize the trampoline code to be similar to the
12716 * mini-codegen.c: Fix cygwin build.
12718 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
12720 * mini.c: Add some minor changes needed by the IA64 port.
12722 * *-ia64.*: Ongoing IA64 work.
12724 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
12726 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
12727 trampolines into arch-independent and arch-dependent parts.
12729 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
12731 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
12733 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
12735 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
12736 the xp-regalloc-branch for amd64.
12738 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
12739 xp-regalloc-branch for x86.
12741 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
12743 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
12745 2005-07-06 Martin Baulig <martin@ximian.com>
12748 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
12749 (mono_jit_runtime_invoke): Likewise.
12751 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
12753 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
12756 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
12757 without loading their metadata. Reorganize the file format so exception handling+
12758 debug info is kept separate from normal method info. Create MonoJitInfo
12759 structures for methods lazily.
12761 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
12763 (x86_class_init_trampoline): Patch AOT class init trampolines too.
12765 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
12767 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
12770 * mini.h: Bump AOT file version.
12772 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
12774 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12776 2005-07-01 Raja R Harinath <rharinath@novell.com>
12778 * Makefile.am (check-local): Call semdel-wrapper.
12780 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
12782 * mini-x86.c: Revert the last change as it seems to break the build..
12784 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
12786 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12788 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
12790 2005-06-27 Ben Maurer <bmaurer@ximian.com>
12792 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
12793 outside of the macro, so strange stuff doesn't happen with gcc4
12794 (NEW_AOTCONST_TOKEN): Likewise.
12796 2005-06-28 Martin Baulig <martin@ximian.com>
12798 * mini.c (mini_class_is_system_array): New static method; use this
12799 instead of `klass->parent == mono_defaults.array_class' everywhere
12800 since this also works for the new generic array class.
12802 2005-06-26 Ben Maurer <bmaurer@ximian.com>
12804 * inssel.brg: Remove warnings.
12806 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
12808 * mini-ia64.c: Ongoing IA64 work.
12810 * basic-float.cs: Add float->i1 conversion test.
12812 * iltests.il: Add conv.u4 test.
12814 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
12816 * inssel-long.brg: Fix bug caused by last change.
12818 2005-06-23 Geoff Norton <gnorton@customerdna.com>
12820 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
12821 BSDs. Allows the x86 JIT to work on OSX86
12823 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
12825 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
12828 * mini-ia64.c: Ongoing IA64 work.
12830 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
12832 * mini-ia64.c: Ongoing IA64 work.
12834 * driver.c: Clean up jit_code_hash as well when using --regression.
12836 * inssel-long.brg: Fix long->i4/u4 conversion rules.
12838 * basic-long.cs: Add tests for long->u4 conversion.
12840 2005-06-18 Ben Maurer <bmaurer@ximian.com>
12842 * mini.c: Take mono_get_domainvar out of macros. This makes sure
12843 that we do not depend on undefined C behavior: the order stuff
12844 gets evaluated within an expression. Fixes mono when compiled on
12847 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
12849 * *-ia64.*: Ongoing IA64 work.
12851 * aot.c: Lower memory usage while loading AOT methods.
12853 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
12855 * mini.h: Bump AOT file format version.
12857 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
12859 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
12861 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
12863 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
12864 not on callee assembly). Fixed some comments.
12866 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
12868 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
12869 it gets proper disassembly.
12870 (emit_method_info): Remove some dead code.
12872 * mini.c (mini_method_compile): Allways allocate the GOT var in
12873 mono_method_to_ir for emulating opcodes.
12875 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
12877 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
12878 before freeing the code memory. Fixes #74990.
12880 * objects.cs: Add regression test for #74992.
12882 * liveness.c: Extend live ranges of arguments to the beginning of the
12883 method. Fixes #74992.
12885 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
12886 so it points into the faulting instruction.
12888 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
12890 * jit-icalls.c (mono_imul_ovf): Add exception handling.
12892 * *-ia64.*: Ongoing IA64 work.
12894 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
12896 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
12898 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
12900 * *-ia64.*: Ongoing IA64 work.
12902 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
12904 * basic-long.cs: Add tests for add/sub.ovf.
12906 * basic.cs: Add tests for sub.ovf.
12908 * *-ia64.*: Ongoing IA64 work.
12910 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
12912 * *-ia64.*: Ongoing IA64 work.
12914 * basic.cs: Add conv.ovf.i4.un test.
12916 2005-06-09 Massimiliano Mantione <massi@ximian.com>
12918 * mini.c: (remove_block_if_useless) Fixed bug 75061.
12920 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12922 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
12924 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
12926 * *-ia64.*: Ongoing IA64 work.
12928 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12931 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
12933 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
12935 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
12937 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
12939 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
12941 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
12942 of a call is callable by a near call.
12944 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
12946 * mini-ia64.c: Ongoing IA64 work.
12948 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
12950 * genmdesc.c: Make the generated array non-static.
12952 * inssel-long.brg: Fix LSHR_IMM rule.
12954 * *-ia64.*: Ongoing IA64 work.
12956 * *-ia64.*: Ongoing IA64 work.
12958 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
12960 * *-ia64.*: Ongoing IA64 work.
12962 * *-ia64.*: Ongoing IA64 work.
12964 * mini-ia64.c: Ongoing IA64 work.
12966 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
12968 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
12970 * objects.cs basic-calls.cs: Move some tests to objects.cs.
12972 * objects.cs basic-long.cs: Move some tests to objects.cs.
12974 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
12976 * *-ia64.*: Ongoing IA64 work.
12978 * iltests.il: Add a new test.
12980 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
12981 newobj. Fixes #75042.
12983 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
12985 * *-ia64.*: Ongoing IA64 work.
12987 * *-ia64.*: Ongoing IA64 work.
12989 * *-ia64.*: Ongoing IA64 work.
12991 * basic.cs objects.cs: Move tests accessing static variables as well.
12993 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
12995 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
12997 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
12999 * driver.c: Always print failed tests.
13001 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
13004 * *ia64*: Ongoing IA64 work.
13006 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
13008 * basic.cs: Add tests for add.ovf. Fix warnings.
13010 2005-05-18 Miguel de Icaza <miguel@novell.com>
13012 * driver.c (mono_main): Avoid crash if no argument is passed to
13013 --break; Do not use g_error, but f_printf. And fix all other
13014 ocurrences of the same crash.
13016 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
13018 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
13019 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
13022 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
13024 * *-ia64.*: Add beginnings of IA64 backend.
13026 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
13028 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
13030 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
13033 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
13035 * mini-amd64.c: Fix a warning.
13037 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
13039 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
13040 in float_neg. Fixes #74897.
13042 * mini-amd64.c (emit_call): Fix another near call bug.
13044 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
13046 * declsec.c: Keep the appdomain information in the structure. Added a
13047 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
13048 value gets overwritten).
13049 * declsec.h: Set the default MonoArray for the the stack to 6. Added
13050 an MonoAppDomain member to MonoSecurityFrame.
13051 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
13052 used in the stack walk. Now use a MonoArray which grow (double) when
13055 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
13057 * mini.c: Re-enabled runtime cleanup, since running threads should
13058 now properly stop when exiting.
13060 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
13062 * mini-codegen.c: New file contaning the arch-independent local
13063 register allocator. Not used by any architectures yet.
13065 * mini.h linear-scan.c: Merge some changes from the
13066 mini-xp-local-regalloc branch.
13068 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
13070 * mini-amd64.c (emit_call): Fix calls to native functions when the
13071 runtime is compiled as a shared library. Fixes #74756.
13073 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
13074 on a literal field. Fixes #74751.
13076 2005-04-25 Raja R Harinath <rharinath@novell.com>
13078 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
13080 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
13082 * objects.cs: Add missing null casting test.
13084 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
13086 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
13087 in wrapper methods. Also rename 'address' variable to 'offset'.
13089 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
13091 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
13094 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
13096 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
13099 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
13101 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
13103 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
13105 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
13106 just the last bytes.
13108 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
13110 * aot.c (mono_compile_assembly): Fix warning.
13112 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
13113 by the _MSC_VER stuff.
13115 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
13117 * inssel-long.brg: Fix #74588.
13119 * cpu-amd64.md: Fix #74591.
13121 * iltests.il: Add new regression tests.
13123 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
13125 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
13128 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
13130 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
13132 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
13133 from Bill Middleton <flashdict@gmail.com>.
13135 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
13137 * arrays.cs: Add new regression test. Fix warnings.
13139 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
13141 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
13142 and leakage in CKFINITE.
13144 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
13145 this to a null op since it is called on amd64 too.
13147 * exceptions-amd64.c (get_throw_trampoline): Align stack.
13149 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
13150 body since this is not used on amd64.
13152 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
13154 * mini-amd64.c: Remove obsolete fixmes.
13156 * mini.c (print_method_from_ip): Fix debugging support.
13158 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13160 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
13161 so that expressions that don't give much gain are not reduced.
13162 * ssapre.h: Likewise.
13164 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
13166 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
13168 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
13170 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
13172 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
13174 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
13176 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
13178 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
13180 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
13183 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
13185 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
13187 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
13189 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
13190 MONO_ARCH_USE_SIGACTION. Fixes #74252.
13192 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
13194 * mini-x86.c: Fix up stack overflow handling.
13196 * exceptions.cs: Add new regression test.
13198 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
13200 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
13201 mono_jit_thread_attach.
13203 * mini.c (mono_method_to_ir): Verify called method is not abstract.
13205 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
13207 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
13208 avoid calling constructors using callvirt.
13210 * inssel.brg: Fix #74073.
13212 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
13214 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
13215 compilation with non-GCC compilers.
13216 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
13217 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
13219 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13221 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
13222 klass->interface_offsets (will likely fix bug#74073).
13224 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
13226 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
13228 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
13230 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
13231 to amd64_div_reg_size ().
13233 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
13235 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
13237 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
13239 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
13241 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
13243 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
13245 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
13247 * mini.c (mono_precompile_assembly): Load and precompile referenced
13248 assemblies as well. Fixes #74015.
13250 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
13252 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
13254 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
13256 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
13257 a lot of checks and (anyway) permissions cannot work until corlib is
13260 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
13262 * mini-ppc.c: fixed ABI issue on sysv/ppc.
13264 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
13266 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
13267 calls (fixes bug#72824).
13269 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13271 * mini.c: fix tail recursion elimination (see test in bug#73936).
13273 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
13275 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
13276 some fp functions in sse2 mode.
13278 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
13280 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
13282 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
13284 * mini.h mini.c: Add mono_get_jit_tls_key ().
13286 * mini-x86.c: Enable fast TLS support on windows.
13288 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
13290 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
13291 * mini.c: Check for p/invoke method when generating code. If a
13292 p/invoke method, or it's class, isn't decorated with [Suppress
13293 UnmanagedCodeSecurity] then generate code to call System.Security.
13294 UnmanagedDemand (only if the security manager is active).
13296 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
13298 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
13299 last change as it seems to cause strange crashes.
13301 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13303 * *.c: handle unsafe function pointers where needed.
13305 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
13307 * mini.c (mono_jit_free_method): Remove the fixme too.
13309 2005-03-15 Miguel de Icaza <miguel@novell.com>
13311 * mini.c: As discussed, make the code actually free the delegate
13312 thunk now, to enable the debugging of delegate problems, use
13313 MONO_DEBUG=1 when running Mono.
13315 This takes also care of parts of the leaks as seen by Joe.
13317 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
13319 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
13320 thread_tls_offset calculation.
13322 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
13324 * declsec.c: Reworked linkdemand checks for icall. The previous code
13325 was using the declaration code (untrusted) and didn't work as expected
13326 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
13329 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
13331 * iltests.il: Add new localloc test.
13333 * mini-amd64.c: Handle large stack allocations the same way as on
13334 windows if stack overflow handling is working.
13336 * mini-amd64.c: Allocate the signal stack using mmap.
13338 * mini.c (sigsegv_signal_handler): Fix reading of context.
13340 * mini-exceptions.c: Fix up stack overflow handling.
13342 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
13344 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
13346 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
13348 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
13350 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
13351 tramp_init functions as they are no longer needed.
13353 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
13355 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
13357 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
13359 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
13361 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
13364 * mini-ops.h: Add OP_LMUL_IMM.
13366 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
13367 long mul/div opcodes as intrinsic.
13369 * mini-amd64.c (emit_call): Handle the case when the callee might be
13372 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
13374 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
13377 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
13379 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
13381 2005-03-09 Ben Maurer <bmaurer@ximian.com>
13383 * mini.c (mono_codegen): Don't leak here, to help people running
13386 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
13388 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
13389 conversions in sse2 mode.
13391 * basic-float.cs: Add regression test.
13393 * mini-amd64.c: Reenable sse2.
13395 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
13397 * mini-amd64.c: Disable sse2 until some regressions are fixed.
13399 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
13401 * driver.c: Copyright text should include 2005.
13403 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
13405 * cpu-amd64.md (load_membase): Fix more max lengths.
13407 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
13409 * cpu-amd64.md (load_membase): Fix max length.
13411 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
13413 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
13415 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
13416 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
13418 * basic-float.cs: Add rounding regression test.
13420 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
13422 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
13424 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
13425 structures in registers for pinvoke wrappers.
13427 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
13429 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
13431 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
13433 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
13434 wrapper to mono_jit_thread_attach.
13436 * mini.c (mini_jit_thread_attach): New jit icall.
13438 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
13439 native->managed wrappers.
13441 * exceptions.cs: Add new regression test.
13443 * mini.c (optimize_branches): Check regions in the cbranch to throw
13444 block case as well. Fixes #73242.
13446 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13448 * mini.c: thread safety fixes.
13450 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
13452 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
13453 patching stuff, since delegates use jump trampolines so there is
13456 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
13459 * tramp-amd64.c: Fix build.
13461 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
13462 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
13464 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
13465 Rename this to mono_arch....
13466 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
13468 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
13470 * mini-amd64.c (emit_call): If both the caller and the callee is
13471 guaranteed to have 32 bit addresses, emit a normal call.
13473 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
13475 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
13476 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
13477 method_ptr inside delegates.
13479 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
13481 * mini.c (mono_jit_free_method): Free the method info even if the native code is
13482 invalidated. Fixes #73001.
13484 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
13486 * mini-x86.c: Only use stdcall for pinvokes on windows.
13488 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13490 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
13491 * mini-x86.c: remove unreliable __thread var offset detection,
13492 use the correct accessors and enable by default.
13494 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
13496 * mini.c (mono_jit_free_method): Fix memory leak.
13498 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
13500 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
13502 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
13504 * cpu-amd64.md: Fix lengths of atomic opcodes.
13506 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13508 * driver.c: try to not imply using ICU is any good.
13510 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
13512 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
13513 functions as inline ops.
13515 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
13516 some Interlocked functions as inline ops.
13518 * mini.c (move_basic_block_to_end): Fix bug in last patch.
13520 * mini.h (MonoBasicBlock): Reorganize fields a bit.
13522 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
13524 * mini.c: Add support for OP_NOT_TAKEN.
13526 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
13527 structures in registers for pinvoke wrappers.
13529 * mini-amd64.c: Fix warnings.
13531 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
13533 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
13535 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
13537 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
13538 address instead of loading the address from it.
13540 * mini-x86.c: Add support for returning small structs in registers
13541 on Win32. Fixes part of #70864.
13543 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
13545 * trace.c (get_token): Improve error checking.
13547 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
13549 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
13551 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
13553 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
13554 it can be reused for MonoClass.
13555 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
13558 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
13560 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
13561 instead of a MonoReflectionMethod. The method information wasn't used
13562 when displaying SecurityException details (but will be now).
13564 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
13566 * Makefile.am : windows build fix.
13568 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
13570 * iltests.il: Add new regression test.
13572 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
13575 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
13577 * mini.c: Moved linkdemand check into helper function check_linkdemand
13578 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
13581 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
13583 * declsec.c: Added statistics counter for different kinds of
13585 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
13586 (and commented) declaration.
13587 * mini.c: Added statistics counter for security Demand code
13588 generation. Added display of security statistics.
13590 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
13592 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
13593 Fix compilation errors under gcc-2.95.
13595 2005-02-12 Ben Maurer <bmaurer@ximian.com>
13597 * mini.c, driver.c: Use the new jit trampoline hashtable
13599 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13601 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
13603 2005-02-11 Martin Baulig <martin@ximian.com>
13605 * debug-mini.c (mono_debug_close_method): Free the line number array.
13607 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
13609 * aot.c: Break up large methods into smaller ones. Share GOT slots for
13612 * mini.h: Bump AOT file format version.
13614 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
13616 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
13618 * declsec.h: Added macros to get/set lazyly initialized security
13619 informations about assemblies. Added new enum for different type of
13620 possible LinkDemand violation. Added function to check LinkDemands.
13621 * mini.h: Added a field to MonoCompile to hold any security violation
13622 detected when JITting a method (so it can be thrown later).
13623 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
13624 and CEE_CALLVIRT. Added code to throw exception at the end of
13625 mini_method_compile (note: the exception is unhandled right now).
13627 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13629 * mini.c, jit-icalls.c: use the managed implementation of
13630 memset for initobj and memset, to avoid managed <-> unmanaged
13633 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
13635 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
13636 optimization if it would need a GOT var.
13638 * basic.cs: Add tests for constant propagation and switch statements.
13640 * ssa.c: Fix out-of-range constant propagation and switch statements.
13642 2005-02-09 <vargaz@freemail.hu>
13644 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
13646 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
13648 * cpu-amd64.md (load_membase): Fix max length of load_membase.
13650 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13652 * mini.c: update to new signature of mono_class_get_allocation_ftn().
13654 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
13656 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
13657 arithmetic operations.
13659 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
13661 * mini-ppc.c: add a workaround for broken user code that
13662 DllImports vararg functions with non-vararg signatures.
13664 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
13666 * mini.c (mono_jit_compile_method_inner): Add detection and a
13667 meaningfull error message for assemblies written in Managed C++.
13669 * tramp-amd64.c mini-amd64.h: Add support for
13670 create_trampoline_from_token ().
13672 * aot.c mini-x86.c abcremoval.c: Applied patch from
13673 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
13675 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
13677 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
13678 which takes a MonoImage/token as parameter instead of a MonoMethod.
13680 * aot.c: Use the new trampoline for initializing vtables.
13682 * aot.c: Add support for ldfld/stfld_remote wrappers.
13684 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
13685 rules for compare <MEM>, IMM.
13687 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
13689 * aot.c: Handle inherited finalizers correctly.
13691 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
13693 * inssel.brg (stmt): Add a missing _setup_... ().
13695 * aot.c: Save some parts of the class state to the AOT file and use it
13696 to recompute that state when a class is initialized.
13698 * mini.c: Install AOT hooks into the runtime.
13700 * mini.h: Bump AOT file format version.
13702 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
13705 * iltests.il: Add new test.
13707 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
13709 * mini.c: fix typo.
13711 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
13713 * mini.c: setup the statistical profiler in the thread attach
13714 callback to cope with the new single thread code.
13716 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
13718 * mini-ppc.c: ensure we have enough room for the profiler
13719 calls (fixed bug#72084).
13721 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
13723 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
13726 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13728 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
13730 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13732 * ssapre.c: Fixed an issue with down safety (this allows IronPython
13733 to succesfully execute parrotbench).
13734 * ssapre.h: Likewise.
13736 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13738 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
13739 variable for stores to method arguments (fixes a SSAPRE issue).
13741 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13743 * mini.c: handle value types in dup, fixes gen-112.cs.
13745 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
13747 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
13748 sequence for calls in dynamic methods to avoid thunks.
13750 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13752 * mini.c: correctly remove dynamic methods from the hashtable.
13754 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13756 * driver.c: Disabled SSAPRE until fix the bug that appears
13757 in IronPython's parrotbench.
13759 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
13761 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
13763 * mini.c (mono_method_to_ir): Revert the previous change.
13765 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
13766 when AOT compiling.
13768 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
13769 mono_jit_info_table_find () etc. when running under valgrind.
13771 * inssel.brg: Fix warnings.
13773 * mini-exceptions.c: Fix warnings.
13775 2005-01-31 Martin Baulig <martin@ximian.com>
13777 * driver.c (compile_all_methods_thread_main): Don't try to compile
13778 generic methods or anything which has type parameters.
13780 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
13782 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
13784 * TestDriver.cs: Add --verbose flags.
13786 * graph.c ssa.c: Fix 64 bit warnings.
13788 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
13789 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
13790 Fix 64 bit warnings.
13792 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
13793 variable not spotted by gcc.
13795 * mini-amd64.c inssel-amd64.brg: Applied patch from
13796 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
13797 X86_COMPARE_MEMBASE opcodes.
13799 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
13801 2005-01-29 Ben Maurer <bmaurer@ximian.com>
13803 * *: MonoMethod->signature might be NULL now. You *MUST* use
13804 mono_method_signature.
13806 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13808 * driver.c (compile_all_methods_thread_main): Compile the methods
13809 without invoking cctors.
13811 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13813 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
13814 * basic-calls.cs: test for the above.
13816 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13818 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
13819 MonoJitInfo changes.
13821 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
13823 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
13824 eagerly if it contains dynamic methods.
13826 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
13828 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
13829 trace, it is now computed by an icall from trace_ips.
13831 * mini-exceptions.c: Fix a warning.
13833 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
13835 * mini-exceptions.c: don't bother getting stack trace info if
13836 it's not going to be used.
13838 2005-01-27 Raja R Harinath <rharinath@novell.com>
13840 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
13843 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
13845 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
13847 * aot.c: Avoid calling mono_method_get_header () if not needed.
13849 * mini.h: Bump AOT file format version.
13851 * mini.c (mono_emit_native_call): Allocate a GOT var here.
13853 * mini.c (mono_print_tree): Print more info for calls.
13855 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
13857 * declsec.h: Remove warning by adding missing include for marshal.h
13859 2005-01-26 Martin Baulig <martin@ximian.com>
13861 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
13864 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
13866 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
13869 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
13871 * aot.c (mono_compile_assembly): Fix a warning.
13873 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
13875 * declsec.c: Look for security attributes on the original MonoMethod
13876 (and not the wrapped one). This fix permissions on icalls.
13878 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
13880 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13882 * mini.c (mono_allocate_stack_slots): Add a fixme.
13884 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13886 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13888 * inssel.brg: optimize casts of sealed types (more
13889 optimizations waiting for fixes in remoting).
13891 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
13893 * inssel.brg (stmt): Add another dummy rule.
13895 * driver.c: Fix warnings.
13897 * driver.c (mono_main): If running under valgrind, instruct glib to use
13898 the system allocation functions so valgrind can track the memory
13899 allocated by the g_... functions.
13901 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
13903 * mini-ops.h: Add OP_DUMMY_STORE opcode.
13905 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
13907 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
13908 variables in try regions.
13910 * mini.c (mini_method_compile): Don't disable optimizations on large
13911 methods when AOT compiling.
13913 * mini.c (mono_allocate_stack_slots): New arch independent method to
13914 allocate stack slots. Not yet used.
13916 2005-01-22 Ben Maurer <bmaurer@ximian.com>
13918 * debug-mini.c (mono_debug_close_method): Plug some leaks.
13920 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
13922 * mini-ppc.c: make the branch info relative as the code
13923 buffer can be reallocated.
13925 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
13927 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
13928 * driver.c: Removed the AOT/security restriction. Now initialize the
13929 security manager (in metadata) if --security is used.
13930 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
13931 rather than the pointer to declarative security, when AOT is used.
13933 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
13935 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
13936 basic blocks, reduced intrinsic exception throwing code size.
13938 2005-01-22 Miguel de Icaza <miguel@ximian.com>
13940 * driver.c (mini_usage): Reorder the usage screen.
13942 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
13944 * mini.c (mono_resolve_patch_target): Fix warning.
13946 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
13948 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
13951 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
13953 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
13954 breaks the amd64 build.
13956 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
13957 register allocation. Fixes #71454.
13959 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
13961 * arrays.cs: Add new regression test.
13963 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13965 * ssapre.c: Turned usage of snprintf to GString.
13966 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
13967 (I left it on by mistake in my previous commit).
13969 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
13971 * mini.c, cfold.c, basic-calls.cs: preserve side effects
13972 on cond branch optimization (fixes bug# 71515).
13974 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13976 * abcremoval.c: Fixed bug 71062.
13977 * abcremoval.h: Likewise.
13979 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13981 * mini.c: Added a new functionality to optimize_branches, the removal
13982 of useless basic blocks, and fixed some problem in the removal of
13983 critical edges; some utility functions added for both purposes.
13984 * ssapre.c: Added complex expression support, and fixed bug 70637.
13985 * ssapre.h: Likewise.
13986 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
13988 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
13989 * driver.c: Re-enabled SSAPRE.
13991 2005-01-19 Martin Baulig <martin@ximian.com>
13993 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
13994 the result of mono_get_method_constrained().
13996 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
13998 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
14001 2005-01-18 Geoff Norton <gnorton@customerdna.com>
14003 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
14004 be detected. Fixes #59296.
14006 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
14008 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
14009 which can happen. Fixes #71361.
14011 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
14013 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
14016 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
14018 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
14019 appdomain-unload.exe to fail.
14021 * mini.c: Fix some memory leaks.
14023 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
14025 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
14026 Fixed bug and sped up some codepaths.
14028 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
14030 * mini.c: Fix some memory leaks.
14032 * exceptions.cs basic-long.cs: Add test for checked ulong->int
14035 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
14037 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
14040 * iltests.il: Add regression test for #71320.
14042 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
14044 * mini.c (mono_codegen): Fix installation of profiler hooks.
14046 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
14048 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
14050 * mini.h, mini.c, cfold.c: optimize access to enum
14051 readonly fields, too. Eval conditional branches if possible
14052 to perform unreachable code removal in more cases.
14054 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
14056 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
14058 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
14061 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
14062 WinXP DEP. Fixes #71244.
14064 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
14066 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
14068 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
14070 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
14072 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
14074 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
14077 * mini.h: Bump AOT version.
14079 * mini.h (MonoCompile): Change exvar to a hash table.
14081 * mini.c: Allocate a separate exvar for each handler block.
14083 * mini.c: Get rid of the computation of filter_lengths, its not needed.
14085 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
14086 ex var with the pending exception and only throw if the two are equal.
14089 * exceptions.cs: Add tests for rethrow and nested catch clauses.
14091 * mini-x86.c: Fix warnings.
14093 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
14094 used by all the ports now.
14096 * aot.c: Add write-symbols and save-temps options.
14098 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
14100 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
14102 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
14104 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
14107 * tramp-s390.c: Check vtable slot belongs to the domain.
14109 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
14110 as per other platforms.
14112 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
14114 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
14116 * driver.c: we don't run the Main() code in a subthread anymore.
14118 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
14120 * mini.c: added experimental rtc support in the statistical
14121 profiler: if the user has the permission, more accurate statistics
14122 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
14123 The MONO_RTC value must be restricted to what the linux rtc allows:
14124 power of two from 64 to 8192 Hz.
14126 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
14128 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
14130 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
14132 * mini-ppc.c: better icache flush for smp.
14134 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
14136 * mini-amd64.c (emit_move_return_value): Fix memory leak.
14138 * mini-x86.c (get_call_info): Add the get_call_info () code from the
14139 amd64 port, not yet used.
14141 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
14143 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
14146 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
14148 * driver.c: Added --security option to activate the security manager.
14149 Right now this will allow code generation for declarative demands and
14150 is disabled when AOT is specified.
14151 * mini.c: Add code generation for declarative security demands.
14152 * mini.h: Add mono_use_security_manager as an extern gboolean.
14154 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
14156 * aot.c (mono_compile_assembly): Speed up compilation a bit by
14157 emitting more dense assembly code.
14159 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
14160 exception throwing stuff.
14162 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
14164 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
14167 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
14168 left in by mistake.
14170 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
14173 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
14175 * tramp-*.c: Only patch vtable slots if the object is in the current
14176 domain. Fixes appdomain-unload.exe.
14178 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
14180 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
14183 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
14185 * mini.c (reverse_branch_op): New helper function.
14187 * mini.c (optimize_branches): Run the new optimization only on
14188 platforms which support it. Also reverse all kinds of branches.
14190 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
14192 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
14195 * mini.c (optimize_branches): Reverse not-equals branches if the false
14196 bblock is a throw. This happens a lot of time with argument checking in
14199 * mini.c (mono_codegen): Add support for placing basic blocks after
14200 the function epilogue.
14202 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
14205 2005-01-05 Miguel de Icaza <miguel@ximian.com>
14207 * mini.c (setup_stat_profiler): Only set this up if the platform
14208 supports ITIMER_PROF.
14210 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
14212 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
14215 * inssel.brg: Fix a warning.
14217 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
14219 * mini.c: added support for statistical profiler
14220 (run with: --profile=default:stat).
14222 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
14224 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
14226 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
14228 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
14229 related to global registers from the amd64 port.
14231 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
14233 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
14235 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
14236 with global registers.
14237 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
14239 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
14241 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
14243 * debug-mini.c (encode_value): Fix off-by-one.
14245 * aot.c (encode_value): Likewise.
14247 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
14249 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
14251 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
14254 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
14256 * aot.c (emit_method_info): Increase size of temp buffer.
14258 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
14261 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
14263 * aot.c (emit_method_info): Fix build.
14265 * aot.c: Further rework of the AOT file format to reduce the size of
14266 the method info data.
14268 * mini.h: Bump AOT file format version.
14270 2004-12-27 Martin Baulig <martin@ximian.com>
14272 * mini.c (mini_get_method): New static method; call
14273 mono_get_method_full() and mono_get_inflated_method().
14274 (mono_method_to_ir): Use mini_get_method() instead of
14275 mono_get_method_full().
14277 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
14279 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
14281 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
14283 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
14285 * inssel-amd64.brg: Add some optimization rules.
14287 2004-12-24 Ben Maurer <bmaurer@ximian.com>
14289 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
14290 standard not GC'd stuff is fine.
14292 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
14294 * aot.c: Rework the AOT file format to get rid of most of the global
14295 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
14297 * mini.h: Bump AOT file format version.
14299 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
14301 * mini.h: Bump AOT file format version.
14303 * aot.c (mono_aot_is_got_entry): New function to determine if an
14304 address is inside a GOT.
14306 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
14308 * cpu-pentium.md: Increase the maximum size of some instructions which
14309 might involve a got access.
14311 * mini.c (get_method_from_ip): Another debug helper function.
14313 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
14314 when got var accesses are created during the decompose phase.
14316 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
14318 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
14319 argument mini_compile_method and to MonoCompile, and use this to
14320 determine whenever a given method is compiled for AOT. This allows the
14321 other methods compiled during AOT compilation to be free of AOT stuff,
14322 so the backends does not need to add special support for them by
14323 creating a fake GOT etc.
14325 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
14328 2004-12-21 Ben Maurer <bmaurer@ximian.com>
14330 * mini.c (mono_method_to_ir): It turns out that some of the
14331 x-appdomain wrappers are lax with types, so just ignore this for
14334 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
14335 at the vtable->klass. If it is non-shared code we can just use the
14338 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
14340 * mini-ppc.c: access MonoDomain from tls, too.
14342 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
14344 * declsec.c: Removed unused variable (and related warning ;-)
14346 2004-12-21 Ben Maurer <bmaurer@ximian.com>
14348 * iltests.il: New test for LDELEMA on an array of ref types.
14350 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
14351 all ldelema's on reftypes.
14352 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
14353 it was the wrong place to put it.
14355 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
14356 register to pop to make this cleaner, at the request of Paolo.
14358 2004-12-20 Ben Maurer <bmaurer@ximian.com>
14360 * mini-ops.h (OP_GETHASHCODE): New op.
14362 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
14364 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
14367 For a microbenchmark, this reduces the cost of Hashtable.get_Item
14370 * mini-x86.c (mono_arch_output_basic_block): Rather than
14378 The first is 3 bytes while the second is 1. This saves 36 kb on
14379 mscorlib, quite a big saving. When bootstraping mcs, I was able to
14380 see a small boost because of icache locality.
14382 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
14384 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
14386 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
14387 started code sharing with the generic code.
14389 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
14391 * mini-ppc.c, cpu-g4.md: added code for direct access to
14394 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
14396 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
14397 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
14400 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
14402 * declsec.c|h: Added functions to cache the declarative stack modifiers
14403 in MonoJitInfo and to create a security frame from a MonoJitInfo
14405 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
14406 created. Register internal calls for System.Security.SecurityFrame::
14407 _GetSecurityFrame and _GetSecurityStack.
14408 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
14409 the definitions for the new stack walk/callback mechanism.
14410 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
14411 first security frame for LinkDemands and InheritanceDemands) and
14412 GetSecurityStack for Demands. Both use the new mono_walk_stack code
14414 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
14415 walk initialization (lupus).
14417 2004-12-20 Ben Maurer <bmaurer@ximian.com>
14419 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
14421 (handle_loaded_temps): Do not create a temporary variable for
14422 things that we know are temps. They will never be modified.
14423 (mono_spill_call): Set MONO_INST_IS_TEMP
14424 (mono_emulate_opcode): ditto
14426 (mono_method_to_ir.CEE_DUP): ditto
14428 2004-12-19 Ben Maurer <bmaurer@ximian.com>
14430 * mini.c (type_to_eval_stack_type): Make this handle the void type
14431 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
14432 (emit_tree): use ip_in_bb to special case some common idioms
14433 Update all callers to pass in the IP.
14434 (mono_method_to_ir): Make CEE_CALL* do the above as well.
14436 This gives us a nice 2% speedup in mcs bootstrap.
14438 * mini-x86.c (peephole_pass): Peephole pass to make
14447 * mini.c (ip_in_bb): new method.
14448 (mono_method_to_ir): use this method rather than doing the hash
14451 * linear-scan.c (mono_linear_scan): When expiring actives, you
14452 don't need to keep around variables that expire on this
14453 instruction. This makes it so that:
14456 store (ebx add (ebx, 1))
14460 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
14462 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
14463 combination to avoid doing two copies. Fix up problems with previous
14466 * mini.c: Fix 64 bit warnings.
14468 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
14470 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
14472 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
14473 changes from the x86 code.
14475 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
14477 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
14479 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
14480 throwing code to reduce its size, unify the AOT and non-aot code and
14481 get rid of relocations in the AOT case.
14483 * mini-x86.h mini.c exceptions-x86.c
14484 (mono_arch_get_throw_corlib_exception): New arch specific function to
14485 raise corlib exceptions which doesn't require relocations in the
14488 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
14490 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
14492 * mini.c (mono_emit_method_call): Only allocate the got var when it is
14495 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
14498 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14500 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
14501 with add function when used from Inc/dec atomic
14502 functions. Re-enabled optimization on x86.
14503 * mini-ops.h: renamed atomic_add functions to
14504 allow _add to match the Interlocked::Add and
14505 _add_next to match Interlocked::Inc/Dec.
14507 2004-12-15 Massimiliano Mantione <massi@ximian.com>
14509 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
14510 linking of BBs to the end BB, and enabled SSAPRE also with
14511 consprop and copyprop (which was prevented by that bug).
14513 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14515 * mini-x86.c: disabling the Interlocked optimizing code.
14517 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
14519 * aot.c (load_aot_module): Move reading of got_addr after the AOT
14520 file version check.
14522 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14524 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
14525 interlocked optimization due lack of support on x86, rewrote
14526 exchange to take into account that base may be in eax.
14528 xsp works again; activated Interlocked optimizing code.
14530 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
14532 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
14534 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
14536 * mini-ops.h: Add new opcodes.
14538 * mini.h: Add new patch types. Add got_var to MonoCompile.
14540 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
14541 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
14542 make it work with all kinds of patchable code.
14544 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
14545 address of the GOT, and referencing entries in the GOT.
14547 * mini.c: Add code to load the GOT address if needed by an opcode.
14549 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
14550 independent AOT code on the x86 using an elf-style Global Offset Table.
14552 2004-12-14 Raja R Harinath <rharinath@novell.com>
14554 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
14556 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14558 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
14561 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
14563 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
14564 of Interlocked:Increment/Decrement/Add as inline ops.
14565 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
14567 2004-12-12 Geoff Norton <gnorton@customerdna.com>
14569 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
14570 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
14572 2004-12-12 Duncan Mak <duncan@ximian.com>
14574 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
14575 again. `patch_info->table_size' is no longer valid after Zoltan's
14578 2004-12-12 Martin Baulig <martin@ximian.com>
14580 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
14581 if we are the "real" method, ie. not an inlined method inside it.
14583 2004-12-11 Ben Maurer <bmaurer@ximian.com>
14585 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
14586 before we look in the special fields table. This fixes
14587 ../tests/thread-static-init.cs.
14589 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14591 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
14592 for Array get_Rank and get_Length. Fixes bug #70465.
14594 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
14596 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
14597 separate structure to reduce the size of MonoJumpInfo.
14599 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14601 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
14603 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
14605 * mini.c (mini_get_inst_for_method): Changed to allow ports
14606 to return a MonoInst instead of opcode
14607 (renamed mini_get_opcode_for_method to better reflect the new functionality)
14609 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
14610 Allow ports to return a created MonoInst instead of op-code, will enable
14612 (renamed mini_get_opcode_for_method to better reflected the functionality)
14614 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
14616 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
14618 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
14620 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
14623 2004-12-08 Martin Baulig <martin@ximian.com>
14625 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
14626 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
14628 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
14630 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
14633 * exceptions.cs: Disable some tests which depend on properties of x86 fp
14636 2004-12-08 Raja R Harinath <rharinath@novell.com>
14638 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
14640 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
14642 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
14643 bug introduced by the previous patch.
14645 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14647 * mini-ppc.c, objectc.cs: handle large structs passed by value
14648 (fixes bug #69972).
14650 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
14652 * mini-ppc.c: OP_ARGLIST implementation from
14653 Geoff Norton <gnorton@customerdna.com>.
14655 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14657 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
14658 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
14660 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14662 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
14664 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14666 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
14669 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
14671 * mini-sparc.c: Zero out localled-ed memory.
14673 * iltests.il: Add tests for zeroing out localloc-ed memory.
14675 2004-12-04 Martin Baulig <martin@ximian.com>
14677 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
14678 mono_method_get_signature_full().
14680 2004-12-03 Massimiliano Mantione <massi@ximian.com>
14682 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
14683 and some utility functions (always for SSAPRE), integrated SSAPRE.
14684 * mini.h: Likewise.
14685 * driver.c: Added ssapre option.
14686 * ssa.c: Small fix on OP_ARG handling.
14687 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
14688 * Makefile.am: Likewise.
14690 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
14692 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
14693 now in the xp code.
14695 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
14698 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14700 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
14702 * cpu-s390.md : Increase instruction length of oparglist.
14704 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
14706 2004-11-30 Martin Baulig <martin@ximian.com>
14708 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
14709 virtual generic methods. We call a special helper_compile_generic_method()
14710 icall to retrieve the method from the vtable, inflate and compile
14711 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
14713 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
14715 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
14717 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
14719 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
14721 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
14724 2004-11-27 Ben Maurer <bmaurer@ximian.com>
14726 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
14727 platforms with PIC aot.
14729 2004-11-28 Martin Baulig <martin@ximian.com>
14731 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
14734 2004-11-28 Martin Baulig <martin@ximian.com>
14736 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
14737 the result of mono_type_get_underlying_type() to check whether
14740 2004-11-26 Martin Baulig <martin@ximian.com>
14743 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
14746 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
14748 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
14749 the same way as the other arguments so they won't get clobbered.
14751 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
14752 calls through R11 since it is clobbered by the trampoline code.
14754 2004-11-26 Raja R Harinath <rharinath@novell.com>
14756 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
14757 pick up in-tree mscorlib.dll.
14759 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
14761 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
14763 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
14764 runtime data/code are now stored in a table similar to the GOT in ELF.
14765 This allows the code itself to be position independent.
14767 * aot.c: Fix loading of referenced assemblies after the lazy assembly
14770 * aot.c: Attach ELF type (object/function) directives to all global
14773 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
14775 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
14777 * mini-amd64.h: Turn on PIC AOT code.
14779 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
14780 returning the offset within an OP_AOTCONST instruction where the GOT
14781 offset needs to be added.
14783 * mini.h: Bump AOT file format version.
14785 2004-11-25 Martin Baulig <martin@ximian.com>
14787 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
14788 uninflated generic methods.
14790 2004-11-25 Martin Baulig <martin@ximian.com>
14792 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
14794 2004-11-24 Martin Baulig <martin@ximian.com>
14796 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
14797 original klass (this only applies for generic instances).
14799 2004-11-24 Martin Baulig <martin@ximian.com>
14801 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
14802 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
14805 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
14807 * mini.c (mono_method_to_ir): Disable inlining for methods containing
14808 localloc. Fixes #69678.
14810 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
14812 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
14814 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
14815 used SSE registers on pinvoke calls. Fixes #69774.
14817 2004-11-23 Geoff Norton <gnorton@customerdna.com>
14819 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
14820 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
14822 2004-11-23 Raja R Harinath <rharinath@novell.com>
14824 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
14825 Refer directly to the mcs/ tree.
14827 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14829 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
14830 Check if a trampoline for a synchronized method is required.
14832 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
14834 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
14835 with localloc if needed. Throe arithmetric exception in
14836 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
14837 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
14839 2004-11-19 Geoff Norton <gnorton@customerdna.com>
14841 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
14842 types before switching on type. Fixes #69622.
14844 2004-11-19 Raja R Harinath <rharinath@novell.com>
14846 * Makefile.am (check-local): New. Integrate into 'make check'.
14847 (MCS,RUNTIME): Define using in-tree mono and mcs.
14849 (%.exe): Use $(ILASM).
14851 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
14853 * mini-ppc.c: adjust initial prolog size (bug #69691).
14855 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
14857 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
14860 2004-11-17 Raja R Harinath <rharinath@novell.com>
14862 * Makefile.am (clean-local): Rename from 'clean'.
14864 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14866 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
14867 to mono_arch_is_int_overflow.
14868 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
14871 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
14873 * declsec.c|h: New files to support declarative security attributes.
14874 Added function to check if a method has (applicable) security.
14875 * mini.c|h: Add check for declarative security attributes in
14876 mono_method_check_inlining.
14877 * Makefile.am: Added declsec.c and declsec.h to the build.
14879 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
14881 * mini.c, mini.h: update to keep dynamic code info per-domain.
14883 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
14885 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
14886 (mini_init): Get rid of it from here too.
14888 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14890 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
14891 implemented OP_RETHROW (patch by Geoff Norton
14892 <gnorton@customerdna.com>).
14894 2004-11-10 Geoff Norton <gnorton@customerdna.com>
14896 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
14897 between appdomains. Fixes appdomain-unload on PPC.
14899 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
14901 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14902 mini-exceptions.c: handle the new wrapper types.
14903 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
14904 token value as a MonoClass* when compiling a wrapper.
14905 mono_jit_create_remoting_trampoline now takes an additional
14906 MonoRemotingTarget parameter.
14908 2004-11-10 Martin Baulig <martin@localhost>
14910 * mini.c (mono_method_to_ir): Use `generic_container->context'
14911 rather than creating a new one.
14913 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14915 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
14917 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
14919 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
14921 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
14922 the experimental aot cache stuff.
14924 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14926 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14927 mini-exceptions.c: update to exception clause structure changes.
14929 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14931 * exceptions-x86.c (throw_exception): Fix warnings.
14933 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
14936 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14938 * exceptions-sparc.c (get_throw_exception): Really fix this.
14940 2004-11-07 Ben Maurer <bmaurer@ximian.com>
14942 * tramp-*.c: we no longer support icalls without wrappers, so
14943 a bit of code can be removed here
14945 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
14947 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
14950 * cpu-sparc.md: Add op_rethrow.
14952 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
14954 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
14956 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
14957 * mini-ops.h: Add OP_RETHROW.
14959 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
14961 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
14963 2004-11-05 Geoff Norton <gnorton@customerdna.com>
14965 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
14966 Makes the output much easier to read
14968 2004-11-05 Ben Maurer <bmaurer@ximian.com>
14970 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
14971 prevents another huge leak when compiling with ssa. Secondly, the
14972 performance of doing this rather than freeing the lists is much
14973 better. GList does a lock every time you allocate a list link,
14974 so that it can use a memory pool. So, it is better to just use
14975 a memory pool of our own.
14977 * ssa.c, linear-scan.c: replace g_list_remove_link with
14978 g_list_delete. The remove one does not free the GList, so we were
14979 leaking memory. On -O=all --compile-all with corlib, this cut down
14980 3 MB of allocations.
14982 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
14984 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
14986 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
14988 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
14989 into a new function mono_create_jit_trampoline ().
14991 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
14993 * trace.c (get_spec): Allow tracing of classes without a namespace.
14995 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
14997 * mini.c: Fix pointer overwrite in mini_method_compile.
14999 2004-11-2 Geoff Norton <gnorton@customerdna.com>
15001 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
15002 The darwin ABI needs some special handling for 1 and 2 byte structs
15003 Lets use lbz/lhz instead of lwz everywhere.
15004 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
15005 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
15006 Use stb/sth for the former, and put the latter always on stack instead of in
15007 argument registers.
15009 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
15011 * trace.c (is_filenamechar): Add '_'.
15013 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15015 * mini-s390.c: Fix prolog length to allow for large trace requirements.
15017 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
15019 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
15021 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
15022 depends on libmonogc. Fixes #68805.
15024 2004-10-26 Miguel de Icaza <miguel@ximian.com>
15026 * mini.c (mono_jit_free_method): Provide extra information for
15027 this error. Currently this leaks, but will be turned into a
15028 developer option in the future.
15030 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
15032 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
15034 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
15036 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
15037 boundary. Fixes reading of PATCH_INFO_R4 and R8.
15038 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
15040 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
15042 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
15043 trampolines for AOT code.
15045 2004-10-22 <vargaz@freemail.hu>
15047 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
15048 constructed types. Fixes #68136.
15050 2004-10-21 Martin Baulig <martin@ximian.com>
15052 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
15053 if it returns true, unwind the stack to the call instruction.
15055 2004-10-21 <vargaz@freemail.hu>
15057 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
15059 * mini.h: Bump AOT version number.
15061 * objects.cs: Add another test for unbox trampolines.
15063 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
15066 2004-10-20 <vargaz@freemail.hu>
15068 * driver.c: Add SHARED to the set of optimizations tested.
15070 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
15072 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
15073 used by CEE_NEWARR.
15075 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
15077 2004-10-20 Martin Baulig <martin@ximian.com>
15079 * mini-exceptions.c (mono_handle_exception): Call
15080 mono_debugger_handle_exception() to tell the debugger about
15081 catch/finally clauses.
15083 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
15085 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
15087 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
15090 2004-10-15 Geoff Norton <gnorton@customerdna.com>
15092 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
15093 methods as their native size, fixed bug #57543, #57545.
15094 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
15095 This saves a temporary register and mullw call down into 1 (minor perf
15096 increase for cases like sum = sum * 5; This use to translate into:
15099 It now translates to
15102 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
15104 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
15107 2004-10-11 Martin Baulig <martin@ximian.com>
15109 * mini.c (mono_method_to_ir): If we're a generic method, get the
15110 MonoGenericContainer from our MonoMethodNormal and create a
15111 MonoGenericContext from it.
15113 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
15115 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
15117 * basic-long.cs: Add test for checked i8->i2 cast.
15119 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15121 * inssel-ppc.brg: added a couple of speedup rules.
15123 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
15125 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
15126 to speed up rebuilds.
15128 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15130 * mini-s390.c: Minor fix to OP_OR_IMM.
15132 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
15134 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
15135 better. Fixes appdomain-unload.exe on sparc.
15137 2004-10-02 Massimiliano Mantione <massi@ximian.com>
15139 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
15140 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
15143 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
15145 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
15147 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
15149 * mini.c: Always generate a field read/write wrapper for members
15150 of the class MarshalByRefObject since the actual instance could
15153 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
15155 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
15157 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
15159 * driver.c mini.h trace.c: Move the setting of the main assembly into
15160 a separate function called mono_trace_set_assembly () and call it after
15161 actually loading the main assembly. Fixes #66872.
15163 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
15165 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
15166 using the code manager.
15168 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
15170 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
15172 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
15174 * cpu-amd64.md: Fix bug in previous patch.
15176 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
15179 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
15181 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15182 mini-exceptions.c: updates for changed stack walk interface.
15184 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15186 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
15188 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
15190 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
15192 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
15194 * driver.c (mini_regression_list): Do not call mono_assembly_close
15195 since assemblies can't be unloaded.
15197 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
15199 * cpu-amd64.md: Fix more instruction lengths.
15201 * cpu-amd64.md: Fix lengths of some instructions.
15203 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
15205 * inssel.brg: Make the array ldelema check aot friendly.
15207 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
15209 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
15211 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
15213 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
15215 * mini-x86.c: Fix build.
15217 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
15218 mono_type_get_underlying_type () helper function to simplify code.
15220 2004-09-09 Martin Baulig <martin@ximian.com>
15222 * mini-amd64.c: Don't access `type->data.klass' directly, call
15223 mono_class_from_mono_type() instead since the type may be a
15226 2004-09-09 Martin Baulig <martin@ximian.com>
15228 * mini-amd64.c (get_call_info): Fix support for generic instances.
15229 (add_valuetype): Use mono_class_from_mono_type() to get the class
15230 since we can be a generic instance.
15232 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
15234 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
15236 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
15238 * liveness.c: reset spill costs on each scan: bug 62107
15240 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
15242 * exceptions-sparc.c (mono_arch_find_jit_info): remove
15243 unnecessary line that doesn't compile
15245 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
15247 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
15248 trampolines, make them call an error function so people can fix their
15251 2004-09-06 Martin Baulig <martin@ximian.com>
15253 * mini.c (mono_method_to_ir): When initializing locals, handle a
15254 generic instances like a valuetype if it's a valuetype and like a
15255 class if it's a class.
15257 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15259 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
15260 stack. Fixes #64674.
15262 * exceptions.cs: Add test for unwinding of call arguments.
15264 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
15266 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
15267 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
15268 set the carry/borrow flag). The sparc and s390 implementations
15269 can now use optimized versions (and simplify the code). ppc bugfixes.
15271 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15273 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
15275 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
15277 * inssel-amd64.brg: Remove leftover 32 bit rule.
15279 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
15281 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
15283 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
15284 mono_arch_find_jit_info functions into a new function. Fix a memory
15287 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
15290 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15292 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
15295 * exceptions.cs: Add array size tests.
15297 * mini.c: Allocate a separate icall wrapper for each arity of
15298 mono_array_new_va. Fixes #59509.
15300 * exceptions.cs: Add testcase for 64578.
15302 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
15304 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
15306 2004-09-02 Martin Baulig <martin@ximian.com>
15308 * mini.c (mono_method_to_ir): When initializing the locals, call
15309 handle_initobj() on the generic instance itself, not its
15312 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15314 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
15315 MonoJitInfo for dynamic methods.
15317 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
15319 * mini.c: Add support for freeing JIT data for dynamic methods.
15321 2004-09-01 Martin Baulig <martin@ximian.com>
15323 * mini-x86.c (is_regsize_var): Added support for generic
15325 (mono_arch_emit_prolog): Make this compile again, use
15326 `x86_push_imm_template (code)'.
15328 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
15330 * mini-x86.c: make all push_imm instructions that get
15331 patched always emit the long form
15333 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
15335 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
15336 in a per-domain hash.
15338 * mini-amd64.c (merge_argument_class_from_type): Handle generic
15341 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
15343 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
15346 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
15349 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
15350 Beginnings of SSE2 support.
15352 * exceptions.cs: Add more tests for checked int<->uint casts.
15354 2004-08-28 Martin Baulig <martin@ximian.com>
15356 * mini-x86.c (mono_arch_instrument_epilog): Added support for
15360 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
15361 Handle generic instances recursively.
15363 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15365 * iltests.il: test for conv.u8 on a constant
15367 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15369 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
15370 LCONV_x4 (shrun_32 (membase)).
15372 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15374 * inssel-x86.brg: c&p rules for push/setret of long
15376 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
15378 * inssel-x86.brg: c&p rules for compare (base, regvar) and
15379 compare (regvar, base)
15381 * inssel-x86.brg: more burg love
15383 * inssel.brg: more cleanup
15385 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
15387 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
15389 * basic-long.cs, basic-calls.cs: new tests for optimization.
15391 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
15393 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
15396 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
15398 * mini-amd64.c (read_tls_offset_from_method): Add another case.
15400 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
15402 * inssel.brg (mini_emit_memcpy): use
15403 NO_UNALIGNED_ACCESS to disable memcpy optimization
15405 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
15407 * mini-amd64.c: Handle generic types in various places.
15409 * mini.c (mono_method_to_ir): Handle generic types in init locals.
15411 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
15413 * mini.c (handle_box): Fix warning.
15415 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
15417 * mini-amd64.h: Enable the emit_state optimization.
15419 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
15421 * mini-amd64.c: Add some new 64 bit peephole opts.
15423 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
15425 * cpu-amd64.md: sreg1 of div instructions must be %rax.
15427 * mini-amd64.c: Register allocator fixes.
15429 * mini.c: Add an optimization to emit_state to avoid allocation of new
15430 registers on some platforms.
15432 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
15434 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
15436 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
15437 allocation. Fixes #63085.
15439 * basic-long.cs: Add new regression test.
15441 * mini-amd64.c: Register allocator improvements.
15443 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
15445 * mini-amd64.c (read_tls_offset_from_method): Add another code
15448 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
15449 instruction sequence for nullifying class init trampolines.
15451 * objects.cs: Add new regalloc test.
15453 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
15455 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
15457 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
15459 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
15462 * driver.c: Fix profiling after TLS changes.
15464 * driver.c (mono_main): Set mono_stats.enabled if needed.
15466 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
15469 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
15471 * mini-x86.c: use a 1 op rather than a 2 op tls access
15472 instruction -> faster.
15474 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
15476 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15479 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
15481 * exceptions-sparc.c (throw_exception): fix typo
15483 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
15485 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
15486 set tree->dreg correctly with tls. Allow any
15487 register to be used.
15489 * mini-x86.c (read_tls_offset_from_method): add new code
15490 generation pattern seen with GCC.
15493 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15495 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
15496 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15497 exceptions-sparc.c: fix some performance issues in exception
15498 handling and setting of the stack trace for exceptions that were
15501 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
15503 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15506 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
15509 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
15511 This patch inlines tls access, when possible.
15513 * mini.h: new arch functions for TLS intrinsics.
15514 All platforms updated with a stub.
15516 * mini.c: use the new intrinsics
15518 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
15519 arch specific intrinsic for tls variables
15521 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
15523 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
15526 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
15528 * mini.c: thread local allocation
15530 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
15532 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
15534 * Makefile.am: Link against the static version of libmonogc.
15536 * Makefile.am: Link the static versions of the convenience libraries
15537 into the mono executable.
15539 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
15541 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
15543 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
15544 on integer overflow.
15546 * mini-amd64.c: Reorganize function call code.
15548 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
15550 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15552 * inssel-x86.brg: use xor eax,eax.
15554 * basic.cs: new tests
15556 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15558 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
15559 in exception throwing code.
15561 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15563 * inssel-x86.brg: use xor esi,esi.
15565 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15567 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
15568 can trace methods compiled during mini_init () too.
15570 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
15573 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15575 * Makefile.am: static link on x86 (r=zoltan)
15577 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15579 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
15580 code since it causes some programs to fail.
15582 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
15584 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
15586 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
15588 * mini.c: ovfops_op_map - add STACK_OBJ case for
15590 * basic.cs: add test_0_pin_string as test
15593 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
15595 * Makefile.am: build C# if srcdir != builddir
15597 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15599 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
15600 fall-through blocks.
15602 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15604 * driver.c: enable loop by default again and include abcrem in -O=all.
15606 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
15608 * iltests.il: Add some localloc tests.
15610 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
15612 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
15615 * inssel-amd64.brg: Add some optimizations.
15617 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
15620 * Makefile.am: Statically link mono against libmono on AMD64.
15622 * mini-amd64.c inssel-amd64.brg: Optimizations.
15624 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
15626 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
15628 * tramp-amd64.c: Patch calling code in trampolines.
15630 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
15632 * mini-amd64.c: pinvoke struct passing fixes.
15634 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
15636 * mini-sparc.c: redo change, make mono_arch_cpu_init call
15637 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
15639 2004-08-05 Duncan Mak <duncan@ximian.com>
15641 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15644 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15646 * mini-amd64.c (emit_move_return_value): Move return value for normal
15649 2004-08-05 Martin Baulig <martin@ximian.com>
15651 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
15652 `type->type'; just modify `type' itself when dealing with enums
15653 and generic instances.
15654 (check_call_signature): Make `simple_type' a `MonoType *'.
15656 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15658 * mini.c: Use OP_PADD to add offsets to addresses.
15660 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
15662 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
15664 * mini-sparc.c (mono_arch_emit_epilog): fix check
15665 for folding last op into restore instruction
15667 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15669 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
15670 helper methods using the code manager.
15672 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
15674 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
15676 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15678 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
15679 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
15681 * mini-s390.c: fix tail processing
15683 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
15685 * mini-ppc.c: mul.ovf.un exception name fix.
15687 2004-08-03 Martin Baulig <martin@ximian.com>
15689 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
15690 instances; before jumping to `handle_enum', also modify `ptype'.
15692 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
15694 * cpu-sparc.md: fcall maximal length too small.
15696 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
15698 * mini-amd64.c mini.h: Add initial support for passing/returning
15699 structures to/from pinvoked methods.
15701 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
15703 * mini-ppc.c: reg allocator fix.
15705 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
15707 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
15709 * inssel.brg: Optimize memset on 64 bit machines.
15711 * mini-amd64.c: Fix some vararg cases.
15713 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15715 * mini-s390.c: Corrected macro in emit_float_to_int
15717 * s390-abi.cs: Tests to exercise the s390 ABI
15719 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15721 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
15724 * basic.cs: Add a test for add.ovf.un.
15726 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
15728 * mini-sparc.c: add case for OP_IDIV_UN
15730 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15732 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
15734 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
15736 2004-07-30 Ben Maurer <bmaurer@ximian.com>
15738 * basic.cs: regression tests.
15740 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
15743 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15745 * basic.cs: Add a new test.
15747 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
15748 and AOT. Various fixes and optimizations.
15750 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
15752 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15754 * mini-ppc.c: make sure temp regs are not used for global reg
15757 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
15759 * cpu-sparc.md: conv_i8 fix for 64bits
15761 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
15763 2004-07-29 Ben Maurer <bmaurer@ximian.com>
15765 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
15766 add opcode for cmp BYTE PTR [eax], imm.
15768 * inssel.brg: Make memcpy and memset takes bases.
15770 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
15772 * *-amd64.*: More AMD64 work.
15774 2004-07-28 Ben Maurer <bmaurer@ximian.com>
15776 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
15777 add a compare-not-equal opcode.
15779 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
15781 * mini.c: Use mono_init_from_assembly instead of mono_init.
15783 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
15785 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
15787 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
15789 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
15791 * inssel.brg: 64 bit fixes.
15793 * mini.h (MonoCallInst): Add some AMD64 specific data.
15795 * mini.h: Add some OP_P opcodes.
15797 2004-07-28 Ben Maurer <bmaurer@ximian.com>
15799 * basic.cs: tests for 61797 and 61740
15801 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15803 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
15804 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
15806 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
15808 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
15810 * *-amd64*.*: Ongoing AMD64 work.
15812 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
15814 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
15816 * *-amd64*: Ongoing AMD64 work.
15818 * mini-arch.h: Add AMD64 support.
15820 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
15822 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
15824 * mini-ops.h: Add new opcodes.
15826 * Makefile.am: Add AMD64 support.
15828 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
15829 rules into the inssel-long*.brg files.
15831 * *-amd64.*: Add beginnings of AMD64 backend.
15833 2004-07-22 Ben Maurer <bmaurer@ximian.com>
15835 * mini.c (print_dfn): commenting out the code that prints
15836 the cil. With -O=deadce, this makes -v -v crash.
15838 * cpu-pentium.md: make checkthis have a length of 2
15840 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
15842 * mini-sparc.h: fix implementations of __builtin
15843 functions for Sun compiler for V9.
15845 2004-07-16 Ben Maurer <bmaurer@ximain.com>
15847 * mini.c: use the new stelem.ref wrapper
15848 * exceptions.cs, arrays.cs: new stelem.ref tests
15850 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15852 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
15853 new XSP should work with these changes).
15855 2004-07-14 Ben Maurer <bmaurer@ximain.com>
15857 * inssel-{long32,x86,}.brg: trivial optimizations.
15859 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15861 * mini.c: load value when emitting box operation in
15864 2004-07-12 Ben Maurer <bmaurer@ximian.com>
15866 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
15867 is one byte shorter than cmp DWORD PTR [eax], 0.
15869 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15871 * inssel-ppc.brg: arguments on the stack are always
15872 relative to the stack pointer (spotted by Neale Ferguson).
15874 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15876 * exceptions-x86.c: delay appending the method name to the trace until
15877 after mono_jit_info_table_find is called, as this gets the real
15880 2004-07-09 Ben Maurer <bmaurer@ximian.com>
15882 * aot.c: register roots
15884 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15886 * aot.c : I could just use PLATFORM_WIN32 flag.
15888 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15890 * aot.c : Reverting the previous fix. This time it broke linux build.
15892 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15894 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
15896 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
15898 * mini.c (handle_stack_args): Remove some more debugging code.
15900 * mini.c (handle_stack_args): Remove debug output left in by mistake.
15902 * driver.c mini.h aot.c: Allow additional options to be specified with
15903 --aot and pass them to mono_compile_assembly.
15905 * aot.c: Add experimental code to AOT compile all loaded assemblies
15906 on demand and save the code into a cache in the filesystem.
15908 * aot.c: Add support for more wrapper methods.
15910 * mini.c (handle_stack_args): Handle some corner cases. Fixes
15913 * cpu-*.md: Remove removed opcodes.
15915 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
15916 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
15917 related icalls to marshal.c.
15919 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
15921 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
15923 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
15925 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
15927 2004-07-06 Ben Maurer <bmaurer@ximian.com>
15928 * liveness.c: If liveness is recomputated we need to reset the information
15929 for each variable. This way, if the liveness range has been narrowed
15930 by optimizations that happened after the last computation, we can return
15933 For example, if you have
15938 // Tons of code that does not affect i
15944 i = 0 is dead code and will be removed by SSA. However, when
15945 linear scan gets to the code, i will still appear to be live
15946 throughout the entire block. This prevents good register allocation.
15948 2004-07-06 Martin Baulig <martin@ximian.com>
15950 * debug-mini.c (mono_debug_init_method): Allow
15951 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
15952 (mono_debug_add_icall_wrapper): New method.
15954 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
15956 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
15958 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
15961 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
15963 * aot.c (mono_aot_load_method): Fix loading of debug info.
15965 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15967 * aot.c: Add logging support.
15969 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
15971 * mini.h: Add prototype for mono_print_method_from_ip.
15973 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
15975 * inssel.brg: 64 bit fixes.
15977 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
15980 * Makefile.am: Add SPARC64 support.
15982 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15984 * aot.c: Fix alignment problems on 32 bit platforms.
15986 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
15988 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
15991 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
15994 * mini.h: Bump AOT file version. Some 64 bit fixes.
15996 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
15998 * inssel-sparc.brg: Add new rule to avoid register moves.
16000 * inssel.brg: Add ldind_to_load_membase helper function.
16002 2004-06-30 Ben Maurer <bmaurer@ximian.com>
16004 * mini.c: OffsetToStringData intrinsic.
16006 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
16008 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
16010 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
16013 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
16014 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16016 * mini.c: reinstated mono_compile_get_interface_var()
16017 on x86, too, since the change breaks the Gtk# build there as well.
16019 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16021 * driver.c: remove loop from the default optimizations: it seems to
16022 interact badly with some of the other options (see bug #60613).
16024 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
16026 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
16027 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
16029 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
16031 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
16032 vararg-using methods.
16034 2004-06-21 Martin Baulig <martin@ximian.com>
16036 * mini/mini-exceptions.c
16037 (mono_handle_exception): Added `gpointer original_ip' argument.
16038 After calling mono_unhandled_exception(), call
16039 mono_debugger_unhandled_exception() and if that returns true,
16040 restore the context and return.
16042 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
16044 * mini-ppc.c: prefer the use of relative branches so
16045 they won't need to be patched in aot code (patch from Patrick Beard).
16047 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16049 * aot.c: patch from Patrick Beard to make the output assembly
16050 more correct for the MacOSX assembler. Small tweak to
16051 generate sane images on Linux/PPC, too.
16053 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16055 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
16056 case until bug #59509 is fixed (shows up in #60332).
16058 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16060 * mini.c: make sure the needed wrappers are compiled, too, with
16063 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
16065 * driver.c: remove NPTL reference in --version output.
16067 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16069 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
16070 generate valid assembly for the Mach-O assembler.
16072 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16074 * driver.c: don't include abcrem in the all optimization specifier
16075 since it slows down jit compilation too much for now.
16077 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
16079 * mini.c: use BIGMUL only if both operands have the same signage.
16080 * iltests.il: Test for bug 60056. (errors related to signage in
16085 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
16087 * mini.c, aot.c: memory leak fixes.
16089 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16091 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
16093 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
16095 * Makefile.am: remove the -static hack completely, it links in
16096 statically glib as well.
16098 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
16100 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
16101 * exceptions.cs: make it compile with new mcs/csc.
16103 2004-06-03 Massimiliano Mantione <massi@ximian.com>
16104 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
16105 and added relevant test case.
16107 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16109 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
16110 regressions in gtk-sharp.
16112 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
16114 * exceptions.cs: New regression tests.
16116 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
16118 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
16120 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
16122 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
16124 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
16126 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
16128 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
16130 * mini.c (mono_jit_runtime_invoke): Init class in this
16131 method instead of trusting mono_jit_compile_method to
16132 do the work (because wrappers can be in object class)
16134 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
16136 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
16138 * basic-long.cs: New regression test.
16140 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
16142 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
16143 and div/rem checks.
16145 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
16147 * Makefile.am: fix miguel's change to build mono statically against
16148 libmono (track build dependencies).
16150 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
16152 * cfold.c: Some glib versions do not have G_MININT32.
16154 2004-05-26 Massimiliano Mantione <massi@ximian.com>
16156 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
16157 with precision of tan, atan, sin and cos, and implemented related
16158 regressions tests (fixes bug 54467, but one new problem appeared and
16161 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
16163 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
16165 * exceptions.cs: Add test for constant folding && division by zero.
16167 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
16168 since driver.c is in libmono too, so the optimization was useless.
16170 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
16171 variable to driver.c so the compiler can emit more efficient code to
16174 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16176 * Makefile.am: don't distribute generated inssel.[ch] files.
16178 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
16180 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
16181 into the default appdomain. Fixes #58707.
16183 * jit-icalls.c: Remove the broken approximation for truncl, doing
16184 no conversion is better.
16186 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
16189 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16191 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
16192 of the mcrxr instruction which is not available on some processors
16193 even if it's documented to be. Implement add and sub overflow correctly
16194 (still not complete for long unsigned). Speed up icalls a bit.
16196 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
16198 * mini.c (mono_jit_compile_method_with_opt): Make sure that
16199 we run .cctor in the current domain instead of target_domain.
16201 Fixes bug #58558, .cctor not being called in -O=shared.
16203 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16205 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
16207 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
16209 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
16210 which can be done with an imm8, do it that way.
16211 (mono_arch_output_basic_block): ditto for a jmp
16212 (mono_arch_emit_prolog): Computate maximum offset of a label.
16214 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
16216 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
16217 now tries to allocate prefered physical reg's for virtual
16218 regs. This reduces the number of emited spills/loads with
16219 20-30% on our core assemblies.
16221 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16223 * jit-icalls.c: truncl() is not needed and trunc() is
16224 the correct thing to do anyway (bug #58287).
16226 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
16228 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
16231 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16233 * driver.c: enable loop optimizations by default.
16235 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16237 * mini-x86.c: fix calc of max loop size when aligning loops start.
16239 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
16241 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
16244 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
16246 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
16249 * basic-long.cs: Add tests for add/subtract of immediates with carry.
16251 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
16253 * mini.c (inline_method): Allways inline some wrappers even if the cost
16254 is too large. Fixes #58785.
16256 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
16258 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
16260 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
16261 (crichton@gimp.org). Beginning of support for sparc/linux.
16263 * mini-sparc.c: Optimize retrieval of LMF address.
16265 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
16267 * exceptions-ppc.c: handle alloca in methods with clauses.
16269 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
16271 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
16273 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
16275 * mini.c: Delegate most of the abort signal work to
16276 mono_thread_request_interruption, which also handles Stop and Suspend
16279 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
16281 * mini.c mini.h: Allow inlining of icall wrappers if the backend
16282 supports the save/restore lmf opcodes.
16284 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
16286 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
16287 by gcc-3.4 as well.
16289 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
16291 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
16293 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
16294 methods which contain array accesses.
16296 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
16297 boundaries. Fixes #58537.
16299 * iltests.il: Add regression test for #58537.
16301 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
16303 * mini-x86.c (mono_arch_local_regalloc): Last part of
16304 fix for bug #58633 (releasing register to early).
16306 2004-05-18 Miguel de Icaza <miguel@ximian.com>
16308 * basic-long.cs: Add new regression test.
16310 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
16312 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
16313 register too early on the chain.
16315 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
16317 * mini.c (create_helper_signature): Use a helper function to reduce
16318 the code which needs to be written. Also set the calling convention of
16319 icalls on windows. Fixes #57840.
16321 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16323 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
16324 exceptions-ppc.c: added helper function to get the instruction address
16325 from a signal handler context.
16327 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
16329 * helpers.c: use g_get_tmp_dir. Invokes happyness
16332 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
16334 * helpers.c: Add new env variable to pass args to objdump.
16335 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
16337 2004-05-17 Radek Doulik <rodo@ximian.com>
16339 * Makefile.am (common_sources): added abcremoval.h so it get
16340 disted and daily mono packages on go-mono.com will build again
16342 2004-05-17 Massimiliano Mantione <massi@ximian.com>
16344 * abcremoval.c: Fixed coding style, added copyright header.
16346 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
16348 * mini.h: Added prototype for abc removal main function.
16350 * build_relations_propagation_table.pl: Added copyright header.
16352 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
16354 * basic-long.cs: reg test for complex ceq_long bug.
16356 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
16358 * mini-x86.c (mono_arch_local_regalloc): Correctly free
16359 reg in long and clob case (bug #58343). Fixed/added comments.
16361 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
16363 * mini.c (mono_jit_runtime_invoke): Follow new convention
16364 of calling the invoke method with an function pointer.
16366 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
16368 * ChangeLog: Fix author of memory leak patch.
16370 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
16372 * Makefile.am: fix make dist as well...
16375 2004-05-14 Massimiliano Mantione <massi@ximian.com>
16377 * cfold.c: Made so that conversions from pointer to int4 are no-ops
16378 on archs where pointers are 4 bytes long.
16380 * Makefile.am: Added abcremoval.c source file.
16382 * abcremoval.c: Added abcremoval.c.
16384 * abcremoval.h: Added abcremoval.h.
16386 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
16388 * inssel.brg: Enabled bounds check removal.
16390 * mini.c: Added support for abcrem optimization.
16392 * mini.h: Added abcrem optimization label.
16394 * driver.c: Added support for abcrem optimization.
16396 * propagated_relations_table.def: Added propagated_relations_table.def.
16398 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
16400 * mini.c, cfold.c: fix style.
16402 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16404 * mini.c: handle issue with the low-level implementation of
16405 some long opcodes (bug #54209).
16407 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
16409 * basic.cs: test for my new cmov stuff.
16411 2004-05-13 Patrik Torstensson
16413 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
16414 opt and added peephole documentation.
16416 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
16418 * tramp-ppc.c: rewrote the generic trampoline code.
16420 2004-05-11 Patrik Torstensson
16422 * mini-x86.c: optimize long shl/shr asm code (one less branch)
16424 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
16426 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
16428 * mini.h mini.c dominators.c: Applied patch from Derek Woo
16429 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
16431 * mini.c: Add new icalls for AsAny marshalling.
16433 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16435 * tramp-ppc.c, mini-ppc.c: more cleanups.
16437 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16439 * mini.c: no warnings.
16441 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16443 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
16445 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
16447 * mini.c: In the thread abort signal handler, if the thread is in the
16448 process of being stoped, don't throw the Abort exception, just stop the
16451 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
16453 * tramp-ppc.c: removed old code.
16455 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16457 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
16458 do some simple speed optimizations on ppc.
16460 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16462 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
16463 and large offsets in load/store.
16465 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
16467 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
16468 it causes regressions.
16470 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
16472 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
16475 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16477 * jit-icalls.c: remove warnings.
16478 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
16479 speedups for unsafe code.
16481 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
16483 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
16485 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
16487 * basic-calls.cs: Add new regression test.
16489 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
16492 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
16494 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
16497 2004-05-06 Patrik Torstensson
16499 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
16500 long reg allocation in any reg (not only eax:edx) and implemented
16501 long shl/shr ops in asm instead of helpers.
16503 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
16505 * mini-sparc.h: Fix warnings.
16507 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
16510 * mini-exceptions.c (mono_handle_exception): Call the filter in a
16511 separate statement for clarity.
16513 * mini-sparc.c: Update status.
16515 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
16517 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
16520 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16522 * inssel-ppc.brg: another small pre-release workaround:
16523 we don't do overflow detection for long_sub_un.
16525 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16527 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
16528 (also works around a weird ppc bug: 57957).
16530 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
16532 * tramp-ppc.c: trampoline fixes.
16534 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
16536 * mini-ppc.c: fixed typos.
16538 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16540 * mini-ppc.c, exceptions-ppc.c: more code saves registers
16541 at the top of the stack. Fixed typos. Use a frame registers
16542 for all the methods with exception clauses.
16544 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16546 * exceptions-ppc.c: restore fp registers.
16548 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16550 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
16551 order from the stack top (moved the stack room to save the
16552 return value for trace after the param area). Fixed corruption
16553 in restoring registers on unwind.
16555 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16557 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
16559 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16561 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
16562 and prolog/epilog for methods that use it. Allow
16563 enough param area room for varargs methods. Fix miguel's
16564 breakage in exception handling.
16566 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16568 * Makefile.am: run genmdesc only on current arch.
16570 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16572 * exceptions-x86.c:
16573 * mini-x86.h: fix the build on windows.
16575 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
16577 * 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.
16579 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
16581 * mini-exceptions.c: New file.
16583 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
16584 Move some parts of the x86 exception handling code to an
16585 arch-independent file so it can be shared with other ports.
16587 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16589 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
16591 2004-04-26 David Waite <mass@akuma.org>
16593 * driver.c: remove comma from end of enumeration declaration
16595 2004-04-26 Jackson Harper <jackson@ximian.com>
16597 * driver.c: parse config file before loading first assembly. This
16598 allows the user gac to be enabled/disabled.
16600 2004-04-23 Miguel de Icaza <miguel@ximian.com>
16602 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
16603 simpler mechanism: we do not care what is encoded initially
16604 (branch absolute or relative), we care about the code and its
16605 target. I kept the old code for reference for now.
16607 The new code tries first to determine if the jump is anywhere in
16608 the -/+32 absolute meg range, if it succeeds, it encodes using the
16609 absolute branch; If not, it tried to find something in the
16610 relative range, if not, it uses the handle_thunk code.
16612 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
16614 * exceptions-ppc.c: use the correct ip register on macosx.
16616 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
16618 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
16620 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
16622 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
16623 Raise exception on integer divide by zero by hand since the hw
16624 doesn't support it. Handle NaNs in FP compares.
16626 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
16628 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
16629 code reducing duplication between the platforms and enabled
16630 signal exception handling (on linux for now).
16632 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
16634 * exceptions-ppc.c: more macosx support.
16636 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16638 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
16640 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
16642 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
16644 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
16646 * iltests.il: more tests.
16648 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
16650 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
16653 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16655 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
16657 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
16659 * liveness.c: Mark variables as volatile in all basic blocks reachable
16660 from exception clauses.
16662 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
16664 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
16667 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
16669 * iltests.il, basic.cs: more tests for regalloc.
16671 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
16673 * iltests.il: Some tests for register allocation modifications
16676 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
16678 * exceptions.cs: Add regression test for bug #56782.
16680 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
16681 original stack trace if an exception is rethrown. Fixes #56782. Oh,
16682 the beauty of fixing the same thing in 5 different files...
16684 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
16686 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
16689 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
16691 * mini.c: Add support for STRWLPARRAY marshalling convention.
16693 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16695 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
16696 to init the context to setup the regs pointer).
16698 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16700 * exceptions-ppc.c: more exceptions work.
16702 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16704 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
16707 2004-04-13 Miguel de Icaza <miguel@ximian.com>
16709 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
16710 can use the memory directly.
16712 * cpu-pentium.md: Update documentation from a post from Zoltan.
16714 add x86_add_membase, x86_sub_membase, x86_mul_membase
16716 2004-04-13 Miguel de Icaza <miguel@ximian.com>
16718 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
16719 GENERAL_REGS they were also hardcoded for all PPC ports.
16721 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
16723 Remove hard-coded limit for floating point registers, use
16724 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
16726 Notice that in MacOS X calling conventions you can fit a lot more
16727 floating point values in registers, so I should update the PInvoke
16728 test to excercise the passing of floating point values on the
16729 stack (currently broken).
16731 2004-04-06 Miguel de Icaza <miguel@ximian.com>
16733 * tramp-ppc.c (create_trampoline_code): Added
16734 JUMP_TRAMPOLINE_SIZE.
16735 (ppc_magic_trampoline): Follow the pattern from
16736 x86_magic_trampoline: if code is set to zero, return.
16737 (create_trampoline_code): Always pass MonoMethod to the jump
16738 trampoline, before it was passing a null.
16739 (mono_arch_create_jump_trampoline): Implement the jump stub, could
16740 share the code with mono_arch_create_jit_trampoline.
16742 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
16744 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
16747 * cpu-g4.md: Added length for jmp instruction, the worst case
16748 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
16751 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
16753 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
16755 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
16757 * mini.c: Only set bblock->real_offset when adding a new bblock, and
16758 before each IL instruction.
16760 * mini.c (CEE_BOX): Fix warnings.
16762 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16764 * mini.c: removed a few unused vars and extra whitespace.
16766 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
16768 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
16770 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
16772 (OP_GETCHR): use the above
16773 (CEE_LDELEMA): use the above.
16775 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
16776 version of the generic impl.
16777 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
16778 (CEE_LDELEMA): use the above.
16780 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
16782 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
16785 * iltests.il: Added new regression test for #56317.
16787 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
16789 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
16790 under NetBSD. Fixes #56450.
16792 * liveness.c (update_gen_kill_set): Fix previous patch.
16794 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16796 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
16798 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
16800 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
16801 ldsfld and ldsflda.
16803 * inssel-sparc.brg: Add more optimizations.
16805 * mini-sparc.c: Replace multiply/divide with shifts if possible.
16807 2004-04-01 Martin Baulig <martin@ximian.com>
16809 * mini.c (handle_box): New static function; moved the
16810 implementation of CEE_BOX here.
16811 (mono_method_to_ir): Added `constrained_call' variable.
16812 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
16813 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
16814 mono_method_get_constrained() to get the method.
16816 2004-04-01 Martin Baulig <martin@ximian.com>
16818 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
16819 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
16820 (mono_method_to_ir): We don't need these macros anymore since
16821 mono_class_get_full() already takes care of it.
16823 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16825 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
16826 use @function (as doesn't accept #function here) and check the return
16827 value of system and stop if fails.
16829 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16831 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
16833 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
16835 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
16837 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
16839 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
16842 * basic-long.cs: Add test for negation of Int64.MinValue.
16844 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
16846 * mini-sparc.c: Update status.
16848 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
16850 * exceptions-sparc.c: Fix return value in filters.
16852 * inssel-sparc.brg: Fix register allocation in some rules.
16854 2004-03-28 Martin Baulig <martin@ximian.com>
16856 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
16859 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
16861 * mini-x86.c (mono_arch_patch_code): Fix warnings.
16863 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
16864 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
16865 remove unused conv_u4 opcode.
16867 * mini-x86.c: Remove valgrind workaround since it slows down things
16868 even when mono is not run under valgrind.
16870 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
16872 * mini-sparc.c: Update status.
16874 * inssel-sparc.brg: Add some optimizations.
16876 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
16877 future delay slot filling. Add support for varargs, tail calls and JMP.
16879 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
16880 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
16882 * inssel.brg: Fix register allocation in OP_ARGLIST.
16884 * inssel.brg: Fix warnings.
16886 2004-03-25 Martin Baulig <martin@ximian.com>
16888 * mini.c (inflate_generic_field): Removed.
16889 (mini_get_method): Removed, use mono_get_method_full(),
16890 (mini_get_class): Removed, use mono_class_get_full().
16891 (mono_method_to_ir): Pass our generic context to
16892 mono_field_from_token().
16894 2004-03-25 Martin Baulig <martin@ximian.com>
16896 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
16897 of a `MonoMethod *'.
16898 (mini_get_method): Take a `MonoGenericContext *' instead
16899 of a `MonoMethod *'.
16900 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
16901 a new local variable called `generic_context' which holds the
16902 current `MonoGenericContext *'; use it to lookup things.
16904 2004-03-24 Martin Baulig <martin@ximian.com>
16906 * mini.c (mini_get_class): New static method; if we're inside a
16907 generic instance, inflate the class if neccessary.
16908 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
16910 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
16912 * iltests.il: New regression test for #55976.
16914 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
16917 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
16919 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
16922 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
16924 * liveness.c: Consider SSA stores as well as loads when making vars
16927 * exceptions.cs: New regression tests for register allocation.
16929 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
16931 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
16932 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
16933 domain lock only to protect puntual access to data structures.
16934 Added access lock for sighash, jit_icall_hash_name,
16935 jit_icall_hash_addr and domain->code_mp.
16937 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
16939 * driver.c: Print SIGSEGV handling method.
16941 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
16943 * mini.c (setup_jit_tls_data): Handle case when this is called
16944 multiple times for a thread.
16946 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
16947 is different from fbxx_un. Fixes #54303. Also use constants instead of
16948 magic numbers in a lot of places.
16950 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
16952 * exceptions.cs: Fix cctor test when --regression is used.
16954 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
16956 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
16959 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16961 * inssel-ppc.brg: fixed register assignments for some rules.
16963 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
16965 * exceptions.cs: Add test for exceptions in static constructors.
16967 * mini.c (mono_jit_compile_method_with_out): Move the calling of
16968 static constructors outside the domain lock. Fixes #55720.
16970 2004-03-17 Martin Baulig <martin@ximian.com>
16972 * mini.c (get_generic_field_inst): Removed, this'll never happen.
16973 (inflate_generic_field): Take the `MonoMethod *' instead of the
16974 `MonoClass *' and added support for generic method.
16975 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
16976 have a `field->parent->gen_params', only inflate the field if it's
16977 an open constructed type.
16979 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
16981 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
16982 exception object instead of the preconstructed ones.
16984 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16986 * mini.c: reverted changed to sigsegv_signal_handler commited
16987 accidentally in the previous patch.
16989 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16992 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
16993 running --aot with an old assembly.
16995 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
16997 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
17000 * mini-sparc.c: Add support for v9 branches with prediction.
17002 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
17004 * mini.c (mini_init): #warning is GNUC only
17006 * mini-sparc.h: implement __builtin_frame_address
17007 and __builtin_return_address for Sun C compiler
17009 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
17011 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
17013 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
17015 * basic-calls.cs: Add test for unaligned byref long argument passing.
17017 * mini-ops.h: Add sparcv9 compare and branch instructions.
17019 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
17020 v9 instructions if we have a v9 cpu.
17022 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
17023 registers for global allocation.
17025 * exceptions-sparc.c: Fixes.
17027 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
17029 * liveness.c (mono_analyze_liveness): Optimized version.
17031 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
17033 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
17036 * basic-float.cs basic-calls.cs: New regression tests.
17038 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
17040 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
17041 sigaltstack implementation.
17043 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
17045 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
17046 stuff if SIGSEGV_ON_ALTSTACK is not defined.
17048 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
17050 * mini.c: Fix warnings.
17052 * mini.c (mono_resolve_patch_target): New function which contains the
17053 arch independent part of the patching process.
17055 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
17056 patching code to a separate function.
17058 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
17060 * mini.c (add_signal_handler): ifdef out on Windows
17062 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
17064 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
17065 cpu-sparc.md: Add exception handling support + other fixes.
17067 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
17068 typed GC detection in --version.
17070 * basic.cs exceptions.cs: New regression tests.
17072 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
17073 the arch specific code can store data during a compilation.
17075 * mini-ops.h: Add OP_SETFRET.
17077 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
17078 function, register a separate icall for each arity, so the icalls can
17081 * mini.c (mono_print_tree): Print negative offsets in a more readable
17084 * mini.c: Make signal handling work on sparc.
17086 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
17088 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
17090 * jit-icalls.c: Emulate truncl by aintl on solaris.
17092 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
17094 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
17096 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
17098 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
17100 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
17101 a MarshalByRef type, inline a method that performs the check, taking into
17102 account that the object can be a proxy. Also implemented tow new opcodes:
17103 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
17104 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
17105 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
17107 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
17109 * mini-ppc.c: if a relative branch displacement is too big
17110 but it points to and area reachable with an absolute branch,
17113 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
17115 * mini.c: optimize small copies in cpblk.
17117 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
17119 * basic-calls.cs basic-float.cs: New regression tests.
17121 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
17122 negative offsets from %fp. Implement localloc. Fix local register
17123 allocation. Fix the case when the this argument needs to be saved to
17124 the stack. Implement some missing opcodes.
17126 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
17128 * mini.c (mini_method_compile): Reenable global regalloc in methods
17129 with exception handlers.
17131 * linear-scan.c (mono_varlist_sort): Fix warning.
17133 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
17135 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
17138 * liveness.c: Make all variables uses in exception clauses volatile, to
17139 prevent them from being allocated to registers. Fixes #42136.
17141 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
17143 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
17144 causes regressions.
17146 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
17147 argument to mono_arch_regalloc_cost.
17149 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
17152 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
17154 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
17155 Make the cost of allocating a variable to a register arch dependent.
17157 * basic-calls.cs: Fix compilation of tests.
17159 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
17160 helper function to cut back on the number of #ifdefs needed.
17162 * mini-ppc.c: Fix compilation.
17164 * basic-calls.cs: New regression tests.
17166 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
17168 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
17169 of l0 since that is callee saved.
17171 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
17174 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
17175 of delay instruction.
17177 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
17179 * mini.h (MonoCallInst): Add 'virtual' flag.
17181 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
17183 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
17185 * *.cs: New regression tests.
17187 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
17190 * mini.c (mono_runtime_install_handlers): Fix build.
17192 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
17193 'signal_stack_size' members.
17195 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
17196 alternate signal stack.
17198 * exceptions-x86.c: Add stack overflow handling.
17200 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
17201 functions to arch independent code.
17203 * mini.c (mono_print_tree): Print more detailed info for load_membase
17206 2004-02-23 Martin Baulig <martin@ximian.com>
17208 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
17210 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
17212 * mini-x86.c: fixed reg allocation for div/rem.
17214 2004-02-22 Miguel de Icaza <miguel@ximian.com>
17216 * driver.c (mono_main): Report some configuratio options on --version.
17218 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
17220 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
17221 low in the address space. Correctly flush memory in thunks where we
17222 output native code.
17224 2004-02-20 Martin Baulig <martin@ximian.com>
17226 * mini.c (mini_get_method): New static method; inflate all generic
17227 methods and methods in open generic instances.
17228 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
17229 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
17231 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
17233 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
17235 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
17237 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
17239 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
17241 * mini-sparc.c (flushi mono_arch_output_basic_block): make
17242 it compile using Sun's compiler.
17244 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
17246 * 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.
17248 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
17250 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17252 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
17254 * mini-ppc.c: handle calls outside of the allowed range with thunks
17255 allocated using the code manager.
17256 * tramp-ppc.c: use the code manager to hold generated native code.
17257 Fixed the magic trampoline to just patch vtable entries.
17259 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
17261 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
17264 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
17266 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
17269 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
17270 if we have a working __thread implementation.
17272 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
17273 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
17275 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
17277 * mini-x86.c: Fix compilation under gcc 2.
17279 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
17281 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
17282 contains a call to the wrapped function.
17284 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
17285 OP_<CALL>_IMM opcodes, and use them under X86.
17287 * mini.c (mono_jit_find_compiled_method): Fix warning.
17289 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
17291 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
17293 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
17294 functionality to mini.c.
17296 * mini.c (mono_create_jump_trampoline): New function to create a jump
17297 trampoline. Return a compiled method instead of a trampoline if it
17298 exists. Add a cache for jump trampolines.
17300 * mini.c (mono_jit_find_compiled_method): New function to return a
17301 compiled method if it exists.
17303 * mini-x86.c: Call mono_create_jump_trampoline instead of
17304 mono_arch_create_jit_trampoline.
17306 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
17307 a jump trampoline. Fixes #52092.
17309 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
17311 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
17312 which is not up-to-date. Add check_corlib_version () instead.
17314 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
17317 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
17318 since newer valgrind versions do not need it.
17320 * mini.c (mono_jit_compile_method_with_opt): New helper function to
17321 compile a method with a given set of optimizations.
17323 * mini.c: Compile icall wrappers on-demand instead of at startup.
17325 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
17326 wrapper for an icall.
17328 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
17330 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
17333 * iltests.il: Add test for non-empty stack before switch instruction.
17335 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
17337 * mini.c: Add support for new stringbuilder marshalling conventions.
17339 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
17341 2004-02-01 Martin Baulig <martin@ximian.com>
17343 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
17344 in `ginst->mtype_argv'.
17346 2004-01-31 Miguel de Icaza <miguel@ximian.com>
17348 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
17349 facilitate grepping.
17351 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
17353 * mini.c: fixed buglet in initobj generic implementation for references.
17355 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
17357 * Makefile.am: make the version script conditional.
17358 * jit-icalls.c: handle missing truncl().
17360 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
17362 * exceptions.cs: Add more tests for double->int conversion.
17364 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
17365 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
17367 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
17369 * driver.c: make --verbose --version emit an error
17370 if the loaded corlib doesn't match the runtime version.
17372 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17374 * mini-ppc.h: export ppc_patch().
17375 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
17376 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
17377 on par or better than on MacOSX.
17379 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
17381 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
17382 mono_lookup_pinvoke_call.
17384 * mini-x86.c: Under windows, the default pinvoke calling convention is
17385 stdcall. Fixes #52834.
17387 * mini.c (optimize_branches): Add an upper bound to the number of
17388 iterations to prevent infinite loops on strange loops. Fixes #53003.
17390 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
17392 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
17393 and ISINST. Fixes #52093.
17395 * objects.cs (test_0_vector_array_cast): New tests.
17397 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
17399 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
17400 checking in Array.Set ().
17402 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
17405 * object.cs (test_0_multi_array_cast): New regression test.
17407 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
17409 * exceptions-ppc.c: fix build on Linux/PPC.
17411 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
17413 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
17414 running under valgrind.
17415 (x86_magic_trampoline): Fix build bustage.
17417 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
17418 negative values as well. This is needed for the encoding of the line number
17419 info, since sometimes the line numbers are not in increasing order.
17421 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
17423 * cpu-pentium.md (localloc): Increase the size of the localloc
17424 instruction since it is a loop under Win32.
17426 * debug-mini.c (record_line_number): Get rid of unneccesary memory
17429 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
17431 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
17432 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
17433 Max Horn (max@quendi.de). Fix file names in comments.
17435 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
17437 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
17438 avoid stack overflow.
17439 (replace_usage): Avoid uninitialized variable warnings.
17441 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
17442 and taking the address of valuetype variables.
17444 2004-01-03 Patrik Torstensson
17446 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
17447 for other purposes than FP later on.
17449 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
17451 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
17454 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17456 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
17458 2003-12-30 Patrik Torstensson <p@rxc.se>
17460 * mini-x86.h: Decreased number of availiable fp regs.
17461 Solves corner cases with FP spilling.
17463 2003-12-23 Patrik Torstensson <p@rxc.se>
17465 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
17466 for floating point stack tracking / spilling on x86.
17469 * basic-float.cs: added float mul overflow test.
17471 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
17473 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
17475 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17477 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
17478 supports for cond branches that overflow the immediate
17479 overflow offset. mcs can compile simple programs.
17481 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17483 * exceptions-ppc.c: exception handling support wip:
17484 finally handlers get run on exception.
17486 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
17488 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
17491 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17493 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
17494 initial support for stack walking and unwinding.
17496 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
17498 * driver.c (mono_main): Make corlib-out-of-sync message more
17499 descriptive. Also remove verify_corlib call.
17501 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17503 * mini.c: make CEE_NEWARR calls and other emulated opcodes
17504 not overlap with other call's arguments, too.
17506 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
17508 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
17509 move to arch-specific code the choice of arch-specific
17510 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
17511 * mini.c: ensure emulation calls will not interleave
17514 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
17516 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
17517 the magic trampoline stack frame is dropped before executing
17520 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17522 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
17523 and integer to fp conversions. Added support for overflowing
17524 arguments on the stack. Reserve a couple more registers as temps.
17525 Added support for aot compilation (as output still needs to be
17528 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17530 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
17531 Don't overwrite return register in some corner cases.
17533 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
17535 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
17536 static constructors when AOT compiling.
17538 * driver.c (mono_main): Call mono_check_corlib_version.
17540 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17542 * cpu-g4.md, basic.cs: fixed div target register.
17544 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
17546 * mini-ppc.c, basic.cs: shl_imm fix with test.
17548 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17550 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
17551 structures by value. Misc fixes.
17552 * objects.cs: more tests.
17554 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
17556 * mini-ppc.c: lconv.ovf.i implemented.
17558 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17561 (mini_init): don't error out if someone already called g_thread_init.
17563 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17565 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
17566 to be any type per the spec. Fix abnormal memory usage when
17567 the same object is repeatedly thrown.
17569 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
17571 * mini.c: check for overruns in IL code.
17573 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
17575 * TODO: Add/remove some todo entries.
17577 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
17579 * driver.c (mono_main): Call mono_verify_corlib.
17581 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
17583 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
17584 This has been moved to mini.c
17585 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
17586 type being casted is marshalbyref it could be a proxy, so instead of
17587 emitting the type check code, emit a call to a runtime method that will
17588 perform the check by calling CanCastTo if needed.
17590 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
17592 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
17593 methods with large stack frames under Win32.
17595 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
17597 * Makefile.am: Distribute regression tests.
17599 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
17600 at the end instead of inserting each variable into the sorted list.
17602 * linear-scan.c (mono_varlist_sort): New helper function.
17604 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17606 * mini.c: ensure arguments and locals are within bounds.
17608 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17610 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
17613 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
17615 * mini.c (mono_cprop_copy_values): Fix crash.
17617 * aot.c: Set verbosity back to 0.
17619 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17621 * regalloc.c: complete memory leak fix by Laurent Morichetti
17624 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
17626 * driver.c (main_thread_handler): Revert the previous patch.
17628 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
17631 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
17632 memory from the memory pool.
17634 * driver.c (main_thread_handler): Turn on all optimizations when
17637 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
17638 an array for better performance.
17640 * regalloc.c (mono_regstate_assign): Fix memory leak.
17642 * debug-mini.c (mono_debug_serialize_debug_info): New function to
17643 serialize the debug info.
17645 * debug-mini.c (mono_debug_add_aot_method): New function to load the
17646 debug info from the serialized representation.
17648 * aot.c: Save debug info into the generated file and load it when
17651 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17653 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17655 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
17656 More FP-related fixes.
17658 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17660 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
17661 and register allocation buglet. Hello world now runs.
17663 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17665 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
17666 * tramp-ppc.c: fixed class init trampoline.
17667 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
17669 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17671 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
17672 mini.c: more ppc changes/fixes.
17674 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
17676 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
17677 Also optimize the case when the arguments are the same in the caller
17680 * iltests.il: Add tests for tail calls with valuetype arguments.
17682 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17684 * mini-ppc.c: fixes for struct return type.
17686 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
17688 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17689 mono_spillvar_offset() to arch-specific code.
17691 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17693 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
17695 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
17697 * exceptions-x86.c: Fix stack space leaks.
17699 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
17700 registers from the lmf if the method has save_lmf set.
17702 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
17704 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
17705 of icall wrappers into InvokeInDomain, since these are now per-domain.
17707 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
17709 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
17710 make some opcode emulation and intrinsic ops enabled/disabled
17711 according to the architecture. More fixes.
17713 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17715 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
17717 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17719 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17720 arch-specific handling for 'this' and struct return type to
17721 arch-specific code.
17723 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17725 * aot.c: prevent divide by zero error when reporting (it happened with
17726 Accessibility.dll).
17728 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
17730 * mini.h (inst_switch): Remove unused macro.
17732 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17735 (load_aot_module): free 'info->methods' and 'info' properly. No more
17736 "free(): invalid pointer blah" messages when you have an old aot
17739 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
17741 * jit-icalls.c, mini.c: Added support for context static fields.
17743 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
17745 * mini.c (mono_method_blittable): Methods which set LastError are not
17746 blittable either. Fixes #51108.
17748 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17750 * mini.c: flush icache.
17751 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
17753 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
17755 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
17757 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
17759 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
17762 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
17765 * inssel.brg (CEE_MKREFANY): Fix AOT case.
17767 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
17769 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
17770 instruction when the result is discarded.
17772 * iltests.il (test_0_div_regalloc): New regression test.
17774 * arrays.cs: Fix compilation error.
17776 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
17778 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
17779 float rules to inssel-x86.brg: sane architectures with FP registers
17780 don't need to implement these rules.
17782 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17784 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
17786 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17788 * mini.h, inssel-long32.brg: fixed endianess issues in int64
17789 implementation of 32 bit systems.
17791 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17793 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
17794 (Jeroen Zwartepoorte).
17796 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
17798 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
17799 the caller and the callee matches.
17801 * mini.c (mono_method_to_ir): Add comment.
17803 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
17804 signbit is missing on some platforms.
17806 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
17808 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
17810 * mini.c (setup_jit_tls_data): Call the new function.
17812 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
17814 * mini-x86.c: Add experimental support for fast access to the lmf
17815 structure under NPTL/Linux 2.6.x.
17817 2003-11-06 Martin Baulig <martin@ximian.com>
17819 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
17820 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
17823 2003-11-02 Martin Baulig <martin@ximian.com>
17825 * mini.c (inflate_generic_field): New static method.
17826 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
17827 generic instance and the field is declared in a generic type, call
17828 inflate_generic_field() to inflate it. Fixes gen-28.cs.
17830 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
17832 * mini.h mini.c (mono_method_same_domain): New function to return
17833 whenever the caller and the callee are in the same domain.
17835 * tramp-x86.c (x86_magic_trampoline): Use the new function.
17837 2003-10-30 Martin Baulig <martin@ximian.com>
17839 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
17840 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
17842 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
17843 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
17845 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
17847 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
17850 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
17851 object here, so it is in the correct appdomain etc.
17853 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
17855 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
17857 (mono_method_to_ir): Avoid freeing the type created returned from
17858 mono_type_create_from_typespec, since it is put into an internal cache
17859 by the function. Fixes pointer.exe.
17861 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
17862 trampolines for icalls and pinvokes as well. Fixes #33569.
17864 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
17866 * mini.c: Update after appdomain changes.
17868 * mini.c (mono_jit_compile_method_inner): Allways compile native
17869 method wrappers in the root domain, since there can only be one
17870 instance of them, whose address is stored in method->info.
17872 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
17874 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
17875 environment variable. Instead detect automatically whenever running
17876 under valgrind using the magic macro RUNNING_ON_VALGRIND from
17879 2003-10-16 Miguel de Icaza <miguel@ximian.com>
17881 * trace.c, trace.h: New files that implement the new trace option
17884 * driver.c: Document new --trace options.
17886 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
17889 - if (mono_jit_trace_calls)
17890 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
17892 * mini.h: prototypes.
17894 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
17896 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
17898 * mini.c inssel.brg: Implement typedefbyref opcodes.
17900 * mini.c (mono_jit_compile_method): Remove unused local variable.
17902 * mini.c (mono_jit_compile_method_inner): Ditto.
17904 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
17906 * tramp-x86.c (x86_class_init_trampoline): Fix build.
17908 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
17910 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
17912 * mini.c (mono_no_aot): Remove unused global variable.
17914 * mini.c: Thread safety fixes.
17916 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
17918 * mini.c (mono_create_class_init_trampoline): Add a lock around
17919 class_init_hash_addr.
17921 * arrays.cs (test_0_newarr_emulation): Add new regression test for
17924 * mini.c: Decompose the NEWARR instruction before decomposing its
17925 arguments. Fixes #30073.
17927 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
17929 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
17932 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
17934 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
17936 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
17938 * driver.c: Add support for compiling icall wrappers to --compile.
17940 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
17942 * inssel.brg: The empty value in class->interface_offsets is -1, not
17945 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
17947 * objects.cs: New test for 'is' operator on an array of interfaces.
17949 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17951 * tramp-ppc.c: update trampoline code to support jumps
17952 and class initialization.
17954 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
17956 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
17958 * inssel.brg (OP_UNBOXCAST): Fix #46027.
17960 * inssel.brg (OP_UNBOX): Remove unused rule.
17962 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
17963 region instead of one for each method. Fixes #47813.
17965 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
17967 * exceptions.cs (test_0_nested_finally): New regression test for
17968 nested exception handlers.
17970 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
17972 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
17974 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
17977 * mini.c (mono_method_check_inlining): Make the inlining limit
17978 configurable by an environment variable.
17980 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
17982 * mini.h: Bump AOT file version.
17984 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
17985 token, store the image along with the token, since the token might not
17986 refer to the same image as the method containing the relocation,
17987 because of inlining.
17989 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
17991 * mini.c (mono_precompile_assemblies): New function to compile
17992 all methods in all loaded assemblies.
17994 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
17996 * regalloc.h regalloc.c (MonoRegState): Change the type of
17997 iassign and fassign to int*, since they can contain large negative
17998 values if the register is spilled. Also added some comments. Fixes
18001 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
18002 under Win32. Fixes #42964.
18004 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
18006 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
18008 * aot.c: Added support for AOT compiling methods which contain calls
18009 to wrappers. Currently, only remoting-invoke-with-check wrappers are
18012 * driver.c (compile_all_methods): Run the compilation in a thread
18013 managed by mono. Fixes #44023.
18015 * mini.c (mono_codegen): Print full method name in verbose output.
18017 * mini-x86.c (mono_arch_patch_code): Fix warning.
18019 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
18020 jumps, since the method we are jumping to might be domain-specific.
18022 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
18024 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18026 * inssel.brg: string chars are unsigned.
18028 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
18030 * TODO: New todo item.
18032 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
18033 which calls mono_runtime_class_init and patches the call site to
18034 avoid further calls.
18035 (mono_arch_create_class_init_trampoline): New arch specific function
18036 to create a class init trampoline.
18037 (create_trampoline_code): Generalized so it can create
18038 class init trampolines as well.
18040 * mini.c (helper_sig_class_init_trampoline): New helper variable.
18041 (mono_create_class_init_trampoline): New function to create and cache
18042 class init trampolines.
18043 (mono_find_class_init_trampoline_by_addr): New function to lookup the
18044 vtable given the address of a class init trampoline. Used by the
18046 (mono_codegen): Generate a call to a trampoline instead of
18047 mono_runtime_class_init in LDSFLD[A].
18048 (mono_codegen): Add relocations for the new trampoline.
18050 * mini.h mini-x86.c aot.c: Added a new relocation type:
18051 MONO_PATCH_INFO_CLASS_INIT.
18053 * mini.h: Bump AOT version number.
18055 * aot.c: Create a copy of the loaded code instead of using the original
18056 so methods which call each other will be close in memory, improving
18059 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
18060 patch since it breaks the regression tests.
18062 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
18063 for the register saving instruction sequence since the
18064 frame_state_for function in glibc 2.3.2 don't seem to detect it.
18066 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
18068 * TODO: Fix todo item && remove another.
18070 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
18072 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
18075 * aot.c: Moved the check for MONO_LASTAOT into the initialization
18076 function of the module.
18078 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
18079 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
18080 --no-aot command line option.
18082 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
18084 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
18085 by Bernie Solomon (bernard@ugsolutions.com).
18087 * inssel.brg: Refactor the interface offset table related code into
18088 its separate functions and add support for the AOT case.
18090 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
18092 * aot.c (mono_aot_get_method_inner): Fix memory leak.
18094 * aot.c: Added mono_aot_verbose variable and made all debugging
18095 output depend on the value of this variable.
18097 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
18098 method_label and info_label.
18100 * mini.h mini-x86.c aot.c: Added a new relocation type
18101 MONO_PATCH_INFO_IID for klass->interface_id.
18103 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
18104 the MonoJitInfo structure.
18106 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
18107 a non-root appdomain in shared mode.
18109 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18111 * aot.c: make aot loader less verbose. Remove free of unused variable.
18113 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
18115 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
18117 * .cvsignore: Added *.dll.
18119 * mini.c (mono_print_tree_nl): New function callable while debugging.
18121 * mini.c (mono_print_code): Export this.
18123 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
18126 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
18128 * mini.h (MonoCompile): Added 'jit_info' field.
18130 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
18131 the cfg structure, since it is needed by the AOT compiler.
18133 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
18135 * aot.c: A major rewrite. Changes include:
18136 - save exception tables for methods which have them.
18137 - cache failed lookups in aot_get_method () to avoid the (slow) calls
18138 to g_module_symbol.
18139 - reworked the file format so it is now much smaller and needs
18140 fewer relocation entries.
18142 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
18144 * aot.c (load_aot_module): Fix build bustage on platforms without
18147 2003-09-04 Martin Baulig <martin@ximian.com>
18149 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
18151 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
18153 * TODO: Some new optimization ideas.
18155 * aot.c: Move AOT module loading logic here from mono_assembly_open.
18157 * aot.c: Save the optimization flags used to compile the code into
18160 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
18161 support emitting domain specific code.
18163 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
18164 no longer domain neutral. It can be made domain neutral by compiling
18165 with --optimize=shared.
18167 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
18168 between appdomains.
18170 * driver.c mini.h mini.c: New --no-aot debugging option which disables
18171 loading of AOT code.
18173 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
18175 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
18176 if there is no domain neutrality information.
18178 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
18180 * aot.c (mono_compile_assembly): Emit a symbol containing the file
18181 format version into the generated library.
18183 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
18184 callee method into the caller since one of them could be shared.
18186 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
18187 system exceptions from AOT code now works.
18189 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
18190 method if it is domain neutral and the callee is not.
18192 * graph.c (cfg_emit_one_loop_level): Fix warning.
18194 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
18196 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
18199 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
18201 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
18202 is needed by code which is executed before mono_runtime_init ().
18203 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
18205 * mini.c (mono_thread_abort): Fix warning.
18206 (mono_jit_compile_method): Call static constructor in the AOT case too.
18208 * aot.c (mono_compile_assembly): Fix warning.
18210 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18212 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
18214 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
18216 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
18218 * cpu-pentium.md: Fix the length of call opcodes so they include the
18219 ESP restoring instruction. Fixes #47968.
18221 2003-08-28 Martin Baulig <martin@ximian.com>
18223 * mini-x86.c (mono_arch_call_opcode): Added support for
18224 MONO_TYPE_GENERICINST.
18226 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
18228 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
18230 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
18231 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
18233 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
18236 2003-08-26 Martin Baulig <martin@ximian.com>
18238 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
18239 when reporting an error, set this to the actual error location.
18240 (mono_method_to_ir): Report the correct error location if
18241 get_basic_blocks() returned an error.
18243 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
18245 * mini.c (mono_type_blittable): OBJECT is not blittable.
18246 (mono_method_blittable): Methods which have marshalling descriptors
18247 are not blittable either. Fixes #47842.
18249 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
18251 * driver.c mini.c: Use an environment variable instead of a global
18252 variable. Also fix the build.
18254 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
18255 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
18258 * driver.c mini.c: Added --with-valgrind option to turn off some
18259 code which prevents mono from running under valgrind.
18261 * mini.c (mono_emit_call_args): Fixed warning.
18263 * mini.c (mono_emulate_opcode): Fixed warning.
18265 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18267 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
18268 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
18269 regalloc.c, regalloc.h: specify available registers in arch-specific
18270 code and support floats in the regallocator (patch by Laurent Morichetti
18273 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18275 * mini.c: mono_thread_current() can be called only after
18276 mono_runtime_init(): rearrange code to not call it early on.
18278 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18280 * mini.c: allocate jump tables in the code mempools.
18282 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18284 * mini.c, mini.h: make sure per-thread data allocated by the jit is
18287 2003-08-10 Miguel de Icaza <miguel@ximian.com>
18289 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
18290 12 to 16. This fixes bug #47453.
18293 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18295 * mini-ppc.c: fixed indexed load and unsigned compares.
18297 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
18299 * mini.c: reenabled installation of handler for
18300 thread abort signal.
18302 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18304 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
18305 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
18306 until it's fixed and actually useful.
18308 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18310 * inssel-long32.brg: couple more opcodes implemented.
18312 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18314 * mini-sparc.c: Even more opcodes implemeted.
18316 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
18318 * mini-sparc.c: More opcodes implemented.
18320 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
18322 * mini-sparc.c: More opcodes implemented.
18324 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18326 * inssel-sparc.brg: Add some needed rules. Direct
18328 * Makefile.am: Use inssel-sparc.brg
18329 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
18330 an assert happy for now.
18332 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
18334 * mini-sparc.c: Fixed compile errors.
18335 * exceptions-sparc.c: Same. We now produce a mono binary
18336 on sparc-linux. Yea.
18338 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
18340 * mini-sparc.c: Renamed registers. Also some macro cleanups.
18341 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
18342 They compile, but do not work.
18344 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18346 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
18347 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
18348 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
18351 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18353 * mini.c: more opcodes implemented and better support for generics.
18355 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18357 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
18358 * mini.c, mini.h: first cut at generics support: some new instructions
18359 added and changed the behaviour of some of the existing ones.
18361 2003-07-21 Miguel de Icaza <miguel@ximian.com>
18363 * mini.c: Removed definition of metadata_shared mutex here.
18365 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18367 * mini-x86.c: make vararg calls work for instance methods.
18369 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18371 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
18372 returns the arguments in a separte list, now.
18374 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18376 * aot.c, mini.c: updates for array type representation changes.
18378 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
18380 * mini.c: register function to perform jit shutdown.
18382 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18384 * mini.c: use a faster allocator if possible.
18386 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18388 * aot.c: some cleanups and portability changes.
18390 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18392 * mini.c: use faster allocation for CEE_BOX if possible.
18394 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18396 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
18397 Moved inlined mempcy code to its own function so that is can be
18398 reused. Added an inline memset function as well (optimized initobj).
18399 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
18401 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18403 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
18405 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18407 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
18408 arch code can setup the cpu for CLR execution, if needed.
18409 We use it on x86 to set the precision of FP operations.
18411 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18413 * mini.c: disable some optimizations if we can guess they'll cost too
18414 much for a given method.
18416 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18418 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
18420 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18421 * mini.h mini.c mini-x86.c: Added instruction level coverage
18422 info collection support.
18424 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18426 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
18427 is now implemented in the profiling API. Get rid of a couple of
18428 unnecessary global variables.
18430 2003-06-15 Nick Drochak <ndrochak@gol.com>
18432 * basic-long.cs: tests for negative values for bigmul, and unsigned.
18433 * cpu-g4.md: add op_bigmul and op_bigmul_un
18434 * cpu_pentium.md: add op_bigmul_un
18435 * inssel-long32.brg: add rule for unsigned bigmul
18436 * mini-ops.h: define OP_BIGMUL_UN
18437 * mini-x86.c: THE BUG: handle (un)signed properly
18438 * mini.c: choose unsigned opcode if needed.
18439 This set of patches fixes bug #44291
18441 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
18443 * mini.c (optimize_branches): improved to handle all kinds of
18444 conditional branches.
18446 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18448 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
18449 don't raise exceptions.
18451 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18453 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
18454 to arch-specific files.
18456 2003-06-09 Martin Baulig <martin@ximian.com>
18458 * Makefile.am (libs): Added $(LIBGC_LIBS).
18460 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
18462 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
18463 and OP_ATAN (fixes bug#44293).
18465 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
18467 * Makefile.am, mini-x86.c: rename cpu description array to
18468 pentium_desc, since some compilers define the 'pentium' preprocessor
18471 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
18473 * mini.c (mini_select_instructions): add explicit branch if the
18474 following block is not the false target of a conditional branch -
18475 we need this with any optimization that reorder or remove bblocks
18477 * mini.c (optimize_branches): bug fixes
18479 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
18481 * mini.c (mono_method_to_ir): inline static readonly fields
18483 * ssa.c (fold_tree): start cfold support for long (very simple
18486 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
18488 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18490 * inssel.brg: fixed memcpy (bug #44219).
18492 2003-06-05 Dick Porter <dick@ximian.com>
18494 * driver.c: Set the glib log levels to not abort if g_message
18497 g_set_prgname() has to happen before mini_init() so that the
18498 process handle gets the info.
18500 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18502 * driver.c: add intrins to the default optimizations to get wider
18505 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18507 * mini.h: some large basic blocks will overflow a 16-bit
18508 integers for symbolic registers.
18510 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
18512 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
18513 (mono_arch_output_basic_block): fix bug 43499
18515 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18517 * mini.c: kill duplicated definition of mono_debug_format.
18519 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18521 * mini-x86.c, arrays.cs: fixed register allocation bug.
18523 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
18525 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
18527 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
18529 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18532 (print_method_from_ip): also print source location information if
18535 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
18537 * mini.c (mono_find_block_region): bug fix in region code
18538 (mini_method_compile): enable removing unreachable code again, but
18539 only in methods without exception clauses.
18541 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18543 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
18544 Implemented arglist opcode and handling of TypedReference type.
18545 Fixed x86 call convention when a structure is returned.
18546 Minimal support for calling static vararg methods.
18548 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
18550 * mini.c (mini_method_compile): always remove unreachable code,
18551 because the code in them may be inconsistent (access to dead
18552 variables for example).
18554 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18556 * driver.c, debug-mini.c: warning fixes.
18558 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
18560 * Makefile.am, jit.h, mini.h: install header for embedding mono.
18562 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
18564 * mini.c: thread-static fields are registered in mono_class_vtable(),
18565 so ensure the function is called before checking for them.
18567 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
18569 * mini.c (optimize_branches): fix for bug 43586
18571 * jit-icalls.c (mono_llmult_ovf): added an additional check for
18572 overflow (fixes Bug #43639)
18574 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18576 * mini.c, objects.cs: allow the use of stobj for primitive types.
18578 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18580 * mini.c: be less strict about argument checking until we support
18581 running the verifier.
18583 2003-05-27 Nick Drochak <ndrochak@gol.com>
18585 * basic-long.cs: tests for (ulong)int * (ulong)int also
18586 * mini.c: use the same trick for (ulong)int * (ulong)int
18588 2003-05-27 Nick Drochak <ndrochak@gol.com>
18590 * basic-long.cs: add regression test for (long)int * (long)int
18591 * cpu-pentium.md: add op_bigmul specification
18592 * inssel-long32.brg: add OP_BIGMUL rule
18593 * mini-ops.h: add OP_BIGMUL
18594 * mini-x86.c: register allocator: handle case where src1 needs to be
18596 * mini.c: substitute special BIGMUL opcode in the tree for
18597 (long)int * (long)int
18599 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18601 * jit-icalls.c: call the type ctor on field access if needed.
18603 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18605 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
18606 to a method (including results of ldelema, bug#43207).
18608 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
18610 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
18611 colors to show exception handler blocks.
18613 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
18614 (fix for pinvoke7.cs).
18616 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18618 * mini.h, mini.c: ensure correct initialization order for types that
18619 require it. Prepare for lazy compilation of jit icall wrappers.
18620 Provide a name for opcode emulation to reduce unneeded mallocing.
18622 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18624 * mini-x86.c: better register restoring code and profiling
18625 support for tail calls.
18627 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18629 * mini.h, driver.c: prepare for leaf methods optimization.
18631 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18633 * mini.c: get targets of branches before converting a method.
18635 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
18637 * mini.c (optimize_branches): added some experimental code (disbaled)
18639 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
18641 * mini.c (optimize_branches): fix branch to branch optimization
18643 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
18645 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
18647 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
18649 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
18652 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
18654 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
18655 enable use of interface variables again.
18657 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
18658 I1 to registers because there is no simply way to sign extend 8bit
18659 quantities in caller saved registers on x86.
18661 * inssel-float.brg: set costs of some rules to 2 so
18662 that monobure always select the arch. specific ones if supplied,
18663 regardless of the order we pass the files to monoburg.
18665 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18667 * mini.c, mini-x86.c: since the magic trampoline for jumps
18668 can't patch the code directly, we do it as soon as the
18669 method gets compiled.
18671 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18673 * mini-x86.c, mini.h: introduce a new patching method
18674 to support CEE_JMP and tail calls.
18675 * mini.c: obey tail.call. Don't precompile methods target
18677 * tramp-x86.c: new trampoline code to handle methods
18678 reached through a jump.
18680 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
18682 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
18683 bit values to registers
18685 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
18687 * mini.c (mono_compile_get_interface_var): share interface
18688 variables if possible.
18690 2003-05-16 Martin Baulig <martin@ximian.com>
18692 * debug-mini.c (mono_init_debugger): New function to initialize
18693 the debugger. This is not in the debugger since it needs to
18694 access some of mini's internals.
18696 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
18698 * mini.c (mono_method_to_ir): inlining fixes/cleanups
18700 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
18702 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
18703 for value type handling.
18705 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
18707 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
18708 (mono_method_check_inlining): enable inlining of all kinds of wrappers
18710 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
18712 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
18713 the constructor through a proxy.
18715 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18717 * jit-icalls.c, inssel.brg: fixes to array element address
18720 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
18722 * mini-x86.c (is_regsize_var): allocate pointer to registers
18724 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18726 * driver.c: fixed typo, added intrins to the set of optimizations
18727 tested with regressions.
18729 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18731 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
18732 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
18735 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
18737 * inssel.brg: remove some common pop instructions without side effects
18739 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18741 * inssel-x86.brg: fixed thinko in int to double conversions.
18743 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18745 * mini.c, jit-icalls.c: added runtime thread-static variable support.
18747 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18749 * inssel-long32.brg: two more missing instructions.
18751 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
18753 * mini.c (mono_emit_call_args): set the cil_code for all arguments
18754 if not already set.
18756 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
18758 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
18761 * basic-float.cs: Added tests for negative zero.
18763 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18765 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
18766 a couple of missing operations for long casts, with test cases.
18768 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18770 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
18772 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
18774 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
18775 code size estimation.
18777 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
18779 * mini.c (mono_jit_create_remoting_trampoline): make it work with
18780 abstract methods (fix bug 42542)
18782 * aot.c: add ability to handle array types
18784 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
18786 * mini.c: Call the _specific versions of the object allocation
18787 functions if possible.
18789 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18791 * driver.c: call setlocale ().
18793 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18795 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
18798 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
18800 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
18802 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
18803 wrappers (fix bug 42122)
18805 2003-05-04 Martin Baulig <martin@ximian.com>
18807 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
18809 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
18810 s/mini_set_defaults/mono_set_defaults/g.
18812 2003-05-04 Martin Baulig <martin@ximian.com>
18814 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
18816 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18818 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
18819 (reported by Don Roberts).
18821 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18823 * mini.c: temporarily work around two bugs for this release.
18825 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18827 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
18828 that contains -export-dynamic and it makes using the ld script
18830 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
18832 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18834 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
18837 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18839 * mini.c: make sure leave calls all the needed finally blocks,
18840 even when the target jumps out of multiple exception clauses.
18842 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18844 * ldscript, Makefile.am: add linker script to reduce the number of
18845 exported symbols (should also fix the issues with libwine defining
18846 some of the same symbols in io-layer).
18848 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
18850 * driver.c (mini_main): Avoid assertion when no file name is given on
18853 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
18855 * driver.c: added --version/-V command line option.
18856 Added the inline optimization in the regression tests.
18858 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18860 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
18861 to the type in the method signature (fixes bug#42134).
18863 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
18865 * mini.c: when inlining, check this is not null only when needed (bug #42135).
18867 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
18869 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
18871 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18873 * driver.c: fixed bug #42100.
18875 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
18877 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
18879 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18881 * mini.c: moved most of the code required to do inlining to its own
18882 function so it can be reused. Inline also ctors if appropriate.
18884 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
18886 * Makefile.am: Link with -export-dynamic so shared libs loaded by
18887 the runtime can call mono API functions.
18889 2003-04-27 Martin Baulig <martin@ximian.com>
18891 * debug-mini.c (mono_debug_init_method): Added
18892 `guint32 breakpoint_id' argument; if the method has a breakpoint,
18893 send a notification to the debugger.
18895 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
18896 running in the Mono Debugger, just pass the breakpoint number to
18897 mono_debug_init_method().
18899 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
18901 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
18903 * mini.c: allow some more unsafe compares.
18905 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18907 * mini-x86.c, Makefile.am: make distcheck works (partially from
18908 a patch by Richard Lee <r.h.lee@attbi.com>).
18909 * regset.c, regset.h: removed, they are unused.
18911 2003-04-25 Dick Porter <dick@ximian.com>
18913 * driver.c: Usage reports the name as 'mono' not 'mini'
18914 * exceptions-x86.c: Build and run on freebsd
18916 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18918 * Makefile.am: install the program with the 'mono' name and
18919 the library as libmono instead of mini and libmini.
18921 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18923 * driver.c: provide the APIs for the embedding interface of the old jit.
18925 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
18927 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
18929 2003-04-23 Martin Baulig <martin@ximian.com>
18931 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
18933 * driver.c: Added `--debug' command line argument to enable
18936 2003-04-23 Martin Baulig <martin@ximian.com>
18938 * debug.[ch]: Removed. The code is now in
18939 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
18941 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
18944 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
18946 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
18948 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18951 (mini_cleanup): moved mono_runtime_cleanup call after the call to
18952 mono_domain_finalize.
18953 (mini_method_compile): use mono_method_profile* if the the option is
18956 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
18958 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18959 methods with their wrapper.
18961 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18962 methods with their wrapper.
18964 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
18967 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
18970 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
18973 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
18975 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
18977 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
18979 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
18980 of the mempool. This is slightly faster and uses less memory
18982 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18984 * mini.c: avoid O(n) allocation for variables.
18986 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18988 * mini.c: handle items on the stack after inlining methods.
18990 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18992 * mini.c: make the method->opcode optimization dependent
18993 on MONO_OPT_INSTRINS and do it lazily.
18995 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18997 * driver.c: print overall results at the end of regression run.
18999 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
19001 * inssel.brg: don't overwrite symbolic registers.
19003 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
19005 * inssel-x86.brg: fix conversion from long to float.
19007 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
19009 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
19011 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
19013 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
19015 * driver.c: Added --print-vtable option as in the old JIT.
19017 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
19019 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
19021 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
19023 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
19025 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
19027 * mini.c regalloc.c regalloc.h: Fix memory leak.
19029 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
19031 * aot.c (mono_aot_get_method): register all used strings
19033 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
19035 * mini.c: always intern strings references with ldstr at compile time.
19037 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
19039 * Makefile.am: add BUILT_SOURCES.
19041 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
19043 * driver.c: give a better error message when the assembly to execute
19044 doesn't have an entry point.
19046 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
19048 * Makefile.am: added hack for automake
19050 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
19053 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
19055 22003-04-07 Martin Baulig <martin@ximian.com>
19057 * Makefile.am: Added Makefile.am.
19059 * debugger-main.c: Removed, this is now in the debugger where it
19062 * mini.pc.in: Call this package `mini' for the moment.