1 2009-02-03 Zoltan Varga <vargaz@gmail.com>
3 * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
5 * aot-compiler.c (emit_line_number_info): Fix line number emission when
8 * aot-compiler.c: Add xdebug support on x86.
10 * unwind.c: Add x86 support.
12 * aot-compiler.c (emit_exception_debug_info): Control the emission of
13 unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
15 * mini.c (mini_method_compile): Ditto.
17 * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
20 * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
21 which mimic .push_section/.pop_section in GAS.
23 * aot-compiler.c: Emit precise live range information for variables.
25 * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
27 * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
28 the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
31 * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
32 the live ranges of variables.
34 * mini.h (struct MonoMethodVar): Add two fields containing the live range
35 of the variable in terms of native offsets.
37 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
39 * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
41 2009-02-02 Mark Probst <mark.probst@gmail.com>
43 Contributed under the terms of the MIT/X11 license by Steven
44 Munroe <munroesj@us.ibm.com>.
46 * exceptions-ppc.c (restore_regs_from_context): Correct operand
47 order (offset then base reg) for ppc_load_multiple_regs.
48 (emit_save_saved_regs) Correct operand order for
49 ppc_store_multiple_regs.
50 (mono_arch_get_call_filter): Correct operand order for
51 ppc_load_multiple_regs.
53 * mini-ppc.c (emit_memcpy): Fix operand order for
54 ppc_load_reg_update and ppc_store_reg_update.
55 (mono_arch_output_basic_block): Correct operand order for ppc_lha.
56 (mono_arch_emit_epilog): Correct operand order for
57 ppc_load_multiple_regs.
59 * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
60 order for ppc_store_multiple_regs and ppc_load_multiple_regs.
62 2009-02-02 Mark Probst <mark.probst@gmail.com>
64 * cpu-ppc64.md: Fixed storer4_memindex length.
66 2009-02-02 Zoltan Varga <vargaz@gmail.com>
68 * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
71 * aot-compiler.c (emit_line_number_info): Optimize this.
73 2009-02-01 Zoltan Varga <vargaz@gmail.com>
75 * aot-compiler.c: Disassemble tokens in the IL disassembly.
77 * aot-compiler.c: Add debug info for methods without debug info by
78 emitting an IL file and having the line number info referencing that file.
80 * aot-compiler.c: Optimize the size of the generated line number info.
82 * aot-compiler.c: Emit line number info in xdebug mode.
84 * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
87 2009-01-31 Zoltan Varga <vargaz@gmail.com>
89 * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
91 * driver.c (mono_main): Enable debugging support automatically if XDEBUG
94 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
96 * basic-calls.cs: Test for the weird crash found on arm.
98 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
100 * cpu-arm.md: Increase the size of storer8_membase_reg and
101 loadr8_membase_reg to 24 bytes to accomodate the extra add.
103 * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
104 OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
105 reg to LR otherwise we'll be loading/storing from just the offset.
107 2009-01-30 Miguel de Icaza <miguel@novell.com>
109 Question: if we are storing gint32's inside the "*native_offset",
110 should we change the signature to "gint32 *native_offset" to
111 ensure that we do not have type definition problems?
113 * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
114 an int * as this is what the other function expects, causes
115 problems with Freescale's compiler that defined int32_t to be a
116 long and makes int incompatible
118 2009-01-30 Miguel de Icaza <miguel@novell.com>
120 * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
121 filename conflict with bjam.
123 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
125 * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
126 as it might use decomposed ops.
128 2009-01-30 Zoltan Varga <vargaz@gmail.com>
130 * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
132 * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
135 * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
137 * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
140 * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
141 way registers are stored in MonoContext on arm.
143 * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
144 instead of locking so mono_get_cached_unwind_info () becomes signal safe.
146 * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
148 * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
150 * mini.c (mini_init): Register mono_isfinite.
152 * jit-icalls.c (mono_isfinite): New jit icall.
154 * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
156 * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
157 set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
160 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
162 * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
163 separate frame and stack pointers, so we must use FP to find the register
165 The FP reg is retrieved from the MonoContext::regs array.
167 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
169 * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
172 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
174 * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
175 return R4 and R8 when not running under softfloat.
177 Fixes basic-calls.exe
179 2009-01-30 Zoltan Varga <vargaz@gmail.com>
181 * mini-arm.c: Implement some overflow opcodes.
183 2009-01-29 Miguel de Icaza <miguel@novell.com>
185 * ssa.c: handle another alloca.h
187 * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
188 PLATFORM_WIN32 for detecting if we have sigaction. Instead use
189 MONO_ARCH_USE_SIGACTION.
191 * aot-runtime.c, mini-exceptions.c: Replace platform define with
194 * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
196 * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
197 PPC targets as sigaction does not exist on all platforms, define
198 this on a per-platform basis.
200 Instead of erroring out if the platform is not defined, include
201 mini-ppc-os.h, and expect that the OS specific setting provides
202 the required information.
204 2009-01-30 Zoltan Varga <vargaz@gmail.com>
206 * aot-compiler.c: Fix --enable-minimal=aot.
208 2009-01-30 Zoltan Varga <vargaz@gmail.com>
210 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
213 2009-01-29 Zoltan Varga <vargaz@gmail.com>
215 * exceptions-arm.c: Fix warnings.
217 * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
220 * mini-x86.c: Fix --enable-minimal=jit build.
222 * mini.c: Really fix --enable-minimal=jit build.
224 * mini.c (construct_object_context_for_method): Move this outside
225 the DISABLE_JIT block to fix the --enable-minimal=jit build.
227 "Backported" of r124984 from 2.0 branch.
229 * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
231 "Backport" of r124977 + r124978 from 2.0 branch.
233 * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
234 to avoid calling mono_exception_from_token () from the throw trampoline.
235 (mono_arch_get_throw_exception_generic): call throw_exception_by_token
236 for throwing corlib exceptions, this fixes full-aot support for corlib
239 * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
241 2009-01-29 Miguel de Icaza <miguel@novell.com>
243 * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
244 part of the changes to split the code in mini into operating
245 system specific files.
247 This patch was done by copying mini.c to the respective files to
248 preserve SVN history.
250 2009-01-29 Zoltan Varga <vargaz@gmail.com>
252 * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
254 2009-01-28 Zoltan Varga <vargaz@gmail.com>
256 * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
257 remoting-invoke-with-check wrappers of shared methods.
259 * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
261 2009-01-27 Mark Probst <mark.probst@gmail.com>
263 * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
264 optimization if the top of stack is the last instruction in the
265 bblock. Otherwise it might have been used after its definition.
268 2009-01-27 Zoltan Varga <vargaz@gmail.com>
270 * mini-trampolines.c (mono_magic_trampoline): Print out the caller
271 method as well when get_vcall_slot () fails to match a code sequence.
273 * mini-arm.c: Fix the android build, which doesn't have
276 2009-01-26 Zoltan Varga <vargaz@gmail.com>
278 * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
281 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
283 * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
285 2009-01-26 Zoltan Varga <vargaz@gmail.com>
287 * mini.c (mini_method_compile): Save the unwind info generated by the JIT
288 and put its id into jinfo->used_regs. This is only used on amd64,
289 which is currently the only platform generating unwind info.
291 * exceptions-amd64.c: Instead of unwinding based on a register mask, use
292 the dwarf unwinder. This is required to correctly handle async exceptions
293 like thread abort and stack overflows, which can happen while a method
294 is in the middle of its prolog or epilog.
296 * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
297 the unwind info belonging to an AOTed method.
299 * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
300 into cfg->unwind_ops.
302 * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
304 * mini.c (mini_init): Call mono_unwind_init ().
305 (mini_cleanup): Call mono_unwind_cleanup ().
307 * unwind.c: Add functions for managing a set of unwind info entries, allowing
308 unwind info to be shared between methods.
310 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
313 * exceptions-amd64.c (mono_arch_exceptions_init): Call
314 get_throw_pending_exception () to avoid initialization races.
316 * mini-exceptions.c (mono_exceptions_init): Call an arch specific
317 mono_arch_exceptions_init () function.
319 * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
321 2009-01-25 Zoltan Varga <vargaz@gmail.com>
323 * mini.c (mono_get_domain_intrinsic): New helper function.
324 (mono_get_thread_intrinsic): Ditto.
326 * mini-arm.c mini-ia64.c: Use the new helper functions.
328 * method-to-ir.c (mono_method_to_ir): Fix the comment for
329 the last constrained_call change, since it is needed in the non-AOT
332 * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
334 * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of
335 mono_get_lmf_addr () on arm eabi linux.
337 2009-01-24 Zoltan Varga <vargaz@gmail.com>
339 * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
340 code sequence which matches a non-virtual call.
342 2009-01-23 Mark Probst <mark.probst@gmail.com>
344 * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
347 2009-01-23 Zoltan Varga <vargaz@gmail.com>
349 * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
350 runtime-invoke wrappers, since they are also shared based on signature.
352 2009-01-22 Mark Probst <mark.probst@gmail.com>
354 * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
355 info from the (correct) context.
357 2009-01-22 Zoltan Varga <vargaz@gmail.com>
359 * unwind.c (mono_unwind_frame): Remove a stray g_free ().
361 * unwind.c (mono_unwind_frame): New function to unwind through a frame
362 using dwarf unwinding info. Not yet used.
364 * mini.c (mini_init): When using xdebug, disable freeing of domains.
366 2009-01-21 Mark Probst <mark.probst@gmail.com>
368 * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
371 * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
372 special case and handle mono_arch_delegate_invoke_impl() returning
373 function descriptors.
375 * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
376 trampolines return function descriptors, too.
378 2009-01-21 Zoltan Varga <vargaz@gmail.com>
380 * method-to-ir.c (handle_alloc): Avoid generic instances in the
381 out_of_line optimization.
383 2009-01-21 Martin Baulig <martin@ximian.com>
386 (MonoCompile): Added `disable_deadce_vars' to disable removing
390 (mini_method_compile): Set `cfg->disable_deadce_vars' when running
393 * liveness.c (mono_analyze_liveness): Don't remove any unused
394 variables if `cfg->disable_deadce_vars' is set.
396 2009-01-21 Mark Probst <mark.probst@gmail.com>
398 * method-to-ir.c: Only apply exception constructor optimization if
399 the the method actually belongs to an exception class. Fixes
402 2009-01-21 Zoltan Varga <vargaz@gmail.com>
404 * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
405 change inside a #ifdef __mono_ppc64__.
407 * aot-compiler.c (compile_method): Remove the previous limitation.
409 * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
410 on type variables in AOTed code.
412 * aot-compiler.c (compile_method): Skip generic methods having type
413 constraints on their generic parameters.
415 * aot-compiler.c (compile_method): Check for methods which cannot be
416 encoded inside RGCTX_FETCH patches as well.
418 * mini-exceptions.c (mono_print_thread_dump): Fix the windows
421 2009-01-20 Mark Probst <mark.probst@gmail.com>
423 * method-to-ir.c: Force the vtable variable in shared generic code
424 for the case that they might show up on a stack trace where they
427 * mini-exceptions.c: Save and use generic sharing info as well as
428 IP in stack traces to resolve shared generic instantiations.
430 2009-01-20 Zoltan Varga <vargaz@gmail.com>
432 * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
433 added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
435 2009-01-20 Mark Probst <mark.probst@gmail.com>
437 * method-to-ir.c: Do generic sharing for array constructors.
439 2009-01-20 Rodrigo Kumpera <rkumpera@novell.com>
441 * mini-exceptions.c (mono_print_thread_dump): Add information
442 about the thread state using wapi_current_thread_desc.
444 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
446 * basic-simd.cs: Tests for the new constructors.
448 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
450 * mini-ops.h: Added OP_EXPAND_*
454 * mini-x86.c (mono_arch_output_basic_block): Same.
456 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
458 2009-01-19 Zoltan Varga <vargaz@gmail.com>
460 * iltests.il.in: Add a test for #467385.
462 2009-01-18 Rodrigo Kumpera <rkumpera@novell.com>
464 * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
465 thread been cleaned up is not the same currently in execution.
467 Fixes appdomain-unload crashes on windows, osx and linux variants
468 without the __thread keyword.
470 2009-01-18 Zoltan Varga <vargaz@gmail.com>
472 * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
473 (koush@koushikdutta.com). Implement this for android.
475 * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
478 * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
479 mono_marshal_get_write_barrier ().
481 2009-01-17 Rodrigo Kumpera <rkumpera@novell.com>
483 * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
484 of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
485 that pass them on a register pair.
487 This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
488 test was crashing due to that.
490 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
492 * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
493 trampoline code. Include ucontext.h only if available.
495 2009-01-15 Mark Probst <mark.probst@gmail.com>
497 * mini.c: mono_domain_lookup_shared_generic() takes an open method
498 and doesn't check whether it's sharable, like it was before
499 removing the shared generics hash. This brings IronPython
500 performance back to what it was before that change.
502 2009-01-14 Mark Probst <mark.probst@gmail.com>
504 * method-to-ir.c: Handle delegate invocation optimization earlier,
505 otherwise it would be handled (much more slowly) by the
506 final/sealed optimization.
508 2009-01-13 Zoltan Varga <vargaz@gmail.com>
510 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
511 domain is not set. Fixes #465864.
513 2009-01-12 Mark Probst <mark.probst@gmail.com>
515 * method-to-ir.c: Don't stop sharing of generic methods with catch
516 clauses - we already handle those.
518 2009-01-12 Mark Probst <mark.probst@gmail.com>
520 * mini.c, mini.h: lookup_generic_method() is now
521 mono_domain_lookup_shared_generic() and uses the jit_code_hash,
522 making the shared_generics_hash obsolete.
524 2009-01-12 Mark Probst <mark.probst@gmail.com>
526 * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
527 use the red zone. Make room on the stack first and then use it,
528 not the other way around.
530 2009-01-12 Zoltan Varga <vargaz@gmail.com>
532 * mini.c (mini_init): Call mono_xdebug_init ().
534 * aot-compiler.c (mono_xdebug_init): Make this non-static.
536 2009-01-11 Zoltan Varga <vargaz@gmail.com>
538 * TestDriver.cs: Add an --iter argument to run tests multiple times.
540 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
543 * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
544 debug+unwind info for trampolines.
546 * mini.c (mono_create_unwind_op): New helper function.
548 * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
550 2009-01-10 Zoltan Varga <vargaz@gmail.com>
552 * aot-compiler.c: Fix the build.
554 2009-01-09 Zoltan Varga <vargaz@gmail.com>
556 * Makefile.am: Update dtrace-prelink.sh location.
558 2009-01-08 Zoltan Varga <vargaz@gmail.com>
560 * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr
561 optimization. Fixes #464520.
563 2009-01-07 Bill Holmes <billholmes54@gmail.com>
565 * mini-amd64.c : Adding code to save/restore non-volatile registers
568 * exceptions-amd64.c : Adding code to save/restore non-volatile
571 Contributed under MIT/X11 license.
573 2009-01-07 Zoltan Varga <vargaz@gmail.com>
575 * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
576 __GNUC_MINOR__ which can break when the major version changes.
578 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
580 * basic-simd.cs: Add tests for usage of the sizeof opcode.
582 2009-01-07 Geoff Norton <gnorton@novell.com>
584 * helpers.c: Allow mono -v -v -v to work on darwin.
586 2009-01-05 Bill Holmes <billholmes54@gmail.com>
588 * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
591 Contributed under MIT/X11 license.
593 2009-01-05 Zoltan Varga <vargaz@gmail.com>
595 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
596 instead of directly accessing type->data.klass. Fixes #462016.
597 (mono_allocate_stack_slots_full): Ditto.
599 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
600 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
602 * aot-compiler.c (emit_plt): Fix ARM build.
604 2009-01-04 Zoltan Varga <vargaz@gmail.com>
606 * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
608 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
611 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
612 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
615 * iltests.il.in: Add a regression test.
617 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
619 * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
621 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
623 * basic-simd.cs: Add a regression test for #462457.
625 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
627 * mini-ops.h: Add a definition of XPHI.
629 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
631 * ssa.c (op_phi_to_move): Handle XPHI.
633 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
637 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
639 * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
641 2008-12-31 Geoff Norton <gnorton@novell.com>
643 * mini-ppc.c: The prolog size allocated can be too small for darwin
644 ppc32 under certain circumstances. Also fix a small logic bug.
646 2008-12-29 Zoltan Varga <vargaz@gmail.com>
648 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
649 while loading AOT methods.
651 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
652 since only the former is nulled out after a successful cast. This prevents
653 crashes with rethrown exceptions when using --debug=casts.
655 2008-12-24 Mark Probst <mark.probst@gmail.com>
657 * mini.h: New macro for checking whether a method is final,
658 i.e. whether the method or its class is marked final.
660 * method-to-ir.c: Use the new macro for all final-checks
661 consistently. Fixes the crash in the System.ServiceModel tests.
663 2008-12-23 Mark Probst <mark.probst@gmail.com>
665 * mini-exceptions.c (get_exception_catch_class): Corrected another
666 overly strict assertion.
668 2008-12-23 Mark Probst <mark.probst@gmail.com>
670 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
671 Clobbering it is not allowed because the caller might use it as
672 the vtable register in the interface call.
674 2008-12-19 Mark Probst <mark.probst@gmail.com>
676 * mini-exceptions.c (get_exception_catch_class): Corrected an
677 overly strict assertion.
679 2008-12-18 Mark Mason <mmason@upwardaccess.com>
681 * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
683 * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
685 * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
687 * cpu-mips.md: correct lengths for certain long_ opcodes.
689 * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
691 * 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().
693 2008-12-17 Mark Mason <mmason@upwardaccess.com>
695 * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
697 2008-12-17 Mark Mason <mmason@upwardaccess.com>
699 * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
701 2008-12-16 Rodrigo Kumpera <rkumpera@novell.com>
703 * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
706 2008-12-16 Mark Mason <mmason@upwardaccess.com>
708 * 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
710 * 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)
712 2008-12-15 Mark Mason <mmason@upwardaccess.com>
714 * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
716 2008-12-14 Zoltan Varga <vargaz@gmail.com>
718 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
719 gshared code. Fixes #458947.
721 * generics.cs: Add a test.
723 2008-12-12 Mark Mason <mmason@upwardaccess.com>
725 * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
727 * mini-mips.c: first pass n32 code generation.
729 * mini-mips.h: datatypes and defines for n32 support.
731 * exceptions-mips.c: first pass n32 code generation.
733 * tramp-mips.c: first pass n32 code generation.
735 * cpu-mips.md: add long_ opcodes.
737 2008-12-12 Mark Mason <mmason@upwardaccess.com>
739 * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
741 * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
743 * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
745 * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
747 * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
749 * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
751 * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
753 * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
755 * helpers.c: for mips/n32, don't pass -mips32 to objdump
757 2008-12-12 Zoltan Varga <vargaz@gmail.com>
759 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
761 2008-12-12 Andrés G. Aragoneses <aaragoneses@novell.com>
763 * driver.c: Sync --help-trace with man page (EXPR,EXPR).
765 2008-12-12 Mark Probst <mark.probst@gmail.com>
767 * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
768 descriptors for helper functions directly in front of the code.
770 2008-12-11 Mark Probst <mark.probst@gmail.com>
772 * method-to-ir.c: Removed an unnecessary assertion.
774 2008-12-10 Zoltan Varga <vargaz@gmail.com>
776 * method-to-ir.c: Merge SGEN changes from the old JIT.
778 2008-12-10 Zoltan Varga <vargaz@gmail.com>
780 * driver.c (compile_all_methods_thread_main): Handle failure of
783 2008-12-10 Mark Probst <mark.probst@gmail.com>
785 * mini-ppc.c: Merged with mini-ppc64.c.
787 * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
789 * Makefile.am: Use the same sources for PPC and PPC64.
791 * mini-ppc64.c: Removed.
793 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
795 * branch-opts.c (remove_block_if_useless): Extract fall through detection
796 code to mono_bb_is_fall_through.
798 * branch-opts.c (mono_remove_critical_edges): Same.
800 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
802 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
803 expect that an OP_BR_REG will be there.
805 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
807 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
808 for the many branch ops. The original check miss OP_BR_REG.
812 2008-12-09 Mark Mason <mmason@upwardaccess.com>
814 * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
816 2008-12-09 Zoltan Varga <vargaz@gmail.com>
818 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
819 while holding the aot lock.
821 2008-12-09 Mark Mason <mmason@upwardaccess.com>
823 * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
825 2008-12-09 Bill Holmes <billholmes54@gmail.com>
827 * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws
828 to release all runtime callable wrappers held by the runtime.
830 Contributed under MIT/X11 license.
832 2008-12-09 Bill Holmes <billholmes54@gmail.com>
834 * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
837 Contributed under MIT/X11 license.
839 2008-12-09 Zoltan Varga <vargaz@gmail.com>
841 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
842 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
844 2008-12-09 Mark Mason <mmason@upwardaccess.com>
846 * cpu-mips.md: fix ckfinite length
848 * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
849 (mono_arch_lowering_pass): cleanup, rearrange for clarity
850 (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
852 2008-12-08 Mark Mason <mmason@upwardaccess.com>
854 * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
856 2008-12-08 Geoff Norton <gnorton@novell.com>
858 * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
859 size by 8 bytes as well.
861 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
863 * basic-simd.cs: Fix method names for Vector16b.
865 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
867 * basic-simd.cs: Fix method names for Vector16sb.
869 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
871 * basic-simd.cs: Fix method names for Vector8us.
873 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
875 * basic-simd.cs: Fix method names for Vector8s.
877 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
879 * basic-simd.cs: Fix method names for Vector4ui.
881 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
883 * basic-simd.cs: Fix method names for Vector2l.
885 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
887 * basic-simd.cs: Fix method names for Vector2d.
889 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
891 * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
892 that are extension methods.
894 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
896 * basic-simd.cs: Fix method names for Vector4f.
898 2008-12-08 Zoltan Varga <vargaz@gmail.com>
900 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
901 as such. Fixes #456669.
903 2008-12-07 Mark Mason <mmason@upwardaccess.com>
905 * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
907 2008-12-07 Mark Mason <mmason@upwardaccess.com>
909 * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
910 (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
911 (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
912 (mips_adjust_stackframe): handle FP spills
914 * mini-ops.h: add mips_mtc1_s2
916 * cpu-mips.md: add mips_mtc1_s2
918 2008-12-07 Zoltan Varga <vargaz@gmail.com>
920 * unwind.c: New file, move the unwind info encoding functions here from
921 aot-compiler.c, so they could be used at runtime too.
923 2008-12-05 Mark Mason <mmason@upwardaccess.com>
925 * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
926 (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
928 2008-12-05 Mark Mason <mmason@upwardaccess.com>
930 * mini-mips.c: cleanup warnings
931 (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
932 (mips_adjust_stackframe): handle case of taking the address of stack locals
934 2008-12-05 Zoltan Varga <vargaz@gmail.com>
936 * aot-compiler.c: Implement a few functions missing from the asm writer.
937 (emit_method_code): Only write symbols for methods when using the bin
938 writer, since the assembler can't deal with the characters in our method
941 * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
943 * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
946 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
947 a bit to also restore %rax.
949 2008-12-05 Mark Probst <mark.probst@gmail.com>
951 * mini-ppc.c: Some simple merges from mini-ppc64.c.
953 2008-12-05 Zoltan Varga <vargaz@gmail.com>
955 * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
958 2008-12-05 Mark Probst <mark.probst@gmail.com>
960 * exceptions-ppc.c: Merged with exceptions-ppc64.c.
962 * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
963 MONO_ARCH_FRAME_ALIGNMENT. Struct for PPC64 function descriptors.
965 * exceptions-ppc64.c: Removed.
967 * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
969 2008-12-05 Mark Probst <mark.probst@gmail.com>
971 * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
974 * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
976 * tramp-ppc64.c: Removed.
978 2008-12-05 Zoltan Varga <vargaz@gmail.com>
980 * aot-compiler.c (add_generic_instances): Skip non-generic classes in
983 2008-12-05 Mark Probst <mark.probst@gmail.com>
985 * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
987 * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
988 mini-ppc.h instead of mini-ppc64.h.
990 * mini-ppc64.h: Removed.
992 2008-12-04 Mark Mason <mmason@upwardaccess.com>
994 * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
996 * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
998 2008-12-05 Mark Probst <mark.probst@gmail.com>
1000 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
1001 Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
1004 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1006 * basic-simd.cs: Tests for operator == and != on Vector8us and Vector16b.
1008 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1010 * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
1012 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1014 * basic-simd.cs: Tests for operator == and != on Vector4f.
1016 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1018 * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
1020 * simd-intrinsics.c: Kill useless enum.
1022 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1024 * cpu-mips.md: add long_conv_to_ovf_i4_2
1025 * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
1027 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1029 * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
1031 * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
1033 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1035 * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
1037 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1039 * basic-simd.cs: Add tests for new methods.
1041 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1043 * simd-intrinsics.c: Add support for operator == and !=
1046 * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
1048 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1050 * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
1052 2008-12-04 Zoltan Varga <vargaz@gmail.com>
1054 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
1056 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
1057 MONO_PATCH_INFO_ICALL_ADDR.
1059 * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
1061 * aot-compiler.c: Resurrect full-aot support.
1063 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1065 * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
1067 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1069 * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
1071 2008-12-03 Rodrigo Kumpera <rkumpera@novell.com>
1073 * basic-simd.cs: Fix tests to work under ppc.
1074 Remove tests for methods that will be removed.
1076 2008-12-03 Mark Probst <mark.probst@gmail.com>
1078 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
1079 generic type (via a typedef or typeref) correctly.
1081 2008-12-03 Zoltan Varga <vargaz@gmail.com>
1083 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
1084 diagnose an assertion failure.
1086 2008-12-02 Mark Probst <mark.probst@gmail.com>
1088 * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
1089 Fix trampoline size.
1091 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
1092 conversion opcodes are implemented natively instead via emulation.
1094 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1096 * cpu-mips.md: remove mips_xori
1098 * mini-ops.h: remove mips_xori
1100 * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
1102 * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
1104 * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
1106 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1108 * cpu-mips.md: fix instruction lengths.
1110 * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
1112 * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
1114 * mini-ops.h: fix slti / sltiu op profiles.
1116 2008-12-02 Martin Baulig <martin@ximian.com>
1118 * method-to-ir.c (mono_method_to_ir): Disable debugging
1119 information for the init locals block to make the debugger stop
1120 after all locals have been initalized.
1122 2008-12-02 Martin Baulig <martin@ximian.com>
1124 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
1125 running inside the debugger.
1127 2008-12-01 Zoltan Varga <vargaz@gmail.com>
1129 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
1132 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
1133 alu->alu imm optimization which only shows if deadce is disabled.
1135 * aot-compiler.c: Rename the function names for the binary and asm writers
1136 so they can coexist in the same process. Rework the xdebug code to use the
1137 asm writer. This avoids the need to call into the runtime to dump the
1138 debugging info. Add more debugging info for types.
1140 * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
1142 * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
1143 cpu description tables, they can't occur in cpu-<ARCH>.md.
1145 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
1146 the stack in CEE_LDFLDA. Fixes #450542.
1148 * generics.cs: Add a new test.
1150 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1152 * mini-ops.h: updated MIPS opcodes
1153 * mini-mips.c: decompose long opts
1154 * mini-mips.h: decompose long opts
1156 2008-11-29 Mark Mason <mmason@upwardaccess.com>
1158 * cpu-mips.md: fix length on int_rem_un
1159 * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
1161 2008-11-29 Zoltan Varga <vargaz@gmail.com>
1163 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
1165 * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
1167 2008-11-29 Martin Baulig <martin@ximian.com>
1169 * mini-exceptions.c (mono_handle_native_sigsegv): Check
1170 mono_debug_using_mono_debugger() in addition to the
1171 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
1173 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1175 * mini-ops.h: updated more MIPS opcodes
1176 * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
1177 * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
1179 2008-11-28 Mark Probst <mark.probst@gmail.com>
1181 * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
1183 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1185 * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
1186 * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
1187 * mini-ops.h: correct selected mips opcode entries
1189 2008-11-28 Mark Probst <mark.probst@gmail.com>
1191 * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
1194 2008-11-28 Mark Probst <mark.probst@gmail.com>
1196 * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
1198 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1200 * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
1201 * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
1202 * mini-mips.h: disable IMT
1203 * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
1205 2008-11-28 Mark Probst <mark.probst@gmail.com>
1207 * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
1209 2008-11-28 Mark Probst <mark.probst@gmail.com>
1211 * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
1213 2008-11-28 Zoltan Varga <vargaz@gmail.com>
1215 * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
1218 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1220 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1221 for Set/GetVector aligned versions.
1223 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1225 * basic-simd.cs: Add tests for Get/SetVector.
1227 2008-11-27 Mark Probst <mark.probst@gmail.com>
1229 * mini.c: Removed g_slist_append_mempool(). Now in
1232 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1234 * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
1235 size properly and make the bounds check optional.
1237 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1238 for SetVector and IsAligned.
1240 2008-11-27 Zoltan Varga <vargaz@gmail.com>
1242 * mini.c: Remove unused mono_normalize_opcodes () function.
1244 2008-11-26 Mark Probst <mark.probst@gmail.com>
1246 * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
1247 using the new atomic add ops now.
1249 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
1252 2008-11-26 Mark Probst <mark.probst@gmail.com>
1254 * mini-ppc64.c: Several fixes.
1256 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1258 * cpu-mips.md: added jump_table
1259 * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.
1261 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1263 * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
1265 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1267 * mini-ops.h: corrected a handful of MIPS opcodes.
1269 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1271 * aot-compiler.c: MIPS to use ELF writer
1273 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1275 * mini-codegen.c: remove MIPS specific assert.
1277 2008-11-25 Mark Probst <mark.probst@gmail.com>
1279 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
1280 fixes. PPC64 now passes most of the runtime regressions.
1282 2008-11-24 Zoltan Varga <vargaz@gmail.com>
1284 * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
1285 volatile intervals a bit.
1287 2008-11-24 Mark Probst <mark.probst@gmail.com>
1289 * basic-long.cs: New test case.
1291 2008-11-23 Zoltan Varga <vargaz@gmail.com>
1293 * mini.c (mini_method_compile): Disable globalra for large methods for
1296 * regalloc2.c (order_moves): Add fp support.
1298 * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
1299 source bblock ends with an OP_BR_REG.
1301 * ratests.cs: Add a new test.
1303 2008-11-23 Mark Probst <mark.probst@gmail.com>
1305 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
1306 sharing. PPC64 now passes generics.exe.
1308 2008-11-23 Mark Probst <mark.probst@gmail.com>
1310 * mini-ppc64.c: Several fixes. PPC64 now runs iltests.exe.
1312 2008-11-23 Zoltan Varga <vargaz@gmail.com>
1314 * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
1315 memory when mono_jit_info_table_find () can't find the method in the
1318 * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
1321 * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
1324 2008-11-23 Mark Probst <mark.probst@gmail.com>
1326 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
1327 Several fixes. PPC64 now runs exceptions.exe and
1328 devirtualization.exe.
1330 2008-11-22 Mark Probst <mark.probst@gmail.com>
1332 * mini-ppc64.c, tramp-ppc64.c: Small fixes. PPC64 now runs
1333 arrays.exe and basic-math.exe.
1335 2008-11-22 Mark Probst <mark.probst@gmail.com>
1337 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
1338 cpu-ppc64.md: Several fixes. PPC64 now runs objects.exe.
1340 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1342 * simd-intrinsics.c: Add support ArrayExtension intrinsics.
1344 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1346 * method-to-ir.c: Move bounds checking macros to ir-emit.h
1348 * ir-emit.h: Move macros from method-to-ir.c to here.
1350 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1352 * mini-ops.h: Correct the long simd ops to use LREG.
1354 2008-11-21 Zoltan Varga <vargaz@gmail.com>
1356 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
1358 * mini-ops.h: Correct the dreg type of a few long opcodes.
1360 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
1363 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
1365 * mini-ppc.c: remove negative stack references in epilog
1366 for platforms that don't support the red zone.
1368 2008-11-21 Mark Probst <mark.probst@gmail.com>
1370 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
1371 point regs. Now PPC64 passes basic-calls.exe.
1373 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1375 * basic-simd.cs: Add tests for accessors of Vector2l.
1377 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1379 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
1381 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
1383 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
1385 2008-11-21 Mark Probst <mark.probst@gmail.com>
1387 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
1388 PPC64 passes basic-long.exe.
1390 2008-11-20 Mark Probst <mark.probst@gmail.com>
1392 * decompose.c: Decompose carry and overflow add on PPC64 like on
1393 other 64 bit archs. Don't decompose sub at all on PPC64.
1395 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
1396 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
1399 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1401 * basic-simd.cs: Add tests for accessors of Vector2d.
1403 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1405 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
1409 * mini-x86.c (mono_arch_output_basic_block): Same.
1411 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
1413 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1415 * basic-simd.cs: Add tests for accessors of Vector4f.
1417 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1419 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
1423 * mini-x86.c (mono_arch_output_basic_block): Same.
1425 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
1427 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1429 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
1431 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1433 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
1437 * mini-x86.c (mono_arch_output_basic_block): Same.
1439 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
1441 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1443 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
1445 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1447 * simd-intrinsics.c: Enable setters for Vector16sb.
1449 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1451 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
1455 * mini-x86.c (mono_arch_output_basic_block): Same.
1457 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
1459 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
1461 * simd-intrinsics.c: Implement setter for Vector8us.
1463 2008-11-19 Zoltan Varga <vargaz@gmail.com>
1465 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
1468 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1470 * mini-ppc.c: remove references to the red zone in the prolog
1471 (for systems that don't support it).
1473 2008-11-19 Mark Probst <mark.probst@gmail.com>
1475 * cpu-ppc64.md: Fixed a few instruction lengths.
1477 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
1480 2008-11-19 Mark Probst <mark.probst@gmail.com>
1482 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
1485 2008-11-19 Zoltan Varga <vargaz@gmail.com>
1487 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
1489 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
1491 * mini-ops.h: Added OP_INSERT_I2.
1495 * mini-x86.c (mono_arch_output_basic_block): Same.
1497 * simd-intrinsics.c: Implement setter for Vector8s.
1499 * simd-methods.h: Add the names of get setters of Vector8s.
1501 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1503 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
1505 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
1508 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1510 2008-11-18 Mark Probst <mark.probst@gmail.com>
1512 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
1513 for PPC64. An empty program runs now.
1515 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1517 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1519 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
1520 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
1521 info for JITted code is emitted into a shared library, loadable into gdb.
1523 2008-11-18 Mark Probst <mark.probst@gmail.com>
1525 * Makefile.am: Changes to build PPC64.
1527 * mini-arch.h: Include mini-ppc64.h on PPC64.
1529 2008-11-18 Mark Probst <mark.probst@gmail.com>
1531 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
1532 in PPC code up to r119147.
1534 2008-11-18 Mark Probst <mark.probst@gmail.com>
1536 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1537 cpu-ppc64.md: Changes for PPC64.
1539 Based on code submitted by andreas.faerber@web.de at
1540 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
1543 2008-11-18 Mark Probst <mark.probst@gmail.com>
1545 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1546 cpu-ppc64.md: Copied from the corresponding PPC files from
1549 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
1551 * mini-ops.h: Added OP_ROUND.
1553 * cpu-x86.md: Added round.
1555 * mini-x86.c: Added support for intrinsicing Math.Round (double).
1557 * basic-math.cs: Added test_0_round to test rounding.
1559 Contributed under MIT/X11 license.
1561 2008-11-17 Bill Holmes <billholmes54@gmail.com>
1563 * aot-compiler.c : Fix the Winx64 build.
1565 Contributed under MIT/X11 license.
1567 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1569 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
1570 in OP_EXTRACT_R8 to avoid possible stack corruption.
1572 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1574 * mini-ops.h: Added OP_EXTRACT_R8/I8.
1576 * cpu-x86.md: Added extract_r8.
1578 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
1580 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
1581 a couple of OP_EXTRACT_I4.
1583 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
1585 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
1587 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1589 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
1592 2008-11-17 Zoltan Varga <vargaz@gmail.com>
1594 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
1595 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
1597 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
1598 are not needed any more.
1600 * mini.h: Remove the unused INS_LIST macros.
1602 * mini.c (mini_method_compile): Remove a disable globalra case which is no
1605 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
1608 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
1609 mono_alloc_ireg () instead.
1611 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
1614 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
1617 * aot-runtime.c (load_aot_module): Disable AOT when running under
1620 * mini-amd64.h: Change the monitor fastpath defines to check for
1621 !PLATFORM_WIN32 so they work on *bsd too.
1623 * mini.h mini.c mini-hhpa.c: Remove more unused code.
1625 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
1627 * mini.h (MonoCompile): Remove new_ir flag.
1629 * regalloc.h regalloc.c: Remove unused code.
1631 * cpu-*.md: Remove more unused opcodes.
1633 * simple-cee-ops.h simple-mini-ops.h: Removed.
1635 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
1637 2008-11-17 Zoltan Varga <vargaz@gmail.com>
1639 * aliasing.h: Removed.
1641 * *.c: Remove references to aliasing.h and inssel.h.
1643 * mini.c: Remove additional unused functions.
1645 * mini-ops.h cpu-*.md: Remove unused opcodes.
1647 2008-11-16 Zoltan Varga <vargaz@gmail.com>
1649 Remove the old JIT code.
1651 * inssel*.brg: Removed.
1653 * ssa.c abcremoval.c aliasing.c: Removed.
1655 * ssa2.c: Renamed to ssa.c.
1657 * abcremoval2.c: Renamed to abcremoval.c.
1659 * *.c: Removed all !cfg->new_ir code.
1661 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
1662 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
1664 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
1666 2008-11-16 Zoltan Varga <vargaz@gmail.com>
1668 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
1669 to simplify the code and cut back on the number of global symbols in the AOT
1672 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
1674 2008-11-15 Zoltan Varga <vargaz@gmail.com>
1676 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
1677 with the got/got_info tables.
1679 * mini.h: Bump AOT file format version.
1681 * unwind.h: New file, contains definitions for stack unwinding.
1683 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
1686 * aot-compiler.c: Generalize the emitting of unwind information to use the
1687 information in cfg->unwind_ops.
1689 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
1691 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
1692 AOT method frames. Enable writing symbols for methods by default.
1694 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
1696 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
1697 and make it work with vectors of element sizes 1, 2 and 4.
1699 * simd-intrinsics.c: Enable getter for all vectors with element size
1702 * simd-methods.h: Add the names of other getters.
1704 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
1710 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
1712 * mini-ppc.h: portability fix.
1714 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1716 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
1717 buggy and will overwrite it.
1719 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1721 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
1722 Use it to emit local symbols for all methods so AOTed methods show up with
1723 their full name in gdb/valgrind output.
1725 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1727 * mini-ppc.c: portability fixes.
1729 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1731 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
1732 entries out of the if (!generic_shared...) code so it is always done.
1733 (mono_class_init_trampoline): Do the patching when running under valgrind
1734 too, newer versions of valgrind have no problems with it.
1736 2008-11-13 Zoltan Varga <vargaz@gmail.com>
1738 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
1741 2008-11-13 Mark Probst <mark.probst@gmail.com>
1743 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
1746 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1748 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
1750 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1752 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
1758 * simd-intrinsics.c: Same.
1760 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1762 * simd-intrinsics.c: Enable constructor intrinsics for all types.
1764 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1766 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
1767 to work with more Vector types.
1769 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1771 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
1772 store the elemens directly instead of using and intermediate.
1774 2008-11-13 Zoltan Varga <vargaz@gmail.com>
1776 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
1778 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
1779 to preserve %eax for aot plt trampolines.
1781 * aot-compiler.c (compile_method): Don't skip synchronized methods.
1782 (encode_method_ref): Flag synchronized methods so they won't go through
1785 * aot-compiler.c: Additional work to support AOTing synchronized methods/
1788 * cpu-ia64.md (jmp): Increase max length.
1790 2008-11-12 Zoltan Varga <vargaz@gmail.com>
1792 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
1793 open generic classes.
1795 * aot-compiler.c: Enable the ELF writer on ELF platforms.
1797 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
1798 box+brtrue optimization since it causes test failures on x86.
1800 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
1802 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
1808 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
1809 for simd ctor values.
1811 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
1812 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
1814 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
1816 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
1819 * simd-instrincs.c: Same.
1821 * basic-simd.cs: Same.
1823 2008-11-12 Zoltan Varga <vargaz@gmail.com>
1825 * ratests.cs: Add more tests.
1827 * regalloc2.c (add_spill_code): Handle more corner cases.
1829 2008-11-11 Zoltan Varga <vargaz@gmail.com>
1831 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
1832 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
1833 both the source an destination of an instruction.
1835 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1837 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
1838 wapihandles.c: more portability changes.
1840 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
1842 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
1843 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
1844 safe to execute in a signal handler and the kernel provides better
1845 the info in /proc/self/smaps. Avoid the assert on sigaction during
1848 2008-11-11 Zoltan Varga <vargaz@gmail.com>
1850 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
1851 do the bblock linking hack if it is actually needed.
1853 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
1856 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
1857 crash problem is fixed.
1859 * branch-opts.c (mono_remove_critical_edges): Link up newly added
1862 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
1864 (mini_method_compile): Set the starting value of next_vreg to
1865 MAX_IREGS + MAX_FREGS when using globalra.
1867 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
1868 filter clauses with BB_EXCEPTION_HANDLER.
1870 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
1872 2008-11-10 Mark Probst <mark.probst@gmail.com>
1874 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
1875 space for stdcall. Fixes regressions on Win32.
1877 2008-11-10 Zoltan Varga <vargaz@gmail.com>
1879 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
1881 (linear_scan): Remove an assert which doesn't seem to be needed.
1883 * local-propagation.c (mono_local_deadce): Avoid a call to
1884 MONO_DELETE_INS which would screw up the instruction linking.
1886 * mini.c (mono_decompose_op_imm): Make this work with globalra.
1888 * regalloc2.c: Upgrade to work the current JIT code.
1890 2008-11-09 Zoltan Varga <vargaz@gmail.com>
1892 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
1895 * aot-runtime.c: Remove some dead code.
1897 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
1899 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
1901 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
1902 trampolines using sscanf since atoi doesn't work on large unsigned values.
1904 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
1905 Initialize code_size.
1907 2008-11-08 Mark Probst <mark.probst@gmail.com>
1909 * method-to-ir.c (mini_emit_inst_for_method): Make
1910 Interlocked.CompareExchange work for Int arguments on 32 bit
1913 2008-11-07 Mark Probst <mark.probst@gmail.com>
1915 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
1917 2008-11-06 Bill Holmes <billholmes54@gmail.com>
1919 * main.c Fix MSVC build.
1921 Contributed under MIT/X11 license.
1923 2008-11-06 Mark Probst <mark.probst@gmail.com>
1925 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
1926 alignment larger than 8 bytes are aligned correctly, too.
1928 * mini.c: Honor the min_align field of MonoClass when laying out
1931 2008-11-06 Zoltan Varga <vargaz@gmail.com>
1933 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
1935 * aot-compiler.c (emit_plt): Fix a warning.
1937 * aot-compiler.c: Implement ARM support in the binary writer.
1939 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1941 * basic-simd.cs: Add test for getter with byref arg.
1942 Fix the naming of a few tests.
1943 Add missing checks to a test.
1945 2008-11-05 Zoltan Varga <vargaz@gmail.com>
1947 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
1949 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
1950 most of the full-aot support for monitor enter/exit trampolines.
1952 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
1953 enter/exit trampoline creation functions.
1955 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
1958 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
1960 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
1961 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
1962 implement the needed functionality without adding crap to the runtime.
1964 2008-11-05 Zoltan Varga <vargaz@gmail.com>
1966 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
1969 * mini.c (mono_build_date): New global version holding the build date in
1972 * Makefile.am (buildver.c): Generate a file containing the build date.
1974 * main.c: Set the build date from the generated file.
1976 * mini.c (mono_get_runtime_build_info): New helper function returning build
1977 information in a string format.
1979 * driver.c (mono_main): Print the build date in --version.
1981 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
1982 file when the bind-to-runtime-version option is used.
1984 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1986 * simd-intrinsics.c: Fix bug when using getters and byref args.
1988 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1990 * simd-methods.h: Rename prefetch methods.
1992 * simd-intrinsics.c: Same.
1994 2008-11-05 Mark Probst <mark.probst@gmail.com>
1996 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
1999 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2001 * aot-compiler.c: Use the bundled elf header files instead of depending on
2004 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
2007 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
2010 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2012 * cpu-x86.md: Add store nta ops.
2018 * mini.h: Add an enum for simd prefetch modes.
2020 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
2021 of store. Use the changed code to support store nta.
2023 * simd-intrinsics.c: Add prefetch ops for all vector types.
2025 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2027 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
2030 * aot-compiler.c: Use statically allocated buffers for constructing symbol
2033 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
2036 2008-11-04 Mark Probst <mark.probst@gmail.com>
2038 * mini-x86.c: Fixed commit.
2040 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2042 * aot-compiler.c (emit_plt): Align the plt section only on x86.
2044 2008-11-04 Mark Probst <mark.probst@gmail.com>
2046 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
2047 and MONITOR_EXIT, for the ASM fastpaths.
2049 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
2052 * mini.c, patch-info.h: Signature and patch infos for
2053 Monitor.Enter/Exit trampolines.
2055 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
2057 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
2058 Monitor.Enter/Exit ASM fastpath for Linux.
2060 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2062 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
2064 * objects.cs: Add a new test.
2066 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
2068 * aot-runtime.c (load_method): Run class initialization in the PLT case even
2069 if MONO_LOG_LEVEL is set.
2071 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
2073 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
2075 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
2077 * aot-compiler.c: Change the relocation code to use virtual addresses instead
2078 of file offsets. Align the sections belonging to the data segment to
2081 2008-11-03 Zoltan Varga <vargaz@gmail.com>
2083 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
2084 elf.h. Port it to amd64.
2086 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2088 * driver.c: Enable SIMD by default.
2090 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2092 * cpu-x86.md: Add prefetch op.
2098 * mini.h: Add an enum for simd prefetch modes.
2100 * simd-methods.h: Add prefetch function names.
2102 * simd-intrinsics.c: Add prefetch ops for all vector types.
2104 2008-11-03 Zoltan Varga <vargaz@gmail.com>
2106 * aot-compiler.c (emit_bytes): Speed this up a little.
2108 2008-11-02 Zoltan Varga <vargaz@gmail.com>
2110 * aot-compiler.c: Add JIT time etc. statistics.
2112 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
2114 * mini.h (MonoCompile): Add 'got_offset' field.
2116 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
2117 method_got_offsets array.
2119 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
2122 * aot-compiler.c (compile_method): Add generic method instances referenced
2123 by the method to the list of methods to be compiled, this is required so if
2124 A<T> references B<T>, and another assembly references A<int>, then it will
2125 also get a copy of B<int>.
2127 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
2128 when checking for monitor enter/exit.
2130 2008-10-30 Mark Probst <mark.probst@gmail.com>
2132 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
2133 for Monitor.Enter and Monitor.Exit if enabled.
2135 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
2138 2008-10-30 Zoltan Varga <vargaz@gmail.com>
2140 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
2141 of an OP_MOVE. Fixes #440046.
2143 * basic-long.cs: Add a new test.
2145 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
2147 * mini.h: Add synchronization note for the managed counter-part.
2149 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
2150 returns the simd caps of the current cpu.
2152 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
2154 * basic-simd.cs: Remove Console.WriteLine.
2156 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2158 * basic-simd.cs: New tests for Vector2ul.
2160 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2162 * simd-intrinsics.c: Add new vector type Vector2ul.
2164 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2166 * basic-simd.cs: New tests for Vector2l.
2168 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2170 * cpu-x86.md: Add long version of most packed int ops.
2176 * simd-intrinsics.c: Add new vector type Vector2l.
2178 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2180 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
2182 * simd-methods.h: Remove SN_op_BitwiseXor.
2184 2008-10-28 Zoltan Varga <vargaz@gmail.com>
2186 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
2189 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2191 * basic-simd.cs: Test for Vector2d.
2193 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
2196 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2198 * cpu-x86.md: Add double version of all packed float ops.
2204 * simd-intrinsics.c: Add new vector type Vector2d.
2206 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
2208 * simd-methods.h: Add Duplicate.
2210 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2212 * basic-simd.cs: Test for packing with signed saturation.
2214 2008-10-28 Zoltan Varga <vargaz@gmail.com>
2216 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
2217 found in the TYPESPEC table.
2219 2008-10-26 Zoltan Varga <vargaz@gmail.com>
2221 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
2224 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2226 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
2227 instead of the RVA, since the RVA can be changed by tools like the cil
2230 * method-to-ir.c (mono_method_to_ir2): Ditto.
2232 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
2233 (deserialize_variable): Ditto.
2235 2008-10-25 Martin Baulig <martin@ximian.com>
2237 * debug-mini.c (write_variable): Use
2238 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
2240 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2242 * cpu-x86.md: Add unsigned variants of packd and packw.
2246 * mini-x86.h: Emit the right instruction for packd and packw.
2247 Add unsigned variants of packd and packw.
2249 * simd-intrinsics.c: Packd and packw were used in place of their
2250 unsigned variants. Change that.
2251 Add intrinsics for (Signed)PackWithSignedSaturation.
2253 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
2255 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2257 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
2259 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2261 * mini-ops.h: Remove dword packed add/sub with saturation ops.
2263 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
2265 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
2268 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
2270 2008-10-24 Mark Probst <mark.probst@gmail.com>
2272 * method-to-ir.c, mini.c: Special casing for the synchronized
2273 wrapper for the ldtoken+GetTypeFromHandle case.
2275 2008-10-24 Zoltan Varga <vargaz@gmail.com>
2277 * mini.c (mono_replace_ins): Move this to branch-opts.c.
2279 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
2280 created/split bblocks.
2282 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2284 * mini-ops.h: Add packed signed mul high.
2288 * mini-x86.c (mono_arch_output_basic_block): Same.
2290 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
2292 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
2294 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2296 * basic-simd.cs: Tests for Vector16sb.
2298 2008-10-24 Zoltan Varga <vargaz@gmail.com>
2300 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
2302 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2304 * mini-ops.h: Add packed signed min, max and compare greater.
2308 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
2311 * simd-methods.h: Add CompareGreaterThan.
2313 * simd-methods.h: Remove CompareEquals.
2315 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
2317 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
2319 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
2322 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2324 * basic-simd.cs: Fix tests due to change in the API.
2326 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2328 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
2330 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2332 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
2334 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
2335 inst_offset as this has invalid values for LDADDR.
2337 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2339 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2341 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
2343 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2345 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
2346 for accessing field->data.
2348 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2350 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2352 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2354 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
2356 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
2358 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2360 * dominators.c (mono_compute_natural_loops): Allocate GList enties
2361 from the cfg mempool.
2363 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
2365 * basic-simd.cs: Tests for new methods in Vector8us.
2367 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
2369 * mini-ops.h: Add multiply and store high.
2373 * mini-x86.c (mono_arch_output_basic_block): Same.
2375 * simd-methods.h: Same.
2377 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
2380 2008-10-19 Zoltan Varga <vargaz@gmail.com>
2382 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
2383 mono_class_setup_vtable ().
2385 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
2386 mono_class_get_vtable_entry () for accessing klass->vtable.
2388 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
2390 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
2393 * method-to-ir.c (mono_save_token_info): Don't save references made from
2396 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
2397 of generic instances.
2399 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
2401 2008-10-19 Mark Probst <mark.probst@gmail.com>
2403 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
2404 OP_JMP depends on the method signature. Calculate it properly.
2406 2008-10-19 Zoltan Varga <vargaz@gmail.com>
2408 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
2411 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
2413 (emit_extra_methods): Add another table mapping method indexes to
2414 offsets in the extra_method_info table.
2416 * mini.h: Bump AOT file format version.
2418 * aot-runtime.c: Merge most of the code from mono_aot_get_method
2419 and mono_aot_get_method_from_token () into one function.
2421 2008-10-19 Mark Probst <mark.probst@gmail.com>
2423 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
2426 2008-10-18 Zoltan Varga <vargaz@gmail.com>
2428 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
2431 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
2434 * mini.c (mono_patch_info_equal): Compare the generic context as well.
2436 * mini.h: Bump aot file format version.
2438 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
2439 AOT file can contain native code for methods which are not in the METHOD
2440 table. Generate code for non-sharable generic instances of generic methods
2441 found in the METHODSPEC table.
2443 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
2444 encoding generic type handles.
2446 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
2447 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
2449 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
2450 macros + MONO_ADD_INS.
2452 * mini.c (mono_jump_info_token_new2): New function which takes a generic
2455 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
2457 * mini.h: Bump aot file format version.
2459 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
2461 2008-10-17 Mark Probst <mark.probst@gmail.com>
2463 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
2464 platforms, with definable stack alignment value. Set to 16 now
2467 * mini.c, mini.h, driver.c: Command line option for disabling
2470 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2472 * basic-simd.cs: Tests for new methods in Vector4ui.
2474 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2476 * mini-ops.h: Add packed int shuffle.
2480 * mini-x86.c (mono_arch_output_basic_block): Same.
2482 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
2483 extract mask, max, min, shuffle.
2485 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
2487 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2489 * basic-simd.cs: Tests for new methods in Vector8us.
2491 2008-10-17 Mark Probst <mark.probst@gmail.com>
2493 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
2494 RuntimeTypeHandle, not a TypedReference.
2496 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
2498 * simd-intrinsics.c: remove relocations.
2500 2008-10-17 Zoltan Varga <vargaz@gmail.com>
2502 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
2503 optimizations from the x86 backend.
2505 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
2507 * simd-methods.h, simd-intrinsics.c: debloat method names and
2508 prepare for no relocations.
2510 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2512 * mini-ops.h: Add packed min/equal and sum of absolute differences.
2516 * mini-x86.c (mono_arch_output_basic_block): Same.
2518 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
2519 extract mask, max, min and sum of absolute differences.
2521 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
2524 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2526 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
2527 Renamed one test for consistency.
2529 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2531 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
2532 fix to the code that deal with other blocks.
2534 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2536 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
2538 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2540 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
2541 that deals with vreg interference. Explicitly check for OP_LDADDR to be
2542 able to process the source reg.
2544 2008-10-16 Martin Baulig <martin@ximian.com>
2546 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
2548 * inssel.brg: Add `OP_HARD_NOP'.
2550 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
2552 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
2553 `OP_HARD_NOP' instruction when running inside the debugger.
2555 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
2556 `OP_HARD_NOP' instruction when running inside the debugger.
2558 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2560 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
2561 now works. The issue with the regalloc tripping up no longer
2564 * simd-intrinsics.c (load_simd_vreg): Same.
2566 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2568 * basic-simd.cs: Tests for new Vector8ui methods.
2570 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2572 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
2573 only for type. This fixes crashes where MonoInst::klass is checked
2574 for ops of type != VTYPE or OBJ.
2576 * simd-intrinsics.c (load_simd_vreg): Same.
2578 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2580 * mini-ops.h: Add ops for packed shuffle/max/avg and
2585 * mini-x86.c (mono_arch_output_basic_block): Same.
2587 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
2590 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
2591 to emit extract mask op.
2593 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
2594 to emit word shuffles.
2596 2008-10-15 Mark Probst <mark.probst@gmail.com>
2598 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
2599 the largest alignment needed by a variable, but at least
2602 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2604 * basic-simd.cs: Tests for the fixes in the last commit.
2606 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2608 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
2609 no longer handles STACK_PTR input.
2611 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
2613 * simd-intrinsics.c (load_simd_vreg): New function that works like
2614 get_simd_vreg but handles STACK_PTR input.
2616 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
2617 as the input can be an arbitrary pointer.
2619 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
2620 LDADDR local optimization directly otherwise use a store op.
2622 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2624 * basic-simd.cs: Tests for dup low and dup high.
2626 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2628 * mini-ops.h: Add dup low and dup high ops.
2632 * mini-x86.c (mono_arch_output_basic_block): Same.
2634 * simd-intrinsics.c (vector4f_intrinsics): Same.
2636 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2638 * basic-simd.cs: Tests for recently added functionality.
2640 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2642 * mini-ops.h: Add remaining sse1 fp ops.
2644 * cpu-x86.md: Add remaining sse1 fp ops.
2646 * mini-x86.c (mono_arch_output_basic_block): Same.
2648 * mini.h: Add enum for simd FP compare conditions.
2650 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
2652 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
2653 so the backed can generate the appropriate op.
2655 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2656 This patch squeese one more byte from the SimdIntrinsc struct.
2658 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
2659 a a shift amount intead of simply or'ing it.
2661 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
2663 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
2664 byte so we can have an aditional flags field without increasing struct size.
2666 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
2667 against the simd_supported_versions bitmask.
2669 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
2671 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
2673 * mini.c: remove rawbuffer code (the only use here is unsafe because
2674 it takes locks during signal handling and the kernel now provides much
2675 better info in proc/pid/smaps these days).
2677 2008-10-13 Zoltan Varga <vargaz@gmail.com>
2679 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
2680 OP_X86_PUSH_OBJ. Fixes #434620.
2682 * objects.cs: Add a test.
2684 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
2686 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
2687 that the packuswb/packusdw don't work with unsigned numbers for what
2688 would be negative numbers in signed format.
2690 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
2691 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
2693 * mini-ops.h: Add doubleword forms of many ops and packing ones.
2695 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
2697 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
2699 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
2701 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
2704 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
2705 version as the enum in mini.h.
2707 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
2708 for sse3 ops, check the simd_version field if present. This way the code
2709 works with all versions of sse.
2711 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2713 * simd-intrinsics.c: Fixed intrinsic name typo.
2715 * mini.h: Added missing simd exported function.
2717 * basic-simd.cs: Added tests for Vector4ui.
2718 Fixed broken test for Vector16b.
2720 2008-10-10 Zoltan Varga <vargaz@gmail.com>
2722 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
2723 the max length to 64.
2725 2008-10-10 Mark Probst <mark.probst@gmail.com>
2727 * method-to-ir.c: Only do the fast virtual generic method call for
2728 non-wrapper methods.
2730 * mini.h, mini-trampolines.c: The new generic virtual remoting
2731 trampoline handles virtual method calls via the vtable (as done by
2732 the fast virtual generic method calls) to remoting proxies.
2734 * mini.c (mono_jit_create_remoting_trampoline): For generic
2735 methods reate a generic virtual remoting trampoline.
2737 * mini-amd64.h: Enable fast virtual generic method calls again.
2739 2008-10-10 Mark Probst <mark.probst@gmail.com>
2741 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
2742 restore registers when doing tail calls.
2744 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2746 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
2749 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2751 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
2753 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2755 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
2757 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2759 * basic-simd.cs: Retrofit for API changes.
2761 2008-10-10 Mark Probst <mark.probst@gmail.com>
2763 * mini-ppc.c: Handle integer stack arguments for tail calls.
2765 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2767 * optflags-def.h: Removed sse3 optimization.
2771 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
2774 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
2776 * mini.h: Added enumeration with simd versions.
2778 * simd-intrinsics.c (emit_intrinsics): Use the new static var
2781 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
2783 * mini.c (mini_init): Call mono_simd_intrinsics_init.
2785 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2787 * basic-simd.cs: Added tests for Vector8u and Vector16u.
2789 * basic-simd.cs: Fixed test naming.
2791 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2793 * mini-ops.h: Added ops for packed and saturated math, shifts
2794 and packing/unpacking.
2796 * cpu-x86.md: Added descriptors for the above ops.
2798 * mini-x86.c: Added code to emmit the above ops.
2800 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
2802 2008-10-08 Zoltan Varga <vargaz@gmail.com>
2804 * aot-compiler.c (compile_method): Enable AOT for generic code.
2806 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
2808 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
2810 * mini.c: add a workaround for a common screwup that ends up blamed
2811 to mono (other processes blocking signal delivery).
2813 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2815 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
2816 in the LDFLD/STFLD opcodes. Fixes #432673.
2818 * iltests.il.in: Add a new test.
2820 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
2822 * mini-arm.c: attach the thread in unmanaged->managed transitions
2823 using delegates (bug #433148).
2825 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
2827 * basic-simd.cs: Use new ShuffleSel constants.
2829 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
2831 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
2833 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
2834 only disable simd intrinsics if no sse2 is detected.
2836 * optflags-def.h: Added sse3.
2838 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
2841 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2843 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
2844 when adding delegate-invoke wrappers.
2846 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2848 * Makefile.am: Reenable the simd tests.
2850 2008-10-07 Bill Holmes <billholmes54@gmail.com>
2852 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
2853 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
2854 other vreg is allocated to that hreg.
2856 Contributed under MIT/X11 license.
2858 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2860 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
2863 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
2865 * basic-simd.cs: New test suite for SIMD intrinsics.
2867 * Makefile.am: Added new tests.
2869 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
2871 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
2875 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
2877 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
2878 using SSE2 aware opcodes.
2880 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
2881 is enabled, this code path is only reachable if conversion ops are emmited after
2884 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
2886 This optimization saves 6 bytes per conversion against the old version.
2888 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2890 * aot-compiler.c (compile_method): Don't skip methods referencing
2891 generic methods without a corresponding entry in token_info_hash, since
2892 encode_method_ref () can handle all generic methods now.
2894 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
2895 generic context is set.
2897 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
2898 generic sharing of LDTOKEN.
2900 2008-10-06 Mark Probst <mark.probst@gmail.com>
2902 * mini-amd64.h: Temporarily disabled fast virtual generic method
2903 calls because it breaks the System.Runtime.Remoting tests.
2905 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2907 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
2909 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
2910 so inlining actually works.
2911 (check_inline_caller_method_name_limit): Ditto.
2913 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
2915 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
2916 64 bit safety (from Olaf Hering and Andreas Färber).
2918 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2920 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
2921 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
2922 unused virtual call support code.
2924 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
2926 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
2927 which can't use aot trampolines.
2928 (decode_patch): Don't create aot trampolines for methods which can't use
2931 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
2932 use aot trampolines.
2934 * mini.h: Bump AOT image format version.
2936 2008-10-05 Zoltan Varga <vargaz@gmail.com>
2938 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
2939 to save_token_info () since cmethod is inflated for constrained calls.
2941 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
2943 2008-10-04 Andreas Färber <andreas.faerber@web.de>
2945 * Makefile.am: Add build rules for ppc64.
2946 This avoids the build failing at pedump with unresolved symbols
2947 due to lack of arch_sources. Instead it will now fail earlier
2948 due to lack of cpu-ppc64.md.
2950 Contributed under MIT/X11 license.
2952 2008-10-04 Mark Probst <mark.probst@gmail.com>
2954 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
2957 * iltests.il.in: Add test case for tail call with many arguments.
2959 2008-10-03 Zoltan Varga <vargaz@gmail.com>
2961 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
2962 to the fast virtual generic method code until the aot case is fixed.
2964 2008-10-03 Mark Probst <mark.probst@gmail.com>
2966 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
2968 2008-10-03 Mark Probst <mark.probst@gmail.com>
2970 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
2973 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
2975 * simd-intrinsics.c: Forgot to add this one.
2977 * mini-codegen.c: Fix macro in case SIMD is not supported.
2979 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
2981 This patch land initial JIT support for simd intrinsics.
2983 * mini-x86.h: Added new define to make --enable_minimal work on x86.
2985 * Makefile.am: Added simd-intrinsics.c
2987 * simd-intrinsics.c: New file with simd instrinsic related
2990 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
2992 * cpu-x86.md: Add simd related instructions.
2994 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
2996 * driver.c: Added two new --regression variants.
2998 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
3000 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
3002 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
3003 extract some complicated logic to helper functions.
3005 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
3007 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
3009 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
3010 the specialized simplification pass.
3012 * method-to-ir.c (mono_spill_global_vars): Use new macro.
3014 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
3016 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
3019 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
3020 if MONO_ARCH_NEED_SIMD_BANK is defined.
3022 * mini-ops.h: Added the new simd ops.
3024 * mini-x86.c: Added mono_arch_xregname.
3026 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
3028 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
3030 * mini-x86.h: Define simd related MONO_ARCH macros.
3032 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
3034 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
3036 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
3037 MONO_CLASS_IS_SIMD to deal with simd related IR.
3039 * mini.h (MonoInst): Added spill_var to the backend union.
3041 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
3043 * mini.h: Added forward declarations of the new simd fuctions.
3045 * optflags-def.h: Added new optimization names SIMD.
3047 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
3049 * regalloc.h: Added support for working with 3 register banks.
3051 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
3053 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
3055 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
3057 * mini-exceptions.c: remove 64 bit related ifdef clutter.
3059 2008-10-03 Zoltan Varga <vargaz@gmail.com>
3061 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
3062 instead of one on 64 bit systems.
3064 * method-to-ir.c: Remove unused includes.
3066 2008-10-02 Zoltan Varga <vargaz@gmail.com>
3068 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
3069 cfg->used_int_regs, since the two are different on arm.
3071 2008-10-02 Mark Probst <mark.probst@gmail.com>
3073 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
3074 mono_method_get_vtable_index() to get the vtable index.
3076 2008-10-02 Mark Probst <mark.probst@gmail.com>
3078 * method-to-ir.c (mono_method_to_ir2): Don't create native
3079 wrappers for array methods, because they're never called (and if
3080 they were called they wouldn't work).
3082 2008-10-02 Mark Probst <mark.probst@gmail.com>
3084 * method-to-ir.c (mono_method_to_ir2): Array methods are
3085 special-cased and must not be invoked indirectly via the (M)RGCTX
3086 when generic sharing is turned on. Fixes #431413.
3088 2008-10-01 Mark Probst <mark.probst@gmail.com>
3090 * method-to-ir.c: When generic sharing is active, call
3091 non-interface virtual generic methods via the standard trampoline.
3093 * mini-trampolines.c: Handle virtual generic shared methods.
3095 * mini.h, mini-x86.c, mini-x86.h: New argument for
3096 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
3097 method thunks and which is the trampoline to call if the lookup
3098 fails. Enable the virtual generic method thunk for x86.
3100 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
3101 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
3102 argument but assert that it's NULL, because these archs don't yet
3103 implement the virtual generic method thunk. Changes in the IMT
3104 thunk data structures.
3106 2008-10-01 Zoltan Varga <vargaz@gmail.com>
3108 * aot-compiler.c (emit_globals): Avoid invalid characters in
3109 the static linking symbol.
3111 * objects.cs: Add a test for the range check optimization. Fix warnings.
3113 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
3114 optimization from the current JIT.
3116 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
3117 later in decompose_array_access_opts () to allow more optimizations.
3119 * method-to-ir.c (mono_handle_soft_float): Rename this to
3120 mono_decompose_soft_float () for consistency.
3122 * mini-ops.h: Fix arguments of OP_STRLEN.
3124 * method-to-ir.c (save_cast_details): Extract the cast details saving code
3125 into a separate function.
3126 (reset_cast_details): Ditto.
3127 (handle_unbox): Save cast details. Fixes #431254.
3129 * method-to-ir.c: Remove some obsolete FIXMEs.
3131 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3133 * ir-emit.h (alloc_dreg): Write a warning before crashing.
3135 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3137 * mini-codegen.c: More work on macros to make them
3138 ready for multiple regbanks.
3140 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3142 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
3144 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
3146 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3148 * mini-codegen.c (mono_spillvar_offset): Proper support for
3151 2008-09-30 Zoltan Varga <vargaz@gmail.com>
3153 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
3154 the stack overflow changes.
3156 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3158 * mini-codegen.c: Make all bank macros depend on reg_bank.
3160 * mini-codegen.c (mono_local_regalloc): Make free mask
3161 initialization regbank aware.
3163 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3165 * mini-codegen.c (mono_local_regalloc): Extract callee
3166 mask selection to a function and make it regbank aware.
3168 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3170 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
3171 code to deal with many regbanks.
3173 2008-09-30 Zoltan Varga <vargaz@gmail.com>
3175 * mini-codegen.c: More fp->regbank changes.
3177 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
3179 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
3180 of a hardcoded constant.
3182 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
3184 * method-to-ir.c (type_from_stack_type): Fix typo.
3186 2008-09-29 Zoltan Varga <vargaz@gmail.com>
3188 * mini-ia64.c (emit_move_return_value): Convert float return values to
3191 * objects.cs: Add a new test.
3193 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
3194 VARARG methods to fix an assert later.
3196 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
3197 end so it at least compiles.
3199 2008-09-28 Zoltan Varga <vargaz@gmail.com>
3201 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
3203 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
3205 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
3206 optimization to a new function (emit_optimized_ldloca_ir) and enable
3207 it for both ldloca and ldloca_s.
3209 2008-09-28 Zoltan Varga <vargaz@gmail.com>
3211 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
3212 gshared CASTCLASS code.
3214 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
3215 amd64, where the libc stack unwinder encounters stack frames referring to
3216 native code in unmapped memory.
3218 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
3221 * generics.cs: Add new test.
3223 2008-09-27 Zoltan Varga <vargaz@gmail.com>
3225 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
3226 add a check that one of the ARM_FPU_ constants is defined.
3228 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
3230 * mini-exceptions.c: Fix build on non-altstack platforms.
3232 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
3235 * ir-emit.h: Add a comment to NEW_PCONST.
3237 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
3239 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
3241 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
3242 after the changes to MonoJitDomainInfo.
3244 2008-09-27 Mark Probst <mark.probst@gmail.com>
3246 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
3248 2008-09-27 Mark Probst <mark.probst@gmail.com>
3250 * mini-ppc.c: Compiler warning fixes.
3252 2008-09-27 Mark Probst <mark.probst@gmail.com>
3254 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
3257 2008-09-27 Mark Probst <mark.probst@gmail.com>
3259 * exceptions-ppc.c, mini-ppc.h: Compile
3260 mono_arch_handle_altstack_exception() on Darwin, too.
3262 2008-09-27 Mark Probst <mark.probst@gmail.com>
3264 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
3265 work on archs which don't have generic sharing implemented, only
3266 without the vtable_arg.
3268 2008-09-26 Mark Probst <mark.probst@gmail.com>
3270 * mini.c: Added comment explaining why delegate ctor icall
3271 wrappers are compiled.
3273 2008-09-26 Mark Probst <mark.probst@gmail.com>
3275 * mini.c: Don't produce trampolines to delegate ctor icall
3276 wrappers but compile them upfront.
3278 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
3280 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
3281 runtime-set function when going back to managed code. Currently this
3282 is used to set back the protection on the soft ovf pages and/or to
3283 throw the stack overflow exception that happened in unmanaged code.
3285 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
3287 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
3288 runtime-set function when going back to managed code. Currently this
3289 is used to set back the protection on the soft ovf pages and/or to
3290 throw the stack overflow exception that happened in unmanaged code.
3292 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3294 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
3295 the support code for restoring stack protection after stack overflows
3296 that happen in unmanaged code. Don't set the exec permission on the
3299 2008-09-26 Zoltan Varga <vargaz@gmail.com>
3301 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
3302 delegate->method_ptr is set. Fixes #428054.
3304 2008-09-25 Zoltan Varga <vargaz@gmail.com>
3306 * tests.cs: Rename to ratests.cs.
3308 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
3309 emit_get_rgctx_... functions.
3311 2008-09-25 Mark Probst <mark.probst@gmail.com>
3313 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
3315 2008-09-25 Mark Probst <mark.probst@gmail.com>
3317 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
3318 before asserting that method is sharable.
3320 2008-09-25 Mark Probst <mark.probst@gmail.com>
3322 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
3323 whether method needs a static RGCTX wrapper used instead of
3326 * generic-sharing.c, mini.h: A few functions moved to
3327 metadata/generic-sharing.c.
3329 2008-09-25 Mark Probst <mark.probst@gmail.com>
3331 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
3332 Generic code sharing for value types, which essentially means
3333 treating value type methods like static methods. The RGCTX is
3334 passed in the same way.
3336 2008-09-25 Zoltan Varga <vargaz@gmail.com>
3338 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
3339 opcode when creating multi-dimensional arrays of open types.
3341 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
3344 * generics.cs: Add a test.
3346 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
3348 2008-09-24 Zoltan Varga <vargaz@gmail.com>
3350 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
3352 * mini.c (mini_method_compile): Set it when running under the debugger.
3354 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
3355 vreg optimization if the flag is set.
3357 * driver.c (mono_main): Add --attach= option to pass options to
3360 * mini.c (sigquit_signal_handler): Start the attach agent.
3362 * ssapre.c: Disable this to save space since it is not yet ported to
3365 * regalloc2.c: Disable this to save space.
3367 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
3369 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
3371 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
3372 the -v option useful again.
3374 2008-09-24 Zoltan Varga <vargaz@gmail.com>
3376 * mini-amd64.c (mono_arch_output_basic_block): Add support for
3379 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
3380 arrays of arrays. Fixes #428406.
3382 * method-to-ir.c (mini_emit_castclass): Ditto.
3384 * objects.cs: Add new test.
3386 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
3388 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
3389 was wrong at it choked against target_type_is_incompatible for byref types.
3391 2008-09-23 Zoltan Varga <vargaz@gmail.com>
3393 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
3396 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
3398 * mini-exceptions.c: update a few more exceptions-related counters.
3400 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
3402 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
3403 new functions to allocate from persistent mempools.
3405 2008-09-23 Zoltan Varga <vargaz@gmail.com>
3407 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
3408 multiple register banks in the future.
3410 * mini-codegen.c (mono_local_regalloc): Fix a warning.
3412 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
3414 * mini.c (type_to_eval_stack_type): Remove duplicated function.
3416 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
3418 * mini.h: Export type_to_eval_stack_type.
3420 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
3421 is only ins->klass of byref types.
3423 2008-09-22 Zoltan Varga <vargaz@gmail.com>
3425 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
3426 (mini_emit_memcpy2): Ditto.
3428 * mini-amd64.c: Fix a warning.
3430 2008-09-21 Mark Probst <mark.probst@gmail.com>
3432 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
3435 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
3437 * method-to-ir.c: Extract stloc micro-optimization to a
3438 function and apply it to all cases.
3440 2008-09-19 Mark Probst <mark.probst@gmail.com>
3442 * method-to-ir.c: Don't fail generic code sharing in cases we
3445 2008-09-18 Mark Probst <mark.probst@gmail.com>
3447 * mini-ppc.c: Handle structs in tailcalls on Darwin.
3449 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
3451 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
3454 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
3456 * trace.c: make tracing more useful and correct, with per-thread
3459 2008-09-15 Mark Probst <mark.probst@gmail.com>
3461 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
3462 doing a method call and the argument is an R4.
3464 2008-09-14 Zoltan Varga <vargaz@gmail.com>
3466 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
3469 2008-09-13 Mark Probst <mark.probst@gmail.com>
3471 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
3473 2008-09-12 Zoltan Varga <vargaz@gmail.com>
3475 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
3476 (MONO_JUMP_TABLE_FROM_INS): Ditto.
3478 2008-09-11 Zoltan Varga <vargaz@gmail.com>
3480 * driver.c: Add a --agent argument (not supported yet) to load managed
3481 agent assemblies before loading the main assembly, similarly to how the
3482 Java VM handles agents.
3484 2008-09-11 Mark Probst <mark.probst@gmail.com>
3486 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
3487 function to do stack layout of local variables.
3489 2008-09-11 Mark Probst <mark.probst@gmail.com>
3491 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
3494 2008-09-11 Zoltan Varga <vargaz@gmail.com>
3496 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
3497 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
3498 JIT if DISABLE_JIT is defined.
3500 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
3503 2008-09-10 Mark Probst <mark.probst@gmail.com>
3505 * iltests.il.in: Disable the fconv test on PPC (the result is
3506 undefined according to ECMA).
3508 2008-09-10 Mark Probst <mark.probst@gmail.com>
3510 * iltests.il.in: Enable tail call tests for PPC.
3512 * mini.h: Add variable for storing incoming valuetype argument
3513 addresses for tail calls.
3515 * mini-ppc.c: Implement valuetype arguments and return values for
3518 2008-09-09 Mark Probst <mark.probst@gmail.com>
3520 * mini-ppc.c: Partially implement tail calls (struct arguments and
3521 return values not supported).
3523 * method-to-ir.c: Enable tail calls on PPC.
3525 2008-09-08 Zoltan Varga <vargaz@gmail.com>
3527 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
3528 runtime-invoke wrappers to work around the problem of them getting
3529 assigned to a random class.
3531 * aot-runtime.c (mono_aot_get_method): Ditto.
3533 2008-09-07 Zoltan Varga <vargaz@gmail.com>
3535 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
3536 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
3538 2008-09-07 Mark Probst <mark.probst@gmail.com>
3540 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
3541 until they're implemented properly.
3543 * exceptions-ppc.c: Use arch-independent exception-handling code
3544 instead of custom one.
3546 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
3549 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
3551 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
3552 applies when __powerpc__ is defined.
3554 2008-09-06 Zoltan Varga <vargaz@gmail.com>
3556 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
3557 methods to their code to avoid computing the full name of wrappers and
3558 doing a lookup in a string hash table.
3560 2008-09-05 Zoltan Varga <vargaz@gmail.com>
3562 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
3563 we identify bblocks before method_to_ir () is ran.
3565 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
3566 Also avoid optimizing branches pointing to themselves.
3568 * mini.c (mini_method_compile): Ditto. Fixes #422947.
3570 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
3572 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
3574 2008-09-05 Zoltan Varga <vargaz@gmail.com>
3576 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
3577 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
3578 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
3581 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
3582 jumped to the same entry in plt_jump_table.
3584 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3586 * method-to-ir.c (initialize_array_data): Handle field with RVA from
3589 2008-08-31 Zoltan Varga <vargaz@gmail.com>
3591 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
3592 other assignment can be if converted. Saves 1.5% on corlib size and fixes
3595 2008-08-29 Geoff Norton <gnorton@novell.com>
3597 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
3598 segment, and doesn't properly handle .space as .text. Fixes
3601 2008-08-29 Geoff Norton <gnorton@novell.com>
3603 * mini.c: Disable the mach exception handler when running on
3606 2008-08-29 Geoff Norton <gnorton@novell.com>
3608 * aot-compiler.c: Patch from Renaldas Zioma to properly register
3609 globals on Darwin/ARM
3611 2008-08-28 Zoltan Varga <vargaz@gmail.com>
3613 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
3614 since too many things depend on it. Instead, call
3615 mono_runtime_set_no_exec ().
3617 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
3620 * aot-compiler.c: Add an 'asm-only' AOT option.
3622 * mini.c: Avoid initializing the runtime when doing AOT compilation.
3624 * aot-compiler.c (compile_method): Disable gshared support for now as it
3627 2008-08-27 Bill Holmes <billholmes54@gmail.com>
3629 * mini-amd64.h : Fix a compiler warning.
3631 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
3632 Changed to use a callback function to retrieve the unwind info.
3633 This avoids problems observed when code blocks were removed by
3634 unloading an app domain.
3636 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
3637 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
3640 Contributed under MIT/X11 license.
3642 2008-08-27 Bill Holmes <billholmes54@gmail.com>
3644 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
3645 case to keep the stack aligned to 8.
3647 Contributed under MIT/X11 license.
3649 2008-08-26 Zoltan Varga <vargaz@gmail.com>
3651 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
3652 avoid repeated linear searches.
3654 2008-08-25 Zoltan Varga <vargaz@gmail.com>
3656 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
3657 methods it can't handle.
3659 * aot-compiler.c (add_method): Avoid adding a method twice.
3660 (add_wrappers): Add runtime invoke wrappers for all methods.
3662 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
3663 function to create an aot-compatible version of this trampoline.
3665 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
3667 2008-08-24 Zoltan Varga <vargaz@gmail.com>
3669 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
3671 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
3672 with a generic sharing failure.
3674 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
3676 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
3677 CEE_RETHROW. Fixes #419634.
3679 * mini.c (mono_method_to_ir): Ditto.
3681 * exceptions.cs: Add a new test.
3683 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
3684 to mono_type_stack_size_internal () since some callers might not pass in
3687 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
3688 instrument_prolog. Fixes #419878.
3690 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
3691 doubles in soft float mode volatile.
3693 2008-08-23 Zoltan Varga <vargaz@gmail.com>
3695 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
3697 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
3698 to handle soft float correctly.
3700 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
3703 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
3705 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
3706 to sp, since the generics catch code requires it.
3708 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
3711 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
3712 mono_arch_emit_imt_argument ().
3714 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
3716 * mini-arm.c tramp-arm.c: Generic sharing updates.
3718 2008-08-22 Zoltan Varga <vargaz@gmail.com>
3720 * mini-arm.c: Fix the arm build.
3722 * generic-sharing.c (mini_type_get_underlying_type): New helper function
3723 handling enums, generic instances and generic sharing.
3724 (mini_type_stack_size_full): Ditto.
3726 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
3728 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
3730 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
3732 * tramp-arm.c: Implement the rgctx fetch and the generic class init
3735 * mini-arm.c: Various small generic sharing changes.
3737 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
3739 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
3742 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
3743 helper function to return a generic class init trampoline.
3745 * method-to-ir.c mini.c: Use it.
3747 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
3748 arch-specfic function to return a generic class init trampoline.
3750 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
3751 the GENERIC_CLASS_INIT custom code.
3753 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
3754 a fatal error, not a sharing failure.
3756 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
3759 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
3760 trampoline argument from MONO_ARCH_VTABLE_REG.
3762 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3763 order of the arguments to the C trampoline: pass 'slot' as the trampoline
3764 argument, and pass the vtable in VTABLE_REG.
3766 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3767 order of the arguments to the C trampoline: pass 'slot' as the trampoline
3768 argument, and pass the vtable in VTABLE_REG.
3769 (mono_arch_create_trampoline_code_full): Remove some special casing for
3770 the rgctx fetch trampoline.
3772 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
3775 * iltests.il: Add a test for it.
3777 2008-08-21 Zoltan Varga <vargaz@gmail.com>
3779 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
3781 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
3784 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
3785 use mono_jit_info_table_find () to avoid recursion.
3786 (mono_delegate_trampoline): Add a sync wrapper here.
3788 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
3791 * mini.c (mono_method_to_ir): Ditto.
3793 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
3794 add_sync_wrapper argument. Don't add a sync wrapper here.
3795 (mono_create_jump_trampoline): Don't add a sync wrapper here.
3797 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
3799 2008-08-20 Bill Holmes <billholmes54@gmail.com>
3801 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
3802 of nonvolatile registers back from MonoContext to CONTEXT.
3804 Contributed under MIT/X11 license.
3806 2008-08-20 Bill Holmes <billholmes54@gmail.com>
3808 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
3809 arguments on Winx64 there are only 4 argument registers. For this
3810 logic to work the last argument must be pulled from the stack.
3812 Contributed under MIT/X11 license.
3814 2008-08-20 Zoltan Varga <vargaz@gmail.com>
3816 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3818 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
3819 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
3820 encode/decode_method_ref ().
3822 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
3824 * aot-runtime.c (decode_patch): Ditto.
3826 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
3827 MONO_PATCH_INFO_METHOD.
3829 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
3832 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
3835 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
3837 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
3838 one from the caller.
3840 * aot-runtime.c (decode_generic_inst): New function to decode and
3841 return a interned generic inst.
3842 (decode_klass_ref): Use it.
3843 (decode_method_ref): Ditto.
3845 * aot-compiler.c (emit_exception_debug_info): Save
3846 jinfo->has_generic_jit_info too.
3848 2008-08-19 Zoltan Varga <vargaz@gmail.com>
3850 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
3852 * iltests.il.in: Add a test for fconv_to_i.
3854 * liveness.c: Disable the liveness2 pass for now to save space.
3856 * regalloc2.c: Include mempool-internals.h to fix warnings.
3858 * aot-compiler.c (encode_method_ref): Encode the context of generic
3861 * aot-runtime.c (decode_method_ref): Inflate generic methods using
3862 the context saved in the aot file.
3864 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3866 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3868 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
3869 volatile so they won't be optimized away.
3871 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3877 * dominators.c: Remove duplicated functions that now are in
3878 mempool-internals.h.
3880 2008-08-19 Zoltan Varga <vargaz@gmail.com>
3882 * aot-compiler.c: Fix warnings.
3884 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
3886 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
3888 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
3891 * mini.c (mono_resolve_patch_target): Ditto.
3893 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
3894 (encode_klass_ref): Add support for encoding VARs/MVARs.
3896 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
3898 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
3899 the handling of the got entries into a separate 'decode_got_entry' function.
3900 Add support for RGCTX_FETCH.
3902 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
3903 clobbered by the trampoline code.
3905 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
3906 not clobbered by the indirect calling code.
3908 2008-08-18 Zoltan Varga <vargaz@gmail.com>
3910 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
3913 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3915 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
3916 signature using the compilation mempool otherwise we would leak it.
3918 2008-08-18 Zoltan Varga <vargaz@gmail.com>
3920 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
3921 mono_emit_abs_call ().
3923 * patch-info.h: Add GENERIC_CLASS_INIT.
3925 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
3927 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
3928 as their target as a near call.
3930 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
3932 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
3934 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
3935 call to a runtime function described by a patch.
3937 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
3938 mono_emit_abs_call, this has the advantage that the ABS handling code in
3939 mono_codegen () can handle them both, and can handle other stuff in the
3940 future without additional code.
3942 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
3944 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
3947 * mini.h: Add missing bblock related prototypes.
3949 * mini.h (MonoCompile): Remove unused reverse_inst_list and
3950 reverse_inst_list_len fields.
3952 * mini.c: Refactor this file a bit by moving branch optimizations to
3955 * method-to-ir.c: Merge generic sharing changes missed earlier.
3957 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
3959 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
3960 shared patches. Process METHODCONST as a shared patch.
3962 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
3963 as it crashes on the 2.0 mscorlib.
3965 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
3968 * aot-compiler.c: Use is_plt_patch () in a few additional places.
3969 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
3972 * aot-compiler.c: Reorganize the got handling code to be a bit more
3975 2008-08-17 Zoltan Varga <vargaz@gmail.com>
3977 * aot-compiler.c: Make the patch_to_plt_offset hash table use
3978 mono_patch_info_equals/hash, and use it to massively simplify
3981 * mini.c (mono_patch_info_hash): Simplify this and add support for
3984 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
3986 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
3987 handling code, since an offset is not enough to identify a trampoline.
3989 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
3991 2008-08-17 Mark Probst <mark.probst@gmail.com>
3993 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
3995 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
3997 * mini-ops.h: Argument and result types for OVF_CARRY ops.
3999 * decompose.c: PPC decompositions for various ops.
4001 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
4003 2008-08-17 Zoltan Varga <vargaz@gmail.com>
4005 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
4006 call the generic trampoline code using a call, instead of a jump, to
4007 remove some special casing from the generic trampoline code.
4009 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
4010 (mono_codegen): Ditto.
4012 * aot-compiler.c aot-runtime.c: Ditto.
4014 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
4016 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
4017 helper function to find the offset corresponding to a lazy fetch trampoline.
4019 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
4020 when doing generic sharing.
4022 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
4025 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
4026 mini-trampolines.c to be with the other trampoline creation functions.
4028 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
4029 as it is equal to method->signature in most cases, add a
4030 mono_emit_method_call_full variant which takes a signature and an imt
4033 2008-08-16 Zoltan Varga <vargaz@gmail.com>
4035 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
4036 to this function, since it could be computed easily from the method
4038 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
4041 * method-to-ir.c mini.c: Remove references to
4042 compile_generic_method_wo_context.
4044 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
4045 generic method calls.
4047 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
4048 dimensional non-szarrays.
4050 * mini.c (mini_init): Register mono_array_new_1.
4052 * jit-icalls.c (mono_array_new_1): New jit icall.
4054 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
4055 pointing to the method.
4057 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
4058 method addresses belonging to METHOD_JUMP patches in the
4059 jump_target_got_slot_hash.
4060 (mono_aot_load_method): Ditto.
4062 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
4063 METHOD_JUMP patches.
4065 * mini.c (mini_create_jit_domain_info): New helper function which
4066 initializes/frees domain->runtime_info.
4067 (mini_free_jit_domain_info): Ditto.
4068 (mini_init): Install the domain hook functions with the runtime.
4070 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
4071 information maintained by the JIT.
4073 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
4074 insertion into jump_table_hash into mono_codegen (), also implement proper
4077 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
4078 tail calls, it is already done by the aot code.
4080 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
4083 * iltests.il.in: Make the jmp test a bit more complex.
4085 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
4086 generic instances which doesn't have a token.
4088 * aot-runtime.c (decode_method_ref): Ditto.
4090 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
4091 can handle this case now.
4092 (handle_box): Ditto.
4094 2008-08-15 Geoff Norton <gnorton@novell.com>
4096 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
4099 2008-08-15 Zoltan Varga <vargaz@gmail.com>
4101 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
4102 calling generic methods.
4104 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
4106 * aot-runtime.c (decode_patch_info): Ditto.
4108 * mini.c (mono_resolve_patch_target): Ditto.
4110 * patch-info.h: Add METHOD_RGCTX.
4112 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
4114 2008-08-14 Zoltan Varga <vargaz@gmail.com>
4116 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
4117 arguments in registers.
4119 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
4120 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
4122 * mini.c (mini_method_compile): Abort aot compilation for generic
4123 methods if generic sharing is disabled.
4125 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
4128 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
4129 requiring an mrgctx.
4131 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
4132 store instructions when converting a vcall to a normal call.
4134 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
4135 mono_arch_find_jit_info.
4137 2008-08-13 Zoltan Varga <vargaz@gmail.com>
4139 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
4140 avoid calling mono_method_full_name () for every method even if the
4142 (check_inline_caller_method_name_limit): Ditto.
4144 2008-08-12 Zoltan Varga <vargaz@gmail.com>
4146 * driver.c (main_thread_handler): Allow AOT compilation of multiple
4147 assemblies in one run.
4149 * aot-compiler.c (mono_compile_assembly): Only print out a count of
4150 skipped methods if it is not 0.
4152 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
4154 2008-08-12 Bill Holmes <billholmes54@gmail.com>
4156 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
4157 MONO_ARCH_HAVE_UNWIND_TABLE.
4159 Contributed under MIT/X11 license.
4161 2008-08-12 Bill Holmes <billholmes54@gmail.com>
4163 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
4164 from default optimizaton list on Winx64.
4166 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
4168 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
4169 the LMF from the MonoJitTlsData structure.
4171 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
4173 Contributed under MIT/X11 license.
4175 2008-08-12 Zoltan Varga <vargaz@gmail.com>
4177 * mini.c (sigsegv_signal_handler): Fix the build.
4179 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
4180 assembly->aot_module.
4182 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
4183 hash table. This simplifies and speeds up a lot of code, and fixes support
4186 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
4189 * mini-exceptions.c: Ditto.
4191 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
4192 'native_offset' argument, since these are computed in the
4193 mono_find_jit_info () function.
4195 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
4196 is used by exceptions-ppc.c.
4198 * exceptions-ppc.c: Call mono_find_jit_info () instead of
4199 mono_arch_find_jit_info ().
4201 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
4202 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
4203 generic code in mini-exceptions.c.
4205 2008-08-11 Zoltan Varga <vargaz@gmail.com>
4207 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
4209 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
4211 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
4212 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
4213 called while holding the loader lock. Fixes #415608.
4214 (mono_aot_get_method_from_token_inner): Ditto.
4216 2008-08-09 Zoltan Varga <vargaz@gmail.com>
4218 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
4219 to reduce differences between this and the generic implementation in
4221 (ves_icall_get_frame_info): Ditto.
4223 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
4225 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
4228 * exceptions-ppc.c (arch_get_call_filter): Rename this to
4229 mono_arch_get_call_filter () and make it non-static, for consistency with the
4230 other architectures.
4232 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
4235 * local-propagation.c:
4236 * mini-x86.c: Correct the name of arch defines.
4238 2008-08-09 Zoltan Varga <vargaz@gmail.com>
4240 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
4241 NO_EMULATE_LONG_SHIFT_OPS define.
4243 2008-08-08 Zoltan Varga <vargaz@gmail.com>
4245 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
4246 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
4248 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
4249 MACH fixes. Merged from the 2.0 branch.
4251 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
4253 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
4254 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
4256 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
4258 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
4259 mono_marshal_get_native_wrapper () signature changes.
4261 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
4263 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
4264 conversion bug under arm.
4266 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
4268 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
4270 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
4271 with overflow checking.
4273 2008-08-05 Marek Habersack <mhabersack@novell.com>
4275 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
4276 to the genmdesc.pl file
4278 2008-08-05 Zoltan Varga <vargaz@gmail.com>
4280 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
4281 arg_array in the soft-float versions of the LOAD/STORE macros.
4283 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
4286 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
4288 2008-08-02 Zoltan Varga <vargaz@gmail.com>
4290 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
4291 a float HFA. Fixes #413621.
4293 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
4295 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
4296 frame_size to args_size. Fixes build.
4298 2008-08-02 Zoltan Varga <vargaz@gmail.com>
4300 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
4301 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
4303 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
4304 the stack are not unaligned. Fixes #413247.
4306 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
4308 * mini.c: update jitted methods performance counters.
4310 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4312 * mini-exceptions.c: increase the exceptions thrown performance
4313 counter in mono_handle_exception ().
4315 2008-07-29 Zoltan Varga <vargaz@gmail.com>
4317 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
4318 can work with netmodules.
4320 2008-07-28 Geoff Norton <gnorton@novell.com>
4322 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
4325 2008-07-28 Zoltan Varga <vargaz@gmail.com>
4327 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
4330 2008-07-28 Bill Holmes <billholmes54@gmail.com>
4332 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4333 The float param registers and other param registers must be the
4334 same index on Windows x64.
4336 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
4337 ArgValuetypeAddrInIReg argument case. Setting the argument
4338 op to OP_VTARG_ADDR (OP_REGOFFSET)).
4340 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
4341 variable computed above as the copy length for arguments of storage
4342 type ArgValuetypeAddrInIReg.
4344 * mini-amd64.c (mono_arch_emit_call) : Implementing the
4345 ArgValuetypeAddrInIReg argument case. This case will rely on
4346 mono_arch_emit_outarg_vt to emit the correct code later in the process.
4348 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
4349 a 32 byte stack allocation for all calls. We will omit the adjustment for
4350 jump and tail call instructoins as they do not follow the typical call behavior.
4352 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
4353 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
4354 local variable and pass the local variable by reference to the called method.
4356 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
4357 Implementing the ArgValuetypeAddrInIReg argument case. When the address
4358 of a struct is passed in a register it must be saved with the other
4359 volatile argument on the stack.
4361 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
4362 frame pointer the stack adjustment value must be saved to the unwind
4365 Contributed under MIT/X11 license.
4367 2008-07-28 Zoltan Varga <vargaz@gmail.com>
4369 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
4370 which got lost in the merge.
4372 2008-07-27 Zoltan Varga <vargaz@gmail.com>
4374 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
4377 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
4379 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
4380 icalls, since they won't be patched.
4382 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
4383 different code sequence when running under valgrind to prevent some valgrind
4386 * iltests.il.in: Add new regression test.
4388 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
4391 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
4392 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
4394 * iltests.il.in: Add new test.
4396 * aot-compiler.c: Fix some warnings.
4398 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
4401 2008-07-27 Zoltan Varga <vargaz@gmail.com>
4403 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
4404 (mini_usage_jitdeveloper): Add a missing --wapi option.
4406 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4408 * mini-codegen.c: Simplify the is_fp macros.
4409 (free_up_ireg): Remove, use free_up_reg instead.
4410 (free_up_reg): Fix the fp case.
4412 2008-07-26 Zoltan Varga <vargaz@gmail.com>
4414 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
4417 * exceptions-x86.c: Merge some changes which seemed to have got lost
4418 in the linear-ir merge.
4420 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
4422 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
4423 long vreg volatile even if the variable was already created.
4425 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
4428 2008-07-26 Zoltan Varga <vargaz@gmail.com>
4430 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
4432 * mini.c (mono_jit_compile_method_inner): Add support for
4433 MONO_EXCEPTION_BAD_IMAGE.
4435 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
4436 mini_method_get_context () returns NULL. Fixes #356531.
4438 * mini.c (mono_method_to_ir): Ditto.
4440 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
4441 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
4443 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4445 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
4446 in the LDFTN implementation.
4448 2008-07-25 Mark Probst <mark.probst@gmail.com>
4450 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
4451 code, patch calls to icalls, too, even if they're not in the
4452 shared generic code hash. Fixes #411962.
4454 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4456 * cpu-x86.md: Increase the length of the fcall opcodes.
4458 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
4459 calls returning floats.
4461 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
4464 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
4467 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
4468 into the domain->method_code_hash.
4470 * aot-compiler.c: Fix win32 build.
4472 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
4474 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
4475 gshared NEWARR implementation.
4477 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
4479 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
4480 can be used outside of method_to_ir.
4482 * mini.h (MonoCompile): Add arg_types field.
4484 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
4486 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
4487 the values of the local arg_array and param_types array.
4489 2008-07-24 Zoltan Varga <vargaz@gmail.com>
4491 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
4492 got accesses might only get generated later when NEWOBJ is decomposed.
4494 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
4495 looking up the native code of the target method when a delegate is called
4498 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
4501 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
4503 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
4504 AOT work on platforms without a working dlsym implementation.
4506 * mini.h: Bump AOT image format version.
4508 2008-07-24 Mark Probst <mark.probst@gmail.com>
4510 * mini-exceptions.c: Free a MonoType with
4511 mono_metadata_free_type() instead of g_free().
4513 * aot-runtime.c: Free a MonoType.
4515 2008-07-24 Zoltan Varga <vargaz@gmail.com>
4517 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
4520 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
4523 2008-07-23 Massimiliano Mantione <massi@ximian.com>
4524 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
4527 2008-07-23 Zoltan Varga <vargaz@gmail.com>
4529 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
4530 NEWOBJ calls on valuetypes.
4532 * iltests.il.in: Add new test.
4534 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
4536 2008-07-22 Zoltan Varga <vargaz@gmail.com>
4538 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
4539 is no longer needed.
4541 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
4542 non register sized integer arguments.
4543 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
4544 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
4547 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
4550 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
4551 two a binop with different sized arguments is emitted.
4553 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
4554 instruction in the ins==NULL case.
4556 2008-07-23 Zoltan Varga <vargaz@gmail.com>
4558 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
4560 * mini-x86.c: Fix osx build.
4562 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
4565 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
4566 instruction for non int sized variables.
4568 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
4571 2008-07-23 Robert Jordan <robertj@gmx.net>
4573 * method-to-ir.c: Fix MSVC build.
4575 2008-07-22 Zoltan Varga <vargaz@gmail.com>
4577 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
4578 a non int sized type, widen it to an int since newer versions of gcc seem to
4579 generate code which needs this.
4581 * ssa2.c abcremoval2.c: Fix warnings.
4583 * *: Merge the Linear IR branch.
4585 The original branch is at trunk/branches/vargaz/mini-linear-il, and
4586 the ChangeLog file there describes all the changes done over the years.
4587 Further documentation can be found at www.mono-project.com/Linear_IL.
4589 2008-07-21 Bill Holmes <billholmes54@gmail.com>
4591 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4592 The float param registers and other param registers must be the
4593 same index on Windows x64.
4595 Contributed under MIT/X11 license.
4597 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
4599 * mini.c: Make the previous fix GC safe.
4601 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
4603 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
4605 2008-07-21 Bill Holmes <billholmes54@gmail.com>
4607 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
4608 on Winx64. This type will not be passed on the stack (ArgOnStack), but
4609 ArgValuetypeAddrInIReg instead.
4611 Contributed under MIT/X11 license.
4613 2008-07-21 Zoltan Varga <vargaz@gmail.com>
4615 * mini-codegen.c (get_register_spilling): Fix a warning.
4617 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
4619 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
4620 for types which the initialization fails. Raises the provided exception
4621 at the right stop after cleanup.
4623 2008-07-16 Zoltan Varga <vargaz@gmail.com>
4625 * aot-compiler.c: Free most of the memory allocated during compilation.
4627 * mini.c (mini_parse_debug_options): Fix a leak.
4629 * mini.c (mini_method_compile): Don't add the method to the jit info tables
4630 during aot compilation.
4632 2008-07-14 Zoltan Varga <vargaz@gmail.com>
4634 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
4635 it has too much register pressure.
4637 2008-07-13 Zoltan Varga <vargaz@gmail.com>
4639 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
4641 2008-07-12 Zoltan Varga <vargaz@gmail.com>
4643 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4646 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4647 on amd64 similar to the way it is done on arm.
4649 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4651 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
4652 consistency, normalize error messages, avoid loading aot-only modules in
4655 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
4658 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
4660 2008-07-11 Martin Baulig <martin@ximian.com>
4663 (MonoDebuggerInfo): Add `interruption_request'.
4665 2008-07-12 Zoltan Varga <vargaz@gmail.com>
4667 * aot-compiler.c (emit_plt): Remove some dead code.
4669 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
4671 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
4672 return the plt info offset belonging to a given plt entry.
4674 * mini-trampolines.c (mono_aot_plt_trampoline): Use
4675 mono_aot_get_plt_info_offset.
4677 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
4678 similar to the amd64 code by makeing jumps through a separate jump table
4679 instead of embedding the jump addresses into the code.
4681 2008-07-11 Zoltan Varga <vargaz@gmail.com>
4683 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
4686 2008-07-10 Martin Baulig <martin@ximian.com>
4688 * mini.c (mini_method_compile): Disable generics sharing when
4689 running in the debugger.
4691 2008-07-10 Zoltan Varga <vargaz@gmail.com>
4693 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
4695 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
4696 the local register allocator from running out of registers on x86 when
4699 2008-07-10 Bill Holmes <billholmes54@gmail.com>
4701 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
4702 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
4705 Contributed under MIT/X11 license.
4707 2008-07-10 Zoltan Varga <vargaz@gmail.com>
4709 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
4710 speed up the assembler.
4712 2008-07-09 Zoltan Varga <vargaz@gmail.com>
4714 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
4717 * mini.c: Move the soft float handling macros a bit earlier, add
4718 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
4721 * mini.h: Add prototype for mono_arch_fixup_jinfo.
4723 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
4724 read-only to help catch code allocation requests.
4726 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
4727 and turn it off when using --aot-only or when compiling with --aot=full.
4729 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
4730 jump table for switches from the normal domain mempool, not the code
4733 * mini-trampolines.c (get_unbox_trampoline): New function to return an
4734 unbox trampoline which handles aot-only mode too.
4736 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
4737 an AOTed unbox trampoline.
4739 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
4741 2008-07-09 Bill Holmes <billholmes54@gmail.com>
4743 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
4746 Contributed under MIT/X11 license.
4748 2008-07-09 Bill Holmes <billholmes54@gmail.com>
4750 * mini.c (mono_codegen): Allocate space at the end of the code block and store
4751 the unwind information for the method at the end of the allocated block.
4753 * mini-amd64.h: Added declarations for the unwind routines and adding field to
4754 MonoCompileArch to hold the unwind info for SEH on Winx64
4756 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
4757 frame pointer info for the method being compiled.
4759 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
4760 the call to mono_exception_from_token.
4762 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
4763 storing the method prolog information in a format that the Winx64 SEH can understand. This
4764 information is stored a the end of the method block because it is all 32-bit offset based.
4766 Contributed under MIT/X11 license.
4768 2008-07-09 Zoltan Varga <vargaz@gmail.com>
4770 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
4772 * wapihandles.c: Fix warnings.
4774 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
4777 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
4778 mono_jit_compile_method in aot-only mode since that calls the type
4781 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
4782 get_delegate_invoke_impl in aot-only mode.
4784 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
4786 2008-07-08 Zoltan Varga <vargaz@gmail.com>
4788 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
4790 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
4793 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
4795 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
4796 init trampoline from the AOT file as well.
4798 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
4799 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
4802 * mini.c (mini_init): Move the call to mono_exceptions_init () after
4805 * exceptions-amd64.c: Add _full variants for the remaining exception code
4806 creation functions as well, allow emission of relocatable code, remove
4807 caching since that is now done by the caller.
4809 * mini-exceptions.c: Add _full variants for the remaining exception code
4810 creation functions as well, add aot-only support.
4812 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
4813 if we can determine a proper token for them.
4814 (add_wrappers): Add a few more wrappers.
4815 (emit_method_code): Remove some dead code.
4816 (emit_trampolines): Emit exception code too.
4818 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
4820 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
4821 mono_array_new_va which avoids varargs.
4823 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
4825 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
4826 mono_arch_create_specific_trampoline () in all places.
4828 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
4829 a bit so it can be used for other things as well.
4831 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
4834 * exceptions-amd64.c: Rename the caching from the exception code creation
4835 functions, it is done by the caller instead.
4837 * exceptions-amd64.c: Change the signature of the exception code creation
4838 functions to allow the creation of relocatable code later.
4840 * mini-exceptions.c: Add a set of functions to query the various
4841 runtime-generated exception functions.
4843 * mini.c mini-exceptions.c: Use the newly added functions instead of the
4844 mono_arch_.. () functions.
4846 2008-07-07 Zoltan Varga <vargaz@gmail.com>
4848 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
4850 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
4852 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
4853 (mini_get_vtable_trampoline): Ditto.
4855 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
4856 code in the AOT case by returning the code size and a list of relocations to
4859 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
4861 2008-07-07 Bill Holmes <billholmes54@gmail.com>
4863 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
4866 Contributed under MIT/X11 license.
4868 2008-07-07 Zoltan Varga <vargaz@gmail.com>
4870 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
4871 so the buffer size can be computed correctly. Fixes #404735.
4873 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
4874 normally as cfg->debug_info is already freed.
4876 2008-07-06 Zoltan Varga <vargaz@gmail.com>
4878 * mini-amd64.c: For calls returning vtypes in registers, don't store
4879 the return address on the stack, instead allocate a separate local for
4882 2008-07-05 Mark Probst <mark.probst@gmail.com>
4884 * mini-trampolines.c, mini.h: Add an argument to
4885 mono_create_jit_trampoline_in_domain() for turning off the adding
4886 of the sync wrapper.
4888 * mini.c: Use the JIT trampoline without sync instead of
4889 ldftn_nosync in static RGCTX invoke wrappers so that the call can
4892 2008-07-04 Mark Probst <mark.probst@gmail.com>
4894 * driver.c: Turn on GSHARED optimization by default.
4896 2008-07-04 Zoltan Varga <vargaz@gmail.com>
4898 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
4899 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
4901 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
4902 create a variant of the generic trampoline code callable from AOTed trampolines.
4904 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
4905 trampoline code callable from AOTed trampolines.
4907 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
4909 2008-07-04 Mark Probst <mark.probst@gmail.com>
4911 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
4912 pass-through manner.
4914 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
4915 and don't fail sharing for them anymore.
4917 * mini-exceptions.c: Handle exceptions in shared generic methods.
4919 * generic-sharing.c: When checking the context of a generic
4920 method, also check its class's context. Don't treat wrappers as
4923 * mini-trampolines.c: Some code factored out to
4924 metadata/generic-sharing.c. Handle the MRGCTX case.
4926 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
4927 we must deal with the method being of another instantiation of the
4928 class. Add static rgctx invoke wrappers to generic methods.
4930 2008-07-04 Mark Probst <mark.probst@gmail.com>
4932 * mini.c: Provide all jit infos of generic shared methods with a
4935 * mini-exceptions.c: Handle the new situation that a generic info
4936 might be available, but not info about the this/vtable/mrgctx
4939 2008-07-03 Mark Probst <mark.probst@gmail.com>
4941 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
4944 2008-07-03 Zoltan Varga <vargaz@gmail.com>
4946 * dominators.c (check_dominance_frontier): Fix a warning.
4948 * mini.h: Add some missing prototypes.
4950 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
4952 * driver.c (mono_jit_init_version): Correct the comments since the first
4953 argument should be the name of the root domain, not a filename.
4955 * aot-runtime.c (make_writable): Error out if this is called while running
4957 (load_aot_module): Ditto.
4959 * aot-compiler.c: Really fix the computation of method indexes.
4961 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
4962 optimizations as this is no longer called frequently.
4964 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
4965 method and the invoke impl code and pass it to the delegate trampoline instead of
4966 just the delegate class.
4968 2008-07-02 Zoltan Varga <vargaz@gmail.com>
4970 * aot-compiler.c: Fixup the computation of method indexes.
4971 (add_wrappers): Create the base methods of the runtime invoke wrappers using
4972 the method builder infrastructure.
4974 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
4977 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
4978 mode, load the method right away instead of creating a trampoline.
4980 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
4982 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
4985 2008-07-01 Zoltan Varga <vargaz@gmail.com>
4987 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
4988 (mono_aot_load_method): Use method_index instead of method->token.
4990 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
4991 can handle icalls etc. properly.
4993 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4995 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
4997 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
4998 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
4999 JIT_ICALL_ADDR patch type.
5001 * patch-info.h: Add JIT_ICALL_ADDR patch type.
5003 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
5005 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
5007 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
5009 2008-06-30 Zoltan Varga <vargaz@gmail.com>
5011 * mini.c: Use domain->jit_code_hash_lock for controlling access to
5012 domain->jit_code_hash.
5014 2008-06-29 Zoltan Varga <vargaz@gmail.com>
5016 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
5018 2008-06-27 Zoltan Varga <vargaz@gmail.com>
5020 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
5021 get_this_arg_from_call, let it compute it when needed.
5023 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
5024 gsctx from code only when needed.
5026 * mini-trampolines.c (get_generic_context): Rename this to
5027 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
5028 it can be called by the arch backends.
5030 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
5032 2008-06-26 Zoltan Varga <vargaz@gmail.com>
5034 * driver.c (mono_main): Add experimental --aot-only command line option.
5036 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
5039 2008-06-26 Kornél Pál <kornelpal@gmail.com>
5041 * driver.c (DllMain): Remove mono_module_handle.
5043 Contributed under MIT/X11 license.
5045 2008-06-25 Zoltan Varga <vargaz@gmail.com>
5047 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
5048 for emitting methods which are not in the source assembly. Detect and report
5049 failure of assembling+linking.
5051 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
5053 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
5055 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
5057 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
5059 2008-06-24 Zoltan Varga <vargaz@gmail.com>
5061 * mini.h: Remove some obsolete prototypes.
5063 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
5065 2008-06-24 Mark Probst <mark.probst@gmail.com>
5067 * mini.c (get_object_generic_inst): Variable-sized arrays are not
5068 supported by Visual Studio, so use alloca().
5070 2008-06-23 Zoltan Varga <vargaz@gmail.com>
5072 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
5075 2008-06-23 Mark Probst <mark.probst@gmail.com>
5077 * mini.c: Fail sharing of a generic method if it contains an open
5078 catch clause (because we don't pass MRGCTXs yet).
5080 2008-06-23 Mark Probst <mark.probst@gmail.com>
5082 * mini.c: When compiling a method with generic sharing, insert the
5083 method instantiated with an all-Object generic context into the
5084 jit info table, instead of the context of the first instantiation
5085 of the method we happen to compile.
5087 2008-06-18 Martin Baulig <martin@ximian.com>
5089 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
5090 `major_version' and `minor_version'.
5092 2008-06-17 Mark Probst <mark.probst@gmail.com>
5094 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
5095 mono_method_is_generic_sharable_impl() takes an additional
5096 argument specifying whether to treat type variables as reference
5099 2008-06-17 Mark Probst <mark.probst@gmail.com>
5101 * mini.h: Removed obsolete prototypes.
5103 2008-06-17 Mark Probst <mark.probst@gmail.com>
5105 * mini.c: Don't fail generic sharing for initobj and sizeof - we
5106 already handle them.
5108 2008-06-17 Mark Probst <mark.probst@gmail.com>
5110 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
5111 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
5112 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
5113 tramp-x86.c: Added a MonoGenericContext* argument to
5114 mono_arch_get_unbox_trampoline() so that it can call other
5115 functions which require it.
5117 2008-06-17 Mark Probst <mark.probst@gmail.com>
5119 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
5120 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
5121 mono_arch_get_this_arg_from_call() takes a
5122 MonoGenericSharingContext* as well.
5124 2008-06-17 Mark Probst <mark.probst@gmail.com>
5126 * mini.c: Factor out code for emitting unbox into emit_unbox() and
5127 implement generic sharing of unbox.
5129 2008-06-17 Mark Probst <mark.probst@gmail.com>
5131 * mini.c: Don't compute the vtable to determine whether a field is
5132 special static, because it might not work for open types.
5134 2008-06-17 Mark Probst <mark.probst@gmail.com>
5136 * mini.c: Removed the unused token_type and token_source arguments
5137 from get_runtime_generic_context_ptr().
5139 2008-06-17 Marek Habersack <mhabersack@novell.com>
5141 * mini.c (ADD_BINOP): fix the build
5143 2008-06-16 Zoltan Varga <vargaz@gmail.com>
5145 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
5148 2008-06-16 Mark Probst <mark.probst@gmail.com>
5150 * mini.h: Removed class relations enum that's not used anymore.
5152 2008-06-16 Mark Probst <mark.probst@gmail.com>
5154 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
5156 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
5157 the lazy fetch trampoline access code.
5159 2008-06-15 Zoltan Varga <vargaz@gmail.com>
5161 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
5163 2008-06-14 Zoltan Varga <vargaz@gmail.com>
5165 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
5167 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
5169 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
5171 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5173 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
5176 * mini-ops.h: Add MIN/MAX_UN opcodes.
5178 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
5181 * basic-math.cs: Add more min/max tests.
5183 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5185 2008-06-13 Mark Probst <mark.probst@gmail.com>
5187 * mini.c: Small fix in the prologue of emit_castclass.
5189 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5191 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5193 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
5194 do not work even for unsigned types. Fixes #400014.
5196 * basic-math.cs: Add regression tests for unsigned Min/Max.
5198 2008-06-13 Mark Probst <mark.probst@gmail.com>
5200 * mini.c: Added additional context_used argument to several
5201 functions, which will be needed for sharing generic methods. Use
5202 GET_RGCTX macro wherever appropriate. Declare only one
5203 context_used in mono_method_to_ir().
5205 2008-06-13 Mark Probst <mark.probst@gmail.com>
5207 * mini.c, generic-sharing.c: Removed generic class relations.
5209 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
5210 functions due to MRGCTX changes.
5212 2008-06-13 Mark Probst <mark.probst@gmail.com>
5214 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
5215 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
5216 with calculated IMT.
5218 * mini.c: Generic sharing of calls via generic interfaces.
5220 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
5221 generic method with non-constant MonoGenericContext*. Instead,
5222 the context is taken out of the method itself.
5224 2008-06-13 Mark Probst <mark.probst@gmail.com>
5226 * mini.c: Generic sharing of ldvirtftn.
5228 2008-06-13 Mark Probst <mark.probst@gmail.com>
5230 * mini.c: Generic sharing of ldftn.
5232 2008-06-13 Mark Probst <mark.probst@gmail.com>
5234 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
5236 2008-06-13 Mark Probst <mark.probst@gmail.com>
5238 * mini.c: Generic sharing of the special case of ldtoken followed
5239 by a call to GetTypeFromHandle.
5241 2008-06-13 Mark Probst <mark.probst@gmail.com>
5243 * mini.c: Generic sharing of box for nullable types.
5245 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5247 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
5248 are passed on the stack. Fixes #324807.
5250 2008-06-12 Bill Holmes <billholmes54@gmail.com>
5252 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
5253 for the ArgValuetypeAddrInIReg case.
5255 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
5256 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
5258 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
5259 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
5260 local variable and pass the local variable by reference to the called method.
5262 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
5263 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
5265 Contributed under MIT/X11 license.
5267 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
5269 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
5271 * debug-mini.c (mono_debug_print_vars): Release memory after printing
5274 2008-06-10 Martin Baulig <martin@ximian.com>
5277 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
5279 2008-06-09 Kornél Pál <kornelpal@gmail.com>
5281 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
5282 possible error when no arguments are passed.
5284 Contributed under MIT/X11 license.
5286 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
5288 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
5289 where the file name is NULL.
5291 2008-06-09 Zoltan Varga <vargaz@gmail.com>
5293 * mini.c: Fix s390 build.
5295 2008-06-08 Zoltan Varga <vargaz@gmail.com>
5297 * trace.c (mono_trace_parse_options): Fix warnings.
5299 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
5301 2008-06-07 Zoltan Varga <vargaz@gmail.com>
5303 * mini.c (remove_block_if_useless): Avoid printing the method name.
5305 * mini.c: Remove needless setting of ins->cil_code which is now done by
5308 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
5311 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
5312 translated code after it has been patched.
5314 2008-06-06 Zoltan Varga <vargaz@gmail.com>
5316 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
5317 avoid problems during code patching on SMP systems.
5318 (emit_call): Avoid adding a patch info which is already added by
5320 (mono_arch_emit_exceptions): Ditto.
5322 2008-06-05 Zoltan Varga <vargaz@gmail.com>
5324 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
5325 MONO_TYPE_ISSTRUCT already checks for it.
5327 2008-06-05 Bill Holmes <billholmes54@gmail.com>
5329 * mini-amd64.c:merge_argument_class_from_type: When marshaling
5330 structs with floats on Winx64 the float registers are not used.
5331 The integer registers are always used..
5332 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
5333 only one register will be used and only if the size of the struct
5334 is 1,2,4, or 8 bytes.
5336 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
5339 Contributed under MIT/X11 license.
5341 2008-06-05 Martin Baulig <martin@ximian.com>
5343 * debug-debugger.c (debugger_lookup_class): Also call
5344 mono_class_setup_methods() here; we're only called from RTI.
5346 2008-06-05 Andreas Färber <andreas.faerber@web.de>
5348 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
5349 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
5350 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
5351 Post-process object files and add dtrace-generated object, if necessary.
5353 Contributed under MIT/X11 license.
5355 2008-06-04 Mark Probst <mark.probst@gmail.com>
5357 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
5360 * mini.c: Generic sharing for unbox.any and castclass.
5362 2008-06-04 Mark Probst <mark.probst@gmail.com>
5364 * mini.c: Ignore tailcall prefix in shared generic code and when
5365 doing calls which require a vtable/rgctx argument.
5367 2008-06-04 Mark Probst <mark.probst@gmail.com>
5369 * mini.c: Don't free the JIT info.
5371 * driver.c: Changes in the JIT info table testing code.
5373 2008-06-03 Zoltan Varga <vargaz@gmail.com>
5375 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
5376 interruption. Fix some warnings.
5378 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
5379 interruption_checkpoint.
5381 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5383 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
5384 from embedding applications.
5386 2008-06-02 William Holmes <billholmes54@gmail.com>
5388 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
5389 reserving 32 bytes on the stack when making calls.
5391 Contributed under MIT/X11 license.
5393 2008-06-01 Zoltan Varga <vargaz@gmail.com>
5395 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
5396 the linear IL branch.
5398 * driver.c: Print out more information for --version on arm.
5400 2008-05-30 Zoltan Varga <vargaz@gmail.com>
5402 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
5403 bb_exit instead, since out of line bblocks might not actually be emitted
5406 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
5407 maximum epilog size for out of line bblocks if tracing is enabled.
5409 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
5411 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
5413 * arrays.cs: Regression tests for allocating arrays with negative sizes.
5415 2008-05-28 Zoltan Varga <vargaz@gmail.com>
5417 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
5418 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
5421 2008-05-27 Zoltan Varga <vargaz@gmail.com>
5423 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
5424 the 'value' to store is a constant.
5426 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
5428 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
5429 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
5431 2008-05-26 Zoltan Varga <vargaz@gmail.com>
5433 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
5434 for accessing method->generic_container.
5436 2008-05-24 Zoltan Varga <vargaz@gmail.com>
5438 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
5440 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
5442 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
5444 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
5447 2008-05-23 Zoltan Varga <vargaz@gmail.com>
5449 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
5451 * mini.c: Handle the case when mono_class_vtable () fails.
5453 2008-05-23 Massimiliano Mantione <massi@ximian.com>
5454 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
5457 2008-05-22 Mark Probst <mark.probst@gmail.com>
5459 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
5460 together with domain sharing.
5462 2008-05-22 Mark Probst <mark.probst@gmail.com>
5464 * mini.c: Treat callvirts to final methods like non-virtual calls
5465 when doing generic sharing, i.e. look them up in the runtime
5468 2008-05-22 Mark Probst <mark.probst@gmail.com>
5470 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
5471 with computed types (for generic sharing).
5473 * mini.c: Generic sharing for mkrefany and refanyval.
5475 2008-05-22 Zoltan Varga <vargaz@gmail.com>
5477 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
5480 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
5481 the generic sharing code.
5483 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
5486 2008-05-21 Zoltan Varga <vargaz@gmail.com>
5488 * mini.h: Remove the declaration of mono_aot_init_vtable ().
5490 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
5492 * driver.c: updated copyright date
5494 2008-05-21 Zoltan Varga <vargaz@gmail.com>
5496 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
5499 2008-05-19 Martin Baulig <martin@ximian.com>
5501 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
5502 pointing to the new `_mono_debug_using_mono_debugger' variable.
5505 (mono_main): Check mono_debug_using_mono_debugger() rather than
5506 the `MONO_INSIDE_MDB' environment variable to check whether we're
5507 inside the debugger.
5509 2008-05-19 Zoltan Varga <vargaz@gmail.com>
5511 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
5514 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
5516 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
5518 * mini.c: Added mini_assembly_can_skip_verification. This
5519 function checks if the assembly requested to skip verification.
5520 Fixes part of #387274.
5522 2008-05-07 Zoltan Varga <vargaz@gmail.com>
5524 * mini.c (mini_get_method): Disable the check for open generic classes when
5525 using generic sharing.
5527 * generics.cs: Add a test for #387034.
5529 * mini.c (mini_get_method): Check whenever the method class is an open generic
5530 type, and return NULL in that case, causing a verification error. Fixes
5533 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5535 * driver.c (mono_main): Revert r102623. The right
5536 thing to do is to enable the verifier under verifiable
5537 unless a --security flag was passed.
5539 We need this non-trivial behavior for --verify-all otherwise
5540 mcs-compileall won't be able to use it. As it needs everything to
5541 be verified under validil.
5543 2008-05-06 Martin Baulig <martin@ximian.com>
5547 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
5548 (mono_debugger_thread_cleanup): Likewise.
5549 (mono_debugger_extended_notification): Likewise.
5551 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5553 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
5554 against both inflated and non-inflated methods. We need to check against the
5555 generic definition for cases where the instantiated method is not visible.
5556 We need to check against the inflated types for cases where the instantiation
5557 changes any super type. This fixes #382986.
5559 Note that this doesn't need to be applied to other parts of mono_method_to_ir
5560 that check for visibiliy as generic params only appears as the type subject
5561 of tokens on call opcodes. Field manipulation and ldftn must always
5562 target an exact type.
5564 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5566 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
5567 if no related --security flag is passed.
5569 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5571 * mini-arch.h: Prepare support for ppc64.
5573 Contributed under MIT/X11 license.
5575 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5577 * aot-runtime.c: Prepare support for ppc64.
5579 Contributed under MIT/X11 license.
5581 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5583 * mini-ops.h: Prepare support for ppc64.
5585 Contributed under MIT/X11 license.
5587 2008-05-04 Andreas Färber <andreas.faerber@web.de>
5589 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
5591 Contributed under MIT/X11 license.
5593 2008-05-03 Zoltan Varga <vargaz@gmail.com>
5595 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
5596 assemblies, since aot_name is not a full path, causing us to load MS.NET
5597 assemblies on windows.
5599 2008-04-28 Kornél Pál <kornelpal@gmail.com>
5601 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
5602 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
5603 * main.c: Use UTF-8 encoded command line instead of Windows default code
5604 page on Windows to support Unicode.
5605 * driver.c (DllMain): New function for mixed-mode assembly support.
5606 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
5607 export __stdcall functions without decoration.
5609 Contributed under MIT/X11 license.
5611 2008-04-28 Mark Probst <mark.probst@gmail.com>
5613 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
5614 saving it very early.
5616 2008-04-28 Mark Probst <mark.probst@gmail.com>
5618 * mini.h, mini.c: Lots of code for accessing the old RGCTX
5619 deleted. The only way to access the new RGCTX is via the
5622 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
5623 vtable instead of the RGCTX to static methods.
5625 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
5626 accessing the new RGCTX.
5628 * generic-sharing.c: There is no separation between self, type
5629 arguments and other types in the RGCTX anymore.
5631 2008-04-25 Jonathan Chambers <joncham@gmail.com>
5633 * mini-amd64.c (add_general): Remove previous stack adjustment.
5634 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
5635 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
5636 for 32 bytes of stack space reserved for all calls.
5638 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
5639 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
5642 Code contributed under MIT/X11 license.
5644 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5646 * mini.c (mini_method_verify): Only verify non-inflated methods, check
5647 against the root definition, peeling out method and type instantiations.
5648 Cache verify success results, code that fails verification is still
5649 checked multiple times.
5651 2008-04-23 Zoltan Varga <vargaz@gmail.com>
5653 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
5655 2008-04-23 Jonathan Chambers <joncham@gmail.com>
5657 * mini-amd64.c (add_general): Always increment stack on Win64.
5658 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
5661 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
5662 stack based argument handling on Win64.
5664 Code contributed under MIT/X11 license.
5666 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
5668 * Makefile.am (version.h): Add support for git-svn.
5670 2008-04-22 Zoltan Varga <vargaz@gmail.com>
5672 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
5673 so instead of calling g_spawn_command_line_sync, we do everything by hand,
5674 avoiding allocations and libc functions which might deadlock.
5676 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
5677 'no-gdb-backtrace' option is set.
5679 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
5681 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
5683 2008-04-21 Martin Baulig <martin@ximian.com>
5685 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
5686 and `get_lmf_addr'; `notification_address' is no longer a pointer.
5688 2008-04-21 Martin Baulig <martin@ximian.com>
5690 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
5691 `thread_vtable', `event_handler_ptr' and `event_handler'.
5693 2008-04-21 Martin Baulig <martin@ximian.com>
5695 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
5696 allows delayed initialization of the `executable_code_buffer' when
5699 2008-04-21 Martin Baulig <martin@ximian.com>
5701 * mini.h (mono_debugger_create_notification_function): Removed.
5702 * tramp-*.c (mono_debugger_create_notification_function): Removed.
5704 * mdb-debug-info64.s
5705 (MONO_DEBUGGER__notification_function): Added this in the .text section.
5707 * mdb-debug-info32.s
5708 (MONO_DEBUGGER__notification_function): Added this in the .text section.
5710 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
5711 currently only works on x86 and x86_64, so don't create it on ppc.
5713 2008-04-21 Martin Baulig <martin@ximian.com>
5715 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
5718 (mini_method_compile): In the fp elimination check, check
5719 `debug_options.mdb_optimizations' in addition to
5720 mono_debug_using_mono_debugger().
5722 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
5723 disable some JIT optimizations which are only disabled when
5724 running inside the debugger.
5725 Added `--help-debug' option to describe the debugging options.
5726 (parse_debug_options): New static function to parse the `--debug'
5727 options, so we can easily add more stuff in future.
5729 2008-04-20 Zoltan Varga <vargaz@gmail.com>
5731 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
5732 the method has no body.
5734 2008-04-19 Jonathan Chambers <joncham@gmail.com>
5736 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
5737 assembly is not allowed in MSVC 64-bit compiler.
5738 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
5739 as we get floating point exceptions everywhere.
5741 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
5742 correctly align arguments for call to throw_exception.
5743 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
5745 Code contributed under MIT/X11 license.
5747 2008-04-19 Zoltan Varga <vargaz@gmail.com>
5749 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
5751 2008-04-17 Zoltan Varga <vargaz@gmail.com>
5753 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
5755 * mini-amd64.c (NEW_INS): Set cil_code.
5757 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
5758 from mini-amd64.c so all debugger related logic is in one place.
5760 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
5761 later won't have a random ip assigned to them.
5763 2008-04-16 Zoltan Varga <vargaz@gmail.com>
5765 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
5766 the arch specific function initializes code_size.
5767 (mono_create_delegate_trampoline): Ditto.
5769 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
5770 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
5773 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
5774 running under the debugger.
5776 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
5779 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
5780 debugger. Also move the disabling of optimizations here from driver.c.
5781 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
5784 * mini.h (MonoCompile): Add a few new flags.
5786 2008-04-15 Zoltan Varga <vargaz@gmail.com>
5788 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
5789 so the cil_code field of created MonoInst's is properly set.
5790 (mini_select_instructions): Ditto.
5792 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
5793 (MONO_INST_NEW_CALL): Ditto.
5795 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
5796 in many places so the ins->cil_code field is properly initialized.
5798 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
5801 2008-04-14 Zoltan Varga <vargaz@gmail.com>
5803 * mini.c (mini_method_compile): Print a different message when compiling a
5806 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
5809 2008-04-11 Zoltan Varga <vargaz@gmail.com>
5811 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
5814 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
5816 2008-04-11 Zoltan Varga <vargaz@gmail.com>
5818 * mini.c (handle_stack_args): Make this return void since its return value was
5819 never used. Also set cfg->unverifiable for invalid IL instead of calling
5822 2008-04-10 Mark Probst <mark.probst@gmail.com>
5824 * mini.c: Make sure "this" is live in catch clauses with type
5825 variables in shared generic code.
5827 2008-04-08 Mark Probst <mark.probst@gmail.com>
5829 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
5830 generic_class_is_reference_type() to ensure the proper behaviour
5831 when sharing generic code and the type in question is a type
5834 2008-04-08 Zoltan Varga <vargaz@gmail.com>
5836 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
5837 race conditions when printing thread dumps. Fixes #377738.
5839 2008-04-08 Massimiliano Mantione <massi@ximian.com>
5841 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
5842 shows up when both MonoInst arguments can cause aliasig.
5843 There is likely no way in the current JIT to trigger this problem, but
5844 it showed up in the development of generics sharing, when in a new
5845 opcode both args of an OP_GROUP can be aliases (addresses of a local).
5846 When the generics sharing code will be committed, its tests will be
5847 valid also for this bug.
5849 2008-04-08 Zoltan Varga <vargaz@gmail.com>
5851 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
5854 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
5857 2008-04-07 Zoltan Varga <vargaz@gmail.com>
5859 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
5860 use a more detailed exception message for InvalidCastException.
5862 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
5864 * driver.c (mono_main): Add --debug=casts option to turn on better
5865 InvalidCastException message details.
5867 * mini.c (mini_get_debug_options): New helper function to return the address of
5868 the debug_options variable.
5870 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
5871 the jit_tls TLS variable.
5873 * mini.c (mono_jit_tls): New TLS variable.
5875 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
5878 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
5880 * mini.h: Removed verifer related stuff. This code was moved to verify.c
5882 * mini.c: Removed verifer related stuff, code moved to verify.c.
5884 * driver.c: Using code from verify.c instead of mini.c.
5886 2008-04-05 Zoltan Varga <vargaz@gmail.com>
5888 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
5891 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
5893 * mini.c (check_for_method_verify): Enabling verification of
5894 corlib if mono_verify_all is set. Bugs in the verifier preventing that
5897 2008-04-04 Zoltan Varga <vargaz@gmail.com>
5899 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
5900 caller saved registers as well.
5902 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
5903 saved registers as well.
5905 2008-03-30 Zoltan Varga <vargaz@gmail.com>
5907 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
5909 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
5912 2008-03-27 Zoltan Varga <vargaz@gmail.com>
5914 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
5916 (get_call_info): Take a gsctx argument instead of 'cfg'.
5918 2008-03-26 Zoltan Varga <vargaz@gmail.com>
5920 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
5921 mono_verify_all is set.
5923 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
5925 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
5927 2008-03-25 Zoltan Varga <vargaz@gmail.com>
5929 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
5932 * driver.c mini.c mini.h: Add a --verify-all development option to test the
5933 verifier and the code generated by the compiler.
5935 2008-03-25 Mark Probst <mark.probst@gmail.com>
5937 * mini.c: Generic sharing of the non-nullable case of the box
5940 2008-03-24 Zoltan Varga <vargaz@gmail.com>
5942 * inssel.brg: Fix the build.
5944 * iltests.il.in: Add a test for lconv.ovf.u8.un.
5946 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
5948 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
5949 Array:Address. Fixes #372410.
5951 * iltests.il.in: New tests for readonly prefix.
5953 2008-03-23 Zoltan Varga <vargaz@gmail.com>
5955 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
5958 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
5961 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
5963 * mini.c (mono_decompose_op_imm): New helper function.
5965 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
5966 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5969 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
5970 mono_arch_output_basic_block. Fix warnings.
5972 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
5975 2008-03-22 Zoltan Varga <vargaz@gmail.com>
5977 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
5978 since the extra frame is now detected automatically inside the loop.
5980 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
5981 opts which are now in mono_peephole_ins ().
5983 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
5985 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
5986 frames and skip duplicate managed-to-native frames. Fixes #367665.
5988 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5989 opts which are now in mono_peephole_ins ().
5990 (mono_arch_peephole_pass_2): Ditto.
5992 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
5994 * mini-codegen.c (mono_peephole_ins): New helper function containing the
5995 arch independent peephole optimizations.
5997 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5998 opts which are now in mono_peephole_ins ().
6000 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
6002 * mini-s390.c (mono_arch_output_basic_block): Fix build.
6004 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
6007 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
6008 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
6011 2008-03-21 Zoltan Varga <vargaz@gmail.com>
6013 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
6014 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6017 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
6018 mono_arch_output_basic_block. Fix warnings.
6020 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6022 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6025 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6027 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6030 * iltests.il: Add new tests.
6032 2008-03-20 Kornél Pál <kornelpal@gmail.com>
6034 * mini.c: Removed Windows version macros.
6036 2008-03-20 Mark Probst <mark.probst@gmail.com>
6038 * generic-sharing.c: Put reflection types in the extensible part
6039 of the runtime generic context.
6041 * mini.c: Generic sharing of the GetTypeHandle special case of the
6042 ldtoken instruction.
6044 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6046 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
6048 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
6050 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
6051 consistency with the other version on the linear IR branch.
6053 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
6055 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
6057 * iltests.il.in: Add new tests.
6059 2008-03-19 Zoltan Varga <vargaz@gmail.com>
6061 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
6063 * iltests.il.in: Add new tests.
6065 2008-03-19 Mark Probst <mark.probst@gmail.com>
6067 * mini.c: Two variables with the same name were declared in
6068 nesting contexts and one wasn't initialized. Fixed.
6070 2008-03-19 Mark Probst <mark.probst@gmail.com>
6072 * mini.c: Generic sharing of the initobj instruction.
6074 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6076 * mini.c: make the test to optimize ldtoken from typeof() more
6079 2008-03-18 Mark Probst <mark.probst@gmail.com>
6081 * mini.c: Generic sharing of the initobj instruction for reference
6084 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
6086 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
6087 the mono_breakpoint_clean_code() code to perform bound checks.
6089 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
6091 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
6092 mono_arch_patch_callsite() to include the start of the managed method
6093 to be able to perform bound checks.
6095 2008-03-17 Mark Probst <mark.probst@gmail.com>
6097 * mini.c: Generic sharing for the isinst instruction.
6099 2008-03-17 Mark Probst <mark.probst@gmail.com>
6101 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6102 inssel-long32-mips.brg: Added opcodes for doing indirect calls
6103 with the runtime generic context argument.
6105 * mini.c: Share calls to several types of unsharable methods by
6106 putting the address of the method code in the runtime generic
6107 context and doing an indirect call.
6109 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6112 2008-03-16 Mark Probst <mark.probst@gmail.com>
6114 * generic-sharing.c: Change due to a change in the runtime genric
6117 2008-03-15 Martin Baulig <martin@ximian.com>
6120 (mono_arch_nullify_class_init_trampoline): Add call to
6121 mono_breakpoint_clean_code() to make things work when running
6122 inside the debugger.
6125 (mono_arch_nullify_class_init_trampoline): Add call to
6126 mono_breakpoint_clean_code() to make things work when running
6127 inside the debugger.
6129 2008-03-14 Zoltan Varga <vargaz@gmail.com>
6131 * inssel-long.brg (reg): Fix 64 bit build.
6133 2008-03-14 Mark Probst <mark.probst@gmail.com>
6135 * mini.c, mini.h: Share static generic code by passing it an
6136 implicit argument pointing to the runtime generic context.
6138 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6139 inssel-long32-mips.brg: New opcodes for calling shared static,
6140 which need to be passed the runtime generic context.
6142 * mini-amd64.c, mini-x86.c: Save the runtime generic context
6143 argument on the stack in the prologue if needed. New function for
6144 finding the runtime generic context argument from the registers
6145 saved by the trampoline.
6147 * mini-amd64.h, mini-x86.h: Specify which register to use for the
6148 runtime generic context argument.
6150 * tramp-amd64.c: Also restore the register used for the runtime
6151 generic context argument.
6153 * mini-trampoline.c: Resolve shared static calls by consulting the
6154 runtime generic context via the new argument.
6156 * generic-sharing.c: Add an argument to sharability-checking
6157 functions that specifies whether type variables should be treated
6158 as sharable type arguments.
6160 * inssel-x86.brg: Removed a superfluous, buggy rule.
6162 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6165 2008-03-14 Martin Baulig <martin@ximian.com>
6167 * debug-debugger.c (main_thread_handler): Call
6168 mono_runtime_run_main() without sending any notifications.
6170 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
6172 2008-03-14 Zoltan Varga <vargaz@gmail.com>
6174 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
6176 2008-03-14 Mark Probst <mark.probst@gmail.com>
6178 * tramp-x86.c: Fixed register restore offsets in the trampoline
6179 code for ECX and EDX.
6181 2008-03-12 Geoff Norton <gnorton@novell.com>
6183 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
6184 different ucontext_t implementations.
6185 * exceptions-arm.c: Use the above defines to get exceptions working on
6186 iPhone (based on a patch by Luke Howard lukeh@padl.com)
6187 * mini-arm.c: Implement iPhone icache support (based on a patch by
6188 Luke Howard lukeh@padl.com)
6190 2008-03-12 Mark Probst <mark.probst@gmail.com>
6192 * mini.c: Enable generic sharing of calls to non-static
6193 non-interface non-generic non-value-type methods.
6195 * mini-trampolines.c: Resolve calls from shared generic code.
6197 2008-03-11 Zoltan Varga <vargaz@gmail.com>
6199 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
6201 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
6203 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
6205 * mini.c: some fixes for the AOT compiler.
6207 2008-03-07 Zoltan Varga <vargaz@gmail.com>
6209 * cpu-amd64.md: Add clob:1 to some float opcodes.
6211 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
6213 * mini.h: Added MiniVerifierMode enumeration.
6215 * mini.c: Added mini_verifier_set_mode to control
6216 the usage of the new verifier.
6218 * mini.c (mono_method): Integrated the new verifier.
6220 * driver.c: Extended --security option with validil and
6221 verifiable options to activate the new verifier.
6223 2008-03-07 Zoltan Varga <vargaz@gmail.com>
6225 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
6226 optimization to ctors taking 0 or 2 arguments too.
6228 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
6231 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
6233 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
6235 2008-03-06 Zoltan Varga <vargaz@gmail.com>
6237 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
6238 non-aot case as well.
6240 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
6242 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
6245 * aot-compiler.c (encode_patch): Ditto.
6247 * mini.h (G_MININT32): Fix the definition of this.
6249 2008-03-05 Zoltan Varga <vargaz@gmail.com>
6251 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
6253 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
6255 2008-03-04 Zoltan Varga <vargaz@gmail.com>
6257 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
6258 methods returning vtypes in registers.
6259 (mono_arch_allocate_vars): Ditto.
6261 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
6263 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
6265 * generics.cs: Add a test from the linear IR branch.
6267 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
6269 * mini.c (inline_method): Cache failed inline attempts.
6271 2008-03-04 Mark Probst <mark.probst@gmail.com>
6273 * mini.c: For shared methods of generic classes put the location
6274 of "this" into the MonoGenericJitInfo.
6276 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
6277 register out of a MonoContext by register number. Add the generic
6278 sharing context as an argument to mono_arch_find_this_argument().
6280 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
6281 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
6282 for new arch function.
6284 * mini-exception.c: Handle open exception clauses in shared
6287 * mini-trampolines.c: Supply additional argument to
6288 mono_arch_find_this_argument().
6290 2008-03-04 Zoltan Varga <vargaz@gmail.com>
6292 * Makefile.am (regtests): Run the bench.exe tests last.
6294 2008-03-03 Zoltan Varga <vargaz@gmail.com>
6296 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
6299 2008-03-02 Zoltan Varga <vargaz@gmail.com>
6301 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
6304 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
6306 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
6308 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
6309 whose class has no cctor.
6311 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
6313 2008-03-01 Zoltan Varga <vargaz@gmail.com>
6315 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
6318 2008-02-29 Zoltan Varga <vargaz@gmail.com>
6320 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
6321 to be in sync with the code on the linear IR branch.
6323 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
6325 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
6327 2008-02-27 Zoltan Varga <vargaz@gmail.com>
6329 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
6331 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
6333 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
6335 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
6337 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
6339 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
6342 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
6344 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
6345 OP_LOADR4_MEMBASE emission.
6347 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
6348 (mono_spillvar_offset_float): Ditto.
6350 * mini-mips.c (mono_arch_emit_prolog): Ditto.
6352 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
6355 * basic-long.cs: Add regression tests for them.
6357 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
6359 (mono_arch_allocate_vars): Fix representation of single-precision float
6361 (mono_arch_output_basic_block): Ditto.
6363 * inssel-mips.brg: Ditto, remove duplicate items.
6365 * mini-mips.c (emit_load_volatile_arguments): New function to handle
6366 arguments of tail calls as on other platforms.
6367 (mono_arch_output_basic_block): Handle tail calls.
6369 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
6372 * objects.cs (test_5_pass_static_struct): Add test for it.
6374 Contributed under MIT/X11 license.
6376 2008-02-26 Zoltan Varga <vargaz@gmail.com>
6378 * Makefile.am: Use gmcs for compiling the regression tests.
6380 * *.2.cs *.2.il: Rename to *.cs and *.il.
6382 2008-02-24 Zoltan Varga <vargaz@gmail.com>
6384 * regalloc.h: Make the vassign array smaller.
6386 * mini.c (mini_method_compile): Remove an unused field in cfg.
6388 * mini-codegen.c: Add a bunch of micro optimizations.
6390 2008-02-23 Zoltan Varga <vargaz@gmail.com>
6392 * regalloc.h: Remove some unused fields.
6394 2008-02-22 Zoltan Varga <vargaz@gmail.com>
6396 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
6398 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
6400 2008-02-22 Mark Probst <mark.probst@gmail.com>
6402 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
6404 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
6405 trampoline: Fetch an entry from the runtime generic context. If
6406 it's NULL, jump to the actual trampoline to fill the runtime
6407 generic context. Otherwise, return it.
6409 * mini.c: Call the lazy fetch trampoline to get entries out of the
6410 runtime generic context.
6412 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
6413 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
6414 tramp-sparc.c: Stubs for the lazy fetch trampoline.
6416 2008-02-21 Mark Probst <mark.probst@gmail.com>
6418 * mini.c: Fetch data out of the extensible part of the runtime
6419 generic context instead of calling a helper function.
6421 * generic-sharing.c: Some functions moved into
6422 metadata/generic-sharing.c. Helper function for fetching other
6423 types now checks and asserts against extensible rgctx (just for
6424 debugging purposes - the helper function isn't called anymore
6425 unless for debugging).
6427 2008-02-21 Zoltan Varga <vargaz@gmail.com>
6429 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
6430 for tail calls up to the point that the tests in iltests.exe run. Also add a
6431 dummy CKFINITE implementation.
6432 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
6433 needed for trampoline LMF frames.
6435 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
6436 trampoline LMF frames.
6438 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
6440 * mini.c (inline_method): clean any pending loader error when inlining fail.
6441 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
6443 2008-02-21 Zoltan Varga <vargaz@gmail.com>
6445 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
6447 * aot-runtime.c (decode_patch_info): Ditto.
6449 * mini.c (mono_resolve_patch_target): Ditto.
6451 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
6454 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
6456 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
6457 if it references an icall address.
6459 2008-02-20 Zoltan Varga <vargaz@gmail.com>
6461 * cpu-s390x.md: Remove some more unused opcodes.
6463 * cpu-s390x.md: Remove some unused opcodes.
6465 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
6466 mono_op_imm_to_op ().
6468 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
6469 instead of a switch statement.
6471 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
6472 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
6474 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
6476 * mini-codegen.c: Remove unused mono_regstate2_... functions.
6478 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
6481 2008-02-19 Zoltan Varga <vargaz@gmail.com>
6483 * driver.c (mono_main): Improve error reporting when an assembly cannot be
6484 opened. Fixes #362607.
6486 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
6488 * iltests.il.in: Add a test for static methods in interfaces.
6490 2008-02-18 Zoltan Varga <vargaz@gmail.com>
6492 * genmdesc.c (build_table): Fix a crash on older glib versions.
6494 * cpu-sparc.md: Remove some unused opcodes.
6496 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
6497 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
6499 * cpu-amd64.md: Remove some unused opcodes.
6501 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
6502 like the other opcodes.
6504 2008-02-17 Zoltan Varga <vargaz@gmail.com>
6506 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
6508 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
6510 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
6511 variables 'cfg' instead of 'm' for consistency.
6513 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
6515 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
6516 argument holding the vtype return address, to avoid the ambigious use of
6517 cfg->ret for this purpose.
6519 * mini.c (NEW_RETLOADA): Use vret_addr if set.
6521 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
6523 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
6524 new mono_print_ins () function which only takes one argument.
6526 2008-02-15 Zoltan Varga <vargaz@gmail.com>
6528 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
6531 2008-02-14 Zoltan Varga <vargaz@gmail.com>
6533 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
6535 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
6537 * mini-x86.c: Sync with the version on the linear IR branch by adding new
6538 opcodes and other small changes.
6540 * mini-ops.h: Add some new opcodes from the linear IR branch.
6542 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
6544 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
6545 opcodes, use the REG_MEMBASE opcodes instead.
6547 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
6548 opcodes, use the REG_MEMBASE opcodes instead.
6550 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
6553 * mini.c (mono_op_imm_to_op): New helper function.
6555 * mini-ops.h: Add some opcodes from linear IR branch.
6557 2008-02-13 Zoltan Varga <vargaz@gmail.com>
6559 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
6562 2008-02-12 Zoltan Varga <vargaz@gmail.com>
6564 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
6567 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
6569 2008-02-09 Zoltan Varga <vargaz@gmail.com>
6571 * aot-compiler.c (emit_method_code): Add an assert.
6573 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
6574 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
6577 2008-02-08 Zoltan Varga <vargaz@gmail.com>
6579 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
6580 some load/store opcodes so they are consistent.
6581 (mono_arch_emit_prolog): Simplify some code.
6583 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
6585 * objects.cs: Add tests for large argument offsets on ARM.
6587 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
6588 stack offsets. Fixes #359651.
6590 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
6592 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
6594 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
6596 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
6598 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
6600 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
6601 rid of CEE_CONV_R_UN.
6603 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
6605 2008-02-07 Zoltan Varga <vargaz@gmail.com>
6607 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
6609 * mini.c (mono_normalize_opcodes): Add some more opcodes.
6611 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
6613 * cpu-amd64.md: Remove some unused opcodes.
6615 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
6617 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
6619 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
6620 arch specific functions for its parts. Call the peephole pass after local
6621 regalloc so the prolog can compute a more accurate max_offset.
6623 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
6624 the corresponding OP_I/OP_L opcodes.
6626 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
6628 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
6630 2008-02-06 Zoltan Varga <vargaz@gmail.com>
6632 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
6633 as they are handled in mini.c.
6635 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
6637 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
6638 case since it is handled in mini.c.
6640 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
6642 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
6644 * *.c: Use the new opcodes in the IR and back end code.
6646 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
6648 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
6650 2008-02-06 Mark Probst <mark.probst@gmail.com>
6652 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
6653 an assert because it has a race condition.
6655 2008-02-06 Zoltan Varga <vargaz@gmail.com>
6657 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
6659 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
6661 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
6663 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
6664 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
6666 2008-02-05 Zoltan Varga <vargaz@gmail.com>
6668 * cpu-amd64.md (move): Correct the maximum size of move.
6670 2008-02-05 Mark Probst <mark.probst@gmail.com>
6672 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
6673 the generic class init trampoline to return quickly if the class
6676 2008-02-04 Zoltan Varga <vargaz@gmail.com>
6678 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
6679 issues where an 32 bit callsite cannot be patched by a 64 bit address.
6681 2008-02-03 Zoltan Varga <vargaz@gmail.com>
6683 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
6686 2008-01-31 Zoltan Varga <vargaz@gmail.com>
6688 * objects.cs: Add some soft-float tests.
6690 * mini.c: Fix a couple more soft-float issues.
6692 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
6694 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
6697 2008-01-30 Zoltan Varga <vargaz@gmail.com>
6699 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
6700 exception happens while compiling a virtual method.
6702 2008-01-29 Zoltan Varga <vargaz@gmail.com>
6704 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
6706 * mini-sparc.c: Fix build.
6708 * mini-sparc.c (get_call_info): Add support for generic sharing.
6710 * mini-exceptions.c: Add a FIXME.
6712 2008-01-27 Zoltan Varga <vargaz@gmail.com>
6714 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
6715 altstack handling code.
6717 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
6719 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
6721 * mini-s390.c: Add support for generic sharing.
6723 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
6725 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6727 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
6729 * mini-s390x.c: Add support for generic sharing.
6731 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
6733 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6735 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
6736 can be used since it takes a 16 bit signed immediate.
6738 * inssel-s390x.brg: Fix OP_SETRET.
6740 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
6742 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
6744 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
6746 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
6748 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
6751 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
6754 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
6755 of the unused mono_arch_patch_delegate_trampoline stuff.
6757 2008-01-26 Zoltan Varga <vargaz@gmail.com>
6759 * basic-long.cs: Move the fp related tests to basic-float.cs.
6761 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
6763 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
6765 * basic-calls.cs: Add a test for proper float argument passing.
6767 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
6768 if the context corresponds to an exception received through a signal.
6770 * exceptions.cs: Add a test for nullref handling at the start of a try
6773 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
6775 * jit-icalls.c (mono_break): New JIT icall.
6777 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
6779 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
6781 2008-01-25 Zoltan Varga <vargaz@gmail.com>
6783 * cpu-*.md: Get rid of unused opcodes.
6785 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
6787 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
6790 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
6793 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
6794 the arch independent trampoline code in mini-trampolines.c.
6796 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
6798 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
6800 * mini-s390.h: Remove an unused define.
6802 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
6803 the arch independent trampoline code in mini-trampolines.c.
6805 * mini-arm.c (mono_arch_emit_prolog): Fix build.
6807 2008-01-24 Zoltan Varga <vargaz@gmail.com>
6809 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
6811 * mini-s390.c (mono_arch_emit_prolog): Fix build.
6813 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
6815 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
6817 * cpu-amd64.md: Use smaller sizes for int opcodes.
6819 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
6821 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
6824 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
6827 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
6828 instead of though a pointer to save an indirection when accessing elements of
6831 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
6833 (NOT_IMPLEMENTED): New helper macro.
6834 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
6837 * *.c: Use the new helper macro.
6839 2008-01-21 Zoltan Varga <vargaz@gmail.com>
6841 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
6843 2008-01-20 Zoltan Varga <vargaz@gmail.com>
6845 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
6848 2008-01-18 Zoltan Varga <vargaz@gmail.com>
6850 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
6851 profiling is enabled.
6853 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
6855 (mono_arch_emit_prolog): Add more first bblock optimizations.
6857 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
6858 in order if possible.
6859 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
6860 bblock, since the arguments are still in their original registers.
6862 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
6864 2008-01-17 Zoltan Varga <vargaz@gmail.com>
6866 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
6869 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
6872 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
6874 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
6875 process async exceptions received while in unmanaged code.
6877 * mini.c (mini_init): Install a callback with the runtime which will be called
6878 when a thread receives an async exception while in unmanaged code.
6880 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
6882 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
6884 2008-01-16 Wade Berrier <wberrier@novell.com>
6891 2008-01-16 Zoltan Varga <vargaz@gmail.com>
6893 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
6894 compilation with sun cc.
6896 * cpu-*.md: Fix the build.
6898 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
6900 * mini-amd64.h: Add some comments to the MonoLMF structure.
6902 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
6904 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
6905 in the LMF structure if possible. This saves two instructions in the
6906 managed->native wrappers.
6908 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
6910 2008-01-16 Mark Probst <mark.probst@gmail.com>
6912 * generic-sharing.c: New type argument lookup code which uses the
6913 runtime generic context template.
6915 2008-01-15 Zoltan Varga <vargaz@gmail.com>
6917 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
6919 * mini-arm.c (add_general): Fix arm eabi parameter passing.
6920 (mono_arch_output_basic_block): Fix localloc implementation.
6922 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
6924 * mini-ia64.c (peephole_pass): Fix ia64 build.
6926 * mini-amd64.c (peephole_pass): Fix a warning.
6928 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
6929 at a constant offset from sp/fp.
6931 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
6932 instead of obtaining it from *lmf in the managed method case.
6934 2008-01-14 Zoltan Varga <vargaz@gmail.com>
6936 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
6938 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
6940 * mini.h (MonoInstList): New type.
6941 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
6942 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
6943 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
6944 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
6945 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
6946 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
6947 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
6948 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
6949 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
6950 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
6951 MONO_INST_LIST_FOR_EACH_ENTRY,
6952 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
6953 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
6954 mono_inst_list_first, mono_inst_list_last,
6955 mono_inst_list_next, mono_inst_list_prev): New instruction
6956 list handling interfaces.
6957 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
6958 list head 'ins_list'.
6959 (MonoInst): Replace next pointer with list head 'node'.
6960 (MonoCallInst): Make 'out_args' a MonoInstList.
6961 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
6962 (MonoCompile): Delete reverse_inst_list and
6963 reverse_inst_list_len.
6964 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
6965 mono_arch_lowering_pass, mono_arch_local_regalloc,
6966 mono_arch_output_basic_block, mono_arch_emit_prolog):
6967 Convert to new instruction lists.
6968 (insert_after_ins): Delete.
6969 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
6971 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
6972 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
6973 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
6974 mono_emulate_opcode, mono_emit_load_got_addr,
6975 inline_method, mono_method_to_ir, mono_print_bb_code,
6976 print_dfn, decompose_pass, nullify_basic_block,
6977 replace_out_block_in_code, remove_block_if_useless,
6978 merge_basic_blocks, move_basic_block_to_end,
6979 try_unsigned_compare, optimize_branches, mono_print_code,
6980 mini_select_instructions, remove_critical_edges): Likewise.
6981 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
6982 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
6983 mono_arch_output_basic_block, mono_arch_emit_prolog):
6985 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
6986 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6987 mono_arch_output_basic_block): Likewise.
6988 (inst_list_prepend, insert_after_ins): Delete.
6989 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
6990 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
6992 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
6993 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
6994 mono_arch_emit_prolog): Likewise.
6995 * cfold.c (mono_constant_fold): Likewise.
6996 * liveness.c (visit_bb, mono_analyze_liveness,
6997 optimize_initlocals): Likewise.
6998 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
6999 * graph.c (mono_draw_code_cfg): Likewise.
7000 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
7001 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
7002 mono_ssa_cprop): Likewise.
7003 * abcremoval (get_relations_from_previous_bb, process_block):
7005 * local-propagation (mono_cprop_invalidate_values,
7006 mono_local_cprop_bb): Likewise.
7007 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
7008 peephole_pass, mono_arch_output_basic_block,
7009 mono_arch_emit_prolog): Likewise.
7010 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
7011 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7012 mono_arch_emit_prolog): Likewise.
7013 (insert_after_ins): Delete.
7014 * aliasing.c (print_code_with_aliasing_information,
7015 mono_build_aliasing_information, mono_aliasing_deadce):
7016 Convert to new instruction lists.
7017 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
7018 peephole_pass, NEW_INS, mono_arch_lowering_pass,
7019 mono_arch_local_regalloc, mono_arch_output_basic_block):
7021 (insert_after_ins): Delete.
7022 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
7023 peephole_pass, mono_arch_output_basic_block): Convert to
7024 new instruction lists.
7025 * mini-codegen (InstList, inst_list_prepend,
7026 insert_after_ins): Delete.
7027 (insert_before_ins, get_register_force_spilling,
7028 get_register_spilling, free_up_ireg, free_up_reg,
7029 create_copy_ins, create_spilled_store, alloc_int_reg,
7030 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
7031 to new instruction lists.
7032 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
7033 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7034 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
7035 (insert_after_ins): Delete.
7036 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
7037 mono_arch_local_regalloc, mono_arch_output_basic_block,
7038 mono_arch_call_opcode): Convert to new instruction lists.
7039 (insert_after_ins): Delete.
7040 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
7041 peephole_pass, mono_arch_output_basic_block,
7042 mono_arch_emit_prolog): Convert to new instruction lists.
7044 2008-01-11 Zoltan Varga <vargaz@gmail.com>
7046 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
7048 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
7051 * Makefile.am (version.h): Make this work with non-bash shells.
7053 2008-01-10 Zoltan Varga <vargaz@gmail.com>
7055 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
7057 2008-01-08 Zoltan Varga <vargaz@gmail.com>
7059 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
7060 the InitializeArray optimization.
7062 2008-01-06 Zoltan Varga <vargaz@gmail.com>
7064 * mini.c driver.c: Don't include os/gc_wrapper.h.
7066 2008-01-05 Zoltan Varga <vargaz@gmail.com>
7068 * mini.c (print_jit_stats): Print GC statistics if available.
7070 2008-01-04 Zoltan Varga <vargaz@gmail.com>
7072 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
7074 2007-12-29 Zoltan Varga <vargaz@gmail.com>
7076 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
7078 2007-12-26 Zoltan Varga <vargaz@gmail.com>
7080 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
7082 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7084 * driver.c (mono_main): Ditto.
7086 2007-12-23 Zoltan Varga <vargaz@gmail.com>
7088 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
7090 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
7091 in the vtable can't be encoded.
7092 (compile_method): Ditto.
7094 2007-12-21 Zoltan Varga <vargaz@gmail.com>
7096 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
7099 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
7102 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
7103 the top LMF entry belongs to the current method.
7105 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
7107 2007-12-20 Zoltan Varga <vargaz@gmail.com>
7109 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
7111 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
7113 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
7115 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
7117 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
7119 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
7122 * basic-float.cs: Add an ulong->double cast test.
7124 2007-12-15 Zoltan Varga <vargaz@gmail.com>
7126 * mini.c (mono_method_to_ir): Fix a warning.
7128 2007-12-14 Zoltan Varga <vargaz@gmail.com>
7130 * mini-ops.h: Add OP_SWITCH.
7132 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
7133 CEE_SWITCH in back-end code, use OP_SWITCH instead.
7135 2007-12-11 Geoff Norton <gnorton@novell.com>
7137 * mini-s390x.c: Minor change to the MAX() define to allow
7138 it to compile with other gcc versions.
7140 2007-12-11 Geoff Norton <gnorton@novell.com>
7143 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
7145 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
7147 exceptions-arm.c (mono_arch_get_restore_context): Restore
7150 exceptions-arm.c (throw_exception): Save the frame pointer.
7151 This is a partial fix for #323747. Only the client side is
7154 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
7156 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
7157 was using an unrelated variable to log the class which
7158 needed the cctor to be called. This was crashing on arm.
7160 2007-12-09 Robert Jordan <robertj@gmx.net>
7162 * mini-x86.c (mono_arch_emit_epilog):
7163 Consider all kinds of 64-bit types. Fixes #323114.
7165 2007-12-08 Zoltan Varga <vargaz@gmail.com>
7167 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
7169 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7171 * mini-amd64.c (peephole_pass): Add a missing instruction check.
7173 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7175 * mini.c: run type ctor before allocating an object, not only
7176 when running it's constructor method (fixes at least part of bug #342507).
7178 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7180 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
7182 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
7183 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
7186 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
7187 mono_generic_class_init_trampoline () the same as it is done with the other
7190 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
7191 aot-runtime.c aot-compiler.c: Implement AOT support.
7193 2007-12-07 Mark Probst <mark.probst@gmail.com>
7195 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
7196 build for archs which don't have the vtable trampoline defined
7199 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7201 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
7203 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
7205 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
7207 * tramp-<ARCH>.c: Use the new helper function.
7209 2007-12-07 Mark Probst <mark.probst@gmail.com>
7211 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
7212 trampoline call, which takes a vtable argument.
7214 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
7215 OP_TRAMPCALL_VTABLEs like other calls.
7217 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
7218 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
7219 call. Implemented a support function which fetches the vtable
7220 from a register set.
7222 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
7223 Implemented a generic class init trampoline, using the
7224 OP_TRAMPCALL_VTABLE opcode.
7226 * mini.c: Implemented static field access when sharing generic
7227 code. This implies initing the class using the new
7228 OP_TRAMPCALL_VTABLE call.
7230 2007-12-07 Mark Probst <mark.probst@gmail.com>
7232 * mini.c: Don't compile methods with sharing enabled if their
7233 classes are disabled for sharing.
7235 2007-12-06 Zoltan Varga <vargaz@gmail.com>
7237 * inssel.brg: Add a missing sign extension to the GETCHR and array access
7238 opcodes. Fixes #346563.
7240 * objects.cs: Add a new test.
7242 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
7244 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
7245 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
7247 2007-12-06 Zoltan Varga <vargaz@gmail.com>
7249 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
7251 2007-12-03 Zoltan Varga <vargaz@gmail.com>
7253 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
7256 2007-12-02 Zoltan Varga <vargaz@gmail.com>
7258 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
7260 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
7261 optimization in the AOT case.
7263 2007-11-30 Zoltan Varga <vargaz@gmail.com>
7265 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
7267 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
7269 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
7271 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
7273 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
7274 is created by the inlined delegate ctor.
7276 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7278 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
7280 2007-11-29 Zoltan Varga <vargaz@gmail.com>
7282 * cpu-x86.md: Fix the length of ckfinite.
7284 2007-11-28 Zoltan Varga <vargaz@gmail.com>
7286 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7288 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
7289 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
7291 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
7293 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
7294 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
7296 2007-11-28 Martin Baulig <martin@ximian.com>
7299 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
7300 after creating the trampoline.
7302 2007-11-27 Zoltan Varga <vargaz@gmail.com>
7304 * aot-runtime.c (load_aot_module): Check runtime version if needed.
7306 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
7309 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
7310 instead of the calling method to help AOT.
7312 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
7314 2007-11-26 Zoltan Varga <vargaz@gmail.com>
7316 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
7319 2007-11-23 Zoltan Varga <vargaz@gmail.com>
7321 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
7323 * aot-compiler.c (compile_method): Correct check for generic method definitions.
7324 (encode_method_ref): No need to handle generic method definitions specially.
7326 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
7328 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
7331 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
7333 (compile_method): Enable generic sharing.
7335 2007-11-22 Zoltan Varga <vargaz@gmail.com>
7337 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
7338 (mini_method_compile): Add preliminary support for AOTing shared generic code.
7340 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
7343 * mini-trampolines.c: Fix a warning.
7345 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
7347 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
7348 (generic_class_is_reference_type): Remove unused function.
7350 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
7351 in the generic vtable trampoline case.
7353 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
7355 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
7356 return an AOT method based on a vtable slot.
7358 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
7360 * mini.c (mini_get_vtable_trampoline): Export this.
7362 2007-11-22 Martin Baulig <martin@ximian.com>
7365 (MonoDebuggerInfo): Move `debugger_version' up.
7367 2007-11-22 Martin Baulig <martin@ximian.com>
7370 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
7372 * mini-trampolines.c
7373 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
7374 after compiling the method.
7376 2007-11-20 Martin Baulig <martin@ximian.com>
7379 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
7380 (mono_debugger_remove_breakpoint): Likewise.
7381 (mono_debugger_check_breakpoints): Likewise.
7383 * debug-debugger.c: Implement the new breakpoint interface here.
7385 2007-11-18 Zoltan Varga <vargaz@gmail.com>
7387 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
7388 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
7390 * mini-x86.c (mono_arch_output_basic_block): Ditto.
7392 2007-11-17 Zoltan Varga <vargaz@gmail.com>
7394 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
7396 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
7399 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
7402 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
7403 returning a vtype in a register.
7405 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
7406 here from the arch specific code.
7408 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
7411 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
7412 (mono_arch_emit_prolog): Increment maximum prolog size.
7414 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
7415 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
7417 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
7418 MonoGenericSharingContext.
7420 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
7421 MonoGenericSharingContext. Allocate memory from the cfg mempool.
7423 2007-11-15 Mark Probst <mark.probst@gmail.com>
7425 * mini.c, mini.h, generic-sharing.c: Functions for producing code
7426 which extract fields out of the runtime generic context. Full
7427 sharing of the NEWARR opcode.
7429 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
7431 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
7432 --enable-minimal=ssa.
7434 2007-11-13 Zoltan Varga <vargaz@gmail.com>
7436 * mini-trampolines.c (mono_delegate_trampoline): Update after
7437 mono_marshal_get_delegate_invoke () signature change.
7439 2007-11-13 Mark Probst <mark.probst@gmail.com>
7441 * mini.c: Removed the shared context in favor of the generic
7442 sharing context. Allocate the MonoJitInfo structure with room for
7443 the generic sharing context if it's needed.
7445 * mini.h: Remove MonoGenericSharingContext declaration. It's in
7446 domain-internals.h now.
7448 * mini-x86.c: Pass the generic sharing context to get_call_info ().
7450 * generic-sharing.c: Several changes for working without a shared
7451 context and instead operating on open types instead.
7453 2007-11-12 David S. Miller <davem@davemloft.net>
7455 * inssel-sparc.brg: Fix double instruction emit.
7457 2007-11-12 Zoltan Varga <vargaz@gmail.com>
7459 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
7460 Get/Set/Address methods.
7462 * mini.c debug-debugger.c mini-trampolines.c: Update after
7463 mono_marshal_get_delegate_invoke signature change.
7465 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
7467 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
7468 This can happens with dynamic methods. Fixes the other bug in #322722.
7470 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
7472 * tramp-arm.c (mono_arch_patch_callsite): Support patching
7475 * mini-arm.c (arm_patch): Implement patching of BX call
7476 sequence. Fixes one of the bugs in #322722.
7478 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
7480 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
7481 under Linux. We only need to flush every 32-byte cache line.
7483 2007-11-07 Massimiliano Mantione <massi@ximian.com>
7486 move_basic_block_to_end: Add branches when needed, eventually creating
7488 optimize_branches: added a parameter that tells if it's ok to create
7489 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
7490 and avoid calling move_basic_block_to_end when it's not ok.
7493 2007-11-07 Mark Probst <mark.probst@gmail.com>
7495 * mini.c: Abort inlining call to InitializeArray if something
7496 looks wrong. Let the icall handle it, which now has proper safety
7499 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
7501 * mini.c (mono_spill_call): add support for soft-float.
7503 * mini.c (mono_method_to_ir): add support for soft-float
7504 to inlined functions that return float.
7506 * mini.c (mono_method_to_ir): add support for soft-float
7507 to cee_stsfld opcode on float fields.
7509 2007-11-05 Geoff Norton <gnorton@novell.com>
7511 * mini-x86.h: Fix the structure access for X86 Leopard.
7514 2007-11-05 Martin Baulig <martin@ximian.com>
7516 * mini-trampolines.c
7517 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
7518 after compiling the method to notify the debugger.
7520 2007-11-05 Martin Baulig <martin@ximian.com>
7522 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
7524 2007-11-02 Zoltan Varga <vargaz@gmail.com>
7526 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
7527 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
7529 2007-11-01 Zoltan Varga <vargaz@gmail.com>
7531 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
7532 native-to-managed wrappers.
7534 2007-11-01 Geoff Norton <gnorton@novell.com>
7536 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
7539 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7541 * mini.c, mini-x86.c: when getting back from unmanaged code
7542 to managed via a marshaled delegate we also need to set the
7545 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7547 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
7550 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7552 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
7553 let the debugger or other external agents to tell the JIT when
7554 a sw breakpoint has been inserted in the code that the JIT needs
7555 to be able to inspect.
7557 2007-10-31 Martin Baulig <martin@ximian.com>
7560 (MonoDebuggerInfo): Remove `runtime_class_init'.
7562 2007-10-30 Martin Baulig <martin@ximian.com>
7565 (mono_debugger_thread_created): Added `MonoThread *' argument.
7566 (mono_debugger_extended_notification): New public method.
7567 (mono_debugger_trampoline_compiled): New public method.
7570 (MonoDebuggerThreadInfo): Added `thread' and
7571 `extended_notifications' fields.
7574 (debugger_executable_code_buffer): New static variable.
7577 (MonoDebuggerInfo): Added `executable_code_buffer',
7578 `executable_code_buffer_size', `breakpoint_info_area',
7579 `breakpoint_table' and `breakpoint_table_size'.
7581 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
7583 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
7584 that IP either is an unused value or the vtable pointer. IMT
7585 calls use vtable + offset now. Reduced by almost half the size
7588 2007-10-26 Jonathan Chambers <joncham@gmail.com>
7590 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
7591 defines to access param registers. Replace long usage with
7592 gsize as sizeof(long) != sizeof(void*) on Win64.
7594 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
7595 on Win64. Fix intrinsic, use _AddressOfReturnAddress
7596 instead of non-existant _GetAddressOfReturnAddress.
7598 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
7599 param registers. Save/restore %rdi and %rsi in MonoLMF.
7601 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
7602 param registers. Modify (throw_exception) signature to take
7603 %rdi and %rsi on Win64.
7605 Code is contributed under MIT/X11 license.
7607 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7609 * helpers.c: unlink debugging output files.
7611 2007-10-25 Zoltan Varga <vargaz@gmail.com>
7613 * mini.c: Move mono_create_ftnptr () to object.c.
7615 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
7617 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
7618 optional. This function can now be used to disassemble code generated
7619 outside the JIT such as trampolines and IMT thunks.
7621 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
7623 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
7624 vtable pointer from a ldr instruction.
7626 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
7627 new IMT call sequence.
7629 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
7630 call sequence for interface invocations.
7632 * mini-arm.c (mono_arch_emit_imt_argument): added, required
7633 for imt support. This function is empty since IMT on ARM requires no
7634 special handling on the IR side.
7636 * mini-arm.c (mono_arch_find_imt_method): added, required for
7639 * mini-arm.c (mono_arch_find_this_argument): added, required
7642 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
7643 a ldr instruction to load a value stored in the code stream.
7645 * mini-arm.c (mono_arch_build_imt_thunk):added, required
7649 2007-10-23 Zoltan Varga <vargaz@gmail.com>
7651 * mini.c (mini_init): Install the jump trampoline callback.
7653 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7655 * mini-trampolines.c: handle synchronized methods with the common
7656 vtable trampoline (bug #335601).
7658 2007-10-17 Zoltan Varga <vargaz@gmail.com>
7660 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
7662 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
7665 * mini-ia64.h mini-ia64.c: Add support for IMT.
7667 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
7668 prolog. Fixes #331958.
7670 2007-10-15 Zoltan Varga <vargaz@gmail.com>
7672 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
7674 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7676 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
7679 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7681 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
7684 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
7686 * mini-x86.c, mini-x86.h: x86 support for the common vtable
7689 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
7691 * mini-trampolines.c: changed the magic rampoline to understand
7692 the common vtable trampoline method: the method to invoke is
7693 determined by the vtable displacement of the call.
7695 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7697 * mini.c, mini.h: register the common vtable trampoline if the
7698 architecture supports it.
7700 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7702 * cpu-amd64.md: use the correct max length for tls_get.
7704 2007-10-14 Zoltan Varga <vargaz@gmail.com>
7706 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
7707 CEE_STELEM_ANY. Fixes #333696.
7709 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7711 * exceptions-x86.c: provide more graceful handling of the case where
7712 we followed a bogus function pointer from managed code (bug #332866).
7714 2007-10-11 Mark Probst <mark.probst@gmail.com>
7716 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
7717 replaces the generic_shared flag and will carry more information
7720 * generic-sharing.c: Added mini_type_stack_size() which allows
7721 allows open types if given a generic sharing context.
7722 mini_get_basic_type_from_generic() takes a
7723 MonoGenericSharingContext* instead of a MonoCompile* now.
7725 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
7726 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
7727 mini-sparc.c, mini-x86.c: Trivial changes required by the two
7728 changes above. Just passing arguments through to the right
7731 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7733 * mini-arm.c: unify the call emission to emit_code_seq().
7735 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
7737 * tramp-arm.c: reduced the trampoline size.
7739 2007-10-10 Mark Probst <mark.probst@gmail.com>
7741 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
7742 variable handling out of arch-specific code.
7744 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7746 * mini-arm.c: implemented fast delegate dispatch.
7748 2007-10-09 Zoltan Varga <vargaz@gmail.com>
7750 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
7751 that fp elimination is turned off if the space required by locals is too
7754 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7756 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
7757 ARM to the new style trampoline.
7759 2007-10-09 Zoltan Varga <vargaz@gmail.com>
7761 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
7763 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
7765 2007-10-09 Martin Baulig <martin@ximian.com>
7768 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
7769 `field_info_offset_offset'.
7771 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7773 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
7774 removed more internal usage of the r11 register and made it available
7775 to the register allocator.
7777 2007-10-08 Mark Probst <mark.probst@gmail.com>
7779 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
7780 when sharing generics and treat type variables as references.
7782 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7784 * mini-ppc.c: started removing the internal uses of register r11
7785 to eventually allow the register allocator to manage it as an
7786 additional available register.
7788 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7790 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
7792 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7794 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
7795 specific trampolines as they are not performance critical as a jump
7796 target (maybe align as before only for AOT code?). This saves about
7797 200 KB of native code on x86 for monodevelop startup.
7799 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7801 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
7802 monodevelop startup.
7804 2007-10-06 Zoltan Varga <vargaz@gmail.com>
7806 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
7808 * mini-sparc.h mini-sparc.c: Implement IMT support.
7810 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
7811 its smaller and doesn't clobber sparc_g1.
7813 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
7815 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7817 * mini-ppc.c: optimized the size of the IMT thunks a bit.
7819 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7821 * mini-ppc.c: implemented fast delegate invocation.
7823 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
7825 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
7827 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7829 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
7830 code to the new style trampoline in preparation for IMT support.
7832 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
7834 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
7835 systems already. This also reduces the specific trampiline sizes and
7836 prepares for the use of r12 as the IMT identifier register.
7838 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7840 * mini-mips.h: endianess fix (simplified from a patch by
7841 Thomas Kunze <thommy@tabao.de>, bug #323737).
7843 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7845 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
7846 to access ucontext fields and enable netbsd support
7847 (partially from Magnus Henoch <mange@freemail.hu>).
7849 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7851 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
7852 use the preprocessor from the CPP env var if it is set.
7854 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7856 * mini-trampolines.c: fixed an assertion and moved it earlier in the
7857 code, before interface_offset gets used.
7859 2007-10-02 Zoltan Varga <vargaz@gmail.com>
7861 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
7862 mono_class_setup_vtable () before accessing klass->vtable.
7864 2007-10-01 Zoltan Varga <vargaz@gmail.com>
7866 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
7869 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7871 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
7872 IMT slots (this saves hundreds of KB of memory in programs like
7873 IronPython and Monodevelop).
7875 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
7877 * mini.c: print the delegate counter.
7879 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
7881 * mini-x86.c: make it easier to enable the debugging code for IMT
7884 2007-09-28 Martin Baulig <martin@ximian.com>
7887 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
7888 `mono_method_klass_offset' and `mono_method_token_offset'.
7890 2007-09-20 Mark Probst <mark.probst@gmail.com>
7892 * mini.c: First generics sharing implementation. Can only share
7893 in very simple cases. If sharing doesn't work it falls back to
7894 dedicated compilation.
7896 * mini.h: Flag in MonoCompile to specify whether generic
7897 compilation is shared. Flags enum for marking which generic inst
7898 of a context is used. Prototypes for helper functions.
7900 * generic-sharing.c: Helper functions for generic method sharing.
7902 * optflags-def.h: Optimization flag (gshared) for enabling generic
7903 method sharing added.
7905 * Makefile.am: generic-sharing.c added.
7907 2007-09-19 Daniel Nauck <dna@mono-project.de>
7909 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
7911 2007-09-19 Massimiliano Mantione <massi@ximian.com>
7912 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
7915 2007-09-19 Martin Baulig <martin@ximian.com>
7917 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
7918 mono_debug_cleanup() is now part of mono_cleanup().
7920 2007-09-18 Zoltan Varga <vargaz@gmail.com>
7922 * driver.c (mono_main): Fix a warning.
7924 2007-09-17 Zoltan Varga <vargaz@gmail.com>
7926 * aot-compiler.c: Optimize various parts when processing large assemblies.
7929 * mini.c (mono_patch_info_hash): Improve hash function.
7931 2007-09-14 Jonathan Chambers <joncham@gmail.com>
7933 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
7935 Code is contributed under MIT/X11 license.
7937 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7939 * mini.c (mini_init): Fix a leak.
7941 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
7943 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7945 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
7947 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7949 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
7951 2007-09-13 Zoltan Varga <vargaz@gmail.com>
7953 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
7956 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
7958 * mini.c (handle_alloc): Enable managed allocators in AOT code.
7960 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
7962 * aot-runtime.c (decode_patch_info): Ditto.
7964 2007-09-12 Jonathan Chambers <joncham@gmail.com>
7966 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
7967 static case. Cache delegates in architecture specific code,
7968 based on number of parameters.
7970 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
7971 in architecture specific code, based on number of parameters.
7973 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
7974 caching happen in architecture specific code now.
7976 Code is contributed under MIT/X11 license.
7978 2007-09-12 Jonathan Chambers <joncham@gmail.com>
7980 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
7981 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
7982 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
7984 Code is contributed under MIT/X11 license.
7986 2007-05-15 Massimiliano Mantione <massi@ximian.com>
7987 * mini.c: (mono_thread_abort) Fixed bug #82416.
7989 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7991 * mini.: hook the new managed GC allocation feature into the JIT.
7993 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7995 * mini.c: implementation for the new runtime tls opcode.
7997 2007-09-11 Martin Baulig <martin@ximian.com>
8000 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
8001 `mono_method_inflated_offset'.
8003 2007-09-07 Zoltan Varga <vargaz@gmail.com>
8005 * driver.c mini.h mini.c: Add a new devel command line option for injecting
8006 async exceptions into a method.
8008 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
8009 purpose of testing whenever the unwinder works at every instruction.
8011 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8013 * mini.c: check accessibility of method used in ldftn (fixes
8016 2007-09-04 Zoltan Varga <vargaz@gmail.com>
8018 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
8020 * inssel.brg: Fix a warning.
8022 2007-09-03 Martin Baulig <martin@ximian.com>
8024 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
8025 now takes the `main_method' as argument.
8027 2007-09-02 Zoltan Varga <vargaz@gmail.com>
8029 * cpu-sparc.md (endfilter): Add missing src1:i argument.
8031 2007-08-30 Jonathan Chambers <joncham@gmail.com>
8033 * driver.c: include the cil-coff.h header on Windows.
8035 Code is contributed under MIT/X11 license.
8037 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8039 * mini.c, driver.c: don't include the cil-coff.h header.
8041 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8043 * mini.c: flag places that needs fixes fo soft-float support.
8045 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
8047 * mini.h, inssel-float.brg: fix soft-float constant loads on big
8048 endian systems (partially from Dean Jenkins, bug #81924).
8050 2007-08-28 Mark Probst <mark.probst@gmail.com>
8052 * mini.c (check_linkdemand): Remove embedded reference object in
8053 call to LinkDemandSecurityException.
8054 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
8055 with an IntPtr instead of a reference object.
8057 2007-08-28 Zoltan Varga <vargaz@gmail.com>
8059 * mini.c (handle_initobj): Handle alignment properly.
8061 * inssel.brg (mini_emit_memset): Ditto.
8063 * inssel.brg (mini_emit_memcpy): Ditto.
8065 * inssel-sparc.brg: Ditto.
8067 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
8069 2007-08-26 Zoltan Varga <vargaz@gmail.com>
8071 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
8072 exceptions raised in unmanaged code. Fixes part of #82594.
8074 2007-08-24 Mark Probst <mark.probst@gmail.com>
8076 * mini.c (mono_method_to_ir), declsec.c
8077 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
8079 2007-08-22 Martin Baulig <martin@ximian.com>
8082 (MonoDebuggerThreadInfo): New typedef.
8083 (mono_debugger_thread_table): New global variable.
8084 (mono_debugger_thread_created): New public function.
8085 (mono_debugger_thread_cleanup): New public function.
8089 - removed `get_current_thread' and `lookup_assembly'.
8090 - removed `data_table'.
8091 - added `thread_table'.
8094 (mono_thread_start_cb): Call mono_debugger_thread_created().
8095 (mono_thread_attach_cb): Likewise.
8096 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
8097 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
8100 * driver.c (mono_main): Move mono_debug_init() up, before calling
8101 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
8103 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8105 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
8106 together when passing several arguments of type double (gives a small
8107 speedup and saves a few bytes of generated code).
8109 2007-08-20 Jb Evain <jbevain@novell.com>
8111 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
8113 2007-08-20 Jb Evain <jbevain@novell.com>
8115 * mini.c (mono_method_to_ir): throw MethodAccessException
8116 and FieldAccessException instead of InvalidProgramException.
8118 2007-08-20 Mark Probst <mark.probst@gmail.com>
8120 * mini.c: CoreCLR security checks.
8122 * mini.h: Removed MonoSecurityMode (moved to
8123 metadata/security-manager.h) and mono_security_mode global var
8124 (replaced by set/get functions in security-manager.h).
8126 * driver.c: Added "core-clr-test" security mode for testing. Used
8127 set-function for setting security mode.
8129 2007-08-17 Mark Probst <mark.probst@gmail.com>
8131 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
8132 the new jit_info_table.
8134 * driver.c: Test code for the new jit_info_table (enabled by the
8135 define MONO_JIT_INFO_TABLE_TEST).
8137 2007-08-14 Zoltan Varga <vargaz@gmail.com>
8139 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8140 detection of call <REG> instruction sequence. Fixes build on freebsd.
8142 2007-08-13 Zoltan Varga <vargaz@gmail.com>
8144 * mini-exceptions.c: Fix a warning.
8146 2007-08-11 Zoltan Varga <vargaz@gmail.com>
8148 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
8149 stack overflow handling code on amd64 too.
8151 * mini-exceptions.c (mono_setup_altstack): Make this use
8152 mono_thread_get_stack_bounds ().
8154 * mini-x86.h: Disable sigaltstack on solaris x86.
8156 2007-08-10 Zoltan Varga <vargaz@gmail.com>
8158 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
8160 2007-08-10 Geoff Norton <gnorton@customerdna.com>
8162 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
8164 2007-08-08 Zoltan Varga <vargaz@gmail.com>
8166 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
8168 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
8170 2007-08-03 Neale Ferguson <neale@sinenomine.net>
8172 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
8175 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8177 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
8178 to be emitted (bug #82281).
8180 2007-08-01 Martin Baulig <martin@ximian.com>
8182 Merged the `debugger-dublin' branch.
8184 * debug-debugger.h (MonoDebuggerInfo):
8185 Removed the `old_*' compatibility entries.
8186 Added `debugger_version' and `data_table'.
8187 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
8188 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
8191 (MiniDebugMethodBreakpointInfo): Add `address_list'.
8192 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
8193 instead of a `gconstpointer'.
8194 (mono_debugger_insert_method_breakpoint): Return a
8195 `MonoDebugMethodAddressList *'.
8197 2007-06-28 Martin Baulig <martin@ximian.com>
8199 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8201 2007-08-01 Zoltan Varga <vargaz@gmail.com>
8203 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
8204 __builtin_frame_address () since it is broken on older gcc versions.
8206 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8208 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
8209 on the stack overflow handling and made the managed stack overflows
8210 catchable in most cases using soft guard pages.
8211 * exceptions-x86.c: added code to restore the protection in the soft
8212 guard pages at the end of exception handling.
8214 2007-07-31 Zoltan Varga <vargaz@gmail.com>
8216 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
8218 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8220 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
8223 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8225 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
8226 signal handling support until it has been ported to the new mechanism.
8227 * mini.c: fixed stack overflow detection and use the new
8228 architecture code to handle signals on the altstack.
8230 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8232 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
8233 stack overflows on the alt stack.
8235 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
8237 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
8238 stack overflows on the alt stack.
8240 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
8242 * exceptions-ppc.c: cleanup preparing for altstack support.
8244 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8246 * exceptions-arm.c: cleanup preparing for altstack support.
8248 2007-07-27 Mark Probst <mark.probst@gmail.com>
8250 * mini.c (print_jit_stats): Output hazard pointer stats.
8252 2007-07-26 Mark Probst <mark.probst@gmail.com>
8254 * driver.c, mini.c: Replaced security mode flags with a single
8257 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8259 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
8261 2007-07-25 Mark Probst <mark.probst@gmail.com>
8263 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
8264 (which doesn't do anything yet) for activating Core CLR
8265 (Silverlight) security.
8267 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8269 * mini-codegen.c: work around a possible gcc bug on arm.
8271 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8273 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
8274 message for platforms that don't support AOT compilation.
8276 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8278 * mini.h, mini.c, driver.c: temporary smcs hack.
8280 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
8282 * mini-arm.h, mini-arm.c: arm EABI fixes.
8284 2007-07-22 Zoltan Varga <vargaz@gmail.com>
8286 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
8289 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
8290 trampolines taking a method argument.
8292 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
8294 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
8295 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
8297 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
8298 JIT compilation throws an exception. Fixes #82050.
8300 2007-07-19 Mark Probst <mark.probst@gmail.com>
8302 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
8303 with the MONO_EXCEPTION_ defines.
8305 2007-07-17 Zoltan Varga <vargaz@gmail.com>
8307 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
8310 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
8311 the cause of an assertion.
8313 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
8315 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
8318 2007-07-15 Zoltan Varga <vargaz@gmail.com>
8320 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
8321 assert. Should fix #82103.
8323 2007-07-14 Zoltan Varga <vargaz@gmail.com>
8325 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
8326 here too. Fixes #82095.
8328 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
8331 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
8333 * mini-amd64.h: Enable IMT for amd64.
8335 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
8337 2007-07-12 Zoltan Varga <vargaz@gmail.com>
8339 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
8341 2007-07-12 Mark Probst <mark.probst@gmail.com>
8343 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
8344 as soon as check_linkdemand sets an exception_type.
8346 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8348 * mini-x86.c: fixed offsets for IMT call sequence.
8349 * mini-x86.h: enable IMT again.
8351 2007-07-11 Zoltan Varga <vargaz@gmail.com>
8353 * trace.c (mono_trace_enter_method): Decode MonoType too.
8355 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
8357 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
8359 * mini-amd64.c: Add preliminary IMT implementation.
8361 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8363 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
8364 understand the new IMT-base interface invocation (thanks to
8365 Daniel Nauck for the report and the remote debugging session).
8367 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8369 * mini-x86.c: size and speed optimizations for the IMT bsearch.
8371 2007-07-11 Zoltan Varga <vargaz@gmail.com>
8373 * Makefile.am (aotcheck): Make this actually use the AOTed code.
8375 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
8377 * mini-trampolines.c: implement AOT IMT support.
8378 * mini-x86.h: enable IMT support for wider testing.
8380 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8382 * inssel.brg (emit_imt_argument): Add aot support here.
8384 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
8386 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8388 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
8389 of the IMT implementation, partially from massi, with my
8390 implementation of the bsearch sequence. Disabled by default until
8391 the AOT code is implemented.
8393 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8395 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
8397 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
8399 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8401 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
8402 arch-independent IMT JIT code from Massimiliano
8403 Mantione (massi@ximian.com) with small cleanups from me.
8405 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8407 * Makefile.am: fix svn invocation to get the svn revision to be
8408 independent of the local language (build fix).
8410 2007-07-09 Mark Probst <mark.probst@gmail.com>
8412 * mini.c (inline_method): Reset cfg->exception_type if the
8413 inlining is aborted. Fixes: 82049.
8415 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
8417 * mini.c: remove assert from exception handling code when exception_ptr
8420 2007-07-05 Zoltan Varga <vargaz@gmail.com>
8422 * mini.c (mono_codegen): Add an assert.
8424 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
8425 enter and leave code.
8426 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
8428 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8430 * mini-ppc.c: fixed memory corruption for localloc(0)
8433 2007-07-05 Zoltan Varga <vargaz@gmail.com>
8435 * mini.c: Fix warnings.
8437 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
8439 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
8440 to emit better double->int conversions.
8442 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8444 * mini.c: the provided Min/Max optimizations are valid for unisgned
8447 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
8449 * 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
8451 2007-06-28 Miguel de Icaza <miguel@novell.com>
8453 * mini.c (mono_running_on_valgrind): Add support for reporting the
8454 method and its boundaries to valgrind.
8456 2007-06-28 Martin Baulig <martin@ximian.com>
8458 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8460 2007-06-25 Zoltan Varga <vargaz@gmail.com>
8462 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
8464 * generic.2.cs: Add new test case.
8466 2007-06-25 Martin Baulig <martin@ximian.com>
8468 Merged the `debugger-dublin' branch.
8471 (mono_debugger_insert_method_breakpoint): New public method.
8472 (mono_debugger_remove_method_breakpoint): Likewise.
8473 (mono_debugger_check_breakpoints): New static method.
8474 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
8476 * debug-debugger.h (MonoDebuggerInfo):
8477 Renamed (to keep backward compatibility in the vtable):
8478 `insert_breakpoint' -> `old_insert_breakpoint'.
8479 `remove_breakpoint' -> `old_remove_breakpoint'.
8480 `create_string' -> `old_create_string'.
8481 `lookup_class' -> `old_lookup_class'.
8482 `lookup_type' -> removed; changed into a dummy field.
8483 `lookup_assembly' -> `old_lookup_assembly'.
8484 Added (same functionality, but different signature):
8485 `create_string', `lookup_class', `lookup_assembly'
8487 `get_method_addr_or_bpt', `remove_method_breakpoint',
8488 `runtime_class_init'.
8490 * debug-debugger.c: Merged the `debugger-dublin' branch.
8492 2007-06-23 Zoltan Varga <vargaz@gmail.com>
8494 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
8496 (peephole_pass): Likewise.
8498 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
8500 * driver.c: hopefully make setaffinity work also for ancient
8503 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
8505 * driver.c : win32 build fix.
8507 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8509 * driver.c: check for the MONO_NO_SMP env var and bind to a single
8510 processor if it is set.
8512 2007-06-21 Martin Baulig <martin@ximian.com>
8514 * debug-mini.h: New file.
8517 (mono_debugger_insert_breakpoint_full): Moved here from
8518 ../metadata/mono-debug-debugger.c.
8519 (mono_debugger_remove_breakpoint): Likewise.
8520 (mono_debugger_breakpoint_callback): Likewise.
8522 2007-06-15 Raja R Harinath <rharinath@novell.com>
8524 * jit-icalls.c (mono_helper_compile_generic_method): Update to
8525 changes in MonoGenericClass.
8527 2007-06-14 Zoltan Varga <vargaz@gmail.com>
8529 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
8531 2007-06-14 Raja R Harinath <rharinath@novell.com>
8533 * jit-icalls.c (mono_helper_compile_generic_method): Update to
8534 removal of MonoGenericMethod.
8536 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8538 * mini-exceptions.c: hooks for the exception events profiling API.
8540 2007-06-14 Randolph Chung <tausq@debian.org>
8542 * Makefile.ma: Add hppa target.
8543 * mini-arch.h: Include mini-hppa.h
8544 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
8545 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
8546 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8548 2007-06-14 Randolph Chung <tausq@debian.org>
8550 * inssel.brg: Add rules for "chained" compare-branch operations so that
8551 a single compare op can affect multiple branches. Adjust cost for
8552 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
8553 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
8554 cost for some rules so that they can more easily be overridden by
8555 per-arch rules (with fixes from lupus).
8556 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8558 2007-06-13 Randolph Chung <tausq@debian.org>
8560 * mini-ops.h: Reorder branch ops so that they match the order of the
8561 corresponding CEE_* ops. The code expects them this way.
8562 Add new ops for HPPA target.
8563 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8565 2007-06-13 Randolph Chung <tausq@debian.org>
8567 * mini-exceptions.c: Handle cases where the stack grows towards
8569 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8571 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8573 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
8575 * driver.c: explain where a non-matching corlib is found.
8577 2007-06-13 Mark Probst <mark.probst@gmail.com>
8579 * mini.c (print_jit_stats): Output dynamic code allocation stats.
8581 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
8583 * mini-exceptions.c: Generate a method profile leave event during
8584 an exception to ensure that the profiler gets notified.
8586 2007-06-07 Zoltan Varga <vargaz@gmail.com>
8588 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
8591 * cpu-amd64.md: Add long_and/or/xor opcodes.
8593 2007-06-06 Wade Berrier <wberrier@novell.com>
8595 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
8596 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
8597 length of instruction shr_imm (expected 8, got 10)
8599 2007-06-06 Zoltan Varga <vargaz@gmail.com>
8601 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
8603 2007-06-06 Mark Probst <mark.probst@gmail.com>
8605 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8606 MonoInternalHashTable again (fixed bug in the internal hash table
8609 2007-06-06 Mark Probst <mark.probst@gmail.com>
8611 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
8612 Have to figure out what makes it crash the SWF regression.
8614 2007-06-05 Zoltan Varga <vargaz@gmail.com>
8616 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
8618 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8620 * mini.c: optimize out the type check when storing null in a
8623 2007-06-04 Mark Probst <mark.probst@gmail.com>
8625 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8626 MonoInternalHashTable.
8628 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8630 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
8631 signed integer methods.
8633 2007-06-02 Zoltan Varga <vargaz@gmail.com>
8635 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
8636 permanently since the current approach doesn't work.
8638 2007-06-02 Zoltan Varga <vargaz@gmail.com>
8640 * inssel.brg (stmt): Only call delegate->invoke_impl if
8641 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
8643 2007-06-01 Zoltan Varga <vargaz@gmail.com>
8645 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
8646 the sreg2==rdx case.
8648 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
8649 account if it contains a rex prefix.
8650 (peephole_pass): Handle OP_FMOVE as well.
8652 2007-06-01 Zoltan Varga <vargaz@gmail.com>
8654 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
8655 as it causes regressions.
8657 2007-05-31 Zoltan Varga <vargaz@gmail.com>
8659 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
8660 static case as well.
8662 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
8664 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8665 (mono_arch_get_this_arg_from_call): Ditto.
8667 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
8669 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
8672 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8673 (mono_arch_get_this_arg_from_call): Ditto.
8675 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
8677 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
8678 try to create optimized invoke code and use that for further invocations.
8679 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
8681 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
8683 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
8685 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
8686 sealed classes or methods.
8687 *devirtualization.cs: tests for the new optimization
8689 2007-05-29 Zoltan Varga <vargaz@gmail.com>
8691 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
8692 by the update_volatile () function.
8694 2007-05-27 Zoltan Varga <vargaz@gmail.com>
8696 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
8699 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
8701 2007-05-24 Jonathan Chambers <joncham@gmail.com>
8703 * mini.c: Add configure checks for header files.
8704 * mini-x86.c: Add configure checks for header files.
8705 * trace.c: Add configure checks for header files.
8706 * aot-runtime.c: Add configure checks for header files.
8707 * aot-compiler.c: Add configure checks for header files.
8708 * driver.c: Add configure checks for header files.
8709 * mini-codegen.c: Add configure checks for header files.
8711 Code is contributed under MIT/X11 license.
8713 2007-05-22 Zoltan Varga <vargaz@gmail.com>
8715 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
8716 icompare_imm -128 + op_iclt. Fixes #81703.
8718 2007-05-19 Zoltan Varga <vargaz@gmail.com>
8720 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
8722 2007-05-15 Massimiliano Mantione <massi@ximian.com>
8724 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
8725 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
8726 so that all isinst checks now use "interface_bitmap".
8728 2007-05-15 Zoltan Varga <vargaz@gmail.com>
8730 * cpu-amd64.md (jmp): Fix a warning.
8732 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
8734 * basic.cs: Add new regression test.
8736 * basic.cs: Remove test which is now in basic-long.cs.
8738 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
8740 * basic-long.cs: Add new test.
8742 2007-05-13 Zoltan Varga <vargaz@gmail.com>
8744 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
8746 2007-05-12 Zoltan Varga <vargaz@gmail.com>
8748 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
8750 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
8753 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
8754 throwing code a bit.
8756 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
8757 the exception throwing code a bit.
8759 * mini-x86.c (get_call_info): Allocate result from a mempool.
8761 2007-05-11 Zoltan Varga <vargaz@gmail.com>
8763 * aot-compiler.c (find_typespec_for_class): Fix the assert.
8765 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8767 * mini.h (MonoCompile): Add 'token_info_hash' field.
8769 * mini.c: Save token->method associations during compilation so the AOT
8770 compiler can use it.
8772 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
8773 which reference generic classes and methods.
8775 2007-05-10 Zoltan Varga <vargaz@gmail.com>
8777 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
8779 * aot-compiler.c (compile_method): Fix a typo in a comment.
8781 * aot-runtime.c (decode_cached_class_info): Skip generic types.
8783 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
8786 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
8788 2007-05-09 Zoltan Varga <vargaz@gmail.com>
8790 * mini.h (MonoCompile): Add 'args' field.
8792 * mini.c (mono_compile_create_vars): Store variables representing the arguments
8795 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
8797 2007-05-08 Zoltan Varga <vargaz@gmail.com>
8799 * mini.c (mono_compile_get_interface_var): Remove this unused function.
8801 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
8803 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
8804 opcodes for some opcodes.
8806 * mini.h *.brg *.c: Use the new opcodes.
8808 2007-05-08 Massimiliano Mantione <massi@ximian.com>
8810 * mini.h: Bumped aot revision.
8812 * inssel.brg: modified code generation of type checks for interfaces
8813 to use the new "MonoClass.interface_bitmap" instead of the old
8814 "MonoClass.interface_offsets".
8816 2007-04-30 Zoltan Varga <vargaz@gmail.com>
8818 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
8820 2007-04-29 Zoltan Varga <vargaz@gmail.com>
8822 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
8825 2007-04-27 Neale Ferguson <neale@sinenomine.net>
8827 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
8829 2007-04-27 Wade Berrier <wberrier@novell.com>
8831 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
8832 mini.h) to fix build.
8834 2007-04-26 Zoltan Varga <vargaz@gmail.com>
8836 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
8838 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
8839 causes the corlib unit tests to fail.
8841 2007-04-25 Zoltan Varga <vargaz@gmail.com>
8843 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
8845 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
8847 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
8848 opcodes to the comparison relations.
8850 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
8851 opcodes to their types.
8853 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
8855 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
8856 it in cfg->arch.cinfo.
8858 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
8860 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
8861 cfg->cil_offset_to_bb.
8863 2007-04-24 Zoltan Varga <vargaz@gmail.com>
8865 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
8866 created becase of initlocals.
8868 2007-04-23 Zoltan Varga <vargaz@gmail.com>
8870 * mini-alpha.c cpu-alpha.md: More alpha port work from
8871 Sergey Tikhonov <tsv@solvo.ru>.
8873 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
8875 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
8877 2007-04-19 Zoltan Varga <vargaz@gmail.com>
8879 * cpu-s390.md (break): Correct the length of break instruction.
8881 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8883 * mini.c: fix a couple of soft-float issues and comments.
8885 2007-04-15 Miguel de Icaza <miguel@novell.com>
8887 * trace.c (is_filenamechar): - is also a filename char.
8889 2007-04-15 Neale Ferguson <neale@sinenomine.net>
8891 * mini-s390.c: Correct checking for enum type in return value processing.
8893 2007-04-14 Raja R Harinath <rharinath@novell.com>
8895 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
8896 (version.h): Makefile is in the build directory.
8898 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
8900 * mini-amd64.h: fix for assertion failure on Solaris/amd64
8902 2007-04-11 Martin Baulig <martin@ximian.com>
8904 * mini.c (can_access_member): Fix handling of generic classes;
8907 2007-04-10 Zoltan Varga <vargaz@gmail.com>
8909 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
8911 2007-04-05 Zoltan Varga <vargaz@gmail.com>
8913 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
8915 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
8917 * mini-codegen.c: make sure the right spill amount is
8918 used for fp or integer registers (fixes the float_sub_spill() on ppc).
8920 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
8922 * mini-ppc.c: fixes for the fp_branch_nan test.
8924 2007-03-23 Zoltan Varga <vargaz@gmail.com>
8926 * basic.cs: Comment out new test which still fails on ia64.
8928 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8930 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
8932 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8934 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
8936 2007-03-22 Zoltan Varga <vargaz@gmail.com>
8938 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
8939 on 64 bit machines. Fixes part of #80738.
8941 * basic.cs: Add regression test.
8943 2007-03-17 Zoltan Varga <vargaz@gmail.com>
8945 * inssel.brg basic.cs: Revert previous change to fix build.
8947 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
8950 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
8952 * basic.cs: Add new regression test.
8954 2007-03-17 Zoltan Varga <vargaz@gmail.com>
8956 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
8959 2007-03-16 Neale Ferguson <neale@sinenomine.net>
8961 * cpu-s390x.md: Correct length of break instruction.
8963 2007-03-16 Neale Ferguson <neale@sinenomine.net>
8965 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
8966 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
8968 2007-03-15 Jonathan Chambers <joncham@gmail.com>
8970 * *.c: Begin WIN64 port.
8971 * mini.c: Use correct register in profiler.
8972 * mini-amd64.c: No inline assembly on Win64.
8973 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
8974 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
8975 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
8976 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
8977 mono_arch_ip_from_context for Win64.
8979 Contributed under MIT/X11 license.
8981 2007-03-15 Zoltan Varga <vargaz@gmail.com>
8983 * exceptions-amd64.c (seh_handler): Ditto.
8985 * exceptions-x86.c (seh_handler): Fix a memory leak.
8987 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
8989 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
8990 mini-s390x.c: fixed peephole optimizations to deal
8991 correctly with 1 and 2 byte reload avoidance.
8993 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
8995 * cpu-s390.md, cpu-s390x.md: update localloc length.
8997 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
8999 * cpu-g4.md: added missing descriptions.
9001 2007-03-14 Miguel de Icaza <miguel@novell.com>
9003 * Makefile.am: Add support so the tail tests are not executed on
9004 PowerPC as that is a known limitation of the PowerPC port.
9006 2007-03-13 Jonathan Chambers <joncham@gmail.com>
9008 * runmdesc.bat: Move to msvc directory.
9010 2007-03-13 Jonathan Chambers <joncham@gmail.com>
9012 * runmdesc.bat: Run executable that was produced by the current
9013 target and sent via an argument.
9015 2007-03-11 Zoltan Varga <vargaz@gmail.com>
9017 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
9020 * generics.2.cs: Add regression test.
9022 2007-03-09 Wade berrier <wberrier@novell.com>
9024 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
9026 2007-03-09 Zoltan Varga <vargaz@gmail.com>
9028 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
9029 AOT code depends on this.
9031 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9033 * mini.c: more precise tracking of types in the eval stack
9034 (part of fix for bug #81044).
9036 2007-03-07 Zoltan Varga <vargaz@gmail.com>
9038 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
9040 * aot-compiler.c (encode_patch): Remove an obsolete comment.
9042 2007-03-06 Zoltan Varga <vargaz@gmail.com>
9044 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
9046 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
9048 2007-02-22 Zoltan Varga <vargaz@gmail.com>
9050 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
9051 a pointer on 64 bit systems. Fixes #80190.
9053 * iltests.il: Add new regression test.
9055 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9057 * mini.c: inline a constant for Environment.IsRunningOnWindows.
9059 2007-02-19 Geoff Norton <gnorton@customerdna.com>
9061 * trace.c: Remove an erroneous alignemnt check when tracing.
9062 Fixes --trace on OSX86.
9064 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9066 * mini-$(arch).h: initialize SP in context for all the archs.
9068 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
9070 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
9071 regressions in the thread tests.
9073 2007-02-14 Zoltan Varga <vargaz@gmail.com>
9075 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
9076 - fixed implementation of LOCALLOC opcode
9077 - implemented non-un compare for floats
9079 - implementation of FDIV and CKFINITE opcodes
9080 - fixes for latest mono updates
9081 - additional arch opcodes
9083 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9085 * Makefile.am: simplify and merge rules for cross-compilation.
9087 2007-02-07 Massimiliano Mantione <massi@ximian.com>
9089 * local-propagation.c: Actually *apply* the fix for bug 80591...
9091 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9093 * mini-exceptions.c: backuot part of the last change
9094 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
9096 2007-02-06 Massimiliano Mantione <massi@ximian.com>
9097 * inssel.brg: Fix bug 59286.
9100 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
9102 * mini-exceptions.c: patch from Zoltan to correctly check for
9103 stack boundaries (using the stack register, not the frame register),
9104 fixes bugs #80724, #79717.
9106 2007-02-03 Zoltan Varga <vargaz@gmail.com>
9108 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
9109 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
9111 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
9112 presence of frame pointer elimination.
9114 2007-02-01 Geoff Norton <gnorton@customerdna.com>
9116 * mini-x86.h: NetBSD UCONTEX_REG defines.
9118 2007-02-01 Zoltan Varga <vargaz@gmail.com>
9120 * inssel-amd64.brg: Fix amd64 build.
9122 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
9124 * mini.h: remove extern to workaround what looks likes gcc bug 26905
9127 2007-01-31 Zoltan Varga <vargaz@gmail.com>
9129 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
9132 * mini-<ARCH>.c: Use mono_is_regsize_var ().
9134 2007-01-30 Mark Mason <mason@broadcom.com>
9136 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
9137 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
9138 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
9139 beginning support for CEE_JMP [not quite working yet]
9140 * tramp-mips.c: LMF handling now works
9142 2007-01-30 Zoltan Varga <vargaz@gmail.com>
9144 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
9146 * mini.h (NULLIFY_INS): New macro.
9148 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9150 * mini.c: statistical profiler fix for windows, patch
9151 from Tor Lillqvist (tml@novell.com).
9153 2007-01-30 Massimiliano Mantione <massi@ximian.com>
9154 * local-propagation.c: Fix bug 80591.
9156 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9158 * Makefile.am: put back the --export-dynamic option as with
9159 the previous gmodule flags (thanks to Robert Jordan).
9161 2007-01-28 Zoltan Varga <vargaz@gmail.com>
9163 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
9165 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
9166 simplify and speed up the local register allocator. Also rename some fields
9167 like iassign->vassign.
9169 * regalloc.c: Remove some functions which are no longer used since their
9170 inlined version is in mini-codegen.c.
9172 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
9174 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
9176 2007-01-27 Zoltan Varga <vargaz@gmail.com>
9178 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
9179 narrowing. Fixes #80622.
9181 * iltests.il: Add new regresssion test.
9183 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9185 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
9186 debug-debugger.c, debug-debugger.h: warning fixes.
9187 * driver.c: updated copyright year and made it fit in one line.
9189 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
9191 * aot-runtime.c: updated to use mono-dl instead of gmodule.
9193 2007-01-25 Zoltan Varga <vargaz@gmail.com>
9195 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
9197 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
9199 * iltests.il: Add new test for bug #80507.
9201 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9203 * mini-arm.h: use soft-float also on vfp for now.
9205 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9207 * mini.c: fix some more soft-float issues.
9209 2007-01-24 Zoltan Varga <vargaz@gmail.com>
9211 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
9213 2007-01-24 Massimiliano Mantione <massi@ximian.com>
9214 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
9215 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
9216 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
9218 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
9220 * mini-arm.c: typo fix.
9222 2007-01-23 Neale Ferguson <neale@sinenomine.net>
9224 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
9226 2007-01-21 Zoltan Varga <vargaz@gmail.com>
9228 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
9229 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
9231 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
9233 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
9235 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
9237 * inssel.brg: Fix a warning.
9239 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
9241 * abcremoval.c ssa.c ssapre.c: Update after this change.
9243 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
9245 * dominators.c (df_set): Use mono_bitset_union_fast.
9247 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9249 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
9250 mini-codegen.c: reduce relocations and memory usage for the cpu
9253 2007-01-20 Zoltan Varga <vargaz@gmail.com>
9255 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
9257 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
9258 to reduce their size.
9260 2007-01-19 Mark Mason <mason@broadcom.com>
9262 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
9263 * mini-mips.c: more configuration macros, support long conditional branches, additional
9264 asserts, fix epilog instrumentation.
9265 * mini-mips.h: use standard stack walk
9266 * cpu-mips.md: increase size of div, rem and conditional branches
9268 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
9270 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
9273 2007-01-19 Zoltan Varga <vargaz@gmail.com>
9275 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
9276 (compile_method): Ditto.
9278 * aot-runtime.c (decode_klass_info): Ditto.
9280 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
9281 needed by the code generated by inssel.brg. Also fix a warning.
9283 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
9285 * mini.c: deal with enums that become genericinsts by
9286 being nested in a generic class (bug #79956).
9288 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9290 * mini.c: match the generic definition to check for
9291 private access with generic types (bug #78431).
9293 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9295 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
9296 to make life easier for people cross-compiling that insist on not
9299 2007-01-17 Mark Mason <mason@broadcom.com>
9301 * inssel-long.brg: patch to deal with mips missing flags
9302 * inssel-long32-mips.brg: implement overflow checks
9303 * insset-mips.brg: implement overflow checks
9304 * mini-mips.h: implement conditional exception handling
9305 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
9306 Remove unused code, minor cleanups.
9307 * exceptions-mips.c: minor cleanups
9308 * mini-ops.h: add mips conditional exception ops
9309 * cpu-mips.md: add mips conditional exception ops
9312 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9314 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
9315 to deal with mips missing of flags.
9317 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9319 * exceptions-ppc.c: execute fault handlers.
9321 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
9323 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
9325 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9327 * mini.c: handle also floating point values in initialize_array.
9329 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9331 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
9332 array initialization and make it conditional on the intrins option.
9334 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9336 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
9337 relocations and put the patch info names close to the enum definition.
9339 2007-01-15 Mark Mason <mason@broadcom.com>
9341 * basic.cs, exceptions.cs: break up large tests to increase debugability.
9343 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9345 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
9347 2007-01-12 Raja R Harinath <rharinath@novell.com>
9349 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
9351 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9353 * Makefile.am: distribute the mips sources.
9355 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9357 * mini-codegen.h: handle bug #80489 here, by excluding ecx
9360 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
9362 * cpu-x86.md: back out for now as this triggers other regressions.
9364 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9366 * cpu-x86.md: force src1 and dest regpair for long shift instructions
9367 to eax:edx, so ecx can't get allocated to them (bug #80489).
9369 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
9371 * mini.c, mini-exceptions.c: enabled running fault handlers
9374 2007-01-03 Miguel de Icaza <miguel@novell.com>
9376 * driver.c: If nothing fail, do not use the string "failed",
9377 because it makes it very annoying to view test result logs on the
9380 2006-12-30 Miguel de Icaza <miguel@novell.com>
9382 * debug-debugger.c (mono_debugger_main): Rename "main" to
9383 "main_method" to prevent a warning.
9385 Remove a warning for unused field.
9387 2006-12-28 Martin Baulig <martin@ximian.com>
9390 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
9392 2006-12-22 Martin Baulig <martin@ximian.com>
9394 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
9395 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
9396 seperate `.mdb_debug_info' section, so we can access it from the
9397 debugger even if the binary is stripped.
9399 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
9400 from the `.mdb_debug_info' here to prevent the linker from
9401 removing that section.
9403 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
9406 2006-12-19 Robert Jordan <robertj@gmx.net>
9408 * mini-x86: enable the code to return small structures in
9409 registers for FreeBSD as well. Fixes bug #80278.
9410 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
9412 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9414 * mini-x86.c: align the stack when calling the profiler
9415 function instrumenting the prolog (on OSX).
9417 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9419 * mini.c: emit a break opcode where Debugger.Break () is called.
9421 2006-12-13 Miguel de Icaza <miguel@novell.com>
9423 * mini.c (mono_method_to_ir): Provide useful information on this
9424 assert, to prevent others from debugging like I did.
9426 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9428 * mini.c: enable code which was incorrectly commented
9431 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9433 * mini-x86.c: enable on OSX, too, the code to return small
9434 structures in registers.
9436 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9438 * mini-x86.c: remove the use of the dynamic code manager here, too.
9440 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9442 * mini.h, debug-debugger.c, tramp-*.c: fixed
9443 mono_debugger_create_notification_function() to use
9444 mono_global_codeman_reserve () instead of a dynamic code manager.
9446 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
9448 * mini.c, jit-icalls.h, jit-icalls.c: remove the
9449 ves_array_element_address() jit icall and use a generated
9450 managed method instead (which is about 4 times faster for a rank 3
9453 2006-11-29 Mark Mason <mason@broadcom.com>
9455 * basic-calls.cs: additional tests for passing
9456 structures as function arguments.
9458 2006-11-29 Mark Mason <mason@broadcom.com>
9460 * mini-mips.h: disable custom exception handling
9461 * mini-mips.c: throw/rethrow should use jalr to call
9462 exception stubs. Fixed bug with passing structures
9463 by value. More support for tracing floating point
9466 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9468 * mini.c: fixed typo in the soft-float ldind.r4 handling
9471 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9473 * mini.c, mini.h, driver.c: added --runtime command line
9474 option to select a different runtime than the autodetected one.
9475 * jit.h: added API for embedders to initialize with a specific
9478 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9480 * mini.c: handle also boxing of r4 values (bug #80024).
9482 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9484 * mini-ppc.c: force indirect calls until we reserve
9485 enough address space for all the generated code.
9487 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
9489 * exceptions-arm.c: workaround bugs in the libc definition
9492 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9494 * inssel.brg: fixes from me and Mark Mason.
9496 2006-11-23 Dick Porter <dick@ximian.com>
9498 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
9499 semaphore display now we've fixed the initial value
9501 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9503 * inssel.brg: partially revert the last change to fix the build.
9505 2006-11-21 Mark Mason <mason@broadcom.com>
9507 * inssel.brg: Add and use compare-and-branch macros to support
9508 architectures that do not have condition code registers (ie. MIPS).
9509 * *-mips.{c,brg,md}: Fix copyright statements
9511 2006-11-20 Mark Mason <mason@broadcom.com>
9513 * Makefile.am: remove mini-codegen.c from list of MIPS sources
9514 * mini.c: Allow GET_CONTEXT to be specified by the arch port
9515 * mini.h: Added declaration for mono_print_ins()
9516 * mini-codegen.c: added ins_spec initializer for MIPS
9517 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
9518 vreg to be virtual and hreg to be non-virtual.
9519 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
9520 is not yet working/implemented correctly.
9521 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
9522 non-static, fixup calls to print_ins() from other parts in the file.
9524 2006-11-20 Mark Mason <mason@broadcom.com>
9526 * basic-calls.cs: added tests for passing structures as arguments
9529 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9531 * inssel-long32.brg: optimize signed division by power of two.
9533 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9535 * mini-arm.c: added support for interworking with thumb code
9536 (mono must be still be built using the ARM instruction encoding).
9538 2006-11-19 Miguel de Icaza <miguel@novell.com>
9540 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
9541 verifier has different rules for it. Fixes a few verifier issues
9544 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
9545 at the end, so people know what happened.
9547 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9549 * brach-opts.c: in optimize_exception_target() make sure we
9550 are in a catch clause (fixes bug #79871).
9552 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9554 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
9555 more soft-float support fixes.
9557 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
9559 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
9560 that are passed half on the stack and half in registers.
9562 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
9564 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
9565 more mips integration work from Mark E Mason
9566 <mark.e.mason@broadcom.com>.
9568 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9570 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
9571 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
9572 tramp-mips.c: added sources for the mips port, not
9573 integrated in the build yet. Contributed by
9574 Mark E Mason <mark.e.mason@broadcom.com>.
9576 2006-11-14 Neale Ferguson <neale@sinenomine.net>
9578 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
9580 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9582 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
9583 put the soft-float rules in its own file since it seems to
9584 break s390 compilation.
9586 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9588 * mini-arm.c: fixed wrnings.
9590 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
9592 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
9593 inssel-arm.brg: ARM support for soft-float.
9595 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9597 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
9598 loads and stores of 32 bit fp values.
9600 2006-11-10 Zoltan Varga <vargaz@gmail.com>
9602 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
9604 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
9605 works. Fixes #79852 and #79463.
9607 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9609 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
9610 more soft-float support WIP and fixes.
9612 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
9614 * mini-arm.c: some VFP updates.
9616 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9618 * mini-exceptions.c: 0 is a valid local var offset in some
9619 architectures, don't assert (bug #78508).
9621 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
9623 * exceptions-arm.c: fixed off by one error in stack walk code.
9625 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9627 * mini.h, mini.c: more precise tracking of type load exceptions.
9629 2006-11-03 Robert Jordan <robertj@gmx.net>
9631 * Makefile.am: [WIN32] Add monow.exe target.
9632 * driver.c: [WIN32] Don't detach the console when debugging.
9635 2006-10-30 Miguel de Icaza <miguel@novell.com>
9637 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
9639 2006-10-23 Zoltan Varga <vargaz@gmail.com>
9641 * aot-compiler.c (emit_method_info): Add a case missed earlier.
9643 * driver.c (mini_regression): Fix --regression with AOT.
9645 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
9647 2006-10-17 Zoltan Varga <vargaz@gmail.com>
9649 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
9651 * mini-sparc.h: Don't use sigaction on sparc/linux.
9653 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
9655 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
9657 * mini-exceptions.c: Add proper include files for getpid ().
9659 2006-10-16 Zoltan Varga <vargaz@gmail.com>
9661 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
9662 address instead of a MonoJitInfo* to avoid decoding the exception info for the
9665 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
9666 name cache to reduce its size.
9668 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9670 2006-10-15 Zoltan Varga <vargaz@gmail.com>
9672 * mini-x86.c: Save/restore the current LMF structure more efficiently using
9673 the mono_lmf TLS variable.
9675 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
9676 trampoline lmf frames.
9678 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
9680 2006-10-14 Zoltan Varga <vargaz@gmail.com>
9682 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
9683 the mono_lmf TLS variable.
9685 * mini-exceptions.c: Access the LMF structure through accessors.
9687 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
9688 variable instead of in jit_tls->lmf.
9690 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
9692 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
9693 trampoline lmf frames.
9695 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
9697 2006-10-12 Zoltan Varga <vargaz@gmail.com>
9699 * mini.c trace.c mini-x86.c: Revert these too.
9701 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
9704 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
9706 * genmdesc.c: removed now dead code.
9708 2006-10-09 Robert Jordan <robertj@gmx.net>
9710 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
9712 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9714 * mini.h: do not leave gaps in the opcode values.
9716 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
9718 * jit-icalls.h: flag functions as internal here, too.
9720 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
9722 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
9723 functions with the internal attribute.
9725 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
9727 * aot-compiler.c: fclose the file descriptor in the profile read loop.
9729 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
9731 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
9734 2006-10-05 Zoltan Varga <vargaz@gmail.com>
9736 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
9737 tail calls as on other platforms.
9739 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
9741 * iltests.il: Add a few tailcall tests.
9743 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9745 * driver.c: fix loop for old compilers (bug #79521).
9747 2006-10-02 Zoltan Varga <vargaz@gmail.com>
9749 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
9751 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
9753 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
9754 metadata without any code.
9756 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
9757 more precise debugging information using gdb.
9759 2006-09-30 Zoltan Varga <vargaz@gmail.com>
9761 * inssel-ia64.brg: Make the helper methods static.
9763 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9765 * inssel-x86.brg: make the helper methods static.
9767 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
9769 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
9771 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9773 * mini.c: updates for monoburg changes.
9774 * inssel.brg: make a few helper functions static as they should.
9776 2006-09-27 Zoltan Varga <vargaz@gmail.com>
9778 * Makefile.am: Move mini-codegen.c to common_sources.
9780 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9782 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
9784 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
9785 mini-ppc.h: port to use the common local register allocator.
9787 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9789 * mini.h: Remove the comment too then.
9791 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
9793 * mini.h: put back backend.data which is to be used shortly and
9794 doesn't increase the size of MonoInst. If any 64 bit arch aligned
9795 pointers on 4 byte boundaries it'd have much bigger issues running
9796 and you can ifdef it out anyway.
9798 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9800 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
9801 MonoInst size by 4 bytes on 64 bit machines.
9803 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9805 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
9806 replacement with more meaningful field names. Arch maintainers, please
9807 check the assigned names are good enough for your arch.
9809 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9811 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
9812 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
9814 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
9816 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
9817 relocations and memory requirements, put the optimization flags
9818 definitions in their own file.
9820 2006-09-24 Zoltan Varga <vargaz@gmail.com>
9822 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
9824 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
9826 2006-09-22 Zoltan Varga <vargaz@gmail.com>
9828 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
9830 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
9832 * inssel.brg: use the correct function to get the size of an item
9833 in an array, given an element class.
9834 * aot-compiler.c: do not access class->class_size directly.
9836 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
9838 * mini.h, debug-mini.c: added a debugging function to print
9839 info about local variables and arguments in a jitted method.
9841 2006-09-20 Zoltan Varga <vargaz@gmail.com>
9843 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9845 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
9847 2006-09-19 Zoltan Varga <vargaz@gmail.com>
9849 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
9850 inner and outer loops when passing vtypes.
9852 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
9854 * mini-ppc.c: take into account the cpu errata for cache flushing
9855 which caused some random errors (bug #79381).
9857 2006-09-19 Zoltan Varga <vargaz@gmail.com>
9859 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
9860 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
9862 2006-09-17 Zoltan Varga <vargaz@gmail.com>
9864 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
9867 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
9870 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
9871 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
9873 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
9876 2006-09-13 Zoltan Varga <vargaz@gmail.com>
9878 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
9880 2006-09-12 Zoltan Varga <vargaz@gmail.com>
9882 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
9883 macro does not have to be changed during debugging.
9885 * 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>.
9887 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
9889 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
9891 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
9892 MONO_ARCH_NO_EMULATE_MUL is defined.
9894 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
9896 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
9898 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
9900 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
9902 2006-09-11 Zoltan Varga <vargaz@gmail.com>
9904 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
9905 stuff to mini-exceptions.c where it is used.
9907 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
9908 setup code, the real one is in mini-exceptions.c.
9910 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
9911 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
9912 some changes from the freebsd ports tree.
9914 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
9917 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
9919 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
9921 * mini.c: on Linux, check for /proc to be mounted
9922 (bug# 79351, novell bug#201204).
9924 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
9926 * mini.c: handle cases where pthread_attr_getstack() behaves
9927 incorrectly (bug #78096).
9929 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
9931 * mini-arm.c: support larger stack frames (bug #79272).
9933 2006-09-08 Zoltan Varga <vargaz@gmail.com>
9935 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
9937 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
9940 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
9941 mono_class_from_name () to find a class from its name.
9943 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
9945 2006-09-07 Zoltan Varga <vargaz@gmail.com>
9947 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
9949 2006-09-05 Kornél Pál <kornelpal@gmail.com>
9951 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
9953 2006-09-04 Zoltan Varga <vargaz@gmail.com>
9955 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
9956 callinfo->trampoline.
9958 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
9960 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
9963 2006-09-03 Zoltan Varga <vargaz@gmail.com>
9965 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
9967 2006-09-02 Zoltan Varga <vargaz@gmail.com>
9969 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
9970 stats.method_trampolines, it is already done by the generic trampoline code.
9972 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
9974 2006-09-01 Zoltan Varga <vargaz@gmail.com>
9976 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
9978 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
9980 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
9982 * mini.c (print_jit_stats): Print mscorlib mempool size too.
9984 * mini.c (print_jit_stats): Print new stats.
9986 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9988 2006-08-31 Zoltan Varga <vargaz@gmail.com>
9990 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
9991 Address on two dimensional arrays. Fixes #78729.
9993 * mini.h (MonoCompile): Add a 'skip_visibility' field.
9995 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
9998 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
10000 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
10003 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
10005 (mini_get_ldelema_ins): Ditto.
10007 2006-08-30 Zoltan Varga <vargaz@gmail.com>
10009 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
10010 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
10013 2006-08-29 Neale Ferguson <neale@sinenomine.net>
10015 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
10016 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
10018 * exceptions-s390x.c: Cosmetic change.
10020 * tramp-s390.c: Fix warning.
10022 * cpu-s390.md: Correct length of mul_imm.
10024 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
10026 * aot-compiler.c: added binary writer with ELF backend
10027 implementation (only on Linux/x86 for now).
10029 2006-08-18 Zoltan Varga <vargaz@gmail.com>
10031 * Makefile.am: Don't run net 2.0 AOT tests.
10033 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
10034 (mono_compile_assembly): Skip net 2.0 assemblies as well.
10036 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
10038 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10040 * aot-compiler.c: simplified and refactored the asm-writing code
10041 to allow different backends.
10043 2006-08-18 Zoltan Varga <vargaz@gmail.com>
10045 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10047 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
10048 little. Share patches of type TYPE_FROM_HANDLE as well.
10050 * mini.c (mono_patch_info_equal): New helper function.
10051 (mono_patch_info_hash): Ditto.
10053 * aot-compiler.c (emit_method_code): Fix s390 build.
10055 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
10056 is not handled because it is stored as a flag and not as a type ctor. Fixes
10059 2006-08-17 Zoltan Varga <vargaz@gmail.com>
10061 * aot-compiler.c: Fix computation of GOT slot statistics.
10063 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
10064 Also remove support for not PIC AOT.
10066 * mini.h: Bump AOT file format version.
10068 * objects.cs: Add a test for #78990.
10070 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
10071 (peter.dettman@iinet.net.au). Fixes #79087.
10073 * basic-long.cs: Add a test for the above.
10075 2006-08-16 Zoltan Varga <vargaz@gmail.com>
10077 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
10079 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
10082 2006-08-15 Zoltan Varga <vargaz@gmail.com>
10084 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
10087 2006-08-10 Jonathan Chambers <joncham@gmail.com>
10089 * mini.c: Don't verify COM proxy invoke calls
10092 2006-08-10 Dick Porter <dick@ximian.com>
10094 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
10095 which process is holding semaphores locked.
10097 2006-08-08 Zoltan Varga <vargaz@gmail.com>
10099 * mini-ia64.c mini-amd64.c: Fix #79027.
10101 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
10103 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
10105 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
10106 implicit arguments in a vararg call. Fixes #79027.
10108 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
10110 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
10111 (mono_get_array_new_va_signature): Ditto.
10113 2006-08-05 Zoltan Varga <vargaz@gmail.com>
10115 * aot-runtime.c: Call init_plt lazily.
10117 * inssel-long.brg: Fix unsigned long->int conversion.
10119 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
10121 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
10122 that most data is now in the .rss/.data section.
10124 2006-08-04 Zoltan Varga <vargaz@gmail.com>
10126 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
10128 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
10130 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
10132 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
10134 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
10135 virtual call. Fixes #79010.
10137 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
10138 and use the result as the this argument in the real call.
10140 * generics.2.cs: Add a new test for #79010.
10142 2006-08-03 Zoltan Varga <vargaz@gmail.com>
10144 * mini-x86.c: Fix a warning.
10146 * aot-compiler.c: Add a bunch of statistics.
10148 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
10150 2006-08-02 Zoltan Varga <vargaz@gmail.com>
10152 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
10154 2006-08-01 Zoltan Varga <vargaz@gmail.com>
10156 * 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>.
10158 2006-07-13 Miguel de Icaza <miguel@novell.com>
10160 * mini.c (mono_method_to_ir): Obtain the original method in the
10161 CIL stream and use this to perform validation.
10165 2006-07-19 Zoltan Varga <vargaz@gmail.com>
10167 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
10168 (mono_arch_call_opcode): Ditto.
10170 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
10173 * mini.c (mono_patch_info_dup_mp): New helper function.
10175 * aot-compiler.c (compile_method): Fix some of the memory allocated during
10176 compilation. Fixes #78827.
10178 2006-07-18 Kornél Pál <kornelpal@gmail.com>
10180 * declsec.c: Use original security informations for
10181 MONO_WRAPPER_MANAGED_TO_MANAGED.
10183 2006-07-15 Jonathan Chambers <joncham@gmail.com>
10185 * mini.c: Allow Com Interop methods/classes and
10186 don't verify COM wrapper calls
10189 2006-07-13 Zoltan Varga <vargaz@gmail.com>
10191 * inssel-long32.brg: Fix long->i4 checked conversion.
10193 * exceptions.cs: Add a test for the above.
10195 2006-07-08 Zoltan Varga <vargaz@gmail.com>
10197 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
10199 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
10202 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
10205 2006-07-03 Zoltan Varga <vargaz@gmail.com>
10207 * mini.c: Fix solaris/x86 exception handling.
10209 * Makefile.am: Get rid of $(ICU_LIBS).
10211 2006-07-02 Zoltan Varga <vargaz@gmail.com>
10213 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
10214 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
10215 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
10217 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
10219 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
10220 this function causes a SIGSEGV.
10222 2006-06-22 Zoltan Varga <vargaz@gmail.com>
10224 * mini.c: Remove unused solaris/x86 includes.
10226 2006-06-21 Zoltan Varga <vargaz@gmail.com>
10228 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
10230 2006-06-20 Jb Evain <jbevain@gmail.com>
10232 * cpu-g4.md: fix max length of start_handler instruction.
10234 2006-06-20 Massimiliano Mantione <massi@ximian.com>
10235 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
10237 2006-06-16 Massimiliano Mantione <massi@ximian.com>
10238 * ssa.c: Fixed bug 78653 for SSA based deadce.
10239 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
10240 MonoInst.flags, used in SSA based deadce.
10241 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
10242 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
10244 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
10246 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
10247 it can end up using non executable memory on ppc64 systems
10248 running ppc32 userspace (fix from Johannes Berg).
10250 2006-06-14 Dick Porter <dick@ximian.com>
10252 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
10255 2006-06-13 Massimiliano Mantione <massi@ximian.com>
10256 * mini.c: Made so that inline is locally disabled if it would
10257 trigger a .cctor, because too many apps depend on this behavior
10258 (which seems to be also the one of the MS CLR).
10260 2006-06-13 Zoltan Varga <vargaz@gmail.com>
10262 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
10263 No idea why this worked before.
10265 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
10266 which branch to outer exception clauses since they could skip the
10267 inner finally clauses. Fixes #78633.
10269 * exceptions.cs: Add a test for the above.
10271 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
10274 * iltests.il: Add a test for the above.
10276 2006-06-12 Zoltan Varga <vargaz@gmail.com>
10278 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
10279 after the end of a try bblock, to prevent asserts in mini_method_compile ().
10281 * iltests.il: Add a test for the above.
10283 2006-06-10 Zoltan Varga <vargaz@gmail.com>
10285 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
10287 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
10288 methods as instrinsics.
10290 2006-06-09 Wade Berrier <wberrier@novell.com>
10292 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
10293 (simple-cee-ops.h ssapre-mini-ops.h)
10295 2006-06-09 Neale Ferguson <neale@sinenomine.net>
10297 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
10298 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
10300 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
10301 * cpu-s390x.md: Fix max. length values for a couple of instructions.
10303 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
10305 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
10307 2006-06-08 Massimiliano Mantione <massi@ximian.com>
10309 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
10310 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
10311 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
10312 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
10313 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
10314 of opcodes, so that bug 78549 should not happen again.
10315 * ssapre.c: Updated to use the renamed files.
10317 2006-06-08 Zoltan Varga <vargaz@gmail.com>
10319 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
10320 in OP_ATOMIC_EXCHANGE_I4.
10322 2006-06-07 Wade Berrier <wberrier@novell.com>
10324 * tramp-s390.c: Fix s390 build (add missing pointer declarations
10325 in mono_debugger_create_notification_function)
10327 2006-06-06 Zoltan Varga <vargaz@gmail.com>
10329 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
10331 * mini.c (type_from_stack_type): Disable some changes which do not
10334 * driver.c: Reenable opts.
10336 * mini.h (MonoStackSlot): New structure to keep track of the verification state
10337 of the evaluation stack.
10339 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
10340 evaluation stack trace at entry to the bblock.
10342 * mini.c (merge_stacks): New function to perform verification of stack merges.
10343 Turned off by default.
10345 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
10348 2006-06-06 Massimiliano Mantione <massi@ximian.com>
10350 * local-propagation.c: Fixed bug 78549.
10352 2006-06-04 Zoltan Varga <vargaz@gmail.com>
10354 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
10356 2006-06-02 Miguel de Icaza <miguel@novell.com>
10358 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
10359 tramp-arm.c, tramp-ia64.c
10360 (mono_debugger_create_notification_function): Update signature to
10361 new signature and use new protocol for creating the notification
10364 Should fix the build.
10366 2006-06-02 Geoff Norton <gnorton@customerdna.com>
10368 * exceptions-ppc.c (mono_jit_walk_stack)
10369 (ves_icall_get_frame_info): Fix the build
10371 2006-06-02 Zoltan Varga <vargaz@gmail.com>
10373 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
10375 2006-05-31 Raja R Harinath <rharinath@novell.com>
10377 * il2tests.2.il: New file for generics CIL tests. Add test for
10379 * Makefile.am: Update.
10382 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
10385 2006-05-30 Massimiliano Mantione <massi@ximian.com>
10387 * aliasing.c: Fixed bug 78311.
10389 2006-05-29 Martin Baulig <martin@ximian.com>
10391 * mini-exceptions.c (mono_find_jit_info): When computing the
10392 native offset, check whether we're actually inside the method's
10393 code; call mono_debug_print_stack_frame() to format the frame.
10394 (ves_icall_System_Exception_get_trace): Call
10395 mono_debug_print_stack_frame() to format the stack frame.
10396 (ves_icall_get_trace): Update to the new debugging API.
10397 (mono_jit_walk_stack_from_ctx): Likewise.
10398 (ves_icall_get_frame_info): Likewise.
10400 * mini.c (get_method_from_ip): Use the new debugging API.
10401 (mono_print_method_from_ip): Likewise.
10404 (mono_jit_walk_stack): Use the new debugging API.
10405 (ves_icall_get_frame_info): Likewise.
10407 2006-05-27 Zoltan Varga <vargaz@gmail.com>
10409 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
10411 2006-05-25 Massimiliano Mantione <massi@ximian.com>
10413 * mini.c: Added "limitator" to inline for debugging.
10415 2006-05-24 Martin Baulig <martin@ximian.com>
10417 * debug-debugger.c (mono_debugger_init): Create a private,
10418 malloc()-based code manager for the notification function and
10419 intentionally leak it on exit. This fixes the crash-on-exit race
10423 (mono_debugger_create_notification_function): Added
10424 `MonoCodeManager *' argument.
10427 (mono_debugger_create_notification_function): Added
10428 `MonoCodeManager *' argument.
10430 2006-05-23 Massimiliano Mantione <massi@ximian.com>
10432 * aliasing.c: Fixed 64 bit issue.
10433 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10434 default since all known bugs are fixed (one more time!).
10436 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10438 * mini.c: write barrier support.
10440 2006-05-23 Martin Baulig <martin@ximian.com>
10442 * debug-debugger.c: Revert Paolo's change. Add comment and #error
10443 check at the top of the file.
10445 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10447 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
10448 reverting changes without reason and without changelog entries.
10450 2006-05-18 Zoltan Varga <vargaz@gmail.com>
10452 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
10453 to a few opcodes. Fixes #78439.
10455 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
10456 consistency with other archs.
10458 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
10460 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10462 * debug-debugger.c: fix the build.
10464 2006-05-17 Martin Baulig <martin@ximian.com>
10467 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
10468 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
10469 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
10470 (debugger_attach): Call GC_mono_debugger_add_all_threads().
10472 2006-05-11 Zoltan Varga <vargaz@gmail.com>
10474 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
10476 2006-05-10 Zoltan Varga <vargaz@gmail.com>
10478 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
10479 MONO_TYPE_GENERICINST.
10481 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
10482 MONO_TYPE_GENERICINST.
10484 2006-05-09 Zoltan Varga <vargaz@gmail.com>
10486 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
10489 2006-05-08 Zoltan Varga <vargaz@gmail.com>
10491 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
10493 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
10495 2006-05-06 Zoltan Varga <vargaz@gmail.com>
10497 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
10498 mono_trace_cleanup ().
10500 * iltests.il: Fix problem with the newly added test.
10502 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
10503 due to register constraints, free up the previous hreg. Fixes #78314.
10505 * iltests.il: Add new test for #78314.
10507 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
10508 Interlocked.Add. Fixes #78312.
10510 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
10512 2006-05-05 Zoltan Varga <vargaz@gmail.com>
10514 * inssel.brg (mini_emit_virtual_call): Fix a warning.
10516 2006-05-05 Martin Baulig <martin@ximian.com>
10518 * debug-mini.c (mono_debug_open_block): New method.
10521 (mono_arch_output_basic_block): Call mono_debug_open_block() at
10522 the beginning of each basic block.
10525 (mono_arch_output_basic_block): Call mono_debug_open_block() at
10526 the beginning of each basic block.
10528 2006-05-04 Massimiliano Mantione <massi@ximian.com>
10530 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10531 default until I understand why they break the build on amd64.
10533 2006-05-04 Zoltan Varga <vargaz@gmail.com>
10535 * mini.c (mini_cleanup): Call mono_cleanup ().
10537 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
10540 2006-05-04 Massimiliano Mantione <massi@ximian.com>
10542 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
10543 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10544 default since all known bugs are fixed, and I cannot reproduce bug
10545 77944... I'm asking Matt Hargett to test again after this commit.
10547 2006-04-28 Massimiliano Mantione <massi@ximian.com>
10549 * mini-codegen.c: Fixed typo that thrashed inline.
10551 2006-04-28 Zoltan Varga <vargaz@gmail.com>
10553 * dominators.c (compute_dominators): Avoid using a worklist since
10554 it is not correct in some cases. Instead, iterate over all bblocks as
10555 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
10557 2006-04-28 Miguel de Icaza <miguel@novell.com>
10559 * mini.c (mono_jit_compile_method_inner): Use
10560 mono_prepare_exception_from_error that resets the value
10563 2006-04-27 Miguel de Icaza <miguel@novell.com>
10565 * mini.c: Move the mini_loader_error_to_exception to metadata.
10567 2006-04-27 Massimiliano Mantione <massi@ximian.com>
10569 * aliasing.c: Fixed bug 78210.
10571 2006-04-27 Massimiliano Mantione <massi@ximian.com>
10573 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10574 default until all their problems (or the ones they trigger) are fixed.
10576 2006-04-26 Zoltan Varga <vargaz@gmail.com>
10578 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
10580 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
10581 as loaded only after resolving patches since that could invoke the same method.
10583 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
10585 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
10588 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
10591 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
10594 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
10595 made from AOT code through the PLT table.
10597 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
10598 holding the plt offset when a call is made to the aot plt trampoline.
10600 2006-04-25 Zoltan Varga <vargaz@gmail.com>
10602 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
10605 * Makefile.am (common_sources): Fix build breakage.
10607 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
10608 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
10609 intra-assembly calls if possible.
10611 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
10613 * mini-trampolines.c: Handle PLT entries.
10615 * mini.c: Avoid creating a GOT var for calls.
10617 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
10618 from mscorlib code.
10620 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
10621 from mscorlib code.
10623 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
10626 * mini.h: Bump AOT file format version.
10628 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
10631 2006-04-25 Martin Baulig <martin@ximian.com>
10633 * driver.c: Disable copyprop, consprop and inline when running
10634 inside the debugger.
10636 2006-04-25 Martin Baulig <martin@ximian.com>
10638 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
10639 with `get_current_thread' and added `detach'.
10640 (MonoDebuggerMetadataInfo): Added `thread_size',
10641 `thread_tid_offset', `thread_stack_ptr_offset' and
10642 `thread_end_stack_offset'.
10644 2006-04-25 Zoltan Varga <vargaz@gmail.com>
10646 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
10649 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
10650 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
10652 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
10654 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
10656 * aot.c: Add support for ADJUSTED_IID.
10658 2006-04-24 Zoltan Varga <vargaz@gmail.com>
10660 * aot.c (emit_method_order): Don't align method_order_end.
10662 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
10663 the interface ID changes.
10665 2006-04-21 Dick Porter <dick@ximian.com>
10667 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
10668 cleaning up a thread. Fixes the new part of bug 77470.
10670 2006-04-20 Geoff Norton <gnorton@customerdna.com>
10672 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
10673 to managed wrapper.
10675 2006-04-19 Zoltan Varga <vargaz@gmail.com>
10677 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
10679 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
10680 SIGSEGV. Fixes #78072.
10682 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
10683 unregister our SIGABRT handler.
10685 2006-04-19 Massimiliano Mantione <massi@ximian.com>
10687 * mini.c: Disabled inline where it can alter the call stack in a
10688 way visible from managed code.
10689 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
10692 2006-04-16 Zoltan Varga <vargaz@gmail.com>
10694 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
10695 on other platforms. Fixes #78089.
10697 2006-04-13 Martin Baulig <martin@ximian.com>
10699 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
10700 determine whether we're inside the debugger.
10703 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
10705 2006-04-12 Zoltan Varga <vargaz@gmail.com>
10707 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
10708 handler clauses. Fixes #78024.
10710 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
10711 in the CALL_MEMBASE opcodes. Fixes #78088.
10712 (mono_arch_get_vcall_slot_addr): Ditto.
10714 2006-04-10 Martin Baulig <martin@ximian.com>
10716 * debug-debugger.c: The thread handling code has now been moved
10717 into ../metadata/threads.c.
10719 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10721 * driver.c (mono_main): Fix --with-gc=none build.
10723 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
10724 (mono_spillvar_offset_float): Ditto.
10725 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
10726 hreg, not when its !global, since on ia64, there is a third category: stacked
10729 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
10731 * mini.c: set MonoInst->klass for load field address and a few other
10734 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10736 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
10738 2006-04-07 Zoltan Varga <vargaz@gmail.com>
10740 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
10741 the branch opt changes.
10743 2006-04-06 Dick Porter <dick@ximian.com>
10745 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
10747 * wapihandles.c (mini_wapi_seminfo):
10748 * driver.c (mono_main): Add semaphore info option
10750 2006-04-05 Zoltan Varga <vargaz@gmail.com>
10752 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
10753 branch optimization changes. Fixes #78009.
10755 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10757 * mini.c: ignore accessibility of methods in managed->native wrappers.
10759 2006-04-04 Zoltan Varga <vargaz@gmail.com>
10761 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
10763 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
10765 2006-04-03 Zoltan Varga <vargaz@gmail.com>
10767 * mini.c: Modify the branch optimizations to preserve the invariant that
10768 the entries inside the in_bb and out_bb arrays are unique.
10769 (mono_unlink_bblock): Avoid creation of new arrays.
10771 2006-04-02 Zoltan Varga <vargaz@gmail.com>
10773 * mini.c (mono_unlink_bblock): Fix regression caused by previous
10776 2006-04-01 Zoltan Varga <vargaz@gmail.com>
10778 * mini.c (optimize_branches): Remove the "optimizations" in
10779 the cbranch1/cbranch2 -> branch cases which were causing several
10780 problems in the past. Fixes #77986.
10782 2006-03-31 Chris Toshok <toshok@ximian.com>
10784 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
10785 default optimizations :(
10787 2006-03-31 Zoltan Varga <vargaz@gmail.com>
10789 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
10792 2006-03-31 Massimiliano Mantione <massi@ximian.com>
10794 * local-propagation.c: Added comments to structs and removed
10795 "Mono" prefixes from local tree mover types.
10797 2006-03-30 Zoltan Varga <vargaz@gmail.com>
10799 * Makefile.am (arch_sources): Define this for each architecture so
10800 libmono_la_SOURCES is defined in one place.
10802 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
10804 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
10807 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
10809 * driver.c: print the GC name supplied by configure.
10811 2006-03-29 Massimiliano Mantione <massi@ximian.com>
10813 * local-propagation.c: Added tree mover, and moved here all the
10814 local propagation code from mini.c
10815 * mini.c: Added support for treeprop, and moved all the local
10816 propagation code to local-propagation.c
10817 * mini.h: Added support for treeprop
10818 * driver.c: Added support for treeprop, enabled consprop, copyprop,
10819 treeprop, inline and deadce by default
10820 * Makefile.am: Added local-propagation.c
10822 2006-03-25 Zoltan Varga <vargaz@gmail.com>
10824 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
10826 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
10828 * debug-debugger.c: make it compile without the Boehm GC.
10830 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10832 * mini.c: fixed issue with mismatch when an icall is registered
10833 with multiple names but same address.
10835 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
10837 * declsec.c, mini-exceptions.c: use write barrier to set reference
10838 fields of managed objects.
10840 2006-03-19 Zoltan Varga <vargaz@gmail.com>
10842 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
10843 (can_access_internals): Fix a warning.
10845 * mini.c (print_method_from_ip): Rename this to
10846 mono_print_method_from_ip so it gets exported.
10848 * trace.c: Deal with strings inside StringBuilder's containing garbage
10849 and fix memory leaks. Fixes #77848.
10851 2006-03-19 Zoltan Varga <vargaz@gmail.com>
10853 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
10856 2006-03-16 Neale Ferguson <neale@sinenomine.net>
10858 * mini-s390.c: Remove OP_X86_TEST_NULL.
10860 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
10862 * mini.c: use the correct GetHashCode() for the moving collector.
10864 2006-03-16 Massimiliano Mantione <massi@ximian.com>
10866 * liveness.c: Regalloc spill cost tuning.
10868 2006-03-15 Neale Ferguson <neale@sinenomine.net>
10870 * mini-s390x.h: Correct S390_LONG macro.
10872 * mini-s390x.c: Cleanup unused code.
10874 2006-03-15 Zoltan Varga <vargaz@gmail.com>
10876 * jit-icalls.h: New file.
10878 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
10879 icalls and include that instead of including jit-icalls.c.
10881 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
10884 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
10886 * mini.c: when checking for member accessibility, also check for
10887 friend assemblies and for explicit interface implementations.
10889 2006-03-14 Zoltan Varga <vargaz@gmail.com>
10891 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
10893 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
10895 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10896 common cases are done first.
10898 * mini-ops.h: Only define platform specific opcodes on the given platform.
10900 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
10903 2006-03-14 Martin Baulig <martin@ximian.com>
10905 Revert Paolo's change from r57348:
10907 * mini.h: don't use gboolean for bitfields.
10908 * mini.c: verifier changes for fields and methods accessibility.
10910 2006-03-13 Neale Ferguson <neale@sinenomine.net>
10912 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
10914 * mini-s390x.c: Fix conv_r_un.
10916 * cpu-s390, cpu-s390x.md: Fix lengths.
10918 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
10920 * mini.c: nested types have access to all the nesting
10921 levels, not just the enclosing types.
10923 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10925 * mini.c: added a few more verification checks.
10927 2006-03-12 Zoltan Varga <vargaz@gmail.com>
10929 * liveness.c: Merge optimizations from the linear-il branch.
10931 2006-03-11 Zoltan Varga <vargaz@gmail.com>
10933 * mini-ia64.c (emit_call): Add a comment.
10935 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
10937 * tramp-ia64.c: Fix some warnings.
10939 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10941 * mini.h: don't use gboolean for bitfields.
10942 * mini.c: verifier changes for fields and methods accessibility.
10944 2006-03-11 Zoltan Varga <vargaz@gmail.com>
10946 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
10947 lazy icall wrapper changes.
10949 * dominators.c: Replace all the dominator algorithms with faster
10950 ones from the linear-il branch.
10952 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
10955 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10956 common cases are done first.
10958 * mini-amd64.c: Fix some warnings.
10960 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
10963 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
10966 * mini.h: Add a missing prototype.
10968 2006-03-10 Zoltan Varga <vargaz@gmail.com>
10970 * mini.c: Compile icall wrappers lazily.
10972 * mini-codegen.c: Use printf instead of g_print since its much faster.
10974 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
10977 * mini.c (optimize_branches): Cache the negative result from
10978 remove_block_if_useless ().
10980 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
10981 Also fix some bblock linking issues.
10983 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
10986 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
10988 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
10989 accessed fields first, for better cache behavior.
10991 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10993 * mini.c: speedup IList<T> array accesses.
10995 2006-03-09 Zoltan Varga <vargaz@gmail.com>
10997 * mini.c (mono_method_to_ir): Handle large methods overflowing the
10998 inline_costs counter. Fixes #77190.
11000 2006-03-06 Zoltan Varga <vargaz@gmail.com>
11002 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
11003 trace messages. Fixes #77706.
11005 2006-03-04 Martin Baulig <martin@ximian.com>
11007 * tramp-amd64.c, tramp-x86.c
11008 (mono_debugger_create_notification_function): Use
11009 mono_global_codeman_reserve() to allocate a buffer at runtime and
11012 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
11014 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
11015 notification function at runtime and then call `initialize' in the
11016 `MONO_DEBUGGER__debugger_info' vtable.
11018 2006-03-04 Zoltan Varga <vargaz@gmail.com>
11020 * iltests.il: Fix a visibility problem.
11022 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11024 * driver.c, mini.c: add hooks for the counters API.
11026 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11028 * driver.c: show disabled options.
11030 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11032 * linear-scan.c: always use cost-driven selection.
11034 2006-02-28 Raja R Harinath <rharinath@novell.com>
11036 * jit-icalls.c (helper_compile_generic_method): Revert change from
11039 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
11041 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
11043 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
11045 * inssel.brg: style fixes, mostly to force the updated monoburg
11046 to run for people using svn.
11048 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11050 * mini.c: match monoburg changes.
11052 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11054 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
11055 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
11056 declaration in the header file.
11058 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11060 * helpers.c: reduce relocations and mem usage.
11062 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11064 * mini.h, mini-codegen.c: disable logging features if
11065 requested by configure.
11067 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
11069 * mini.c: tiny verifier changes.
11071 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11073 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
11074 cpu-pentium.md: stack alignment changes for osx/x86,
11075 partially from Geoff Norton <gnorton@customerdna.com>.
11077 2006-02-24 Raja R Harinath <harinath@gmail.com>
11079 * jit-icalls.c (helper_compile_generic_method): Update to changes
11080 in metadata/class.c.
11082 2006-02-24 Zoltan Varga <vargaz@gmail.com>
11084 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
11086 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
11087 interface calls with large offsets.
11089 2006-02-23 Raja R Harinath <rharinath@novell.com>
11091 * jit-icalls.c (helper_compile_generic_method): Document the
11092 special-case we depend on so that we can inflate the method twice
11093 with the same context with no bad side-effects.
11095 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
11097 * mini-x86.c, mini-amd64.c: fix for case when xen support
11100 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
11102 * mini-x86.c, mini-amd64.c: generate code to access tls items
11103 in a faster way for Xen systems.
11105 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11107 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
11108 updates and compilation fixes for the OSX/x86 port, mostly from
11109 Geoff Norton <gnorton@customerdna.com>.
11111 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11113 * inssel.brg: faster interface call implementation
11114 to sync with the interface_offsets MonoVTable changes.
11116 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11118 * mini.c: more verification checks.
11120 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
11122 * mini.c: added a few more verification checks.
11124 2006-02-17 Neale Ferguson <neale@sinenomine.net>
11126 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
11127 facility on the processor and use it if available.
11129 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11131 * driver.c, aot.c, mini.c: throw exception if the IL code is
11132 invalid or unverifiable.
11134 2006-02-17 Raja R Harinath <rharinath@novell.com>
11136 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
11139 2006-02-16 Zoltan Varga <vargaz@gmail.com>
11141 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
11143 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11145 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
11146 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
11147 handling of instantiated generic valuetypes.
11149 2006-02-11 Zoltan Varga <vargaz@gmail.com>
11151 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
11152 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
11155 * generics.2.cs: Revert the nullable reftypes tests.
11157 2006-02-10 Zoltan Varga <vargaz@gmail.com>
11159 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
11160 using __builtin_frame_address (1) as it doesn't work in the presence
11161 of optimizations. Hopefully fixes #77273.
11163 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
11164 -> generics.cs change as it doesn't work with some automake versions.
11166 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11168 * mini.c: handle systems that sue a different way to
11169 retrieve the stack address of the current thread.
11171 2006-02-09 Zoltan Varga <vargaz@gmail.com>
11173 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
11174 it specially in the makefile.
11176 * generics.2.cs: Add tests for nullable reference types.
11178 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11180 * mini.c: always handle the case when mono_jit_init()
11181 is called in a thread different from the main thread,
11182 confusing libgc (bug #77309).
11184 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
11186 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
11188 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11190 * mini.c: change optimize_branches () to use a single loop
11191 and introduce a new optimization to simplify some range checks.
11193 2006-02-03 Martin Baulig <martin@ximian.com>
11195 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
11196 and merged with debugger_thread_manager_add_thread().
11197 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
11198 inform the debugger about the main thread.
11200 2006-02-03 Zoltan Varga <vargaz@gmail.com>
11202 * basic.cs: Add test for div.un/rem.un constant folding.
11204 2006-02-03 Neale Ferguson <neale@sinenomine.net>
11206 * cpu-s390x.md: correct int_xor_imm length
11208 2006-02-03 Zoltan Varga <vargaz@gmail.com>
11210 * generics.2.cs: New test for #77442.
11212 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
11215 2006-02-02 Martin Baulig <martin@ximian.com>
11217 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
11218 <mono/metadata/mono-debug-debugger.h>
11220 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
11222 2006-02-02 Martin Baulig <martin@ximian.com>
11224 * debug-debugger.h: New header file for debug-debugger.c.
11226 * debug-debugger.c: Big API cleanup; don't run the managed Main()
11227 function is a separate thread anymore; add support for attaching.
11229 2006-02-01 Zoltan Varga <vargaz@gmail.com>
11231 * tramp-x86.c: Fix a warning.
11233 2006-01-31 Zoltan Varga <vargaz@gmail.com>
11235 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
11236 on very large methods.
11238 * aot.c (load_patch_info): Fix a warning.
11240 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11242 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
11243 mini-ops.h: alu membase optimizations.
11245 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
11247 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
11248 to speedup StringBuilder.
11250 2006-01-27 Zoltan Varga <vargaz@gmail.com>
11252 * dominators.c (mono_compute_natural_loops): Fix detection of
11253 loop body start blocks.
11255 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
11257 2006-01-26 Zoltan Varga <vargaz@gmail.com>
11259 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
11262 2006-01-25 Massimiliano Mantione <massi@ximian.com>
11264 * aliasing.c: Fixed aliasing issue on 64 bit archs.
11266 2006-01-25 Martin Baulig <martin@ximian.com>
11268 * debug-debugger.c: Moved the `MonoDebuggerManager' and
11269 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
11270 started to cleanup this file a little bit.
11272 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
11274 * mini.c: optimize a codepath frequently happening in generics code.
11276 2006-01-23 Martin Baulig <martin@ximian.com>
11278 * Makefile.am: Only compile debug-debugger.c on supported platforms.
11280 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
11281 functions directly.
11283 * driver.c: debug-debugger.c is only available if
11284 `MONO_DEBUGGER_SUPPORTED' is defined.
11286 2006-01-23 Martin Baulig <martin@ximian.com>
11288 * debug-debugger.c: Only enable this on platforms where the Mono
11289 Debugger is working (x86 and x86_64).
11291 2006-01-21 Martin Baulig <martin@ximian.com>
11293 The Mono Debugger is now using the normal `mono' instead of the
11294 `mono-debugger-mini-wrapper' when executing managed code.
11296 * debug-debugger.c: New file; previously known as
11297 debugger/wrapper/wrapper.c.
11299 * debug-mini.c (mono_init_debugger): Removed.
11301 * driver.c (mono_main): Added new `--inside-mdb' command line
11302 argument which is used when running inside the debugger.
11304 2006-01-20 Zoltan Varga <vargaz@gmail.com>
11306 * liveness.c (mono_analyze_liveness): Remove some unused data
11309 2006-01-17 Zoltan Varga <vargaz@gmail.com>
11311 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
11313 2006-01-16 Zoltan Varga <vargaz@gmail.com>
11315 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
11316 depends on implementation details of monobitset.
11318 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
11321 2006-01-15 Zoltan Varga <vargaz@gmail.com>
11323 * liveness.c: Update after monobitset changes.
11325 2006-01-14 Zoltan Varga <vargaz@gmail.com>
11327 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
11329 2006-01-11 Neale Ferguson <neale@sinenomine.net>
11331 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
11333 * mini-s390x.c: Remove warning messages.
11335 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
11337 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
11339 2006-01-10 Zoltan Varga <vargaz@gmail.com>
11341 * generics.2.cs: Add ldelem/stelem_any test.
11343 2006-01-10 Neale Ferguson <neale@sinenomine.net>
11345 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
11347 2006-01-07 Zoltan Varga <vargaz@gmail.com>
11349 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
11351 2006-01-06 Zoltan Varga <vargaz@gmail.com>
11353 * generics.2.cs: Reenable vtype tests.
11355 * inssel-x86.brg: Remove an icorrect valuetype rule.
11357 2006-01-06 Neale Ferguson <neale@sinenomine.net>
11359 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
11360 initial support for OP_ABS.
11362 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11364 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
11366 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11368 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
11369 conversion and implement LADD/LSUB.
11371 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
11374 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11376 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
11378 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
11381 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11383 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
11384 localloc is encountered. Fixes crash in test-183.cs when using gmcs
11385 (stack walk problem).
11387 2006-01-04 Zoltan Varga <vargaz@gmail.com>
11389 * aot.c (mono_aot_load_method): Fix a warning.
11391 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11393 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
11395 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11397 * iltests.il: Add test for #77148.
11399 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
11402 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11404 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
11406 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11408 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
11409 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
11411 * basic-long.cs: Add lconv-to-r4/r8 tests.
11413 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11415 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
11417 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
11418 here as on other archs.
11420 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11422 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
11424 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11426 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
11428 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
11430 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
11431 instrument_prolog; Add memory_barrier instruction.
11433 2005-12-26 Zoltan Varga <vargaz@gmail.com>
11435 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
11437 2005-12-23 Zoltan Varga <vargaz@gmail.com>
11439 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
11441 * aliasing.c inssel.brg: Fix warnings.
11443 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
11444 could skip initialization of some parts of memory.
11446 * mini.c mini-ia64.c: Fix warnings.
11448 * inssel-sparc.brg: Add an implementation of lneg which actually works.
11450 2005-12-22 Zoltan Varga <vargaz@gmail.com>
11452 * aliasing.c (mono_build_aliasing_information): Add a workaround for
11453 a crash seen on sparc.
11455 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
11457 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
11459 2005-12-21 Neale Ferguson <neale@sinenomine.net>
11461 * mini-ops.h: Add s390_backchain instruction
11463 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
11465 * cpu-s390.md: Add s390_backchain instruction
11467 * mini-s390.c: Significant ABI changes
11469 * mini-s390.h: Cater for zero length structures
11471 2005-12-20 Neale Ferguson <neale@sinenomine.net>
11473 * mini-s390.c: ABI fixes
11475 * inssel-s390.brg: Remove debug statements
11477 * cpu-s390.md: Fix length of ATOMIC_xx operations
11479 2005-12-19 Zoltan Varga <vargaz@gmail.com>
11481 * basic-float.cs: Add float<->long conversion tests.
11483 2005-12-16 Neale Ferguson <neale@sinenomine.net>
11485 * mini-s390.c: Fix LOCALLOC processing.
11487 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
11489 2005-12-15 Zoltan Varga <vargaz@gmail.com>
11491 * iltests.il: Add tests for some opcodes not covered by the other
11494 2005-12-15 Neale Ferguson <neale@sinenomine.net>
11496 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
11497 register loading for Tail processing; Correct trace output.
11499 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
11501 * cpu-s390.md: Correct size of jmp instruction.
11503 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11505 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
11507 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11509 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
11510 Bring s390 up to current level.
11512 2005-12-12 Zltan Varga <vargaz@gmail.com>
11514 * generics.2.cs: Disable the newly added tests as they do not work yet.
11516 * generics.2.cs: Add valuetype tests.
11518 2005-12-09 Zoltan Varga <vargaz@gmail.com>
11520 * basic-long.cs: Add i4->u8 test.
11522 * objects.cs: Add tests for JIT intrinsic.
11524 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
11525 optimizations lost by a mistake.
11527 2005-12-07 Zoltan Varga <vargaz@gmail.com>
11529 * basic-long.cs: Remove a test moved to objects.cs.
11531 * arrays.cs: Add more array tests.
11533 2005-12-06 Zoltan Varga <vargaz@gmail.com>
11535 * arrays.cs: Add new tests for multi-dimensional arrays.
11537 2005-12-06 Raja R Harinath <rharinath@novell.com>
11539 * Makefile.am (test_sources2): Add generics.2.cs.
11540 (EXTRA_DIST): Add test_sources2.
11542 2005-12-05 Ben Maurer <bmaurer@ximian.com>
11544 Support for boxing and unboxing nullable types as well as the
11545 isinst operation on nullables, per the CLI ammendment.
11547 * inssel.brg (CEE_ISINST): Special case for nullable
11549 * mini.c (handle_unbox_nullable): new method
11550 (handle_box): Special case for nullable types
11551 (mono_method_to_ir): Call handle_unbox_nullable in correct
11554 * generics.2.cs: New test suite
11556 * Makefile.am: Support for regression tests with generics.
11558 2005-12-03 Zoltan Varga <vargaz@gmail.com>
11560 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
11561 allocated to registers. Fixes #76800.
11563 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
11565 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
11567 2005-11-30 Zoltan Varga <vargaz@gmail.com>
11569 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
11572 2005-11-29 Zoltan Varga <vargaz@gmail.com>
11574 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
11577 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
11579 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
11580 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
11582 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
11583 single precision before storing to a single precision location.
11585 2005-11-28 Raja R Harinath <rharinath@novell.com>
11587 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
11589 2005-11-27 Zoltan Varga <vargaz@gmail.com>
11591 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
11594 * basic.cs: Remove test_0_byte_compares test which was moved to
11595 objects.cs a long time ago.
11597 2005-11-22 Massimiliano Mantione <massi@ximian.com>
11599 * aliasing.c: Fixed aliasing issue on 64 bit archs.
11601 2005-11-20 Zoltan Varga <vargaz@gmail.com>
11603 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
11604 handlers are called.
11606 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
11609 * mini-ia64.c: Add support for the throw->branch exception
11612 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
11614 2005-11-18 Massimiliano Mantione <massi@ximian.com>
11616 * mini.c: Enabled "fastpath" deadce :-)
11618 2005-11-18 Massimiliano Mantione <massi@ximian.com>
11620 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
11621 alias analysis pass to support it.
11622 * mini.h: Likewise.
11624 * liveness.c: Likewise (liveness computation can use aliasing
11625 information to be more accurate).
11626 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
11627 moreover made so that "--compile-all" uses the given optimization
11628 flags and not the default ones.
11629 * aliasing.c: Alias analysis (new file).
11630 * aliasing.h: Likewise.
11631 * Makefile.am: added "aliasing.c" and "aliasing.h".
11633 2005-11-17 Zoltan Varga <vargaz@gmail.com>
11635 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
11638 2005-11-13 Zoltan Varga <vargaz@gmail.com>
11640 * mini-exceptions.c (mono_handle_exception_internal): Remove the
11641 fp >= end_of_stack exit condition, as it is not needed, and it might
11642 become true for fp eliminated frames.
11644 2005-11-11 Zoltan Varga <vargaz@gmail.com>
11646 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
11649 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
11651 * mini-arm.c: fixed alignment of doubles/longs to match
11652 the C ABI (bug #76635).
11654 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
11656 * aot.c: fix compilation with --enable-minimal=aot.
11658 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
11660 * mini-arm.c: fixed compatibility with the new
11661 floating point emulator package for compares.
11663 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
11665 * mini.c : reverted sig->pinvoke changes (r51396-51397).
11667 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
11669 * mini-exceptions.c (print_stack_frame): Output to stderr.
11670 (mono_handle_native_sigsegv): Ditto.
11672 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
11674 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
11675 OP_LCONV_TO_OVF_I implementation.
11677 * mini-amd64.c: Add support for the throw->branch exception
11680 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
11681 when the catch clause catches a more general exception, i.e. Object.
11683 2005-10-30 Zoltan Varga <vargaz@gmail.com>
11685 * cpu-ia64.md: Remove unused opcodes.
11687 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
11688 specific defines for architectures defining USE_SIGACTION.
11690 * mini-ia64.c: Fix some warnings.
11692 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
11693 version seemed to skip a frame.
11695 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
11697 * mini.c: Clean up the usage of sig->pinvoke flag. Now
11698 only calls which are made to native code use this flag.
11700 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
11702 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
11703 varargs methods as well.
11705 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
11706 which have save_lmf set. Reorganize methods prologs a bit.
11708 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
11709 debugger to the proper place.
11711 2005-10-29 Martin Baulig <martin@ximian.com>
11713 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
11714 when running inside the debugger until the debugger has support
11717 2005-10-26 Zoltan Varga <vargaz@gmail.com>
11719 * mini.h: Fix a warning.
11721 2005-10-24 Miguel de Icaza <miguel@novell.com>
11723 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
11724 we expose publicly, this returns the string.
11726 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
11728 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
11729 with fp elimination.
11731 2005-10-21 Zoltan Varga <vargaz@gmail.com>
11733 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
11734 native stacktrace using the glibc 'backtrace' function if available.
11736 2005-10-20 Zoltan Varga <vargaz@gmail.com>
11738 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
11740 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
11741 handle SIGSEGVs received while in native code.
11743 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
11744 code, call mono_handle_native_sigsegv which will abort the runtime
11745 after printing some diagnostics, instead of converting it into a
11746 confusing NullReferenceException.
11748 2005-10-18 Zoltan Varga <vargaz@gmail.com>
11750 * cpu-pentium.md: Remove unused opcodes.
11752 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
11754 * mini-amd64.h (MonoLMF): Add rsp field.
11756 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
11759 2005-10-17 Zoltan Varga <vargaz@gmail.com>
11761 * mini-codegen.c (get_register_spilling): Fix some warnings.
11763 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
11765 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
11766 elimination during exception handling. Enable fp elimination by
11769 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
11772 2005-10-16 Martin Baulig <martin@ximian.com>
11774 * mini-exceptions.c
11775 (mono_debugger_run_finally): New public method for the debugger.
11777 2005-10-10 Zoltan Varga <vargaz@gmail.com>
11779 * debug-mini.c (mono_debug_init_method): Fix warning.
11781 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
11782 the 'exname' parameter const to fix some warnings.
11784 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
11786 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
11787 introduced by the previous patch.
11789 2005-10-08 Zoltan Varga <vargaz@gmail.com>
11791 * basic-float.cs: Add test for precision of float arithmetic.
11793 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
11794 when loading/storing single values from/to memory.
11796 * mini.c (mono_jit_compile_method_with_opt): Create the function
11797 pointers in the correct domain.
11799 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
11801 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
11802 introduced by previous patch.
11804 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
11805 when out_filter_idx is NULL.
11807 * mini-exceptions.c: Don't run filter clauses twice during exception
11808 handling. Fixes #75755.
11810 2005-10-07 Zoltan Varga <vargaz@gmail.com>
11812 * aot.c: Add support for ldflda wrappers.
11814 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
11817 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
11819 * mini.c, mini.h: do not consider exception handlers blocks when
11820 setting up interface variables.
11822 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
11824 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
11826 2005-10-03 Zoltan Varga <vargaz@gmail.com>
11828 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
11829 causes a regression.
11831 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
11833 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
11835 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
11836 of the OP_P definitions.
11838 * TODO: Add a proposal for dealing with the CEE/OP mess.
11840 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
11841 optimizations from the x86 port.
11843 * cpu-amd64.md: Ditto.
11845 * basic.cs basic-long.cs: Add tests.
11847 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
11849 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
11850 Patrik Torstensson's implementation of my exception-handling
11851 optimization idea, when the exception object is not used
11854 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
11856 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
11857 of the mul_imm optimizations from the old jit.
11859 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
11861 * mini.c, liveness.c: patch by Patrik Torstensson and
11862 Zoltan Varga to improve performance in methods with
11865 2005-09-30 Zoltan Varga <vargaz@gmail.com>
11867 * driver.c: Remove 'Globalization' entry from --version.
11869 2005-09-28 Zoltan Varga <vargaz@gmail.com>
11871 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
11872 there is a profiler interested in JIT events.
11874 * aot.c: Load profile files produced by the AOT profiling module, and
11875 reorder methods based on the profiling info. Add a 'method_order' table
11876 to the AOT file to make mono_aot_find_jit_info work with the reordered
11879 * mini.h: Bump AOT file version info.
11881 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
11883 * mini-arm.h: work around what looks like a gcc bug when optimizations
11886 2005-09-28 Raja R Harinath <rharinath@novell.com>
11888 * Makefile.am (AM_CFLAGS): Don't use += to append inside
11889 conditionals. Use ...
11890 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
11892 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
11894 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
11895 to determine the amount of memory to copy when passing valuetypes.
11897 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
11898 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
11900 2005-09-27 Zoltan Varga <vargaz@gmail.com>
11902 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
11903 information about aot.
11905 2005-09-27 Ben Maurer <bmaurer@ximian.com>
11907 * *.c: Replace the use of {Enter,Leave}CriticalSection with
11908 macros. This will allow a deadlock debugger to easily be plugged
11911 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
11913 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
11915 2005-09-27 Raja R Harinath <rharinath@novell.com>
11917 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
11918 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
11919 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
11920 ($(arch_built)) [CROSS_COMPILING]: Error out.
11922 2005-09-26 Zoltan Varga <vargaz@gmail.com>
11924 * aot.c: Add support for the no_special_static flag for classes.
11926 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
11928 * Reapply reverted patches.
11930 * *: Revert r50174 as well.
11932 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
11934 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
11936 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
11938 2005-09-23 Miguel de Icaza <miguel@novell.com>
11940 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
11941 part of the SIG_HANDLER_SIGNATURE.
11943 2005-09-23 Zoltan Varga <vargaz@gmail.com>
11945 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
11948 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
11949 introduced by previous patch.
11951 2005-09-21 Zoltan Varga <vargaz@gmail.com>
11953 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
11954 saved registers too.
11956 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
11957 upon the information returned by get_call_info ().
11959 * mini-x86.c (add_float): Fix stack size calculation.
11960 (mono_arch_call_opcode): Rewrite this so it works based up the
11961 information returned by get_call_info ().
11962 (mono_arch_get_this_vret_args): Ditto.
11964 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
11966 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
11967 in cinfo to determine the registers which need to be used.
11969 2005-09-20 Miguel de Icaza <miguel@novell.com>
11971 * driver.c (mono_main): Add --server and --desktop flags.
11973 2005-09-16 Zoltan Varga <vargaz@gmail.com>
11975 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
11976 registers as global registers.
11978 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
11979 longer needed with the new register allocator.
11981 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
11983 * cpu-ia64.md: Remove unused opcodes.
11985 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
11987 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
11989 * cpu-amd64.md: Remove unused opcodes.
11991 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
11992 needed with the new register allocator.
11994 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
11997 2005-09-16 Raja R Harinath <rharinath@novell.com>
11999 * Makefile.am (check-local): Don't invoke semdel-wrapper.
12001 2005-09-16 Martin Baulig <martin@ximian.com>
12003 * exceptions-amd64.c
12004 (throw_exception): Don't call mono_debugger_throw_exception() if
12005 we're a rethrow - see the FIXME in the code.
12007 2005-09-15 Geoff Norton <gnorton@customerdna.com>
12009 * mini.c (mono_init_exceptions): This only works on some architectures.
12011 2005-09-15 Zoltan Varga <vargaz@gmail.com>
12013 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
12016 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
12018 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
12019 now in mini-exceptions.c.
12021 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
12023 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
12024 now in mini-exceptions.c.
12026 2005-09-15 Zoltan Varga <vargaz@gmail.com>
12028 * exceptions-x86.c: Applied patch from Patrik Torstensson
12029 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
12031 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
12032 code into mini-exceptions.c. Add some assertions to it.
12034 2005-09-12 Zoltan Varga <vargaz@gmail.com>
12036 * aot.c (emit_section_change): Applied patch from "The Software Team"
12037 (<software@solmersa.com>). Fix as errors on windows.
12039 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
12041 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
12042 method info into the LMF.
12044 2005-09-11 Zoltan Varga <vargaz@gmail.com>
12046 * mini-ia64.c: Add proper unwind info for method epilogs.
12048 * exceptions-ia64.c: Add some code to help debugging.
12050 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
12052 * mini-exceptions.c: Fix warning.
12054 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
12056 * mini.c: Really fix build.
12058 * mini-x86.c mini-amd64.c: Fix build.
12060 2005-09-11 Zoltan Varga <vargaz@gmail.com>
12062 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
12064 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
12065 some Interlocked methods as intrinsics.
12067 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
12068 for Thread methods as well.
12070 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
12072 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
12074 * mini-ia64.c mini-x86.c mini-amd64.c
12075 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
12078 * mini.c (mono_init_exceptions): Fix build breakage.
12080 2005-09-10 Zoltan Varga <vargaz@gmail.com>
12082 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
12083 of instructions. Use the new ia64_unw_op macros for emitting unwind
12086 * mini.c (mono_init_exceptions): Initialize exception handling
12087 related trampolines at startup.
12089 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
12091 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
12093 2005-09-09 Zoltan Varga <vargaz@gmail.com>
12095 * mini.c: Handle type loading errors gracefully during compilation and
12096 throw the appropriate exception.
12098 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
12100 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
12101 for the mono binary.
12103 2005-09-09 Martin Baulig <martin@ximian.com>
12105 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
12108 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12110 * mini-arm.h: use emulation for conv.r.un for the release.
12112 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12114 * mini-arm.c, objects.cs: more fixes and tests for them.
12116 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12118 * mini-arm.c: align structures to at least 4 bytes to be able
12119 to keep our current optimized memcpy.
12121 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
12123 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
12125 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12127 * mini.c: ignore SIGPIPE.
12129 2005-09-04 Zoltan Varga <vargaz@gmail.com>
12131 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
12133 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
12135 2005-09-02 Zoltan Varga <vargaz@gmail.com>
12137 * mini.h: Add prototype for mono_allocate_stack_slots_full.
12139 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12141 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
12142 exception handling support.
12143 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
12144 patch by Brian Koropoff <briank@marakicorp.com>).
12146 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
12148 * mini.c: revert another 'optimization' which breaks when
12149 items on the eval stack need to be saved at a basic block end
12152 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12154 * jit-icalls.c: for arrays, ensure we always provide
12157 2005-08-30 Zoltan Varga <vargaz@gmail.com>
12159 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
12161 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
12163 2005-08-29 Zoltan Varga <vargaz@gmail.com>
12165 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
12166 arguments in their original register.
12168 2005-08-28 Zoltan Varga <vargaz@gmail.com>
12170 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
12173 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
12174 when ssapre is enabled.
12176 * inssel-long.brg: Fix bug in previous patch.
12178 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
12179 multiplication by a constant.
12181 2005-08-27 Zoltan Varga <vargaz@gmail.com>
12183 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
12186 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
12189 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
12191 * inssel-arm.brg: apply changes tested by Brian Koropoff
12192 <briank@marakicorp.com>.
12194 2005-08-25 Zoltan Varga <vargaz@gmail.com>
12196 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
12198 2005-08-24 Zoltan Varga <vargaz@gmail.com>
12200 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
12201 to the same register if dreg is just a base register.
12202 (print_ins): Improve printing of membase opcodes.
12204 * inssel-x86.brg: Add optimized ldind(reg) rules.
12206 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
12208 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
12210 * mini.c: when running under valgrind, set the stack bottom for
12211 the GC at the actual approximate stack for the app (fixes running
12212 mono with valgrind).
12214 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
12216 * mini.c: do no break at the first valuetype to init found
12217 (fixes bug #75791).
12219 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
12221 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
12223 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
12225 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
12227 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
12229 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
12231 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12233 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
12235 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
12238 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
12241 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
12244 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
12246 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
12248 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12250 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
12251 in the tail recursion optimization.
12253 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
12254 debug info into the assembly file.
12256 * iltests.il: Add test for filter regions.
12258 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
12259 initial stack of filter regions. Fixes #75755.
12261 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
12263 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
12264 stack requirements.
12266 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12268 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
12269 the check for an already compiled method on non-ia64 platforms.
12270 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
12273 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
12275 * inssel-x86.brg: Add some optimized call rules.
12277 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
12279 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
12282 * mini.h mini-trampolines.c: Pass the trampoline argument to
12283 mono_arch_patch_delegate_trampoline.
12285 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
12287 * mini-trampolines.c: Fix build.
12289 * mini-amd64.h: Add delegate trampolines.
12291 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
12293 * inssel-amd64.brg: Add optimized call rules.
12295 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
12297 * inssel-ia64.brg: Add optimized ldind(reg) rules.
12299 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
12301 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
12304 * mini-ia64.c: Remove LMF fixmes.
12306 * mini-ia64.h: Remove most fields from LMF.
12308 * inssel-ia64.brg (stmt): Fix unaligned access errors.
12310 * mini-trampolines.c: Add support for IA64 function descriptors.
12312 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
12313 for IA64 function descriptors.
12315 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
12317 * tramp-arm.c: patch the vtable for virtual calls. Added
12318 support code to register/unregister the LMF.
12319 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
12322 2005-08-19 Dick Porter <dick@ximian.com>
12324 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
12325 bit value if needed.
12327 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
12329 * mini.c (mini_get_method): Move handling of wrapper data here.
12331 * mini.c (mono_method_to_ir): Add support for dynamic methods.
12333 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
12336 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
12337 bblock->code does not remain empty.
12339 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
12341 * arrays.cs: Add regression test for #75832.
12343 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
12344 rules. Fixes #75832.
12346 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
12347 instruction scheduling.
12349 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
12351 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
12353 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
12355 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
12357 * mini-codegen.c: Fix VC build.
12359 * cpu-pentium.md: Increase length of atomic_exhange_i4.
12361 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12363 * mini.h: fix signature for mono_register_opcode_emulation.
12365 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
12367 * mini.c: Get rid of most of the helper_sig_... constants using
12368 mono_create_icall_signature ().
12370 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
12372 * jit-icalls.c (helper_ldstr): New helper function.
12374 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
12376 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
12377 throw, load the string using a helper call instead of creating a string object.
12379 * aot.c: Update after LDSTR changes.
12381 * mini.h: Bump AOT file version.
12383 * aot.c: Save class size info into the AOT file. Print more statistics during
12386 * mini.h: Bump AOT file version.
12388 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
12389 ordering of disasm cases. Fixes #74957.
12391 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
12393 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
12394 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
12395 the generic code needed for the ARM port.
12397 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
12399 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
12400 inssel-arm.brg: more ARM features and fixes.
12402 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
12404 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
12405 ARM port work in progress.
12407 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
12409 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
12411 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
12413 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
12415 * inssel.brg (mini_emit_memset): Add support for unaligned access.
12417 * *-ia64.*: Ongoing IA64 work.
12419 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
12421 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
12423 * TODO: Remove out-of-data todo stuff.
12425 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
12428 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
12430 * mini.h: Bump corlib version.
12432 2005-07-27 Martin Baulig <martin@ximian.com>
12435 (create_copy_ins): Added `const unsigned char *ip' argument; set
12436 `copy->cil_code' from it.
12438 2005-07-27 Martin Baulig <martin@ximian.com>
12440 * mini-exceptions.c (mono_handle_exception): Don't call
12441 mono_debugger_handle_exception() for filters.
12443 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
12445 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
12448 2005-07-26 Martin Baulig <martin@ximian.com>
12450 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
12452 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
12453 helper_compile_generic_method() if the method is actually virtual
12456 2005-07-26 Martin Baulig <martin@ximian.com>
12459 (trampoline_code): Renamed to `mono_trampoline_code' and made it
12460 public; this is now accessed directly by the debugger.
12461 (mono_generic_trampoline_code): Removed.
12464 (mono_debug_init_method): Also add interncalls and wrappers.
12466 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
12468 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
12470 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
12472 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
12474 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
12476 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
12478 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
12480 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
12481 getting TLS offsets on AMD64 too.
12483 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
12485 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
12487 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
12489 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
12490 inssel-arm.brg, mini-arm.h: ARM port work in progress.
12492 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
12494 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
12496 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
12499 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
12500 mono_sparc_is_virtual_call ().
12502 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
12504 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
12505 trampoline parameters.
12507 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
12509 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
12510 to mono_arch_get_vcall_slot_addr.
12512 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
12515 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
12517 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
12519 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
12521 2005-07-19 Martin Baulig <martin@ximian.com>
12523 * exceptions-amd64.c (throw_exception): Call
12524 mono_debugger_throw_exception() here like we're doing it on i386.
12526 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
12528 * mini-ia64.c: Add optimized TLS access support.
12530 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
12532 * mini-exceptions.c: Ongoing IA64 work.
12534 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
12536 * mini.c: Use the default optimization set when embedding. Fixes
12539 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
12541 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
12542 of trampolines to a separate file.
12544 * mini-trampolines.c: New file.
12546 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
12549 * tramp-x86.c: Reorganize the trampoline code to be similar to the
12552 * mini-codegen.c: Fix cygwin build.
12554 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
12556 * mini.c: Add some minor changes needed by the IA64 port.
12558 * *-ia64.*: Ongoing IA64 work.
12560 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
12562 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
12563 trampolines into arch-independent and arch-dependent parts.
12565 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
12567 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
12569 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
12571 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
12572 the xp-regalloc-branch for amd64.
12574 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
12575 xp-regalloc-branch for x86.
12577 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
12579 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
12581 2005-07-06 Martin Baulig <martin@ximian.com>
12584 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
12585 (mono_jit_runtime_invoke): Likewise.
12587 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
12589 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
12592 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
12593 without loading their metadata. Reorganize the file format so exception handling+
12594 debug info is kept separate from normal method info. Create MonoJitInfo
12595 structures for methods lazily.
12597 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
12599 (x86_class_init_trampoline): Patch AOT class init trampolines too.
12601 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
12603 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
12606 * mini.h: Bump AOT file version.
12608 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
12610 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12612 2005-07-01 Raja R Harinath <rharinath@novell.com>
12614 * Makefile.am (check-local): Call semdel-wrapper.
12616 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
12618 * mini-x86.c: Revert the last change as it seems to break the build..
12620 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
12622 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12624 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
12626 2005-06-27 Ben Maurer <bmaurer@ximian.com>
12628 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
12629 outside of the macro, so strange stuff doesn't happen with gcc4
12630 (NEW_AOTCONST_TOKEN): Likewise.
12632 2005-06-28 Martin Baulig <martin@ximian.com>
12634 * mini.c (mini_class_is_system_array): New static method; use this
12635 instead of `klass->parent == mono_defaults.array_class' everywhere
12636 since this also works for the new generic array class.
12638 2005-06-26 Ben Maurer <bmaurer@ximian.com>
12640 * inssel.brg: Remove warnings.
12642 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
12644 * mini-ia64.c: Ongoing IA64 work.
12646 * basic-float.cs: Add float->i1 conversion test.
12648 * iltests.il: Add conv.u4 test.
12650 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
12652 * inssel-long.brg: Fix bug caused by last change.
12654 2005-06-23 Geoff Norton <gnorton@customerdna.com>
12656 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
12657 BSDs. Allows the x86 JIT to work on OSX86
12659 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
12661 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
12664 * mini-ia64.c: Ongoing IA64 work.
12666 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
12668 * mini-ia64.c: Ongoing IA64 work.
12670 * driver.c: Clean up jit_code_hash as well when using --regression.
12672 * inssel-long.brg: Fix long->i4/u4 conversion rules.
12674 * basic-long.cs: Add tests for long->u4 conversion.
12676 2005-06-18 Ben Maurer <bmaurer@ximian.com>
12678 * mini.c: Take mono_get_domainvar out of macros. This makes sure
12679 that we do not depend on undefined C behavior: the order stuff
12680 gets evaluated within an expression. Fixes mono when compiled on
12683 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
12685 * *-ia64.*: Ongoing IA64 work.
12687 * aot.c: Lower memory usage while loading AOT methods.
12689 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
12691 * mini.h: Bump AOT file format version.
12693 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
12695 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
12697 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
12699 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
12700 not on callee assembly). Fixed some comments.
12702 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
12704 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
12705 it gets proper disassembly.
12706 (emit_method_info): Remove some dead code.
12708 * mini.c (mini_method_compile): Allways allocate the GOT var in
12709 mono_method_to_ir for emulating opcodes.
12711 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
12713 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
12714 before freeing the code memory. Fixes #74990.
12716 * objects.cs: Add regression test for #74992.
12718 * liveness.c: Extend live ranges of arguments to the beginning of the
12719 method. Fixes #74992.
12721 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
12722 so it points into the faulting instruction.
12724 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
12726 * jit-icalls.c (mono_imul_ovf): Add exception handling.
12728 * *-ia64.*: Ongoing IA64 work.
12730 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
12732 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
12734 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
12736 * *-ia64.*: Ongoing IA64 work.
12738 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
12740 * basic-long.cs: Add tests for add/sub.ovf.
12742 * basic.cs: Add tests for sub.ovf.
12744 * *-ia64.*: Ongoing IA64 work.
12746 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
12748 * *-ia64.*: Ongoing IA64 work.
12750 * basic.cs: Add conv.ovf.i4.un test.
12752 2005-06-09 Massimiliano Mantione <massi@ximian.com>
12754 * mini.c: (remove_block_if_useless) Fixed bug 75061.
12756 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12758 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
12760 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
12762 * *-ia64.*: Ongoing IA64 work.
12764 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12767 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
12769 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
12771 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
12773 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
12775 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
12777 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
12778 of a call is callable by a near call.
12780 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
12782 * mini-ia64.c: Ongoing IA64 work.
12784 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
12786 * genmdesc.c: Make the generated array non-static.
12788 * inssel-long.brg: Fix LSHR_IMM rule.
12790 * *-ia64.*: Ongoing IA64 work.
12792 * *-ia64.*: Ongoing IA64 work.
12794 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
12796 * *-ia64.*: Ongoing IA64 work.
12798 * *-ia64.*: Ongoing IA64 work.
12800 * mini-ia64.c: Ongoing IA64 work.
12802 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
12804 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
12806 * objects.cs basic-calls.cs: Move some tests to objects.cs.
12808 * objects.cs basic-long.cs: Move some tests to objects.cs.
12810 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
12812 * *-ia64.*: Ongoing IA64 work.
12814 * iltests.il: Add a new test.
12816 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
12817 newobj. Fixes #75042.
12819 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
12821 * *-ia64.*: Ongoing IA64 work.
12823 * *-ia64.*: Ongoing IA64 work.
12825 * *-ia64.*: Ongoing IA64 work.
12827 * basic.cs objects.cs: Move tests accessing static variables as well.
12829 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
12831 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
12833 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
12835 * driver.c: Always print failed tests.
12837 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
12840 * *ia64*: Ongoing IA64 work.
12842 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
12844 * basic.cs: Add tests for add.ovf. Fix warnings.
12846 2005-05-18 Miguel de Icaza <miguel@novell.com>
12848 * driver.c (mono_main): Avoid crash if no argument is passed to
12849 --break; Do not use g_error, but f_printf. And fix all other
12850 ocurrences of the same crash.
12852 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
12854 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
12855 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
12858 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
12860 * *-ia64.*: Add beginnings of IA64 backend.
12862 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
12864 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
12866 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
12869 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
12871 * mini-amd64.c: Fix a warning.
12873 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
12875 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
12876 in float_neg. Fixes #74897.
12878 * mini-amd64.c (emit_call): Fix another near call bug.
12880 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
12882 * declsec.c: Keep the appdomain information in the structure. Added a
12883 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
12884 value gets overwritten).
12885 * declsec.h: Set the default MonoArray for the the stack to 6. Added
12886 an MonoAppDomain member to MonoSecurityFrame.
12887 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
12888 used in the stack walk. Now use a MonoArray which grow (double) when
12891 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
12893 * mini.c: Re-enabled runtime cleanup, since running threads should
12894 now properly stop when exiting.
12896 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
12898 * mini-codegen.c: New file contaning the arch-independent local
12899 register allocator. Not used by any architectures yet.
12901 * mini.h linear-scan.c: Merge some changes from the
12902 mini-xp-local-regalloc branch.
12904 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
12906 * mini-amd64.c (emit_call): Fix calls to native functions when the
12907 runtime is compiled as a shared library. Fixes #74756.
12909 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
12910 on a literal field. Fixes #74751.
12912 2005-04-25 Raja R Harinath <rharinath@novell.com>
12914 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
12916 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
12918 * objects.cs: Add missing null casting test.
12920 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
12922 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
12923 in wrapper methods. Also rename 'address' variable to 'offset'.
12925 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
12927 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
12930 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
12932 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
12935 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12937 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
12939 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
12941 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
12942 just the last bytes.
12944 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
12946 * aot.c (mono_compile_assembly): Fix warning.
12948 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
12949 by the _MSC_VER stuff.
12951 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
12953 * inssel-long.brg: Fix #74588.
12955 * cpu-amd64.md: Fix #74591.
12957 * iltests.il: Add new regression tests.
12959 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
12961 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
12964 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
12966 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
12968 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
12969 from Bill Middleton <flashdict@gmail.com>.
12971 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
12973 * arrays.cs: Add new regression test. Fix warnings.
12975 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
12977 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
12978 and leakage in CKFINITE.
12980 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
12981 this to a null op since it is called on amd64 too.
12983 * exceptions-amd64.c (get_throw_trampoline): Align stack.
12985 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
12986 body since this is not used on amd64.
12988 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
12990 * mini-amd64.c: Remove obsolete fixmes.
12992 * mini.c (print_method_from_ip): Fix debugging support.
12994 2005-2-1 Massimiliano Mantione <massi@ximian.com>
12996 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
12997 so that expressions that don't give much gain are not reduced.
12998 * ssapre.h: Likewise.
13000 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
13002 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
13004 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
13006 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
13008 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
13010 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
13012 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
13014 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
13016 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
13019 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
13021 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
13023 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
13025 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
13026 MONO_ARCH_USE_SIGACTION. Fixes #74252.
13028 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
13030 * mini-x86.c: Fix up stack overflow handling.
13032 * exceptions.cs: Add new regression test.
13034 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
13036 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
13037 mono_jit_thread_attach.
13039 * mini.c (mono_method_to_ir): Verify called method is not abstract.
13041 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
13043 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
13044 avoid calling constructors using callvirt.
13046 * inssel.brg: Fix #74073.
13048 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
13050 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
13051 compilation with non-GCC compilers.
13052 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
13053 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
13055 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13057 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
13058 klass->interface_offsets (will likely fix bug#74073).
13060 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
13062 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
13064 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
13066 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
13067 to amd64_div_reg_size ().
13069 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
13071 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
13073 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
13075 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
13077 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
13079 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
13081 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
13083 * mini.c (mono_precompile_assembly): Load and precompile referenced
13084 assemblies as well. Fixes #74015.
13086 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
13088 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
13090 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
13092 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
13093 a lot of checks and (anyway) permissions cannot work until corlib is
13096 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
13098 * mini-ppc.c: fixed ABI issue on sysv/ppc.
13100 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
13102 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
13103 calls (fixes bug#72824).
13105 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13107 * mini.c: fix tail recursion elimination (see test in bug#73936).
13109 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
13111 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
13112 some fp functions in sse2 mode.
13114 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
13116 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
13118 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
13120 * mini.h mini.c: Add mono_get_jit_tls_key ().
13122 * mini-x86.c: Enable fast TLS support on windows.
13124 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
13126 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
13127 * mini.c: Check for p/invoke method when generating code. If a
13128 p/invoke method, or it's class, isn't decorated with [Suppress
13129 UnmanagedCodeSecurity] then generate code to call System.Security.
13130 UnmanagedDemand (only if the security manager is active).
13132 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
13134 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
13135 last change as it seems to cause strange crashes.
13137 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13139 * *.c: handle unsafe function pointers where needed.
13141 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
13143 * mini.c (mono_jit_free_method): Remove the fixme too.
13145 2005-03-15 Miguel de Icaza <miguel@novell.com>
13147 * mini.c: As discussed, make the code actually free the delegate
13148 thunk now, to enable the debugging of delegate problems, use
13149 MONO_DEBUG=1 when running Mono.
13151 This takes also care of parts of the leaks as seen by Joe.
13153 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
13155 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
13156 thread_tls_offset calculation.
13158 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
13160 * declsec.c: Reworked linkdemand checks for icall. The previous code
13161 was using the declaration code (untrusted) and didn't work as expected
13162 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
13165 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
13167 * iltests.il: Add new localloc test.
13169 * mini-amd64.c: Handle large stack allocations the same way as on
13170 windows if stack overflow handling is working.
13172 * mini-amd64.c: Allocate the signal stack using mmap.
13174 * mini.c (sigsegv_signal_handler): Fix reading of context.
13176 * mini-exceptions.c: Fix up stack overflow handling.
13178 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
13180 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
13182 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
13184 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
13186 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
13187 tramp_init functions as they are no longer needed.
13189 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
13191 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
13193 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
13195 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
13197 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
13200 * mini-ops.h: Add OP_LMUL_IMM.
13202 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
13203 long mul/div opcodes as intrinsic.
13205 * mini-amd64.c (emit_call): Handle the case when the callee might be
13208 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
13210 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
13213 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
13215 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
13217 2005-03-09 Ben Maurer <bmaurer@ximian.com>
13219 * mini.c (mono_codegen): Don't leak here, to help people running
13222 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
13224 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
13225 conversions in sse2 mode.
13227 * basic-float.cs: Add regression test.
13229 * mini-amd64.c: Reenable sse2.
13231 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
13233 * mini-amd64.c: Disable sse2 until some regressions are fixed.
13235 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
13237 * driver.c: Copyright text should include 2005.
13239 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
13241 * cpu-amd64.md (load_membase): Fix more max lengths.
13243 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
13245 * cpu-amd64.md (load_membase): Fix max length.
13247 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
13249 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
13251 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
13252 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
13254 * basic-float.cs: Add rounding regression test.
13256 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
13258 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
13260 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
13261 structures in registers for pinvoke wrappers.
13263 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
13265 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
13267 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
13269 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
13270 wrapper to mono_jit_thread_attach.
13272 * mini.c (mini_jit_thread_attach): New jit icall.
13274 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
13275 native->managed wrappers.
13277 * exceptions.cs: Add new regression test.
13279 * mini.c (optimize_branches): Check regions in the cbranch to throw
13280 block case as well. Fixes #73242.
13282 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13284 * mini.c: thread safety fixes.
13286 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
13288 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
13289 patching stuff, since delegates use jump trampolines so there is
13292 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
13295 * tramp-amd64.c: Fix build.
13297 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
13298 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
13300 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
13301 Rename this to mono_arch....
13302 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
13304 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
13306 * mini-amd64.c (emit_call): If both the caller and the callee is
13307 guaranteed to have 32 bit addresses, emit a normal call.
13309 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
13311 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
13312 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
13313 method_ptr inside delegates.
13315 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
13317 * mini.c (mono_jit_free_method): Free the method info even if the native code is
13318 invalidated. Fixes #73001.
13320 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
13322 * mini-x86.c: Only use stdcall for pinvokes on windows.
13324 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13326 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
13327 * mini-x86.c: remove unreliable __thread var offset detection,
13328 use the correct accessors and enable by default.
13330 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
13332 * mini.c (mono_jit_free_method): Fix memory leak.
13334 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
13336 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
13338 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
13340 * cpu-amd64.md: Fix lengths of atomic opcodes.
13342 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13344 * driver.c: try to not imply using ICU is any good.
13346 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
13348 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
13349 functions as inline ops.
13351 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
13352 some Interlocked functions as inline ops.
13354 * mini.c (move_basic_block_to_end): Fix bug in last patch.
13356 * mini.h (MonoBasicBlock): Reorganize fields a bit.
13358 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
13360 * mini.c: Add support for OP_NOT_TAKEN.
13362 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
13363 structures in registers for pinvoke wrappers.
13365 * mini-amd64.c: Fix warnings.
13367 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
13369 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
13371 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
13373 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
13374 address instead of loading the address from it.
13376 * mini-x86.c: Add support for returning small structs in registers
13377 on Win32. Fixes part of #70864.
13379 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
13381 * trace.c (get_token): Improve error checking.
13383 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
13385 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
13387 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
13389 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
13390 it can be reused for MonoClass.
13391 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
13394 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
13396 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
13397 instead of a MonoReflectionMethod. The method information wasn't used
13398 when displaying SecurityException details (but will be now).
13400 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
13402 * Makefile.am : windows build fix.
13404 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
13406 * iltests.il: Add new regression test.
13408 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
13411 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
13413 * mini.c: Moved linkdemand check into helper function check_linkdemand
13414 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
13417 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
13419 * declsec.c: Added statistics counter for different kinds of
13421 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
13422 (and commented) declaration.
13423 * mini.c: Added statistics counter for security Demand code
13424 generation. Added display of security statistics.
13426 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
13428 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
13429 Fix compilation errors under gcc-2.95.
13431 2005-02-12 Ben Maurer <bmaurer@ximian.com>
13433 * mini.c, driver.c: Use the new jit trampoline hashtable
13435 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13437 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
13439 2005-02-11 Martin Baulig <martin@ximian.com>
13441 * debug-mini.c (mono_debug_close_method): Free the line number array.
13443 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
13445 * aot.c: Break up large methods into smaller ones. Share GOT slots for
13448 * mini.h: Bump AOT file format version.
13450 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
13452 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
13454 * declsec.h: Added macros to get/set lazyly initialized security
13455 informations about assemblies. Added new enum for different type of
13456 possible LinkDemand violation. Added function to check LinkDemands.
13457 * mini.h: Added a field to MonoCompile to hold any security violation
13458 detected when JITting a method (so it can be thrown later).
13459 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
13460 and CEE_CALLVIRT. Added code to throw exception at the end of
13461 mini_method_compile (note: the exception is unhandled right now).
13463 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13465 * mini.c, jit-icalls.c: use the managed implementation of
13466 memset for initobj and memset, to avoid managed <-> unmanaged
13469 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
13471 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
13472 optimization if it would need a GOT var.
13474 * basic.cs: Add tests for constant propagation and switch statements.
13476 * ssa.c: Fix out-of-range constant propagation and switch statements.
13478 2005-02-09 <vargaz@freemail.hu>
13480 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
13482 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
13484 * cpu-amd64.md (load_membase): Fix max length of load_membase.
13486 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13488 * mini.c: update to new signature of mono_class_get_allocation_ftn().
13490 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
13492 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
13493 arithmetic operations.
13495 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
13497 * mini-ppc.c: add a workaround for broken user code that
13498 DllImports vararg functions with non-vararg signatures.
13500 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
13502 * mini.c (mono_jit_compile_method_inner): Add detection and a
13503 meaningfull error message for assemblies written in Managed C++.
13505 * tramp-amd64.c mini-amd64.h: Add support for
13506 create_trampoline_from_token ().
13508 * aot.c mini-x86.c abcremoval.c: Applied patch from
13509 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
13511 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
13513 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
13514 which takes a MonoImage/token as parameter instead of a MonoMethod.
13516 * aot.c: Use the new trampoline for initializing vtables.
13518 * aot.c: Add support for ldfld/stfld_remote wrappers.
13520 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
13521 rules for compare <MEM>, IMM.
13523 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
13525 * aot.c: Handle inherited finalizers correctly.
13527 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
13529 * inssel.brg (stmt): Add a missing _setup_... ().
13531 * aot.c: Save some parts of the class state to the AOT file and use it
13532 to recompute that state when a class is initialized.
13534 * mini.c: Install AOT hooks into the runtime.
13536 * mini.h: Bump AOT file format version.
13538 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
13541 * iltests.il: Add new test.
13543 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
13545 * mini.c: fix typo.
13547 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
13549 * mini.c: setup the statistical profiler in the thread attach
13550 callback to cope with the new single thread code.
13552 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
13554 * mini-ppc.c: ensure we have enough room for the profiler
13555 calls (fixed bug#72084).
13557 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
13559 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
13562 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13564 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
13566 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13568 * ssapre.c: Fixed an issue with down safety (this allows IronPython
13569 to succesfully execute parrotbench).
13570 * ssapre.h: Likewise.
13572 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13574 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
13575 variable for stores to method arguments (fixes a SSAPRE issue).
13577 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13579 * mini.c: handle value types in dup, fixes gen-112.cs.
13581 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
13583 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
13584 sequence for calls in dynamic methods to avoid thunks.
13586 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13588 * mini.c: correctly remove dynamic methods from the hashtable.
13590 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13592 * driver.c: Disabled SSAPRE until fix the bug that appears
13593 in IronPython's parrotbench.
13595 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
13597 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
13599 * mini.c (mono_method_to_ir): Revert the previous change.
13601 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
13602 when AOT compiling.
13604 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
13605 mono_jit_info_table_find () etc. when running under valgrind.
13607 * inssel.brg: Fix warnings.
13609 * mini-exceptions.c: Fix warnings.
13611 2005-01-31 Martin Baulig <martin@ximian.com>
13613 * driver.c (compile_all_methods_thread_main): Don't try to compile
13614 generic methods or anything which has type parameters.
13616 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
13618 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
13620 * TestDriver.cs: Add --verbose flags.
13622 * graph.c ssa.c: Fix 64 bit warnings.
13624 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
13625 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
13626 Fix 64 bit warnings.
13628 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
13629 variable not spotted by gcc.
13631 * mini-amd64.c inssel-amd64.brg: Applied patch from
13632 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
13633 X86_COMPARE_MEMBASE opcodes.
13635 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
13637 2005-01-29 Ben Maurer <bmaurer@ximian.com>
13639 * *: MonoMethod->signature might be NULL now. You *MUST* use
13640 mono_method_signature.
13642 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13644 * driver.c (compile_all_methods_thread_main): Compile the methods
13645 without invoking cctors.
13647 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13649 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
13650 * basic-calls.cs: test for the above.
13652 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13654 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
13655 MonoJitInfo changes.
13657 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
13659 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
13660 eagerly if it contains dynamic methods.
13662 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
13664 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
13665 trace, it is now computed by an icall from trace_ips.
13667 * mini-exceptions.c: Fix a warning.
13669 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
13671 * mini-exceptions.c: don't bother getting stack trace info if
13672 it's not going to be used.
13674 2005-01-27 Raja R Harinath <rharinath@novell.com>
13676 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
13679 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
13681 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
13683 * aot.c: Avoid calling mono_method_get_header () if not needed.
13685 * mini.h: Bump AOT file format version.
13687 * mini.c (mono_emit_native_call): Allocate a GOT var here.
13689 * mini.c (mono_print_tree): Print more info for calls.
13691 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
13693 * declsec.h: Remove warning by adding missing include for marshal.h
13695 2005-01-26 Martin Baulig <martin@ximian.com>
13697 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
13700 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
13702 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
13705 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
13707 * aot.c (mono_compile_assembly): Fix a warning.
13709 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
13711 * declsec.c: Look for security attributes on the original MonoMethod
13712 (and not the wrapped one). This fix permissions on icalls.
13714 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
13716 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13718 * mini.c (mono_allocate_stack_slots): Add a fixme.
13720 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13722 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13724 * inssel.brg: optimize casts of sealed types (more
13725 optimizations waiting for fixes in remoting).
13727 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
13729 * inssel.brg (stmt): Add another dummy rule.
13731 * driver.c: Fix warnings.
13733 * driver.c (mono_main): If running under valgrind, instruct glib to use
13734 the system allocation functions so valgrind can track the memory
13735 allocated by the g_... functions.
13737 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
13739 * mini-ops.h: Add OP_DUMMY_STORE opcode.
13741 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
13743 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
13744 variables in try regions.
13746 * mini.c (mini_method_compile): Don't disable optimizations on large
13747 methods when AOT compiling.
13749 * mini.c (mono_allocate_stack_slots): New arch independent method to
13750 allocate stack slots. Not yet used.
13752 2005-01-22 Ben Maurer <bmaurer@ximian.com>
13754 * debug-mini.c (mono_debug_close_method): Plug some leaks.
13756 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
13758 * mini-ppc.c: make the branch info relative as the code
13759 buffer can be reallocated.
13761 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
13763 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
13764 * driver.c: Removed the AOT/security restriction. Now initialize the
13765 security manager (in metadata) if --security is used.
13766 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
13767 rather than the pointer to declarative security, when AOT is used.
13769 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
13771 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
13772 basic blocks, reduced intrinsic exception throwing code size.
13774 2005-01-22 Miguel de Icaza <miguel@ximian.com>
13776 * driver.c (mini_usage): Reorder the usage screen.
13778 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
13780 * mini.c (mono_resolve_patch_target): Fix warning.
13782 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
13784 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
13787 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
13789 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
13790 breaks the amd64 build.
13792 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
13793 register allocation. Fixes #71454.
13795 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
13797 * arrays.cs: Add new regression test.
13799 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13801 * ssapre.c: Turned usage of snprintf to GString.
13802 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
13803 (I left it on by mistake in my previous commit).
13805 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
13807 * mini.c, cfold.c, basic-calls.cs: preserve side effects
13808 on cond branch optimization (fixes bug# 71515).
13810 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13812 * abcremoval.c: Fixed bug 71062.
13813 * abcremoval.h: Likewise.
13815 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13817 * mini.c: Added a new functionality to optimize_branches, the removal
13818 of useless basic blocks, and fixed some problem in the removal of
13819 critical edges; some utility functions added for both purposes.
13820 * ssapre.c: Added complex expression support, and fixed bug 70637.
13821 * ssapre.h: Likewise.
13822 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
13824 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
13825 * driver.c: Re-enabled SSAPRE.
13827 2005-01-19 Martin Baulig <martin@ximian.com>
13829 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
13830 the result of mono_get_method_constrained().
13832 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
13834 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
13837 2005-01-18 Geoff Norton <gnorton@customerdna.com>
13839 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
13840 be detected. Fixes #59296.
13842 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
13844 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
13845 which can happen. Fixes #71361.
13847 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
13849 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
13852 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
13854 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
13855 appdomain-unload.exe to fail.
13857 * mini.c: Fix some memory leaks.
13859 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
13861 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
13862 Fixed bug and sped up some codepaths.
13864 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
13866 * mini.c: Fix some memory leaks.
13868 * exceptions.cs basic-long.cs: Add test for checked ulong->int
13871 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
13873 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
13876 * iltests.il: Add regression test for #71320.
13878 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
13880 * mini.c (mono_codegen): Fix installation of profiler hooks.
13882 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
13884 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
13886 * mini.h, mini.c, cfold.c: optimize access to enum
13887 readonly fields, too. Eval conditional branches if possible
13888 to perform unreachable code removal in more cases.
13890 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
13892 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
13894 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
13897 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
13898 WinXP DEP. Fixes #71244.
13900 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
13902 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
13904 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
13906 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
13908 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
13910 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
13913 * mini.h: Bump AOT version.
13915 * mini.h (MonoCompile): Change exvar to a hash table.
13917 * mini.c: Allocate a separate exvar for each handler block.
13919 * mini.c: Get rid of the computation of filter_lengths, its not needed.
13921 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
13922 ex var with the pending exception and only throw if the two are equal.
13925 * exceptions.cs: Add tests for rethrow and nested catch clauses.
13927 * mini-x86.c: Fix warnings.
13929 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
13930 used by all the ports now.
13932 * aot.c: Add write-symbols and save-temps options.
13934 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
13936 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
13938 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
13940 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
13943 * tramp-s390.c: Check vtable slot belongs to the domain.
13945 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
13946 as per other platforms.
13948 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
13950 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
13952 * driver.c: we don't run the Main() code in a subthread anymore.
13954 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
13956 * mini.c: added experimental rtc support in the statistical
13957 profiler: if the user has the permission, more accurate statistics
13958 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
13959 The MONO_RTC value must be restricted to what the linux rtc allows:
13960 power of two from 64 to 8192 Hz.
13962 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
13964 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
13966 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
13968 * mini-ppc.c: better icache flush for smp.
13970 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
13972 * mini-amd64.c (emit_move_return_value): Fix memory leak.
13974 * mini-x86.c (get_call_info): Add the get_call_info () code from the
13975 amd64 port, not yet used.
13977 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
13979 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
13982 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
13984 * driver.c: Added --security option to activate the security manager.
13985 Right now this will allow code generation for declarative demands and
13986 is disabled when AOT is specified.
13987 * mini.c: Add code generation for declarative security demands.
13988 * mini.h: Add mono_use_security_manager as an extern gboolean.
13990 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
13992 * aot.c (mono_compile_assembly): Speed up compilation a bit by
13993 emitting more dense assembly code.
13995 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
13996 exception throwing stuff.
13998 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
14000 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
14003 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
14004 left in by mistake.
14006 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
14009 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
14011 * tramp-*.c: Only patch vtable slots if the object is in the current
14012 domain. Fixes appdomain-unload.exe.
14014 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
14016 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
14019 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
14021 * mini.c (reverse_branch_op): New helper function.
14023 * mini.c (optimize_branches): Run the new optimization only on
14024 platforms which support it. Also reverse all kinds of branches.
14026 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
14028 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
14031 * mini.c (optimize_branches): Reverse not-equals branches if the false
14032 bblock is a throw. This happens a lot of time with argument checking in
14035 * mini.c (mono_codegen): Add support for placing basic blocks after
14036 the function epilogue.
14038 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
14041 2005-01-05 Miguel de Icaza <miguel@ximian.com>
14043 * mini.c (setup_stat_profiler): Only set this up if the platform
14044 supports ITIMER_PROF.
14046 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
14048 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
14051 * inssel.brg: Fix a warning.
14053 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
14055 * mini.c: added support for statistical profiler
14056 (run with: --profile=default:stat).
14058 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
14060 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
14062 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
14064 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
14065 related to global registers from the amd64 port.
14067 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
14069 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
14071 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
14072 with global registers.
14073 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
14075 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
14077 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
14079 * debug-mini.c (encode_value): Fix off-by-one.
14081 * aot.c (encode_value): Likewise.
14083 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
14085 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
14087 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
14090 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
14092 * aot.c (emit_method_info): Increase size of temp buffer.
14094 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
14097 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
14099 * aot.c (emit_method_info): Fix build.
14101 * aot.c: Further rework of the AOT file format to reduce the size of
14102 the method info data.
14104 * mini.h: Bump AOT file format version.
14106 2004-12-27 Martin Baulig <martin@ximian.com>
14108 * mini.c (mini_get_method): New static method; call
14109 mono_get_method_full() and mono_get_inflated_method().
14110 (mono_method_to_ir): Use mini_get_method() instead of
14111 mono_get_method_full().
14113 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
14115 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
14117 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
14119 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
14121 * inssel-amd64.brg: Add some optimization rules.
14123 2004-12-24 Ben Maurer <bmaurer@ximian.com>
14125 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
14126 standard not GC'd stuff is fine.
14128 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
14130 * aot.c: Rework the AOT file format to get rid of most of the global
14131 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
14133 * mini.h: Bump AOT file format version.
14135 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
14137 * mini.h: Bump AOT file format version.
14139 * aot.c (mono_aot_is_got_entry): New function to determine if an
14140 address is inside a GOT.
14142 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
14144 * cpu-pentium.md: Increase the maximum size of some instructions which
14145 might involve a got access.
14147 * mini.c (get_method_from_ip): Another debug helper function.
14149 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
14150 when got var accesses are created during the decompose phase.
14152 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
14154 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
14155 argument mini_compile_method and to MonoCompile, and use this to
14156 determine whenever a given method is compiled for AOT. This allows the
14157 other methods compiled during AOT compilation to be free of AOT stuff,
14158 so the backends does not need to add special support for them by
14159 creating a fake GOT etc.
14161 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
14164 2004-12-21 Ben Maurer <bmaurer@ximian.com>
14166 * mini.c (mono_method_to_ir): It turns out that some of the
14167 x-appdomain wrappers are lax with types, so just ignore this for
14170 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
14171 at the vtable->klass. If it is non-shared code we can just use the
14174 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
14176 * mini-ppc.c: access MonoDomain from tls, too.
14178 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
14180 * declsec.c: Removed unused variable (and related warning ;-)
14182 2004-12-21 Ben Maurer <bmaurer@ximian.com>
14184 * iltests.il: New test for LDELEMA on an array of ref types.
14186 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
14187 all ldelema's on reftypes.
14188 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
14189 it was the wrong place to put it.
14191 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
14192 register to pop to make this cleaner, at the request of Paolo.
14194 2004-12-20 Ben Maurer <bmaurer@ximian.com>
14196 * mini-ops.h (OP_GETHASHCODE): New op.
14198 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
14200 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
14203 For a microbenchmark, this reduces the cost of Hashtable.get_Item
14206 * mini-x86.c (mono_arch_output_basic_block): Rather than
14214 The first is 3 bytes while the second is 1. This saves 36 kb on
14215 mscorlib, quite a big saving. When bootstraping mcs, I was able to
14216 see a small boost because of icache locality.
14218 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
14220 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
14222 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
14223 started code sharing with the generic code.
14225 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
14227 * mini-ppc.c, cpu-g4.md: added code for direct access to
14230 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
14232 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
14233 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
14236 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
14238 * declsec.c|h: Added functions to cache the declarative stack modifiers
14239 in MonoJitInfo and to create a security frame from a MonoJitInfo
14241 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
14242 created. Register internal calls for System.Security.SecurityFrame::
14243 _GetSecurityFrame and _GetSecurityStack.
14244 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
14245 the definitions for the new stack walk/callback mechanism.
14246 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
14247 first security frame for LinkDemands and InheritanceDemands) and
14248 GetSecurityStack for Demands. Both use the new mono_walk_stack code
14250 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
14251 walk initialization (lupus).
14253 2004-12-20 Ben Maurer <bmaurer@ximian.com>
14255 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
14257 (handle_loaded_temps): Do not create a temporary variable for
14258 things that we know are temps. They will never be modified.
14259 (mono_spill_call): Set MONO_INST_IS_TEMP
14260 (mono_emulate_opcode): ditto
14262 (mono_method_to_ir.CEE_DUP): ditto
14264 2004-12-19 Ben Maurer <bmaurer@ximian.com>
14266 * mini.c (type_to_eval_stack_type): Make this handle the void type
14267 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
14268 (emit_tree): use ip_in_bb to special case some common idioms
14269 Update all callers to pass in the IP.
14270 (mono_method_to_ir): Make CEE_CALL* do the above as well.
14272 This gives us a nice 2% speedup in mcs bootstrap.
14274 * mini-x86.c (peephole_pass): Peephole pass to make
14283 * mini.c (ip_in_bb): new method.
14284 (mono_method_to_ir): use this method rather than doing the hash
14287 * linear-scan.c (mono_linear_scan): When expiring actives, you
14288 don't need to keep around variables that expire on this
14289 instruction. This makes it so that:
14292 store (ebx add (ebx, 1))
14296 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
14298 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
14299 combination to avoid doing two copies. Fix up problems with previous
14302 * mini.c: Fix 64 bit warnings.
14304 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
14306 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
14308 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
14309 changes from the x86 code.
14311 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
14313 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
14315 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
14316 throwing code to reduce its size, unify the AOT and non-aot code and
14317 get rid of relocations in the AOT case.
14319 * mini-x86.h mini.c exceptions-x86.c
14320 (mono_arch_get_throw_corlib_exception): New arch specific function to
14321 raise corlib exceptions which doesn't require relocations in the
14324 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
14326 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
14328 * mini.c (mono_emit_method_call): Only allocate the got var when it is
14331 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
14334 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14336 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
14337 with add function when used from Inc/dec atomic
14338 functions. Re-enabled optimization on x86.
14339 * mini-ops.h: renamed atomic_add functions to
14340 allow _add to match the Interlocked::Add and
14341 _add_next to match Interlocked::Inc/Dec.
14343 2004-12-15 Massimiliano Mantione <massi@ximian.com>
14345 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
14346 linking of BBs to the end BB, and enabled SSAPRE also with
14347 consprop and copyprop (which was prevented by that bug).
14349 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14351 * mini-x86.c: disabling the Interlocked optimizing code.
14353 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
14355 * aot.c (load_aot_module): Move reading of got_addr after the AOT
14356 file version check.
14358 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14360 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
14361 interlocked optimization due lack of support on x86, rewrote
14362 exchange to take into account that base may be in eax.
14364 xsp works again; activated Interlocked optimizing code.
14366 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
14368 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
14370 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
14372 * mini-ops.h: Add new opcodes.
14374 * mini.h: Add new patch types. Add got_var to MonoCompile.
14376 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
14377 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
14378 make it work with all kinds of patchable code.
14380 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
14381 address of the GOT, and referencing entries in the GOT.
14383 * mini.c: Add code to load the GOT address if needed by an opcode.
14385 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
14386 independent AOT code on the x86 using an elf-style Global Offset Table.
14388 2004-12-14 Raja R Harinath <rharinath@novell.com>
14390 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
14392 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14394 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
14397 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
14399 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
14400 of Interlocked:Increment/Decrement/Add as inline ops.
14401 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
14403 2004-12-12 Geoff Norton <gnorton@customerdna.com>
14405 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
14406 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
14408 2004-12-12 Duncan Mak <duncan@ximian.com>
14410 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
14411 again. `patch_info->table_size' is no longer valid after Zoltan's
14414 2004-12-12 Martin Baulig <martin@ximian.com>
14416 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
14417 if we are the "real" method, ie. not an inlined method inside it.
14419 2004-12-11 Ben Maurer <bmaurer@ximian.com>
14421 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
14422 before we look in the special fields table. This fixes
14423 ../tests/thread-static-init.cs.
14425 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14427 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
14428 for Array get_Rank and get_Length. Fixes bug #70465.
14430 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
14432 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
14433 separate structure to reduce the size of MonoJumpInfo.
14435 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14437 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
14439 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
14441 * mini.c (mini_get_inst_for_method): Changed to allow ports
14442 to return a MonoInst instead of opcode
14443 (renamed mini_get_opcode_for_method to better reflect the new functionality)
14445 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
14446 Allow ports to return a created MonoInst instead of op-code, will enable
14448 (renamed mini_get_opcode_for_method to better reflected the functionality)
14450 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
14452 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
14454 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
14456 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
14459 2004-12-08 Martin Baulig <martin@ximian.com>
14461 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
14462 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
14464 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
14466 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
14469 * exceptions.cs: Disable some tests which depend on properties of x86 fp
14472 2004-12-08 Raja R Harinath <rharinath@novell.com>
14474 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
14476 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
14478 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
14479 bug introduced by the previous patch.
14481 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14483 * mini-ppc.c, objectc.cs: handle large structs passed by value
14484 (fixes bug #69972).
14486 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
14488 * mini-ppc.c: OP_ARGLIST implementation from
14489 Geoff Norton <gnorton@customerdna.com>.
14491 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14493 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
14494 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
14496 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14498 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
14500 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14502 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
14505 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
14507 * mini-sparc.c: Zero out localled-ed memory.
14509 * iltests.il: Add tests for zeroing out localloc-ed memory.
14511 2004-12-04 Martin Baulig <martin@ximian.com>
14513 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
14514 mono_method_get_signature_full().
14516 2004-12-03 Massimiliano Mantione <massi@ximian.com>
14518 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
14519 and some utility functions (always for SSAPRE), integrated SSAPRE.
14520 * mini.h: Likewise.
14521 * driver.c: Added ssapre option.
14522 * ssa.c: Small fix on OP_ARG handling.
14523 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
14524 * Makefile.am: Likewise.
14526 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
14528 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
14529 now in the xp code.
14531 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
14534 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14536 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
14538 * cpu-s390.md : Increase instruction length of oparglist.
14540 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
14542 2004-11-30 Martin Baulig <martin@ximian.com>
14544 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
14545 virtual generic methods. We call a special helper_compile_generic_method()
14546 icall to retrieve the method from the vtable, inflate and compile
14547 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
14549 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
14551 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
14553 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
14555 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
14557 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
14560 2004-11-27 Ben Maurer <bmaurer@ximian.com>
14562 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
14563 platforms with PIC aot.
14565 2004-11-28 Martin Baulig <martin@ximian.com>
14567 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
14570 2004-11-28 Martin Baulig <martin@ximian.com>
14572 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
14573 the result of mono_type_get_underlying_type() to check whether
14576 2004-11-26 Martin Baulig <martin@ximian.com>
14579 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
14582 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
14584 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
14585 the same way as the other arguments so they won't get clobbered.
14587 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
14588 calls through R11 since it is clobbered by the trampoline code.
14590 2004-11-26 Raja R Harinath <rharinath@novell.com>
14592 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
14593 pick up in-tree mscorlib.dll.
14595 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
14597 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
14599 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
14600 runtime data/code are now stored in a table similar to the GOT in ELF.
14601 This allows the code itself to be position independent.
14603 * aot.c: Fix loading of referenced assemblies after the lazy assembly
14606 * aot.c: Attach ELF type (object/function) directives to all global
14609 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
14611 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
14613 * mini-amd64.h: Turn on PIC AOT code.
14615 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
14616 returning the offset within an OP_AOTCONST instruction where the GOT
14617 offset needs to be added.
14619 * mini.h: Bump AOT file format version.
14621 2004-11-25 Martin Baulig <martin@ximian.com>
14623 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
14624 uninflated generic methods.
14626 2004-11-25 Martin Baulig <martin@ximian.com>
14628 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
14630 2004-11-24 Martin Baulig <martin@ximian.com>
14632 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
14633 original klass (this only applies for generic instances).
14635 2004-11-24 Martin Baulig <martin@ximian.com>
14637 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
14638 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
14641 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
14643 * mini.c (mono_method_to_ir): Disable inlining for methods containing
14644 localloc. Fixes #69678.
14646 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
14648 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
14650 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
14651 used SSE registers on pinvoke calls. Fixes #69774.
14653 2004-11-23 Geoff Norton <gnorton@customerdna.com>
14655 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
14656 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
14658 2004-11-23 Raja R Harinath <rharinath@novell.com>
14660 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
14661 Refer directly to the mcs/ tree.
14663 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14665 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
14666 Check if a trampoline for a synchronized method is required.
14668 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
14670 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
14671 with localloc if needed. Throe arithmetric exception in
14672 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
14673 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
14675 2004-11-19 Geoff Norton <gnorton@customerdna.com>
14677 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
14678 types before switching on type. Fixes #69622.
14680 2004-11-19 Raja R Harinath <rharinath@novell.com>
14682 * Makefile.am (check-local): New. Integrate into 'make check'.
14683 (MCS,RUNTIME): Define using in-tree mono and mcs.
14685 (%.exe): Use $(ILASM).
14687 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
14689 * mini-ppc.c: adjust initial prolog size (bug #69691).
14691 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
14693 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
14696 2004-11-17 Raja R Harinath <rharinath@novell.com>
14698 * Makefile.am (clean-local): Rename from 'clean'.
14700 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14702 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
14703 to mono_arch_is_int_overflow.
14704 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
14707 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
14709 * declsec.c|h: New files to support declarative security attributes.
14710 Added function to check if a method has (applicable) security.
14711 * mini.c|h: Add check for declarative security attributes in
14712 mono_method_check_inlining.
14713 * Makefile.am: Added declsec.c and declsec.h to the build.
14715 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
14717 * mini.c, mini.h: update to keep dynamic code info per-domain.
14719 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
14721 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
14722 (mini_init): Get rid of it from here too.
14724 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14726 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
14727 implemented OP_RETHROW (patch by Geoff Norton
14728 <gnorton@customerdna.com>).
14730 2004-11-10 Geoff Norton <gnorton@customerdna.com>
14732 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
14733 between appdomains. Fixes appdomain-unload on PPC.
14735 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
14737 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14738 mini-exceptions.c: handle the new wrapper types.
14739 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
14740 token value as a MonoClass* when compiling a wrapper.
14741 mono_jit_create_remoting_trampoline now takes an additional
14742 MonoRemotingTarget parameter.
14744 2004-11-10 Martin Baulig <martin@localhost>
14746 * mini.c (mono_method_to_ir): Use `generic_container->context'
14747 rather than creating a new one.
14749 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14751 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
14753 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
14755 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
14757 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
14758 the experimental aot cache stuff.
14760 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14762 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14763 mini-exceptions.c: update to exception clause structure changes.
14765 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14767 * exceptions-x86.c (throw_exception): Fix warnings.
14769 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
14772 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14774 * exceptions-sparc.c (get_throw_exception): Really fix this.
14776 2004-11-07 Ben Maurer <bmaurer@ximian.com>
14778 * tramp-*.c: we no longer support icalls without wrappers, so
14779 a bit of code can be removed here
14781 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
14783 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
14786 * cpu-sparc.md: Add op_rethrow.
14788 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
14790 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
14792 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
14793 * mini-ops.h: Add OP_RETHROW.
14795 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
14797 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
14799 2004-11-05 Geoff Norton <gnorton@customerdna.com>
14801 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
14802 Makes the output much easier to read
14804 2004-11-05 Ben Maurer <bmaurer@ximian.com>
14806 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
14807 prevents another huge leak when compiling with ssa. Secondly, the
14808 performance of doing this rather than freeing the lists is much
14809 better. GList does a lock every time you allocate a list link,
14810 so that it can use a memory pool. So, it is better to just use
14811 a memory pool of our own.
14813 * ssa.c, linear-scan.c: replace g_list_remove_link with
14814 g_list_delete. The remove one does not free the GList, so we were
14815 leaking memory. On -O=all --compile-all with corlib, this cut down
14816 3 MB of allocations.
14818 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
14820 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
14822 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
14824 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
14825 into a new function mono_create_jit_trampoline ().
14827 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
14829 * trace.c (get_spec): Allow tracing of classes without a namespace.
14831 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
14833 * mini.c: Fix pointer overwrite in mini_method_compile.
14835 2004-11-2 Geoff Norton <gnorton@customerdna.com>
14837 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
14838 The darwin ABI needs some special handling for 1 and 2 byte structs
14839 Lets use lbz/lhz instead of lwz everywhere.
14840 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
14841 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
14842 Use stb/sth for the former, and put the latter always on stack instead of in
14843 argument registers.
14845 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
14847 * trace.c (is_filenamechar): Add '_'.
14849 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14851 * mini-s390.c: Fix prolog length to allow for large trace requirements.
14853 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
14855 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
14857 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
14858 depends on libmonogc. Fixes #68805.
14860 2004-10-26 Miguel de Icaza <miguel@ximian.com>
14862 * mini.c (mono_jit_free_method): Provide extra information for
14863 this error. Currently this leaks, but will be turned into a
14864 developer option in the future.
14866 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
14868 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
14870 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
14872 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
14873 boundary. Fixes reading of PATCH_INFO_R4 and R8.
14874 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
14876 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
14878 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
14879 trampolines for AOT code.
14881 2004-10-22 <vargaz@freemail.hu>
14883 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
14884 constructed types. Fixes #68136.
14886 2004-10-21 Martin Baulig <martin@ximian.com>
14888 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
14889 if it returns true, unwind the stack to the call instruction.
14891 2004-10-21 <vargaz@freemail.hu>
14893 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
14895 * mini.h: Bump AOT version number.
14897 * objects.cs: Add another test for unbox trampolines.
14899 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
14902 2004-10-20 <vargaz@freemail.hu>
14904 * driver.c: Add SHARED to the set of optimizations tested.
14906 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
14908 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
14909 used by CEE_NEWARR.
14911 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
14913 2004-10-20 Martin Baulig <martin@ximian.com>
14915 * mini-exceptions.c (mono_handle_exception): Call
14916 mono_debugger_handle_exception() to tell the debugger about
14917 catch/finally clauses.
14919 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
14921 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
14923 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
14926 2004-10-15 Geoff Norton <gnorton@customerdna.com>
14928 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
14929 methods as their native size, fixed bug #57543, #57545.
14930 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
14931 This saves a temporary register and mullw call down into 1 (minor perf
14932 increase for cases like sum = sum * 5; This use to translate into:
14935 It now translates to
14938 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
14940 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
14943 2004-10-11 Martin Baulig <martin@ximian.com>
14945 * mini.c (mono_method_to_ir): If we're a generic method, get the
14946 MonoGenericContainer from our MonoMethodNormal and create a
14947 MonoGenericContext from it.
14949 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
14951 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
14953 * basic-long.cs: Add test for checked i8->i2 cast.
14955 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14957 * inssel-ppc.brg: added a couple of speedup rules.
14959 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
14961 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
14962 to speed up rebuilds.
14964 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14966 * mini-s390.c: Minor fix to OP_OR_IMM.
14968 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
14970 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
14971 better. Fixes appdomain-unload.exe on sparc.
14973 2004-10-02 Massimiliano Mantione <massi@ximian.com>
14975 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
14976 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
14979 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
14981 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
14983 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
14985 * mini.c: Always generate a field read/write wrapper for members
14986 of the class MarshalByRefObject since the actual instance could
14989 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
14991 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
14993 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
14995 * driver.c mini.h trace.c: Move the setting of the main assembly into
14996 a separate function called mono_trace_set_assembly () and call it after
14997 actually loading the main assembly. Fixes #66872.
14999 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
15001 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
15002 using the code manager.
15004 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
15006 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
15008 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
15010 * cpu-amd64.md: Fix bug in previous patch.
15012 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
15015 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
15017 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15018 mini-exceptions.c: updates for changed stack walk interface.
15020 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15022 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
15024 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
15026 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
15028 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
15030 * driver.c (mini_regression_list): Do not call mono_assembly_close
15031 since assemblies can't be unloaded.
15033 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
15035 * cpu-amd64.md: Fix more instruction lengths.
15037 * cpu-amd64.md: Fix lengths of some instructions.
15039 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
15041 * inssel.brg: Make the array ldelema check aot friendly.
15043 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
15045 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
15047 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
15049 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
15051 * mini-x86.c: Fix build.
15053 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
15054 mono_type_get_underlying_type () helper function to simplify code.
15056 2004-09-09 Martin Baulig <martin@ximian.com>
15058 * mini-amd64.c: Don't access `type->data.klass' directly, call
15059 mono_class_from_mono_type() instead since the type may be a
15062 2004-09-09 Martin Baulig <martin@ximian.com>
15064 * mini-amd64.c (get_call_info): Fix support for generic instances.
15065 (add_valuetype): Use mono_class_from_mono_type() to get the class
15066 since we can be a generic instance.
15068 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
15070 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
15072 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
15074 * liveness.c: reset spill costs on each scan: bug 62107
15076 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
15078 * exceptions-sparc.c (mono_arch_find_jit_info): remove
15079 unnecessary line that doesn't compile
15081 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
15083 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
15084 trampolines, make them call an error function so people can fix their
15087 2004-09-06 Martin Baulig <martin@ximian.com>
15089 * mini.c (mono_method_to_ir): When initializing locals, handle a
15090 generic instances like a valuetype if it's a valuetype and like a
15091 class if it's a class.
15093 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15095 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
15096 stack. Fixes #64674.
15098 * exceptions.cs: Add test for unwinding of call arguments.
15100 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
15102 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
15103 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
15104 set the carry/borrow flag). The sparc and s390 implementations
15105 can now use optimized versions (and simplify the code). ppc bugfixes.
15107 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15109 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
15111 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
15113 * inssel-amd64.brg: Remove leftover 32 bit rule.
15115 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
15117 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
15119 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
15120 mono_arch_find_jit_info functions into a new function. Fix a memory
15123 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
15126 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15128 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
15131 * exceptions.cs: Add array size tests.
15133 * mini.c: Allocate a separate icall wrapper for each arity of
15134 mono_array_new_va. Fixes #59509.
15136 * exceptions.cs: Add testcase for 64578.
15138 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
15140 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
15142 2004-09-02 Martin Baulig <martin@ximian.com>
15144 * mini.c (mono_method_to_ir): When initializing the locals, call
15145 handle_initobj() on the generic instance itself, not its
15148 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15150 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
15151 MonoJitInfo for dynamic methods.
15153 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
15155 * mini.c: Add support for freeing JIT data for dynamic methods.
15157 2004-09-01 Martin Baulig <martin@ximian.com>
15159 * mini-x86.c (is_regsize_var): Added support for generic
15161 (mono_arch_emit_prolog): Make this compile again, use
15162 `x86_push_imm_template (code)'.
15164 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
15166 * mini-x86.c: make all push_imm instructions that get
15167 patched always emit the long form
15169 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
15171 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
15172 in a per-domain hash.
15174 * mini-amd64.c (merge_argument_class_from_type): Handle generic
15177 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
15179 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
15182 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
15185 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
15186 Beginnings of SSE2 support.
15188 * exceptions.cs: Add more tests for checked int<->uint casts.
15190 2004-08-28 Martin Baulig <martin@ximian.com>
15192 * mini-x86.c (mono_arch_instrument_epilog): Added support for
15196 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
15197 Handle generic instances recursively.
15199 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15201 * iltests.il: test for conv.u8 on a constant
15203 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15205 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
15206 LCONV_x4 (shrun_32 (membase)).
15208 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15210 * inssel-x86.brg: c&p rules for push/setret of long
15212 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
15214 * inssel-x86.brg: c&p rules for compare (base, regvar) and
15215 compare (regvar, base)
15217 * inssel-x86.brg: more burg love
15219 * inssel.brg: more cleanup
15221 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
15223 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
15225 * basic-long.cs, basic-calls.cs: new tests for optimization.
15227 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
15229 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
15232 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
15234 * mini-amd64.c (read_tls_offset_from_method): Add another case.
15236 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
15238 * inssel.brg (mini_emit_memcpy): use
15239 NO_UNALIGNED_ACCESS to disable memcpy optimization
15241 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
15243 * mini-amd64.c: Handle generic types in various places.
15245 * mini.c (mono_method_to_ir): Handle generic types in init locals.
15247 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
15249 * mini.c (handle_box): Fix warning.
15251 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
15253 * mini-amd64.h: Enable the emit_state optimization.
15255 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
15257 * mini-amd64.c: Add some new 64 bit peephole opts.
15259 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
15261 * cpu-amd64.md: sreg1 of div instructions must be %rax.
15263 * mini-amd64.c: Register allocator fixes.
15265 * mini.c: Add an optimization to emit_state to avoid allocation of new
15266 registers on some platforms.
15268 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
15270 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
15272 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
15273 allocation. Fixes #63085.
15275 * basic-long.cs: Add new regression test.
15277 * mini-amd64.c: Register allocator improvements.
15279 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
15281 * mini-amd64.c (read_tls_offset_from_method): Add another code
15284 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
15285 instruction sequence for nullifying class init trampolines.
15287 * objects.cs: Add new regalloc test.
15289 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
15291 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
15293 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
15295 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
15298 * driver.c: Fix profiling after TLS changes.
15300 * driver.c (mono_main): Set mono_stats.enabled if needed.
15302 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
15305 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
15307 * mini-x86.c: use a 1 op rather than a 2 op tls access
15308 instruction -> faster.
15310 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
15312 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15315 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
15317 * exceptions-sparc.c (throw_exception): fix typo
15319 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
15321 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
15322 set tree->dreg correctly with tls. Allow any
15323 register to be used.
15325 * mini-x86.c (read_tls_offset_from_method): add new code
15326 generation pattern seen with GCC.
15329 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15331 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
15332 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15333 exceptions-sparc.c: fix some performance issues in exception
15334 handling and setting of the stack trace for exceptions that were
15337 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
15339 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15342 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
15345 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
15347 This patch inlines tls access, when possible.
15349 * mini.h: new arch functions for TLS intrinsics.
15350 All platforms updated with a stub.
15352 * mini.c: use the new intrinsics
15354 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
15355 arch specific intrinsic for tls variables
15357 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
15359 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
15362 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
15364 * mini.c: thread local allocation
15366 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
15368 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
15370 * Makefile.am: Link against the static version of libmonogc.
15372 * Makefile.am: Link the static versions of the convenience libraries
15373 into the mono executable.
15375 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
15377 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
15379 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
15380 on integer overflow.
15382 * mini-amd64.c: Reorganize function call code.
15384 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
15386 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15388 * inssel-x86.brg: use xor eax,eax.
15390 * basic.cs: new tests
15392 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15394 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
15395 in exception throwing code.
15397 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15399 * inssel-x86.brg: use xor esi,esi.
15401 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15403 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
15404 can trace methods compiled during mini_init () too.
15406 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
15409 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15411 * Makefile.am: static link on x86 (r=zoltan)
15413 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15415 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
15416 code since it causes some programs to fail.
15418 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
15420 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
15422 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
15424 * mini.c: ovfops_op_map - add STACK_OBJ case for
15426 * basic.cs: add test_0_pin_string as test
15429 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
15431 * Makefile.am: build C# if srcdir != builddir
15433 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15435 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
15436 fall-through blocks.
15438 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15440 * driver.c: enable loop by default again and include abcrem in -O=all.
15442 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
15444 * iltests.il: Add some localloc tests.
15446 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
15448 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
15451 * inssel-amd64.brg: Add some optimizations.
15453 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
15456 * Makefile.am: Statically link mono against libmono on AMD64.
15458 * mini-amd64.c inssel-amd64.brg: Optimizations.
15460 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
15462 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
15464 * tramp-amd64.c: Patch calling code in trampolines.
15466 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
15468 * mini-amd64.c: pinvoke struct passing fixes.
15470 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
15472 * mini-sparc.c: redo change, make mono_arch_cpu_init call
15473 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
15475 2004-08-05 Duncan Mak <duncan@ximian.com>
15477 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15480 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15482 * mini-amd64.c (emit_move_return_value): Move return value for normal
15485 2004-08-05 Martin Baulig <martin@ximian.com>
15487 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
15488 `type->type'; just modify `type' itself when dealing with enums
15489 and generic instances.
15490 (check_call_signature): Make `simple_type' a `MonoType *'.
15492 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15494 * mini.c: Use OP_PADD to add offsets to addresses.
15496 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
15498 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
15500 * mini-sparc.c (mono_arch_emit_epilog): fix check
15501 for folding last op into restore instruction
15503 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15505 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
15506 helper methods using the code manager.
15508 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
15510 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
15512 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15514 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
15515 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
15517 * mini-s390.c: fix tail processing
15519 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
15521 * mini-ppc.c: mul.ovf.un exception name fix.
15523 2004-08-03 Martin Baulig <martin@ximian.com>
15525 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
15526 instances; before jumping to `handle_enum', also modify `ptype'.
15528 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
15530 * cpu-sparc.md: fcall maximal length too small.
15532 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
15534 * mini-amd64.c mini.h: Add initial support for passing/returning
15535 structures to/from pinvoked methods.
15537 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
15539 * mini-ppc.c: reg allocator fix.
15541 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
15543 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
15545 * inssel.brg: Optimize memset on 64 bit machines.
15547 * mini-amd64.c: Fix some vararg cases.
15549 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15551 * mini-s390.c: Corrected macro in emit_float_to_int
15553 * s390-abi.cs: Tests to exercise the s390 ABI
15555 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15557 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
15560 * basic.cs: Add a test for add.ovf.un.
15562 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
15564 * mini-sparc.c: add case for OP_IDIV_UN
15566 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15568 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
15570 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
15572 2004-07-30 Ben Maurer <bmaurer@ximian.com>
15574 * basic.cs: regression tests.
15576 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
15579 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15581 * basic.cs: Add a new test.
15583 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
15584 and AOT. Various fixes and optimizations.
15586 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
15588 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15590 * mini-ppc.c: make sure temp regs are not used for global reg
15593 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
15595 * cpu-sparc.md: conv_i8 fix for 64bits
15597 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
15599 2004-07-29 Ben Maurer <bmaurer@ximian.com>
15601 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
15602 add opcode for cmp BYTE PTR [eax], imm.
15604 * inssel.brg: Make memcpy and memset takes bases.
15606 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
15608 * *-amd64.*: More AMD64 work.
15610 2004-07-28 Ben Maurer <bmaurer@ximian.com>
15612 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
15613 add a compare-not-equal opcode.
15615 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
15617 * mini.c: Use mono_init_from_assembly instead of mono_init.
15619 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
15621 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
15623 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
15625 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
15627 * inssel.brg: 64 bit fixes.
15629 * mini.h (MonoCallInst): Add some AMD64 specific data.
15631 * mini.h: Add some OP_P opcodes.
15633 2004-07-28 Ben Maurer <bmaurer@ximian.com>
15635 * basic.cs: tests for 61797 and 61740
15637 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15639 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
15640 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
15642 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
15644 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
15646 * *-amd64*.*: Ongoing AMD64 work.
15648 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
15650 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
15652 * *-amd64*: Ongoing AMD64 work.
15654 * mini-arch.h: Add AMD64 support.
15656 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
15658 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
15660 * mini-ops.h: Add new opcodes.
15662 * Makefile.am: Add AMD64 support.
15664 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
15665 rules into the inssel-long*.brg files.
15667 * *-amd64.*: Add beginnings of AMD64 backend.
15669 2004-07-22 Ben Maurer <bmaurer@ximian.com>
15671 * mini.c (print_dfn): commenting out the code that prints
15672 the cil. With -O=deadce, this makes -v -v crash.
15674 * cpu-pentium.md: make checkthis have a length of 2
15676 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
15678 * mini-sparc.h: fix implementations of __builtin
15679 functions for Sun compiler for V9.
15681 2004-07-16 Ben Maurer <bmaurer@ximain.com>
15683 * mini.c: use the new stelem.ref wrapper
15684 * exceptions.cs, arrays.cs: new stelem.ref tests
15686 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15688 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
15689 new XSP should work with these changes).
15691 2004-07-14 Ben Maurer <bmaurer@ximain.com>
15693 * inssel-{long32,x86,}.brg: trivial optimizations.
15695 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15697 * mini.c: load value when emitting box operation in
15700 2004-07-12 Ben Maurer <bmaurer@ximian.com>
15702 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
15703 is one byte shorter than cmp DWORD PTR [eax], 0.
15705 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15707 * inssel-ppc.brg: arguments on the stack are always
15708 relative to the stack pointer (spotted by Neale Ferguson).
15710 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15712 * exceptions-x86.c: delay appending the method name to the trace until
15713 after mono_jit_info_table_find is called, as this gets the real
15716 2004-07-09 Ben Maurer <bmaurer@ximian.com>
15718 * aot.c: register roots
15720 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15722 * aot.c : I could just use PLATFORM_WIN32 flag.
15724 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15726 * aot.c : Reverting the previous fix. This time it broke linux build.
15728 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15730 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
15732 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
15734 * mini.c (handle_stack_args): Remove some more debugging code.
15736 * mini.c (handle_stack_args): Remove debug output left in by mistake.
15738 * driver.c mini.h aot.c: Allow additional options to be specified with
15739 --aot and pass them to mono_compile_assembly.
15741 * aot.c: Add experimental code to AOT compile all loaded assemblies
15742 on demand and save the code into a cache in the filesystem.
15744 * aot.c: Add support for more wrapper methods.
15746 * mini.c (handle_stack_args): Handle some corner cases. Fixes
15749 * cpu-*.md: Remove removed opcodes.
15751 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
15752 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
15753 related icalls to marshal.c.
15755 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
15757 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
15759 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
15761 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
15763 2004-07-06 Ben Maurer <bmaurer@ximian.com>
15764 * liveness.c: If liveness is recomputated we need to reset the information
15765 for each variable. This way, if the liveness range has been narrowed
15766 by optimizations that happened after the last computation, we can return
15769 For example, if you have
15774 // Tons of code that does not affect i
15780 i = 0 is dead code and will be removed by SSA. However, when
15781 linear scan gets to the code, i will still appear to be live
15782 throughout the entire block. This prevents good register allocation.
15784 2004-07-06 Martin Baulig <martin@ximian.com>
15786 * debug-mini.c (mono_debug_init_method): Allow
15787 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
15788 (mono_debug_add_icall_wrapper): New method.
15790 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
15792 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
15794 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
15797 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
15799 * aot.c (mono_aot_load_method): Fix loading of debug info.
15801 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15803 * aot.c: Add logging support.
15805 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
15807 * mini.h: Add prototype for mono_print_method_from_ip.
15809 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
15811 * inssel.brg: 64 bit fixes.
15813 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
15816 * Makefile.am: Add SPARC64 support.
15818 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15820 * aot.c: Fix alignment problems on 32 bit platforms.
15822 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
15824 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
15827 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
15830 * mini.h: Bump AOT file version. Some 64 bit fixes.
15832 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
15834 * inssel-sparc.brg: Add new rule to avoid register moves.
15836 * inssel.brg: Add ldind_to_load_membase helper function.
15838 2004-06-30 Ben Maurer <bmaurer@ximian.com>
15840 * mini.c: OffsetToStringData intrinsic.
15842 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
15844 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
15846 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
15849 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
15850 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15852 * mini.c: reinstated mono_compile_get_interface_var()
15853 on x86, too, since the change breaks the Gtk# build there as well.
15855 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15857 * driver.c: remove loop from the default optimizations: it seems to
15858 interact badly with some of the other options (see bug #60613).
15860 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
15862 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
15863 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
15865 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
15867 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
15868 vararg-using methods.
15870 2004-06-21 Martin Baulig <martin@ximian.com>
15872 * mini/mini-exceptions.c
15873 (mono_handle_exception): Added `gpointer original_ip' argument.
15874 After calling mono_unhandled_exception(), call
15875 mono_debugger_unhandled_exception() and if that returns true,
15876 restore the context and return.
15878 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
15880 * mini-ppc.c: prefer the use of relative branches so
15881 they won't need to be patched in aot code (patch from Patrick Beard).
15883 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
15885 * aot.c: patch from Patrick Beard to make the output assembly
15886 more correct for the MacOSX assembler. Small tweak to
15887 generate sane images on Linux/PPC, too.
15889 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15891 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
15892 case until bug #59509 is fixed (shows up in #60332).
15894 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15896 * mini.c: make sure the needed wrappers are compiled, too, with
15899 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
15901 * driver.c: remove NPTL reference in --version output.
15903 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15905 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
15906 generate valid assembly for the Mach-O assembler.
15908 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
15910 * driver.c: don't include abcrem in the all optimization specifier
15911 since it slows down jit compilation too much for now.
15913 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
15915 * mini.c: use BIGMUL only if both operands have the same signage.
15916 * iltests.il: Test for bug 60056. (errors related to signage in
15921 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
15923 * mini.c, aot.c: memory leak fixes.
15925 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15927 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
15929 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
15931 * Makefile.am: remove the -static hack completely, it links in
15932 statically glib as well.
15934 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
15936 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
15937 * exceptions.cs: make it compile with new mcs/csc.
15939 2004-06-03 Massimiliano Mantione <massi@ximian.com>
15940 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
15941 and added relevant test case.
15943 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
15945 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
15946 regressions in gtk-sharp.
15948 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
15950 * exceptions.cs: New regression tests.
15952 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
15954 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
15956 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
15958 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
15960 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
15962 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
15964 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
15966 * mini.c (mono_jit_runtime_invoke): Init class in this
15967 method instead of trusting mono_jit_compile_method to
15968 do the work (because wrappers can be in object class)
15970 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
15972 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
15974 * basic-long.cs: New regression test.
15976 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
15978 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
15979 and div/rem checks.
15981 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
15983 * Makefile.am: fix miguel's change to build mono statically against
15984 libmono (track build dependencies).
15986 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
15988 * cfold.c: Some glib versions do not have G_MININT32.
15990 2004-05-26 Massimiliano Mantione <massi@ximian.com>
15992 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
15993 with precision of tan, atan, sin and cos, and implemented related
15994 regressions tests (fixes bug 54467, but one new problem appeared and
15997 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
15999 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
16001 * exceptions.cs: Add test for constant folding && division by zero.
16003 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
16004 since driver.c is in libmono too, so the optimization was useless.
16006 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
16007 variable to driver.c so the compiler can emit more efficient code to
16010 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16012 * Makefile.am: don't distribute generated inssel.[ch] files.
16014 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
16016 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
16017 into the default appdomain. Fixes #58707.
16019 * jit-icalls.c: Remove the broken approximation for truncl, doing
16020 no conversion is better.
16022 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
16025 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16027 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
16028 of the mcrxr instruction which is not available on some processors
16029 even if it's documented to be. Implement add and sub overflow correctly
16030 (still not complete for long unsigned). Speed up icalls a bit.
16032 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
16034 * mini.c (mono_jit_compile_method_with_opt): Make sure that
16035 we run .cctor in the current domain instead of target_domain.
16037 Fixes bug #58558, .cctor not being called in -O=shared.
16039 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16041 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
16043 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
16045 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
16046 which can be done with an imm8, do it that way.
16047 (mono_arch_output_basic_block): ditto for a jmp
16048 (mono_arch_emit_prolog): Computate maximum offset of a label.
16050 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
16052 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
16053 now tries to allocate prefered physical reg's for virtual
16054 regs. This reduces the number of emited spills/loads with
16055 20-30% on our core assemblies.
16057 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16059 * jit-icalls.c: truncl() is not needed and trunc() is
16060 the correct thing to do anyway (bug #58287).
16062 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
16064 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
16067 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16069 * driver.c: enable loop optimizations by default.
16071 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16073 * mini-x86.c: fix calc of max loop size when aligning loops start.
16075 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
16077 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
16080 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
16082 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
16085 * basic-long.cs: Add tests for add/subtract of immediates with carry.
16087 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
16089 * mini.c (inline_method): Allways inline some wrappers even if the cost
16090 is too large. Fixes #58785.
16092 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
16094 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
16096 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
16097 (crichton@gimp.org). Beginning of support for sparc/linux.
16099 * mini-sparc.c: Optimize retrieval of LMF address.
16101 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
16103 * exceptions-ppc.c: handle alloca in methods with clauses.
16105 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
16107 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
16109 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
16111 * mini.c: Delegate most of the abort signal work to
16112 mono_thread_request_interruption, which also handles Stop and Suspend
16115 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
16117 * mini.c mini.h: Allow inlining of icall wrappers if the backend
16118 supports the save/restore lmf opcodes.
16120 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
16122 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
16123 by gcc-3.4 as well.
16125 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
16127 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
16129 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
16130 methods which contain array accesses.
16132 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
16133 boundaries. Fixes #58537.
16135 * iltests.il: Add regression test for #58537.
16137 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
16139 * mini-x86.c (mono_arch_local_regalloc): Last part of
16140 fix for bug #58633 (releasing register to early).
16142 2004-05-18 Miguel de Icaza <miguel@ximian.com>
16144 * basic-long.cs: Add new regression test.
16146 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
16148 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
16149 register too early on the chain.
16151 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
16153 * mini.c (create_helper_signature): Use a helper function to reduce
16154 the code which needs to be written. Also set the calling convention of
16155 icalls on windows. Fixes #57840.
16157 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16159 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
16160 exceptions-ppc.c: added helper function to get the instruction address
16161 from a signal handler context.
16163 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
16165 * helpers.c: use g_get_tmp_dir. Invokes happyness
16168 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
16170 * helpers.c: Add new env variable to pass args to objdump.
16171 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
16173 2004-05-17 Radek Doulik <rodo@ximian.com>
16175 * Makefile.am (common_sources): added abcremoval.h so it get
16176 disted and daily mono packages on go-mono.com will build again
16178 2004-05-17 Massimiliano Mantione <massi@ximian.com>
16180 * abcremoval.c: Fixed coding style, added copyright header.
16182 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
16184 * mini.h: Added prototype for abc removal main function.
16186 * build_relations_propagation_table.pl: Added copyright header.
16188 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
16190 * basic-long.cs: reg test for complex ceq_long bug.
16192 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
16194 * mini-x86.c (mono_arch_local_regalloc): Correctly free
16195 reg in long and clob case (bug #58343). Fixed/added comments.
16197 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
16199 * mini.c (mono_jit_runtime_invoke): Follow new convention
16200 of calling the invoke method with an function pointer.
16202 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
16204 * ChangeLog: Fix author of memory leak patch.
16206 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
16208 * Makefile.am: fix make dist as well...
16211 2004-05-14 Massimiliano Mantione <massi@ximian.com>
16213 * cfold.c: Made so that conversions from pointer to int4 are no-ops
16214 on archs where pointers are 4 bytes long.
16216 * Makefile.am: Added abcremoval.c source file.
16218 * abcremoval.c: Added abcremoval.c.
16220 * abcremoval.h: Added abcremoval.h.
16222 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
16224 * inssel.brg: Enabled bounds check removal.
16226 * mini.c: Added support for abcrem optimization.
16228 * mini.h: Added abcrem optimization label.
16230 * driver.c: Added support for abcrem optimization.
16232 * propagated_relations_table.def: Added propagated_relations_table.def.
16234 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
16236 * mini.c, cfold.c: fix style.
16238 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16240 * mini.c: handle issue with the low-level implementation of
16241 some long opcodes (bug #54209).
16243 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
16245 * basic.cs: test for my new cmov stuff.
16247 2004-05-13 Patrik Torstensson
16249 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
16250 opt and added peephole documentation.
16252 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
16254 * tramp-ppc.c: rewrote the generic trampoline code.
16256 2004-05-11 Patrik Torstensson
16258 * mini-x86.c: optimize long shl/shr asm code (one less branch)
16260 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
16262 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
16264 * mini.h mini.c dominators.c: Applied patch from Derek Woo
16265 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
16267 * mini.c: Add new icalls for AsAny marshalling.
16269 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16271 * tramp-ppc.c, mini-ppc.c: more cleanups.
16273 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16275 * mini.c: no warnings.
16277 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16279 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
16281 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
16283 * mini.c: In the thread abort signal handler, if the thread is in the
16284 process of being stoped, don't throw the Abort exception, just stop the
16287 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
16289 * tramp-ppc.c: removed old code.
16291 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16293 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
16294 do some simple speed optimizations on ppc.
16296 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16298 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
16299 and large offsets in load/store.
16301 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
16303 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
16304 it causes regressions.
16306 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
16308 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
16311 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16313 * jit-icalls.c: remove warnings.
16314 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
16315 speedups for unsafe code.
16317 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
16319 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
16321 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
16323 * basic-calls.cs: Add new regression test.
16325 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
16328 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
16330 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
16333 2004-05-06 Patrik Torstensson
16335 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
16336 long reg allocation in any reg (not only eax:edx) and implemented
16337 long shl/shr ops in asm instead of helpers.
16339 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
16341 * mini-sparc.h: Fix warnings.
16343 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
16346 * mini-exceptions.c (mono_handle_exception): Call the filter in a
16347 separate statement for clarity.
16349 * mini-sparc.c: Update status.
16351 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
16353 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
16356 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16358 * inssel-ppc.brg: another small pre-release workaround:
16359 we don't do overflow detection for long_sub_un.
16361 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16363 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
16364 (also works around a weird ppc bug: 57957).
16366 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
16368 * tramp-ppc.c: trampoline fixes.
16370 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
16372 * mini-ppc.c: fixed typos.
16374 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16376 * mini-ppc.c, exceptions-ppc.c: more code saves registers
16377 at the top of the stack. Fixed typos. Use a frame registers
16378 for all the methods with exception clauses.
16380 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16382 * exceptions-ppc.c: restore fp registers.
16384 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16386 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
16387 order from the stack top (moved the stack room to save the
16388 return value for trace after the param area). Fixed corruption
16389 in restoring registers on unwind.
16391 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16393 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
16395 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16397 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
16398 and prolog/epilog for methods that use it. Allow
16399 enough param area room for varargs methods. Fix miguel's
16400 breakage in exception handling.
16402 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16404 * Makefile.am: run genmdesc only on current arch.
16406 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16408 * exceptions-x86.c:
16409 * mini-x86.h: fix the build on windows.
16411 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
16413 * 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.
16415 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
16417 * mini-exceptions.c: New file.
16419 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
16420 Move some parts of the x86 exception handling code to an
16421 arch-independent file so it can be shared with other ports.
16423 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16425 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
16427 2004-04-26 David Waite <mass@akuma.org>
16429 * driver.c: remove comma from end of enumeration declaration
16431 2004-04-26 Jackson Harper <jackson@ximian.com>
16433 * driver.c: parse config file before loading first assembly. This
16434 allows the user gac to be enabled/disabled.
16436 2004-04-23 Miguel de Icaza <miguel@ximian.com>
16438 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
16439 simpler mechanism: we do not care what is encoded initially
16440 (branch absolute or relative), we care about the code and its
16441 target. I kept the old code for reference for now.
16443 The new code tries first to determine if the jump is anywhere in
16444 the -/+32 absolute meg range, if it succeeds, it encodes using the
16445 absolute branch; If not, it tried to find something in the
16446 relative range, if not, it uses the handle_thunk code.
16448 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
16450 * exceptions-ppc.c: use the correct ip register on macosx.
16452 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
16454 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
16456 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
16458 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
16459 Raise exception on integer divide by zero by hand since the hw
16460 doesn't support it. Handle NaNs in FP compares.
16462 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
16464 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
16465 code reducing duplication between the platforms and enabled
16466 signal exception handling (on linux for now).
16468 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
16470 * exceptions-ppc.c: more macosx support.
16472 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16474 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
16476 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
16478 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
16480 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
16482 * iltests.il: more tests.
16484 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
16486 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
16489 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16491 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
16493 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
16495 * liveness.c: Mark variables as volatile in all basic blocks reachable
16496 from exception clauses.
16498 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
16500 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
16503 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
16505 * iltests.il, basic.cs: more tests for regalloc.
16507 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
16509 * iltests.il: Some tests for register allocation modifications
16512 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
16514 * exceptions.cs: Add regression test for bug #56782.
16516 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
16517 original stack trace if an exception is rethrown. Fixes #56782. Oh,
16518 the beauty of fixing the same thing in 5 different files...
16520 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
16522 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
16525 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
16527 * mini.c: Add support for STRWLPARRAY marshalling convention.
16529 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16531 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
16532 to init the context to setup the regs pointer).
16534 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16536 * exceptions-ppc.c: more exceptions work.
16538 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16540 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
16543 2004-04-13 Miguel de Icaza <miguel@ximian.com>
16545 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
16546 can use the memory directly.
16548 * cpu-pentium.md: Update documentation from a post from Zoltan.
16550 add x86_add_membase, x86_sub_membase, x86_mul_membase
16552 2004-04-13 Miguel de Icaza <miguel@ximian.com>
16554 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
16555 GENERAL_REGS they were also hardcoded for all PPC ports.
16557 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
16559 Remove hard-coded limit for floating point registers, use
16560 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
16562 Notice that in MacOS X calling conventions you can fit a lot more
16563 floating point values in registers, so I should update the PInvoke
16564 test to excercise the passing of floating point values on the
16565 stack (currently broken).
16567 2004-04-06 Miguel de Icaza <miguel@ximian.com>
16569 * tramp-ppc.c (create_trampoline_code): Added
16570 JUMP_TRAMPOLINE_SIZE.
16571 (ppc_magic_trampoline): Follow the pattern from
16572 x86_magic_trampoline: if code is set to zero, return.
16573 (create_trampoline_code): Always pass MonoMethod to the jump
16574 trampoline, before it was passing a null.
16575 (mono_arch_create_jump_trampoline): Implement the jump stub, could
16576 share the code with mono_arch_create_jit_trampoline.
16578 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
16580 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
16583 * cpu-g4.md: Added length for jmp instruction, the worst case
16584 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
16587 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
16589 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
16591 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
16593 * mini.c: Only set bblock->real_offset when adding a new bblock, and
16594 before each IL instruction.
16596 * mini.c (CEE_BOX): Fix warnings.
16598 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16600 * mini.c: removed a few unused vars and extra whitespace.
16602 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
16604 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
16606 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
16608 (OP_GETCHR): use the above
16609 (CEE_LDELEMA): use the above.
16611 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
16612 version of the generic impl.
16613 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
16614 (CEE_LDELEMA): use the above.
16616 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
16618 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
16621 * iltests.il: Added new regression test for #56317.
16623 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
16625 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
16626 under NetBSD. Fixes #56450.
16628 * liveness.c (update_gen_kill_set): Fix previous patch.
16630 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16632 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
16634 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
16636 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
16637 ldsfld and ldsflda.
16639 * inssel-sparc.brg: Add more optimizations.
16641 * mini-sparc.c: Replace multiply/divide with shifts if possible.
16643 2004-04-01 Martin Baulig <martin@ximian.com>
16645 * mini.c (handle_box): New static function; moved the
16646 implementation of CEE_BOX here.
16647 (mono_method_to_ir): Added `constrained_call' variable.
16648 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
16649 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
16650 mono_method_get_constrained() to get the method.
16652 2004-04-01 Martin Baulig <martin@ximian.com>
16654 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
16655 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
16656 (mono_method_to_ir): We don't need these macros anymore since
16657 mono_class_get_full() already takes care of it.
16659 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16661 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
16662 use @function (as doesn't accept #function here) and check the return
16663 value of system and stop if fails.
16665 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16667 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
16669 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
16671 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
16673 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
16675 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
16678 * basic-long.cs: Add test for negation of Int64.MinValue.
16680 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
16682 * mini-sparc.c: Update status.
16684 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
16686 * exceptions-sparc.c: Fix return value in filters.
16688 * inssel-sparc.brg: Fix register allocation in some rules.
16690 2004-03-28 Martin Baulig <martin@ximian.com>
16692 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
16695 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
16697 * mini-x86.c (mono_arch_patch_code): Fix warnings.
16699 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
16700 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
16701 remove unused conv_u4 opcode.
16703 * mini-x86.c: Remove valgrind workaround since it slows down things
16704 even when mono is not run under valgrind.
16706 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
16708 * mini-sparc.c: Update status.
16710 * inssel-sparc.brg: Add some optimizations.
16712 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
16713 future delay slot filling. Add support for varargs, tail calls and JMP.
16715 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
16716 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
16718 * inssel.brg: Fix register allocation in OP_ARGLIST.
16720 * inssel.brg: Fix warnings.
16722 2004-03-25 Martin Baulig <martin@ximian.com>
16724 * mini.c (inflate_generic_field): Removed.
16725 (mini_get_method): Removed, use mono_get_method_full(),
16726 (mini_get_class): Removed, use mono_class_get_full().
16727 (mono_method_to_ir): Pass our generic context to
16728 mono_field_from_token().
16730 2004-03-25 Martin Baulig <martin@ximian.com>
16732 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
16733 of a `MonoMethod *'.
16734 (mini_get_method): Take a `MonoGenericContext *' instead
16735 of a `MonoMethod *'.
16736 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
16737 a new local variable called `generic_context' which holds the
16738 current `MonoGenericContext *'; use it to lookup things.
16740 2004-03-24 Martin Baulig <martin@ximian.com>
16742 * mini.c (mini_get_class): New static method; if we're inside a
16743 generic instance, inflate the class if neccessary.
16744 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
16746 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
16748 * iltests.il: New regression test for #55976.
16750 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
16753 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
16755 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
16758 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
16760 * liveness.c: Consider SSA stores as well as loads when making vars
16763 * exceptions.cs: New regression tests for register allocation.
16765 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
16767 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
16768 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
16769 domain lock only to protect puntual access to data structures.
16770 Added access lock for sighash, jit_icall_hash_name,
16771 jit_icall_hash_addr and domain->code_mp.
16773 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
16775 * driver.c: Print SIGSEGV handling method.
16777 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
16779 * mini.c (setup_jit_tls_data): Handle case when this is called
16780 multiple times for a thread.
16782 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
16783 is different from fbxx_un. Fixes #54303. Also use constants instead of
16784 magic numbers in a lot of places.
16786 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
16788 * exceptions.cs: Fix cctor test when --regression is used.
16790 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
16792 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
16795 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16797 * inssel-ppc.brg: fixed register assignments for some rules.
16799 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
16801 * exceptions.cs: Add test for exceptions in static constructors.
16803 * mini.c (mono_jit_compile_method_with_out): Move the calling of
16804 static constructors outside the domain lock. Fixes #55720.
16806 2004-03-17 Martin Baulig <martin@ximian.com>
16808 * mini.c (get_generic_field_inst): Removed, this'll never happen.
16809 (inflate_generic_field): Take the `MonoMethod *' instead of the
16810 `MonoClass *' and added support for generic method.
16811 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
16812 have a `field->parent->gen_params', only inflate the field if it's
16813 an open constructed type.
16815 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
16817 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
16818 exception object instead of the preconstructed ones.
16820 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16822 * mini.c: reverted changed to sigsegv_signal_handler commited
16823 accidentally in the previous patch.
16825 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16828 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
16829 running --aot with an old assembly.
16831 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
16833 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
16836 * mini-sparc.c: Add support for v9 branches with prediction.
16838 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
16840 * mini.c (mini_init): #warning is GNUC only
16842 * mini-sparc.h: implement __builtin_frame_address
16843 and __builtin_return_address for Sun C compiler
16845 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
16847 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
16849 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
16851 * basic-calls.cs: Add test for unaligned byref long argument passing.
16853 * mini-ops.h: Add sparcv9 compare and branch instructions.
16855 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
16856 v9 instructions if we have a v9 cpu.
16858 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
16859 registers for global allocation.
16861 * exceptions-sparc.c: Fixes.
16863 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
16865 * liveness.c (mono_analyze_liveness): Optimized version.
16867 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
16869 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
16872 * basic-float.cs basic-calls.cs: New regression tests.
16874 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
16876 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
16877 sigaltstack implementation.
16879 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
16881 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
16882 stuff if SIGSEGV_ON_ALTSTACK is not defined.
16884 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
16886 * mini.c: Fix warnings.
16888 * mini.c (mono_resolve_patch_target): New function which contains the
16889 arch independent part of the patching process.
16891 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
16892 patching code to a separate function.
16894 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
16896 * mini.c (add_signal_handler): ifdef out on Windows
16898 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
16900 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
16901 cpu-sparc.md: Add exception handling support + other fixes.
16903 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
16904 typed GC detection in --version.
16906 * basic.cs exceptions.cs: New regression tests.
16908 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
16909 the arch specific code can store data during a compilation.
16911 * mini-ops.h: Add OP_SETFRET.
16913 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
16914 function, register a separate icall for each arity, so the icalls can
16917 * mini.c (mono_print_tree): Print negative offsets in a more readable
16920 * mini.c: Make signal handling work on sparc.
16922 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
16924 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
16926 * jit-icalls.c: Emulate truncl by aintl on solaris.
16928 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
16930 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
16932 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
16934 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
16936 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
16937 a MarshalByRef type, inline a method that performs the check, taking into
16938 account that the object can be a proxy. Also implemented tow new opcodes:
16939 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16940 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
16941 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16943 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16945 * mini-ppc.c: if a relative branch displacement is too big
16946 but it points to and area reachable with an absolute branch,
16949 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16951 * mini.c: optimize small copies in cpblk.
16953 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
16955 * basic-calls.cs basic-float.cs: New regression tests.
16957 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
16958 negative offsets from %fp. Implement localloc. Fix local register
16959 allocation. Fix the case when the this argument needs to be saved to
16960 the stack. Implement some missing opcodes.
16962 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
16964 * mini.c (mini_method_compile): Reenable global regalloc in methods
16965 with exception handlers.
16967 * linear-scan.c (mono_varlist_sort): Fix warning.
16969 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
16971 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
16974 * liveness.c: Make all variables uses in exception clauses volatile, to
16975 prevent them from being allocated to registers. Fixes #42136.
16977 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
16979 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
16980 causes regressions.
16982 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
16983 argument to mono_arch_regalloc_cost.
16985 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
16988 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
16990 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
16991 Make the cost of allocating a variable to a register arch dependent.
16993 * basic-calls.cs: Fix compilation of tests.
16995 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
16996 helper function to cut back on the number of #ifdefs needed.
16998 * mini-ppc.c: Fix compilation.
17000 * basic-calls.cs: New regression tests.
17002 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
17004 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
17005 of l0 since that is callee saved.
17007 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
17010 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
17011 of delay instruction.
17013 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
17015 * mini.h (MonoCallInst): Add 'virtual' flag.
17017 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
17019 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
17021 * *.cs: New regression tests.
17023 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
17026 * mini.c (mono_runtime_install_handlers): Fix build.
17028 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
17029 'signal_stack_size' members.
17031 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
17032 alternate signal stack.
17034 * exceptions-x86.c: Add stack overflow handling.
17036 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
17037 functions to arch independent code.
17039 * mini.c (mono_print_tree): Print more detailed info for load_membase
17042 2004-02-23 Martin Baulig <martin@ximian.com>
17044 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
17046 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
17048 * mini-x86.c: fixed reg allocation for div/rem.
17050 2004-02-22 Miguel de Icaza <miguel@ximian.com>
17052 * driver.c (mono_main): Report some configuratio options on --version.
17054 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
17056 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
17057 low in the address space. Correctly flush memory in thunks where we
17058 output native code.
17060 2004-02-20 Martin Baulig <martin@ximian.com>
17062 * mini.c (mini_get_method): New static method; inflate all generic
17063 methods and methods in open generic instances.
17064 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
17065 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
17067 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
17069 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
17071 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
17073 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
17075 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
17077 * mini-sparc.c (flushi mono_arch_output_basic_block): make
17078 it compile using Sun's compiler.
17080 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
17082 * 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.
17084 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
17086 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17088 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
17090 * mini-ppc.c: handle calls outside of the allowed range with thunks
17091 allocated using the code manager.
17092 * tramp-ppc.c: use the code manager to hold generated native code.
17093 Fixed the magic trampoline to just patch vtable entries.
17095 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
17097 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
17100 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
17102 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
17105 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
17106 if we have a working __thread implementation.
17108 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
17109 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
17111 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
17113 * mini-x86.c: Fix compilation under gcc 2.
17115 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
17117 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
17118 contains a call to the wrapped function.
17120 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
17121 OP_<CALL>_IMM opcodes, and use them under X86.
17123 * mini.c (mono_jit_find_compiled_method): Fix warning.
17125 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
17127 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
17129 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
17130 functionality to mini.c.
17132 * mini.c (mono_create_jump_trampoline): New function to create a jump
17133 trampoline. Return a compiled method instead of a trampoline if it
17134 exists. Add a cache for jump trampolines.
17136 * mini.c (mono_jit_find_compiled_method): New function to return a
17137 compiled method if it exists.
17139 * mini-x86.c: Call mono_create_jump_trampoline instead of
17140 mono_arch_create_jit_trampoline.
17142 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
17143 a jump trampoline. Fixes #52092.
17145 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
17147 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
17148 which is not up-to-date. Add check_corlib_version () instead.
17150 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
17153 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
17154 since newer valgrind versions do not need it.
17156 * mini.c (mono_jit_compile_method_with_opt): New helper function to
17157 compile a method with a given set of optimizations.
17159 * mini.c: Compile icall wrappers on-demand instead of at startup.
17161 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
17162 wrapper for an icall.
17164 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
17166 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
17169 * iltests.il: Add test for non-empty stack before switch instruction.
17171 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
17173 * mini.c: Add support for new stringbuilder marshalling conventions.
17175 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
17177 2004-02-01 Martin Baulig <martin@ximian.com>
17179 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
17180 in `ginst->mtype_argv'.
17182 2004-01-31 Miguel de Icaza <miguel@ximian.com>
17184 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
17185 facilitate grepping.
17187 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
17189 * mini.c: fixed buglet in initobj generic implementation for references.
17191 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
17193 * Makefile.am: make the version script conditional.
17194 * jit-icalls.c: handle missing truncl().
17196 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
17198 * exceptions.cs: Add more tests for double->int conversion.
17200 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
17201 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
17203 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
17205 * driver.c: make --verbose --version emit an error
17206 if the loaded corlib doesn't match the runtime version.
17208 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17210 * mini-ppc.h: export ppc_patch().
17211 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
17212 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
17213 on par or better than on MacOSX.
17215 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
17217 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
17218 mono_lookup_pinvoke_call.
17220 * mini-x86.c: Under windows, the default pinvoke calling convention is
17221 stdcall. Fixes #52834.
17223 * mini.c (optimize_branches): Add an upper bound to the number of
17224 iterations to prevent infinite loops on strange loops. Fixes #53003.
17226 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
17228 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
17229 and ISINST. Fixes #52093.
17231 * objects.cs (test_0_vector_array_cast): New tests.
17233 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
17235 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
17236 checking in Array.Set ().
17238 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
17241 * object.cs (test_0_multi_array_cast): New regression test.
17243 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
17245 * exceptions-ppc.c: fix build on Linux/PPC.
17247 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
17249 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
17250 running under valgrind.
17251 (x86_magic_trampoline): Fix build bustage.
17253 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
17254 negative values as well. This is needed for the encoding of the line number
17255 info, since sometimes the line numbers are not in increasing order.
17257 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
17259 * cpu-pentium.md (localloc): Increase the size of the localloc
17260 instruction since it is a loop under Win32.
17262 * debug-mini.c (record_line_number): Get rid of unneccesary memory
17265 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
17267 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
17268 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
17269 Max Horn (max@quendi.de). Fix file names in comments.
17271 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
17273 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
17274 avoid stack overflow.
17275 (replace_usage): Avoid uninitialized variable warnings.
17277 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
17278 and taking the address of valuetype variables.
17280 2004-01-03 Patrik Torstensson
17282 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
17283 for other purposes than FP later on.
17285 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
17287 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
17290 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17292 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
17294 2003-12-30 Patrik Torstensson <p@rxc.se>
17296 * mini-x86.h: Decreased number of availiable fp regs.
17297 Solves corner cases with FP spilling.
17299 2003-12-23 Patrik Torstensson <p@rxc.se>
17301 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
17302 for floating point stack tracking / spilling on x86.
17305 * basic-float.cs: added float mul overflow test.
17307 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
17309 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
17311 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17313 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
17314 supports for cond branches that overflow the immediate
17315 overflow offset. mcs can compile simple programs.
17317 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17319 * exceptions-ppc.c: exception handling support wip:
17320 finally handlers get run on exception.
17322 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
17324 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
17327 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17329 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
17330 initial support for stack walking and unwinding.
17332 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
17334 * driver.c (mono_main): Make corlib-out-of-sync message more
17335 descriptive. Also remove verify_corlib call.
17337 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17339 * mini.c: make CEE_NEWARR calls and other emulated opcodes
17340 not overlap with other call's arguments, too.
17342 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
17344 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
17345 move to arch-specific code the choice of arch-specific
17346 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
17347 * mini.c: ensure emulation calls will not interleave
17350 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
17352 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
17353 the magic trampoline stack frame is dropped before executing
17356 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17358 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
17359 and integer to fp conversions. Added support for overflowing
17360 arguments on the stack. Reserve a couple more registers as temps.
17361 Added support for aot compilation (as output still needs to be
17364 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17366 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
17367 Don't overwrite return register in some corner cases.
17369 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
17371 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
17372 static constructors when AOT compiling.
17374 * driver.c (mono_main): Call mono_check_corlib_version.
17376 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17378 * cpu-g4.md, basic.cs: fixed div target register.
17380 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
17382 * mini-ppc.c, basic.cs: shl_imm fix with test.
17384 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17386 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
17387 structures by value. Misc fixes.
17388 * objects.cs: more tests.
17390 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
17392 * mini-ppc.c: lconv.ovf.i implemented.
17394 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17397 (mini_init): don't error out if someone already called g_thread_init.
17399 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17401 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
17402 to be any type per the spec. Fix abnormal memory usage when
17403 the same object is repeatedly thrown.
17405 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
17407 * mini.c: check for overruns in IL code.
17409 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
17411 * TODO: Add/remove some todo entries.
17413 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
17415 * driver.c (mono_main): Call mono_verify_corlib.
17417 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
17419 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
17420 This has been moved to mini.c
17421 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
17422 type being casted is marshalbyref it could be a proxy, so instead of
17423 emitting the type check code, emit a call to a runtime method that will
17424 perform the check by calling CanCastTo if needed.
17426 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
17428 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
17429 methods with large stack frames under Win32.
17431 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
17433 * Makefile.am: Distribute regression tests.
17435 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
17436 at the end instead of inserting each variable into the sorted list.
17438 * linear-scan.c (mono_varlist_sort): New helper function.
17440 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17442 * mini.c: ensure arguments and locals are within bounds.
17444 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17446 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
17449 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
17451 * mini.c (mono_cprop_copy_values): Fix crash.
17453 * aot.c: Set verbosity back to 0.
17455 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17457 * regalloc.c: complete memory leak fix by Laurent Morichetti
17460 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
17462 * driver.c (main_thread_handler): Revert the previous patch.
17464 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
17467 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
17468 memory from the memory pool.
17470 * driver.c (main_thread_handler): Turn on all optimizations when
17473 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
17474 an array for better performance.
17476 * regalloc.c (mono_regstate_assign): Fix memory leak.
17478 * debug-mini.c (mono_debug_serialize_debug_info): New function to
17479 serialize the debug info.
17481 * debug-mini.c (mono_debug_add_aot_method): New function to load the
17482 debug info from the serialized representation.
17484 * aot.c: Save debug info into the generated file and load it when
17487 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17489 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17491 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
17492 More FP-related fixes.
17494 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17496 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
17497 and register allocation buglet. Hello world now runs.
17499 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17501 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
17502 * tramp-ppc.c: fixed class init trampoline.
17503 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
17505 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17507 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
17508 mini.c: more ppc changes/fixes.
17510 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
17512 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
17513 Also optimize the case when the arguments are the same in the caller
17516 * iltests.il: Add tests for tail calls with valuetype arguments.
17518 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17520 * mini-ppc.c: fixes for struct return type.
17522 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
17524 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17525 mono_spillvar_offset() to arch-specific code.
17527 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17529 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
17531 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
17533 * exceptions-x86.c: Fix stack space leaks.
17535 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
17536 registers from the lmf if the method has save_lmf set.
17538 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
17540 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
17541 of icall wrappers into InvokeInDomain, since these are now per-domain.
17543 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
17545 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
17546 make some opcode emulation and intrinsic ops enabled/disabled
17547 according to the architecture. More fixes.
17549 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17551 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
17553 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17555 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17556 arch-specific handling for 'this' and struct return type to
17557 arch-specific code.
17559 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17561 * aot.c: prevent divide by zero error when reporting (it happened with
17562 Accessibility.dll).
17564 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
17566 * mini.h (inst_switch): Remove unused macro.
17568 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17571 (load_aot_module): free 'info->methods' and 'info' properly. No more
17572 "free(): invalid pointer blah" messages when you have an old aot
17575 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
17577 * jit-icalls.c, mini.c: Added support for context static fields.
17579 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
17581 * mini.c (mono_method_blittable): Methods which set LastError are not
17582 blittable either. Fixes #51108.
17584 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17586 * mini.c: flush icache.
17587 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
17589 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
17591 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
17593 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
17595 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
17598 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
17601 * inssel.brg (CEE_MKREFANY): Fix AOT case.
17603 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
17605 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
17606 instruction when the result is discarded.
17608 * iltests.il (test_0_div_regalloc): New regression test.
17610 * arrays.cs: Fix compilation error.
17612 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
17614 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
17615 float rules to inssel-x86.brg: sane architectures with FP registers
17616 don't need to implement these rules.
17618 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17620 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
17622 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17624 * mini.h, inssel-long32.brg: fixed endianess issues in int64
17625 implementation of 32 bit systems.
17627 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17629 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
17630 (Jeroen Zwartepoorte).
17632 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
17634 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
17635 the caller and the callee matches.
17637 * mini.c (mono_method_to_ir): Add comment.
17639 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
17640 signbit is missing on some platforms.
17642 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
17644 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
17646 * mini.c (setup_jit_tls_data): Call the new function.
17648 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
17650 * mini-x86.c: Add experimental support for fast access to the lmf
17651 structure under NPTL/Linux 2.6.x.
17653 2003-11-06 Martin Baulig <martin@ximian.com>
17655 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
17656 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
17659 2003-11-02 Martin Baulig <martin@ximian.com>
17661 * mini.c (inflate_generic_field): New static method.
17662 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
17663 generic instance and the field is declared in a generic type, call
17664 inflate_generic_field() to inflate it. Fixes gen-28.cs.
17666 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
17668 * mini.h mini.c (mono_method_same_domain): New function to return
17669 whenever the caller and the callee are in the same domain.
17671 * tramp-x86.c (x86_magic_trampoline): Use the new function.
17673 2003-10-30 Martin Baulig <martin@ximian.com>
17675 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
17676 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
17678 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
17679 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
17681 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
17683 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
17686 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
17687 object here, so it is in the correct appdomain etc.
17689 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
17691 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
17693 (mono_method_to_ir): Avoid freeing the type created returned from
17694 mono_type_create_from_typespec, since it is put into an internal cache
17695 by the function. Fixes pointer.exe.
17697 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
17698 trampolines for icalls and pinvokes as well. Fixes #33569.
17700 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
17702 * mini.c: Update after appdomain changes.
17704 * mini.c (mono_jit_compile_method_inner): Allways compile native
17705 method wrappers in the root domain, since there can only be one
17706 instance of them, whose address is stored in method->info.
17708 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
17710 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
17711 environment variable. Instead detect automatically whenever running
17712 under valgrind using the magic macro RUNNING_ON_VALGRIND from
17715 2003-10-16 Miguel de Icaza <miguel@ximian.com>
17717 * trace.c, trace.h: New files that implement the new trace option
17720 * driver.c: Document new --trace options.
17722 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
17725 - if (mono_jit_trace_calls)
17726 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
17728 * mini.h: prototypes.
17730 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
17732 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
17734 * mini.c inssel.brg: Implement typedefbyref opcodes.
17736 * mini.c (mono_jit_compile_method): Remove unused local variable.
17738 * mini.c (mono_jit_compile_method_inner): Ditto.
17740 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
17742 * tramp-x86.c (x86_class_init_trampoline): Fix build.
17744 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
17746 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
17748 * mini.c (mono_no_aot): Remove unused global variable.
17750 * mini.c: Thread safety fixes.
17752 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
17754 * mini.c (mono_create_class_init_trampoline): Add a lock around
17755 class_init_hash_addr.
17757 * arrays.cs (test_0_newarr_emulation): Add new regression test for
17760 * mini.c: Decompose the NEWARR instruction before decomposing its
17761 arguments. Fixes #30073.
17763 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
17765 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
17768 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
17770 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
17772 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
17774 * driver.c: Add support for compiling icall wrappers to --compile.
17776 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
17778 * inssel.brg: The empty value in class->interface_offsets is -1, not
17781 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
17783 * objects.cs: New test for 'is' operator on an array of interfaces.
17785 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17787 * tramp-ppc.c: update trampoline code to support jumps
17788 and class initialization.
17790 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
17792 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
17794 * inssel.brg (OP_UNBOXCAST): Fix #46027.
17796 * inssel.brg (OP_UNBOX): Remove unused rule.
17798 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
17799 region instead of one for each method. Fixes #47813.
17801 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
17803 * exceptions.cs (test_0_nested_finally): New regression test for
17804 nested exception handlers.
17806 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
17808 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
17810 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
17813 * mini.c (mono_method_check_inlining): Make the inlining limit
17814 configurable by an environment variable.
17816 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
17818 * mini.h: Bump AOT file version.
17820 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
17821 token, store the image along with the token, since the token might not
17822 refer to the same image as the method containing the relocation,
17823 because of inlining.
17825 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
17827 * mini.c (mono_precompile_assemblies): New function to compile
17828 all methods in all loaded assemblies.
17830 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
17832 * regalloc.h regalloc.c (MonoRegState): Change the type of
17833 iassign and fassign to int*, since they can contain large negative
17834 values if the register is spilled. Also added some comments. Fixes
17837 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
17838 under Win32. Fixes #42964.
17840 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
17842 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
17844 * aot.c: Added support for AOT compiling methods which contain calls
17845 to wrappers. Currently, only remoting-invoke-with-check wrappers are
17848 * driver.c (compile_all_methods): Run the compilation in a thread
17849 managed by mono. Fixes #44023.
17851 * mini.c (mono_codegen): Print full method name in verbose output.
17853 * mini-x86.c (mono_arch_patch_code): Fix warning.
17855 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
17856 jumps, since the method we are jumping to might be domain-specific.
17858 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
17860 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17862 * inssel.brg: string chars are unsigned.
17864 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
17866 * TODO: New todo item.
17868 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
17869 which calls mono_runtime_class_init and patches the call site to
17870 avoid further calls.
17871 (mono_arch_create_class_init_trampoline): New arch specific function
17872 to create a class init trampoline.
17873 (create_trampoline_code): Generalized so it can create
17874 class init trampolines as well.
17876 * mini.c (helper_sig_class_init_trampoline): New helper variable.
17877 (mono_create_class_init_trampoline): New function to create and cache
17878 class init trampolines.
17879 (mono_find_class_init_trampoline_by_addr): New function to lookup the
17880 vtable given the address of a class init trampoline. Used by the
17882 (mono_codegen): Generate a call to a trampoline instead of
17883 mono_runtime_class_init in LDSFLD[A].
17884 (mono_codegen): Add relocations for the new trampoline.
17886 * mini.h mini-x86.c aot.c: Added a new relocation type:
17887 MONO_PATCH_INFO_CLASS_INIT.
17889 * mini.h: Bump AOT version number.
17891 * aot.c: Create a copy of the loaded code instead of using the original
17892 so methods which call each other will be close in memory, improving
17895 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
17896 patch since it breaks the regression tests.
17898 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
17899 for the register saving instruction sequence since the
17900 frame_state_for function in glibc 2.3.2 don't seem to detect it.
17902 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
17904 * TODO: Fix todo item && remove another.
17906 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
17908 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
17911 * aot.c: Moved the check for MONO_LASTAOT into the initialization
17912 function of the module.
17914 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
17915 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
17916 --no-aot command line option.
17918 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
17920 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
17921 by Bernie Solomon (bernard@ugsolutions.com).
17923 * inssel.brg: Refactor the interface offset table related code into
17924 its separate functions and add support for the AOT case.
17926 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
17928 * aot.c (mono_aot_get_method_inner): Fix memory leak.
17930 * aot.c: Added mono_aot_verbose variable and made all debugging
17931 output depend on the value of this variable.
17933 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
17934 method_label and info_label.
17936 * mini.h mini-x86.c aot.c: Added a new relocation type
17937 MONO_PATCH_INFO_IID for klass->interface_id.
17939 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
17940 the MonoJitInfo structure.
17942 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
17943 a non-root appdomain in shared mode.
17945 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17947 * aot.c: make aot loader less verbose. Remove free of unused variable.
17949 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
17951 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
17953 * .cvsignore: Added *.dll.
17955 * mini.c (mono_print_tree_nl): New function callable while debugging.
17957 * mini.c (mono_print_code): Export this.
17959 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
17962 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
17964 * mini.h (MonoCompile): Added 'jit_info' field.
17966 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
17967 the cfg structure, since it is needed by the AOT compiler.
17969 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17971 * aot.c: A major rewrite. Changes include:
17972 - save exception tables for methods which have them.
17973 - cache failed lookups in aot_get_method () to avoid the (slow) calls
17974 to g_module_symbol.
17975 - reworked the file format so it is now much smaller and needs
17976 fewer relocation entries.
17978 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
17980 * aot.c (load_aot_module): Fix build bustage on platforms without
17983 2003-09-04 Martin Baulig <martin@ximian.com>
17985 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
17987 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
17989 * TODO: Some new optimization ideas.
17991 * aot.c: Move AOT module loading logic here from mono_assembly_open.
17993 * aot.c: Save the optimization flags used to compile the code into
17996 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
17997 support emitting domain specific code.
17999 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
18000 no longer domain neutral. It can be made domain neutral by compiling
18001 with --optimize=shared.
18003 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
18004 between appdomains.
18006 * driver.c mini.h mini.c: New --no-aot debugging option which disables
18007 loading of AOT code.
18009 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
18011 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
18012 if there is no domain neutrality information.
18014 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
18016 * aot.c (mono_compile_assembly): Emit a symbol containing the file
18017 format version into the generated library.
18019 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
18020 callee method into the caller since one of them could be shared.
18022 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
18023 system exceptions from AOT code now works.
18025 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
18026 method if it is domain neutral and the callee is not.
18028 * graph.c (cfg_emit_one_loop_level): Fix warning.
18030 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
18032 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
18035 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
18037 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
18038 is needed by code which is executed before mono_runtime_init ().
18039 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
18041 * mini.c (mono_thread_abort): Fix warning.
18042 (mono_jit_compile_method): Call static constructor in the AOT case too.
18044 * aot.c (mono_compile_assembly): Fix warning.
18046 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18048 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
18050 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
18052 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
18054 * cpu-pentium.md: Fix the length of call opcodes so they include the
18055 ESP restoring instruction. Fixes #47968.
18057 2003-08-28 Martin Baulig <martin@ximian.com>
18059 * mini-x86.c (mono_arch_call_opcode): Added support for
18060 MONO_TYPE_GENERICINST.
18062 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
18064 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
18066 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
18067 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
18069 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
18072 2003-08-26 Martin Baulig <martin@ximian.com>
18074 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
18075 when reporting an error, set this to the actual error location.
18076 (mono_method_to_ir): Report the correct error location if
18077 get_basic_blocks() returned an error.
18079 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
18081 * mini.c (mono_type_blittable): OBJECT is not blittable.
18082 (mono_method_blittable): Methods which have marshalling descriptors
18083 are not blittable either. Fixes #47842.
18085 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
18087 * driver.c mini.c: Use an environment variable instead of a global
18088 variable. Also fix the build.
18090 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
18091 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
18094 * driver.c mini.c: Added --with-valgrind option to turn off some
18095 code which prevents mono from running under valgrind.
18097 * mini.c (mono_emit_call_args): Fixed warning.
18099 * mini.c (mono_emulate_opcode): Fixed warning.
18101 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18103 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
18104 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
18105 regalloc.c, regalloc.h: specify available registers in arch-specific
18106 code and support floats in the regallocator (patch by Laurent Morichetti
18109 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18111 * mini.c: mono_thread_current() can be called only after
18112 mono_runtime_init(): rearrange code to not call it early on.
18114 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18116 * mini.c: allocate jump tables in the code mempools.
18118 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18120 * mini.c, mini.h: make sure per-thread data allocated by the jit is
18123 2003-08-10 Miguel de Icaza <miguel@ximian.com>
18125 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
18126 12 to 16. This fixes bug #47453.
18129 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18131 * mini-ppc.c: fixed indexed load and unsigned compares.
18133 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
18135 * mini.c: reenabled installation of handler for
18136 thread abort signal.
18138 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18140 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
18141 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
18142 until it's fixed and actually useful.
18144 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18146 * inssel-long32.brg: couple more opcodes implemented.
18148 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18150 * mini-sparc.c: Even more opcodes implemeted.
18152 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
18154 * mini-sparc.c: More opcodes implemented.
18156 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
18158 * mini-sparc.c: More opcodes implemented.
18160 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18162 * inssel-sparc.brg: Add some needed rules. Direct
18164 * Makefile.am: Use inssel-sparc.brg
18165 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
18166 an assert happy for now.
18168 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
18170 * mini-sparc.c: Fixed compile errors.
18171 * exceptions-sparc.c: Same. We now produce a mono binary
18172 on sparc-linux. Yea.
18174 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
18176 * mini-sparc.c: Renamed registers. Also some macro cleanups.
18177 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
18178 They compile, but do not work.
18180 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18182 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
18183 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
18184 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
18187 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18189 * mini.c: more opcodes implemented and better support for generics.
18191 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18193 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
18194 * mini.c, mini.h: first cut at generics support: some new instructions
18195 added and changed the behaviour of some of the existing ones.
18197 2003-07-21 Miguel de Icaza <miguel@ximian.com>
18199 * mini.c: Removed definition of metadata_shared mutex here.
18201 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18203 * mini-x86.c: make vararg calls work for instance methods.
18205 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18207 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
18208 returns the arguments in a separte list, now.
18210 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18212 * aot.c, mini.c: updates for array type representation changes.
18214 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
18216 * mini.c: register function to perform jit shutdown.
18218 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18220 * mini.c: use a faster allocator if possible.
18222 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18224 * aot.c: some cleanups and portability changes.
18226 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18228 * mini.c: use faster allocation for CEE_BOX if possible.
18230 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18232 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
18233 Moved inlined mempcy code to its own function so that is can be
18234 reused. Added an inline memset function as well (optimized initobj).
18235 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
18237 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18239 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
18241 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18243 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
18244 arch code can setup the cpu for CLR execution, if needed.
18245 We use it on x86 to set the precision of FP operations.
18247 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18249 * mini.c: disable some optimizations if we can guess they'll cost too
18250 much for a given method.
18252 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18254 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
18256 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18257 * mini.h mini.c mini-x86.c: Added instruction level coverage
18258 info collection support.
18260 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18262 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
18263 is now implemented in the profiling API. Get rid of a couple of
18264 unnecessary global variables.
18266 2003-06-15 Nick Drochak <ndrochak@gol.com>
18268 * basic-long.cs: tests for negative values for bigmul, and unsigned.
18269 * cpu-g4.md: add op_bigmul and op_bigmul_un
18270 * cpu_pentium.md: add op_bigmul_un
18271 * inssel-long32.brg: add rule for unsigned bigmul
18272 * mini-ops.h: define OP_BIGMUL_UN
18273 * mini-x86.c: THE BUG: handle (un)signed properly
18274 * mini.c: choose unsigned opcode if needed.
18275 This set of patches fixes bug #44291
18277 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
18279 * mini.c (optimize_branches): improved to handle all kinds of
18280 conditional branches.
18282 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18284 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
18285 don't raise exceptions.
18287 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18289 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
18290 to arch-specific files.
18292 2003-06-09 Martin Baulig <martin@ximian.com>
18294 * Makefile.am (libs): Added $(LIBGC_LIBS).
18296 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
18298 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
18299 and OP_ATAN (fixes bug#44293).
18301 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
18303 * Makefile.am, mini-x86.c: rename cpu description array to
18304 pentium_desc, since some compilers define the 'pentium' preprocessor
18307 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
18309 * mini.c (mini_select_instructions): add explicit branch if the
18310 following block is not the false target of a conditional branch -
18311 we need this with any optimization that reorder or remove bblocks
18313 * mini.c (optimize_branches): bug fixes
18315 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
18317 * mini.c (mono_method_to_ir): inline static readonly fields
18319 * ssa.c (fold_tree): start cfold support for long (very simple
18322 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
18324 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18326 * inssel.brg: fixed memcpy (bug #44219).
18328 2003-06-05 Dick Porter <dick@ximian.com>
18330 * driver.c: Set the glib log levels to not abort if g_message
18333 g_set_prgname() has to happen before mini_init() so that the
18334 process handle gets the info.
18336 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18338 * driver.c: add intrins to the default optimizations to get wider
18341 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18343 * mini.h: some large basic blocks will overflow a 16-bit
18344 integers for symbolic registers.
18346 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
18348 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
18349 (mono_arch_output_basic_block): fix bug 43499
18351 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18353 * mini.c: kill duplicated definition of mono_debug_format.
18355 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18357 * mini-x86.c, arrays.cs: fixed register allocation bug.
18359 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
18361 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
18363 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
18365 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18368 (print_method_from_ip): also print source location information if
18371 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
18373 * mini.c (mono_find_block_region): bug fix in region code
18374 (mini_method_compile): enable removing unreachable code again, but
18375 only in methods without exception clauses.
18377 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18379 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
18380 Implemented arglist opcode and handling of TypedReference type.
18381 Fixed x86 call convention when a structure is returned.
18382 Minimal support for calling static vararg methods.
18384 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
18386 * mini.c (mini_method_compile): always remove unreachable code,
18387 because the code in them may be inconsistent (access to dead
18388 variables for example).
18390 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18392 * driver.c, debug-mini.c: warning fixes.
18394 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
18396 * Makefile.am, jit.h, mini.h: install header for embedding mono.
18398 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
18400 * mini.c: thread-static fields are registered in mono_class_vtable(),
18401 so ensure the function is called before checking for them.
18403 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
18405 * mini.c (optimize_branches): fix for bug 43586
18407 * jit-icalls.c (mono_llmult_ovf): added an additional check for
18408 overflow (fixes Bug #43639)
18410 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18412 * mini.c, objects.cs: allow the use of stobj for primitive types.
18414 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18416 * mini.c: be less strict about argument checking until we support
18417 running the verifier.
18419 2003-05-27 Nick Drochak <ndrochak@gol.com>
18421 * basic-long.cs: tests for (ulong)int * (ulong)int also
18422 * mini.c: use the same trick for (ulong)int * (ulong)int
18424 2003-05-27 Nick Drochak <ndrochak@gol.com>
18426 * basic-long.cs: add regression test for (long)int * (long)int
18427 * cpu-pentium.md: add op_bigmul specification
18428 * inssel-long32.brg: add OP_BIGMUL rule
18429 * mini-ops.h: add OP_BIGMUL
18430 * mini-x86.c: register allocator: handle case where src1 needs to be
18432 * mini.c: substitute special BIGMUL opcode in the tree for
18433 (long)int * (long)int
18435 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18437 * jit-icalls.c: call the type ctor on field access if needed.
18439 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18441 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
18442 to a method (including results of ldelema, bug#43207).
18444 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
18446 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
18447 colors to show exception handler blocks.
18449 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
18450 (fix for pinvoke7.cs).
18452 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18454 * mini.h, mini.c: ensure correct initialization order for types that
18455 require it. Prepare for lazy compilation of jit icall wrappers.
18456 Provide a name for opcode emulation to reduce unneeded mallocing.
18458 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18460 * mini-x86.c: better register restoring code and profiling
18461 support for tail calls.
18463 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18465 * mini.h, driver.c: prepare for leaf methods optimization.
18467 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18469 * mini.c: get targets of branches before converting a method.
18471 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
18473 * mini.c (optimize_branches): added some experimental code (disbaled)
18475 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
18477 * mini.c (optimize_branches): fix branch to branch optimization
18479 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
18481 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
18483 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
18485 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
18488 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
18490 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
18491 enable use of interface variables again.
18493 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
18494 I1 to registers because there is no simply way to sign extend 8bit
18495 quantities in caller saved registers on x86.
18497 * inssel-float.brg: set costs of some rules to 2 so
18498 that monobure always select the arch. specific ones if supplied,
18499 regardless of the order we pass the files to monoburg.
18501 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18503 * mini.c, mini-x86.c: since the magic trampoline for jumps
18504 can't patch the code directly, we do it as soon as the
18505 method gets compiled.
18507 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18509 * mini-x86.c, mini.h: introduce a new patching method
18510 to support CEE_JMP and tail calls.
18511 * mini.c: obey tail.call. Don't precompile methods target
18513 * tramp-x86.c: new trampoline code to handle methods
18514 reached through a jump.
18516 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
18518 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
18519 bit values to registers
18521 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
18523 * mini.c (mono_compile_get_interface_var): share interface
18524 variables if possible.
18526 2003-05-16 Martin Baulig <martin@ximian.com>
18528 * debug-mini.c (mono_init_debugger): New function to initialize
18529 the debugger. This is not in the debugger since it needs to
18530 access some of mini's internals.
18532 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
18534 * mini.c (mono_method_to_ir): inlining fixes/cleanups
18536 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
18538 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
18539 for value type handling.
18541 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
18543 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
18544 (mono_method_check_inlining): enable inlining of all kinds of wrappers
18546 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
18548 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
18549 the constructor through a proxy.
18551 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18553 * jit-icalls.c, inssel.brg: fixes to array element address
18556 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
18558 * mini-x86.c (is_regsize_var): allocate pointer to registers
18560 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18562 * driver.c: fixed typo, added intrins to the set of optimizations
18563 tested with regressions.
18565 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18567 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
18568 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
18571 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
18573 * inssel.brg: remove some common pop instructions without side effects
18575 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18577 * inssel-x86.brg: fixed thinko in int to double conversions.
18579 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18581 * mini.c, jit-icalls.c: added runtime thread-static variable support.
18583 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18585 * inssel-long32.brg: two more missing instructions.
18587 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
18589 * mini.c (mono_emit_call_args): set the cil_code for all arguments
18590 if not already set.
18592 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
18594 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
18597 * basic-float.cs: Added tests for negative zero.
18599 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18601 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
18602 a couple of missing operations for long casts, with test cases.
18604 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18606 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
18608 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
18610 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
18611 code size estimation.
18613 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
18615 * mini.c (mono_jit_create_remoting_trampoline): make it work with
18616 abstract methods (fix bug 42542)
18618 * aot.c: add ability to handle array types
18620 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
18622 * mini.c: Call the _specific versions of the object allocation
18623 functions if possible.
18625 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18627 * driver.c: call setlocale ().
18629 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18631 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
18634 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
18636 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
18638 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
18639 wrappers (fix bug 42122)
18641 2003-05-04 Martin Baulig <martin@ximian.com>
18643 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
18645 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
18646 s/mini_set_defaults/mono_set_defaults/g.
18648 2003-05-04 Martin Baulig <martin@ximian.com>
18650 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
18652 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18654 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
18655 (reported by Don Roberts).
18657 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18659 * mini.c: temporarily work around two bugs for this release.
18661 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18663 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
18664 that contains -export-dynamic and it makes using the ld script
18666 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
18668 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18670 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
18673 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18675 * mini.c: make sure leave calls all the needed finally blocks,
18676 even when the target jumps out of multiple exception clauses.
18678 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18680 * ldscript, Makefile.am: add linker script to reduce the number of
18681 exported symbols (should also fix the issues with libwine defining
18682 some of the same symbols in io-layer).
18684 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
18686 * driver.c (mini_main): Avoid assertion when no file name is given on
18689 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
18691 * driver.c: added --version/-V command line option.
18692 Added the inline optimization in the regression tests.
18694 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18696 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
18697 to the type in the method signature (fixes bug#42134).
18699 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
18701 * mini.c: when inlining, check this is not null only when needed (bug #42135).
18703 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
18705 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
18707 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18709 * driver.c: fixed bug #42100.
18711 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
18713 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
18715 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18717 * mini.c: moved most of the code required to do inlining to its own
18718 function so it can be reused. Inline also ctors if appropriate.
18720 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
18722 * Makefile.am: Link with -export-dynamic so shared libs loaded by
18723 the runtime can call mono API functions.
18725 2003-04-27 Martin Baulig <martin@ximian.com>
18727 * debug-mini.c (mono_debug_init_method): Added
18728 `guint32 breakpoint_id' argument; if the method has a breakpoint,
18729 send a notification to the debugger.
18731 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
18732 running in the Mono Debugger, just pass the breakpoint number to
18733 mono_debug_init_method().
18735 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
18737 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
18739 * mini.c: allow some more unsafe compares.
18741 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18743 * mini-x86.c, Makefile.am: make distcheck works (partially from
18744 a patch by Richard Lee <r.h.lee@attbi.com>).
18745 * regset.c, regset.h: removed, they are unused.
18747 2003-04-25 Dick Porter <dick@ximian.com>
18749 * driver.c: Usage reports the name as 'mono' not 'mini'
18750 * exceptions-x86.c: Build and run on freebsd
18752 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18754 * Makefile.am: install the program with the 'mono' name and
18755 the library as libmono instead of mini and libmini.
18757 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18759 * driver.c: provide the APIs for the embedding interface of the old jit.
18761 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
18763 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
18765 2003-04-23 Martin Baulig <martin@ximian.com>
18767 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
18769 * driver.c: Added `--debug' command line argument to enable
18772 2003-04-23 Martin Baulig <martin@ximian.com>
18774 * debug.[ch]: Removed. The code is now in
18775 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
18777 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
18780 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
18782 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
18784 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18787 (mini_cleanup): moved mono_runtime_cleanup call after the call to
18788 mono_domain_finalize.
18789 (mini_method_compile): use mono_method_profile* if the the option is
18792 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
18794 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18795 methods with their wrapper.
18797 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18798 methods with their wrapper.
18800 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
18803 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
18806 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
18809 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
18811 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
18813 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
18815 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
18816 of the mempool. This is slightly faster and uses less memory
18818 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18820 * mini.c: avoid O(n) allocation for variables.
18822 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18824 * mini.c: handle items on the stack after inlining methods.
18826 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18828 * mini.c: make the method->opcode optimization dependent
18829 on MONO_OPT_INSTRINS and do it lazily.
18831 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18833 * driver.c: print overall results at the end of regression run.
18835 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
18837 * inssel.brg: don't overwrite symbolic registers.
18839 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18841 * inssel-x86.brg: fix conversion from long to float.
18843 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
18845 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
18847 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
18849 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
18851 * driver.c: Added --print-vtable option as in the old JIT.
18853 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18855 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
18857 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18859 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
18861 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
18863 * mini.c regalloc.c regalloc.h: Fix memory leak.
18865 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
18867 * aot.c (mono_aot_get_method): register all used strings
18869 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18871 * mini.c: always intern strings references with ldstr at compile time.
18873 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18875 * Makefile.am: add BUILT_SOURCES.
18877 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18879 * driver.c: give a better error message when the assembly to execute
18880 doesn't have an entry point.
18882 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
18884 * Makefile.am: added hack for automake
18886 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
18889 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
18891 22003-04-07 Martin Baulig <martin@ximian.com>
18893 * Makefile.am: Added Makefile.am.
18895 * debugger-main.c: Removed, this is now in the debugger where it
18898 * mini.pc.in: Call this package `mini' for the moment.