1 2009-02-04 Zoltan Varga <vargaz@gmail.com>
3 * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
6 2009-02-03 Zoltan Varga <vargaz@gmail.com>
8 * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
10 * aot-compiler.c (emit_line_number_info): Fix line number emission when
13 * aot-compiler.c: Add xdebug support on x86.
15 * unwind.c: Add x86 support.
17 * aot-compiler.c (emit_exception_debug_info): Control the emission of
18 unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
20 * mini.c (mini_method_compile): Ditto.
22 * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
25 * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
26 which mimic .push_section/.pop_section in GAS.
28 * aot-compiler.c: Emit precise live range information for variables.
30 * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
32 * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
33 the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
36 * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
37 the live ranges of variables.
39 * mini.h (struct MonoMethodVar): Add two fields containing the live range
40 of the variable in terms of native offsets.
42 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
44 * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
46 2009-02-02 Mark Probst <mark.probst@gmail.com>
48 Contributed under the terms of the MIT/X11 license by Steven
49 Munroe <munroesj@us.ibm.com>.
51 * exceptions-ppc.c (restore_regs_from_context): Correct operand
52 order (offset then base reg) for ppc_load_multiple_regs.
53 (emit_save_saved_regs) Correct operand order for
54 ppc_store_multiple_regs.
55 (mono_arch_get_call_filter): Correct operand order for
56 ppc_load_multiple_regs.
58 * mini-ppc.c (emit_memcpy): Fix operand order for
59 ppc_load_reg_update and ppc_store_reg_update.
60 (mono_arch_output_basic_block): Correct operand order for ppc_lha.
61 (mono_arch_emit_epilog): Correct operand order for
62 ppc_load_multiple_regs.
64 * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
65 order for ppc_store_multiple_regs and ppc_load_multiple_regs.
67 2009-02-02 Mark Probst <mark.probst@gmail.com>
69 * cpu-ppc64.md: Fixed storer4_memindex length.
71 2009-02-02 Zoltan Varga <vargaz@gmail.com>
73 * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
76 * aot-compiler.c (emit_line_number_info): Optimize this.
78 2009-02-01 Zoltan Varga <vargaz@gmail.com>
80 * aot-compiler.c: Disassemble tokens in the IL disassembly.
82 * aot-compiler.c: Add debug info for methods without debug info by
83 emitting an IL file and having the line number info referencing that file.
85 * aot-compiler.c: Optimize the size of the generated line number info.
87 * aot-compiler.c: Emit line number info in xdebug mode.
89 * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
92 2009-01-31 Zoltan Varga <vargaz@gmail.com>
94 * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
96 * driver.c (mono_main): Enable debugging support automatically if XDEBUG
99 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
101 * basic-calls.cs: Test for the weird crash found on arm.
103 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
105 * cpu-arm.md: Increase the size of storer8_membase_reg and
106 loadr8_membase_reg to 24 bytes to accomodate the extra add.
108 * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
109 OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
110 reg to LR otherwise we'll be loading/storing from just the offset.
112 2009-01-30 Miguel de Icaza <miguel@novell.com>
114 Question: if we are storing gint32's inside the "*native_offset",
115 should we change the signature to "gint32 *native_offset" to
116 ensure that we do not have type definition problems?
118 * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
119 an int * as this is what the other function expects, causes
120 problems with Freescale's compiler that defined int32_t to be a
121 long and makes int incompatible
123 2009-01-30 Miguel de Icaza <miguel@novell.com>
125 * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
126 filename conflict with bjam.
128 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
130 * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
131 as it might use decomposed ops.
133 2009-01-30 Zoltan Varga <vargaz@gmail.com>
135 * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
137 * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
140 * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
142 * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
145 * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
146 way registers are stored in MonoContext on arm.
148 * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
149 instead of locking so mono_get_cached_unwind_info () becomes signal safe.
151 * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
153 * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
155 * mini.c (mini_init): Register mono_isfinite.
157 * jit-icalls.c (mono_isfinite): New jit icall.
159 * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
161 * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
162 set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
165 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
167 * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
168 separate frame and stack pointers, so we must use FP to find the register
170 The FP reg is retrieved from the MonoContext::regs array.
172 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
174 * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
177 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
179 * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
180 return R4 and R8 when not running under softfloat.
182 Fixes basic-calls.exe
184 2009-01-30 Zoltan Varga <vargaz@gmail.com>
186 * mini-arm.c: Implement some overflow opcodes.
188 2009-01-29 Miguel de Icaza <miguel@novell.com>
190 * ssa.c: handle another alloca.h
192 * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
193 PLATFORM_WIN32 for detecting if we have sigaction. Instead use
194 MONO_ARCH_USE_SIGACTION.
196 * aot-runtime.c, mini-exceptions.c: Replace platform define with
199 * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
201 * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
202 PPC targets as sigaction does not exist on all platforms, define
203 this on a per-platform basis.
205 Instead of erroring out if the platform is not defined, include
206 mini-ppc-os.h, and expect that the OS specific setting provides
207 the required information.
209 2009-01-30 Zoltan Varga <vargaz@gmail.com>
211 * aot-compiler.c: Fix --enable-minimal=aot.
213 2009-01-30 Zoltan Varga <vargaz@gmail.com>
215 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
218 2009-01-29 Zoltan Varga <vargaz@gmail.com>
220 * exceptions-arm.c: Fix warnings.
222 * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
225 * mini-x86.c: Fix --enable-minimal=jit build.
227 * mini.c: Really fix --enable-minimal=jit build.
229 * mini.c (construct_object_context_for_method): Move this outside
230 the DISABLE_JIT block to fix the --enable-minimal=jit build.
232 "Backported" of r124984 from 2.0 branch.
234 * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
236 "Backport" of r124977 + r124978 from 2.0 branch.
238 * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
239 to avoid calling mono_exception_from_token () from the throw trampoline.
240 (mono_arch_get_throw_exception_generic): call throw_exception_by_token
241 for throwing corlib exceptions, this fixes full-aot support for corlib
244 * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
246 2009-01-29 Miguel de Icaza <miguel@novell.com>
248 * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
249 part of the changes to split the code in mini into operating
250 system specific files.
252 This patch was done by copying mini.c to the respective files to
253 preserve SVN history.
255 2009-01-29 Zoltan Varga <vargaz@gmail.com>
257 * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
259 2009-01-28 Zoltan Varga <vargaz@gmail.com>
261 * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
262 remoting-invoke-with-check wrappers of shared methods.
264 * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
266 2009-01-27 Mark Probst <mark.probst@gmail.com>
268 * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
269 optimization if the top of stack is the last instruction in the
270 bblock. Otherwise it might have been used after its definition.
273 2009-01-27 Zoltan Varga <vargaz@gmail.com>
275 * mini-trampolines.c (mono_magic_trampoline): Print out the caller
276 method as well when get_vcall_slot () fails to match a code sequence.
278 * mini-arm.c: Fix the android build, which doesn't have
281 2009-01-26 Zoltan Varga <vargaz@gmail.com>
283 * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
286 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
288 * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
290 2009-01-26 Zoltan Varga <vargaz@gmail.com>
292 * mini.c (mini_method_compile): Save the unwind info generated by the JIT
293 and put its id into jinfo->used_regs. This is only used on amd64,
294 which is currently the only platform generating unwind info.
296 * exceptions-amd64.c: Instead of unwinding based on a register mask, use
297 the dwarf unwinder. This is required to correctly handle async exceptions
298 like thread abort and stack overflows, which can happen while a method
299 is in the middle of its prolog or epilog.
301 * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
302 the unwind info belonging to an AOTed method.
304 * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
305 into cfg->unwind_ops.
307 * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
309 * mini.c (mini_init): Call mono_unwind_init ().
310 (mini_cleanup): Call mono_unwind_cleanup ().
312 * unwind.c: Add functions for managing a set of unwind info entries, allowing
313 unwind info to be shared between methods.
315 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
318 * exceptions-amd64.c (mono_arch_exceptions_init): Call
319 get_throw_pending_exception () to avoid initialization races.
321 * mini-exceptions.c (mono_exceptions_init): Call an arch specific
322 mono_arch_exceptions_init () function.
324 * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
326 2009-01-25 Zoltan Varga <vargaz@gmail.com>
328 * mini.c (mono_get_domain_intrinsic): New helper function.
329 (mono_get_thread_intrinsic): Ditto.
331 * mini-arm.c mini-ia64.c: Use the new helper functions.
333 * method-to-ir.c (mono_method_to_ir): Fix the comment for
334 the last constrained_call change, since it is needed in the non-AOT
337 * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
339 * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of
340 mono_get_lmf_addr () on arm eabi linux.
342 2009-01-24 Zoltan Varga <vargaz@gmail.com>
344 * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
345 code sequence which matches a non-virtual call.
347 2009-01-23 Mark Probst <mark.probst@gmail.com>
349 * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
352 2009-01-23 Zoltan Varga <vargaz@gmail.com>
354 * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
355 runtime-invoke wrappers, since they are also shared based on signature.
357 2009-01-22 Mark Probst <mark.probst@gmail.com>
359 * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
360 info from the (correct) context.
362 2009-01-22 Zoltan Varga <vargaz@gmail.com>
364 * unwind.c (mono_unwind_frame): Remove a stray g_free ().
366 * unwind.c (mono_unwind_frame): New function to unwind through a frame
367 using dwarf unwinding info. Not yet used.
369 * mini.c (mini_init): When using xdebug, disable freeing of domains.
371 2009-01-21 Mark Probst <mark.probst@gmail.com>
373 * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
376 * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
377 special case and handle mono_arch_delegate_invoke_impl() returning
378 function descriptors.
380 * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
381 trampolines return function descriptors, too.
383 2009-01-21 Zoltan Varga <vargaz@gmail.com>
385 * method-to-ir.c (handle_alloc): Avoid generic instances in the
386 out_of_line optimization.
388 2009-01-21 Martin Baulig <martin@ximian.com>
391 (MonoCompile): Added `disable_deadce_vars' to disable removing
395 (mini_method_compile): Set `cfg->disable_deadce_vars' when running
398 * liveness.c (mono_analyze_liveness): Don't remove any unused
399 variables if `cfg->disable_deadce_vars' is set.
401 2009-01-21 Mark Probst <mark.probst@gmail.com>
403 * method-to-ir.c: Only apply exception constructor optimization if
404 the the method actually belongs to an exception class. Fixes
407 2009-01-21 Zoltan Varga <vargaz@gmail.com>
409 * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
410 change inside a #ifdef __mono_ppc64__.
412 * aot-compiler.c (compile_method): Remove the previous limitation.
414 * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
415 on type variables in AOTed code.
417 * aot-compiler.c (compile_method): Skip generic methods having type
418 constraints on their generic parameters.
420 * aot-compiler.c (compile_method): Check for methods which cannot be
421 encoded inside RGCTX_FETCH patches as well.
423 * mini-exceptions.c (mono_print_thread_dump): Fix the windows
426 2009-01-20 Mark Probst <mark.probst@gmail.com>
428 * method-to-ir.c: Force the vtable variable in shared generic code
429 for the case that they might show up on a stack trace where they
432 * mini-exceptions.c: Save and use generic sharing info as well as
433 IP in stack traces to resolve shared generic instantiations.
435 2009-01-20 Zoltan Varga <vargaz@gmail.com>
437 * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
438 added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
440 2009-01-20 Mark Probst <mark.probst@gmail.com>
442 * method-to-ir.c: Do generic sharing for array constructors.
444 2009-01-20 Rodrigo Kumpera <rkumpera@novell.com>
446 * mini-exceptions.c (mono_print_thread_dump): Add information
447 about the thread state using wapi_current_thread_desc.
449 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
451 * basic-simd.cs: Tests for the new constructors.
453 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
455 * mini-ops.h: Added OP_EXPAND_*
459 * mini-x86.c (mono_arch_output_basic_block): Same.
461 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
463 2009-01-19 Zoltan Varga <vargaz@gmail.com>
465 * iltests.il.in: Add a test for #467385.
467 2009-01-18 Rodrigo Kumpera <rkumpera@novell.com>
469 * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
470 thread been cleaned up is not the same currently in execution.
472 Fixes appdomain-unload crashes on windows, osx and linux variants
473 without the __thread keyword.
475 2009-01-18 Zoltan Varga <vargaz@gmail.com>
477 * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
478 (koush@koushikdutta.com). Implement this for android.
480 * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
483 * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
484 mono_marshal_get_write_barrier ().
486 2009-01-17 Rodrigo Kumpera <rkumpera@novell.com>
488 * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
489 of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
490 that pass them on a register pair.
492 This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
493 test was crashing due to that.
495 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
497 * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
498 trampoline code. Include ucontext.h only if available.
500 2009-01-15 Mark Probst <mark.probst@gmail.com>
502 * mini.c: mono_domain_lookup_shared_generic() takes an open method
503 and doesn't check whether it's sharable, like it was before
504 removing the shared generics hash. This brings IronPython
505 performance back to what it was before that change.
507 2009-01-14 Mark Probst <mark.probst@gmail.com>
509 * method-to-ir.c: Handle delegate invocation optimization earlier,
510 otherwise it would be handled (much more slowly) by the
511 final/sealed optimization.
513 2009-01-13 Zoltan Varga <vargaz@gmail.com>
515 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
516 domain is not set. Fixes #465864.
518 2009-01-12 Mark Probst <mark.probst@gmail.com>
520 * method-to-ir.c: Don't stop sharing of generic methods with catch
521 clauses - we already handle those.
523 2009-01-12 Mark Probst <mark.probst@gmail.com>
525 * mini.c, mini.h: lookup_generic_method() is now
526 mono_domain_lookup_shared_generic() and uses the jit_code_hash,
527 making the shared_generics_hash obsolete.
529 2009-01-12 Mark Probst <mark.probst@gmail.com>
531 * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
532 use the red zone. Make room on the stack first and then use it,
533 not the other way around.
535 2009-01-12 Zoltan Varga <vargaz@gmail.com>
537 * mini.c (mini_init): Call mono_xdebug_init ().
539 * aot-compiler.c (mono_xdebug_init): Make this non-static.
541 2009-01-11 Zoltan Varga <vargaz@gmail.com>
543 * TestDriver.cs: Add an --iter argument to run tests multiple times.
545 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
548 * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
549 debug+unwind info for trampolines.
551 * mini.c (mono_create_unwind_op): New helper function.
553 * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
555 2009-01-10 Zoltan Varga <vargaz@gmail.com>
557 * aot-compiler.c: Fix the build.
559 2009-01-09 Zoltan Varga <vargaz@gmail.com>
561 * Makefile.am: Update dtrace-prelink.sh location.
563 2009-01-08 Zoltan Varga <vargaz@gmail.com>
565 * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr
566 optimization. Fixes #464520.
568 2009-01-07 Bill Holmes <billholmes54@gmail.com>
570 * mini-amd64.c : Adding code to save/restore non-volatile registers
573 * exceptions-amd64.c : Adding code to save/restore non-volatile
576 Contributed under MIT/X11 license.
578 2009-01-07 Zoltan Varga <vargaz@gmail.com>
580 * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
581 __GNUC_MINOR__ which can break when the major version changes.
583 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
585 * basic-simd.cs: Add tests for usage of the sizeof opcode.
587 2009-01-07 Geoff Norton <gnorton@novell.com>
589 * helpers.c: Allow mono -v -v -v to work on darwin.
591 2009-01-05 Bill Holmes <billholmes54@gmail.com>
593 * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
596 Contributed under MIT/X11 license.
598 2009-01-05 Zoltan Varga <vargaz@gmail.com>
600 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
601 instead of directly accessing type->data.klass. Fixes #462016.
602 (mono_allocate_stack_slots_full): Ditto.
604 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
605 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
607 * aot-compiler.c (emit_plt): Fix ARM build.
609 2009-01-04 Zoltan Varga <vargaz@gmail.com>
611 * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
613 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
616 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
617 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
620 * iltests.il.in: Add a regression test.
622 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
624 * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
626 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
628 * basic-simd.cs: Add a regression test for #462457.
630 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
632 * mini-ops.h: Add a definition of XPHI.
634 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
636 * ssa.c (op_phi_to_move): Handle XPHI.
638 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
642 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
644 * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
646 2008-12-31 Geoff Norton <gnorton@novell.com>
648 * mini-ppc.c: The prolog size allocated can be too small for darwin
649 ppc32 under certain circumstances. Also fix a small logic bug.
651 2008-12-29 Zoltan Varga <vargaz@gmail.com>
653 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
654 while loading AOT methods.
656 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
657 since only the former is nulled out after a successful cast. This prevents
658 crashes with rethrown exceptions when using --debug=casts.
660 2008-12-24 Mark Probst <mark.probst@gmail.com>
662 * mini.h: New macro for checking whether a method is final,
663 i.e. whether the method or its class is marked final.
665 * method-to-ir.c: Use the new macro for all final-checks
666 consistently. Fixes the crash in the System.ServiceModel tests.
668 2008-12-23 Mark Probst <mark.probst@gmail.com>
670 * mini-exceptions.c (get_exception_catch_class): Corrected another
671 overly strict assertion.
673 2008-12-23 Mark Probst <mark.probst@gmail.com>
675 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
676 Clobbering it is not allowed because the caller might use it as
677 the vtable register in the interface call.
679 2008-12-19 Mark Probst <mark.probst@gmail.com>
681 * mini-exceptions.c (get_exception_catch_class): Corrected an
682 overly strict assertion.
684 2008-12-18 Mark Mason <mmason@upwardaccess.com>
686 * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
688 * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
690 * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
692 * cpu-mips.md: correct lengths for certain long_ opcodes.
694 * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
696 * 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().
698 2008-12-17 Mark Mason <mmason@upwardaccess.com>
700 * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
702 2008-12-17 Mark Mason <mmason@upwardaccess.com>
704 * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
706 2008-12-16 Rodrigo Kumpera <rkumpera@novell.com>
708 * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
711 2008-12-16 Mark Mason <mmason@upwardaccess.com>
713 * 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
715 * 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)
717 2008-12-15 Mark Mason <mmason@upwardaccess.com>
719 * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
721 2008-12-14 Zoltan Varga <vargaz@gmail.com>
723 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
724 gshared code. Fixes #458947.
726 * generics.cs: Add a test.
728 2008-12-12 Mark Mason <mmason@upwardaccess.com>
730 * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
732 * mini-mips.c: first pass n32 code generation.
734 * mini-mips.h: datatypes and defines for n32 support.
736 * exceptions-mips.c: first pass n32 code generation.
738 * tramp-mips.c: first pass n32 code generation.
740 * cpu-mips.md: add long_ opcodes.
742 2008-12-12 Mark Mason <mmason@upwardaccess.com>
744 * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
746 * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
748 * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
750 * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
752 * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
754 * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
756 * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
758 * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
760 * helpers.c: for mips/n32, don't pass -mips32 to objdump
762 2008-12-12 Zoltan Varga <vargaz@gmail.com>
764 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
766 2008-12-12 Andrés G. Aragoneses <aaragoneses@novell.com>
768 * driver.c: Sync --help-trace with man page (EXPR,EXPR).
770 2008-12-12 Mark Probst <mark.probst@gmail.com>
772 * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
773 descriptors for helper functions directly in front of the code.
775 2008-12-11 Mark Probst <mark.probst@gmail.com>
777 * method-to-ir.c: Removed an unnecessary assertion.
779 2008-12-10 Zoltan Varga <vargaz@gmail.com>
781 * method-to-ir.c: Merge SGEN changes from the old JIT.
783 2008-12-10 Zoltan Varga <vargaz@gmail.com>
785 * driver.c (compile_all_methods_thread_main): Handle failure of
788 2008-12-10 Mark Probst <mark.probst@gmail.com>
790 * mini-ppc.c: Merged with mini-ppc64.c.
792 * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
794 * Makefile.am: Use the same sources for PPC and PPC64.
796 * mini-ppc64.c: Removed.
798 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
800 * branch-opts.c (remove_block_if_useless): Extract fall through detection
801 code to mono_bb_is_fall_through.
803 * branch-opts.c (mono_remove_critical_edges): Same.
805 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
807 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
808 expect that an OP_BR_REG will be there.
810 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
812 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
813 for the many branch ops. The original check miss OP_BR_REG.
817 2008-12-09 Mark Mason <mmason@upwardaccess.com>
819 * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
821 2008-12-09 Zoltan Varga <vargaz@gmail.com>
823 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
824 while holding the aot lock.
826 2008-12-09 Mark Mason <mmason@upwardaccess.com>
828 * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
830 2008-12-09 Bill Holmes <billholmes54@gmail.com>
832 * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws
833 to release all runtime callable wrappers held by the runtime.
835 Contributed under MIT/X11 license.
837 2008-12-09 Bill Holmes <billholmes54@gmail.com>
839 * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
842 Contributed under MIT/X11 license.
844 2008-12-09 Zoltan Varga <vargaz@gmail.com>
846 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
847 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
849 2008-12-09 Mark Mason <mmason@upwardaccess.com>
851 * cpu-mips.md: fix ckfinite length
853 * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
854 (mono_arch_lowering_pass): cleanup, rearrange for clarity
855 (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
857 2008-12-08 Mark Mason <mmason@upwardaccess.com>
859 * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
861 2008-12-08 Geoff Norton <gnorton@novell.com>
863 * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
864 size by 8 bytes as well.
866 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
868 * basic-simd.cs: Fix method names for Vector16b.
870 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
872 * basic-simd.cs: Fix method names for Vector16sb.
874 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
876 * basic-simd.cs: Fix method names for Vector8us.
878 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
880 * basic-simd.cs: Fix method names for Vector8s.
882 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
884 * basic-simd.cs: Fix method names for Vector4ui.
886 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
888 * basic-simd.cs: Fix method names for Vector2l.
890 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
892 * basic-simd.cs: Fix method names for Vector2d.
894 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
896 * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
897 that are extension methods.
899 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
901 * basic-simd.cs: Fix method names for Vector4f.
903 2008-12-08 Zoltan Varga <vargaz@gmail.com>
905 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
906 as such. Fixes #456669.
908 2008-12-07 Mark Mason <mmason@upwardaccess.com>
910 * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
912 2008-12-07 Mark Mason <mmason@upwardaccess.com>
914 * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
915 (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
916 (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
917 (mips_adjust_stackframe): handle FP spills
919 * mini-ops.h: add mips_mtc1_s2
921 * cpu-mips.md: add mips_mtc1_s2
923 2008-12-07 Zoltan Varga <vargaz@gmail.com>
925 * unwind.c: New file, move the unwind info encoding functions here from
926 aot-compiler.c, so they could be used at runtime too.
928 2008-12-05 Mark Mason <mmason@upwardaccess.com>
930 * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
931 (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
933 2008-12-05 Mark Mason <mmason@upwardaccess.com>
935 * mini-mips.c: cleanup warnings
936 (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
937 (mips_adjust_stackframe): handle case of taking the address of stack locals
939 2008-12-05 Zoltan Varga <vargaz@gmail.com>
941 * aot-compiler.c: Implement a few functions missing from the asm writer.
942 (emit_method_code): Only write symbols for methods when using the bin
943 writer, since the assembler can't deal with the characters in our method
946 * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
948 * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
951 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
952 a bit to also restore %rax.
954 2008-12-05 Mark Probst <mark.probst@gmail.com>
956 * mini-ppc.c: Some simple merges from mini-ppc64.c.
958 2008-12-05 Zoltan Varga <vargaz@gmail.com>
960 * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
963 2008-12-05 Mark Probst <mark.probst@gmail.com>
965 * exceptions-ppc.c: Merged with exceptions-ppc64.c.
967 * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
968 MONO_ARCH_FRAME_ALIGNMENT. Struct for PPC64 function descriptors.
970 * exceptions-ppc64.c: Removed.
972 * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
974 2008-12-05 Mark Probst <mark.probst@gmail.com>
976 * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
979 * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
981 * tramp-ppc64.c: Removed.
983 2008-12-05 Zoltan Varga <vargaz@gmail.com>
985 * aot-compiler.c (add_generic_instances): Skip non-generic classes in
988 2008-12-05 Mark Probst <mark.probst@gmail.com>
990 * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
992 * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
993 mini-ppc.h instead of mini-ppc64.h.
995 * mini-ppc64.h: Removed.
997 2008-12-04 Mark Mason <mmason@upwardaccess.com>
999 * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
1001 * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
1003 2008-12-05 Mark Probst <mark.probst@gmail.com>
1005 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
1006 Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
1009 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1011 * basic-simd.cs: Tests for operator == and != on Vector8us and Vector16b.
1013 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1015 * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
1017 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1019 * basic-simd.cs: Tests for operator == and != on Vector4f.
1021 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
1023 * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
1025 * simd-intrinsics.c: Kill useless enum.
1027 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1029 * cpu-mips.md: add long_conv_to_ovf_i4_2
1030 * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
1032 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1034 * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
1036 * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
1038 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1040 * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
1042 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1044 * basic-simd.cs: Add tests for new methods.
1046 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1048 * simd-intrinsics.c: Add support for operator == and !=
1051 * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
1053 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1055 * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
1057 2008-12-04 Zoltan Varga <vargaz@gmail.com>
1059 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
1061 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
1062 MONO_PATCH_INFO_ICALL_ADDR.
1064 * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
1066 * aot-compiler.c: Resurrect full-aot support.
1068 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1070 * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
1072 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1074 * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
1076 2008-12-03 Rodrigo Kumpera <rkumpera@novell.com>
1078 * basic-simd.cs: Fix tests to work under ppc.
1079 Remove tests for methods that will be removed.
1081 2008-12-03 Mark Probst <mark.probst@gmail.com>
1083 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
1084 generic type (via a typedef or typeref) correctly.
1086 2008-12-03 Zoltan Varga <vargaz@gmail.com>
1088 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
1089 diagnose an assertion failure.
1091 2008-12-02 Mark Probst <mark.probst@gmail.com>
1093 * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
1094 Fix trampoline size.
1096 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
1097 conversion opcodes are implemented natively instead via emulation.
1099 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1101 * cpu-mips.md: remove mips_xori
1103 * mini-ops.h: remove mips_xori
1105 * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
1107 * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
1109 * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
1111 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1113 * cpu-mips.md: fix instruction lengths.
1115 * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
1117 * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
1119 * mini-ops.h: fix slti / sltiu op profiles.
1121 2008-12-02 Martin Baulig <martin@ximian.com>
1123 * method-to-ir.c (mono_method_to_ir): Disable debugging
1124 information for the init locals block to make the debugger stop
1125 after all locals have been initalized.
1127 2008-12-02 Martin Baulig <martin@ximian.com>
1129 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
1130 running inside the debugger.
1132 2008-12-01 Zoltan Varga <vargaz@gmail.com>
1134 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
1137 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
1138 alu->alu imm optimization which only shows if deadce is disabled.
1140 * aot-compiler.c: Rename the function names for the binary and asm writers
1141 so they can coexist in the same process. Rework the xdebug code to use the
1142 asm writer. This avoids the need to call into the runtime to dump the
1143 debugging info. Add more debugging info for types.
1145 * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
1147 * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
1148 cpu description tables, they can't occur in cpu-<ARCH>.md.
1150 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
1151 the stack in CEE_LDFLDA. Fixes #450542.
1153 * generics.cs: Add a new test.
1155 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1157 * mini-ops.h: updated MIPS opcodes
1158 * mini-mips.c: decompose long opts
1159 * mini-mips.h: decompose long opts
1161 2008-11-29 Mark Mason <mmason@upwardaccess.com>
1163 * cpu-mips.md: fix length on int_rem_un
1164 * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
1166 2008-11-29 Zoltan Varga <vargaz@gmail.com>
1168 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
1170 * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
1172 2008-11-29 Martin Baulig <martin@ximian.com>
1174 * mini-exceptions.c (mono_handle_native_sigsegv): Check
1175 mono_debug_using_mono_debugger() in addition to the
1176 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
1178 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1180 * mini-ops.h: updated more MIPS opcodes
1181 * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
1182 * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
1184 2008-11-28 Mark Probst <mark.probst@gmail.com>
1186 * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
1188 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1190 * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
1191 * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
1192 * mini-ops.h: correct selected mips opcode entries
1194 2008-11-28 Mark Probst <mark.probst@gmail.com>
1196 * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
1199 2008-11-28 Mark Probst <mark.probst@gmail.com>
1201 * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
1203 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1205 * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
1206 * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
1207 * mini-mips.h: disable IMT
1208 * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
1210 2008-11-28 Mark Probst <mark.probst@gmail.com>
1212 * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
1214 2008-11-28 Mark Probst <mark.probst@gmail.com>
1216 * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
1218 2008-11-28 Zoltan Varga <vargaz@gmail.com>
1220 * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
1223 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1225 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1226 for Set/GetVector aligned versions.
1228 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1230 * basic-simd.cs: Add tests for Get/SetVector.
1232 2008-11-27 Mark Probst <mark.probst@gmail.com>
1234 * mini.c: Removed g_slist_append_mempool(). Now in
1237 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1239 * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
1240 size properly and make the bounds check optional.
1242 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1243 for SetVector and IsAligned.
1245 2008-11-27 Zoltan Varga <vargaz@gmail.com>
1247 * mini.c: Remove unused mono_normalize_opcodes () function.
1249 2008-11-26 Mark Probst <mark.probst@gmail.com>
1251 * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
1252 using the new atomic add ops now.
1254 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
1257 2008-11-26 Mark Probst <mark.probst@gmail.com>
1259 * mini-ppc64.c: Several fixes.
1261 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1263 * cpu-mips.md: added jump_table
1264 * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.
1266 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1268 * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
1270 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1272 * mini-ops.h: corrected a handful of MIPS opcodes.
1274 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1276 * aot-compiler.c: MIPS to use ELF writer
1278 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1280 * mini-codegen.c: remove MIPS specific assert.
1282 2008-11-25 Mark Probst <mark.probst@gmail.com>
1284 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
1285 fixes. PPC64 now passes most of the runtime regressions.
1287 2008-11-24 Zoltan Varga <vargaz@gmail.com>
1289 * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
1290 volatile intervals a bit.
1292 2008-11-24 Mark Probst <mark.probst@gmail.com>
1294 * basic-long.cs: New test case.
1296 2008-11-23 Zoltan Varga <vargaz@gmail.com>
1298 * mini.c (mini_method_compile): Disable globalra for large methods for
1301 * regalloc2.c (order_moves): Add fp support.
1303 * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
1304 source bblock ends with an OP_BR_REG.
1306 * ratests.cs: Add a new test.
1308 2008-11-23 Mark Probst <mark.probst@gmail.com>
1310 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
1311 sharing. PPC64 now passes generics.exe.
1313 2008-11-23 Mark Probst <mark.probst@gmail.com>
1315 * mini-ppc64.c: Several fixes. PPC64 now runs iltests.exe.
1317 2008-11-23 Zoltan Varga <vargaz@gmail.com>
1319 * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
1320 memory when mono_jit_info_table_find () can't find the method in the
1323 * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
1326 * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
1329 2008-11-23 Mark Probst <mark.probst@gmail.com>
1331 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
1332 Several fixes. PPC64 now runs exceptions.exe and
1333 devirtualization.exe.
1335 2008-11-22 Mark Probst <mark.probst@gmail.com>
1337 * mini-ppc64.c, tramp-ppc64.c: Small fixes. PPC64 now runs
1338 arrays.exe and basic-math.exe.
1340 2008-11-22 Mark Probst <mark.probst@gmail.com>
1342 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
1343 cpu-ppc64.md: Several fixes. PPC64 now runs objects.exe.
1345 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1347 * simd-intrinsics.c: Add support ArrayExtension intrinsics.
1349 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1351 * method-to-ir.c: Move bounds checking macros to ir-emit.h
1353 * ir-emit.h: Move macros from method-to-ir.c to here.
1355 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1357 * mini-ops.h: Correct the long simd ops to use LREG.
1359 2008-11-21 Zoltan Varga <vargaz@gmail.com>
1361 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
1363 * mini-ops.h: Correct the dreg type of a few long opcodes.
1365 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
1368 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
1370 * mini-ppc.c: remove negative stack references in epilog
1371 for platforms that don't support the red zone.
1373 2008-11-21 Mark Probst <mark.probst@gmail.com>
1375 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
1376 point regs. Now PPC64 passes basic-calls.exe.
1378 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1380 * basic-simd.cs: Add tests for accessors of Vector2l.
1382 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1384 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
1386 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
1388 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
1390 2008-11-21 Mark Probst <mark.probst@gmail.com>
1392 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
1393 PPC64 passes basic-long.exe.
1395 2008-11-20 Mark Probst <mark.probst@gmail.com>
1397 * decompose.c: Decompose carry and overflow add on PPC64 like on
1398 other 64 bit archs. Don't decompose sub at all on PPC64.
1400 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
1401 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
1404 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1406 * basic-simd.cs: Add tests for accessors of Vector2d.
1408 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1410 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
1414 * mini-x86.c (mono_arch_output_basic_block): Same.
1416 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
1418 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1420 * basic-simd.cs: Add tests for accessors of Vector4f.
1422 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1424 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
1428 * mini-x86.c (mono_arch_output_basic_block): Same.
1430 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
1432 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1434 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
1436 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1438 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
1442 * mini-x86.c (mono_arch_output_basic_block): Same.
1444 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
1446 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1448 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
1450 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1452 * simd-intrinsics.c: Enable setters for Vector16sb.
1454 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1456 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
1460 * mini-x86.c (mono_arch_output_basic_block): Same.
1462 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
1464 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
1466 * simd-intrinsics.c: Implement setter for Vector8us.
1468 2008-11-19 Zoltan Varga <vargaz@gmail.com>
1470 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
1473 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1475 * mini-ppc.c: remove references to the red zone in the prolog
1476 (for systems that don't support it).
1478 2008-11-19 Mark Probst <mark.probst@gmail.com>
1480 * cpu-ppc64.md: Fixed a few instruction lengths.
1482 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
1485 2008-11-19 Mark Probst <mark.probst@gmail.com>
1487 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
1490 2008-11-19 Zoltan Varga <vargaz@gmail.com>
1492 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
1494 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
1496 * mini-ops.h: Added OP_INSERT_I2.
1500 * mini-x86.c (mono_arch_output_basic_block): Same.
1502 * simd-intrinsics.c: Implement setter for Vector8s.
1504 * simd-methods.h: Add the names of get setters of Vector8s.
1506 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1508 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
1510 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
1513 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1515 2008-11-18 Mark Probst <mark.probst@gmail.com>
1517 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
1518 for PPC64. An empty program runs now.
1520 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1522 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1524 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
1525 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
1526 info for JITted code is emitted into a shared library, loadable into gdb.
1528 2008-11-18 Mark Probst <mark.probst@gmail.com>
1530 * Makefile.am: Changes to build PPC64.
1532 * mini-arch.h: Include mini-ppc64.h on PPC64.
1534 2008-11-18 Mark Probst <mark.probst@gmail.com>
1536 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
1537 in PPC code up to r119147.
1539 2008-11-18 Mark Probst <mark.probst@gmail.com>
1541 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1542 cpu-ppc64.md: Changes for PPC64.
1544 Based on code submitted by andreas.faerber@web.de at
1545 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
1548 2008-11-18 Mark Probst <mark.probst@gmail.com>
1550 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1551 cpu-ppc64.md: Copied from the corresponding PPC files from
1554 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
1556 * mini-ops.h: Added OP_ROUND.
1558 * cpu-x86.md: Added round.
1560 * mini-x86.c: Added support for intrinsicing Math.Round (double).
1562 * basic-math.cs: Added test_0_round to test rounding.
1564 Contributed under MIT/X11 license.
1566 2008-11-17 Bill Holmes <billholmes54@gmail.com>
1568 * aot-compiler.c : Fix the Winx64 build.
1570 Contributed under MIT/X11 license.
1572 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1574 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
1575 in OP_EXTRACT_R8 to avoid possible stack corruption.
1577 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1579 * mini-ops.h: Added OP_EXTRACT_R8/I8.
1581 * cpu-x86.md: Added extract_r8.
1583 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
1585 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
1586 a couple of OP_EXTRACT_I4.
1588 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
1590 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
1592 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1594 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
1597 2008-11-17 Zoltan Varga <vargaz@gmail.com>
1599 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
1600 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
1602 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
1603 are not needed any more.
1605 * mini.h: Remove the unused INS_LIST macros.
1607 * mini.c (mini_method_compile): Remove a disable globalra case which is no
1610 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
1613 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
1614 mono_alloc_ireg () instead.
1616 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
1619 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
1622 * aot-runtime.c (load_aot_module): Disable AOT when running under
1625 * mini-amd64.h: Change the monitor fastpath defines to check for
1626 !PLATFORM_WIN32 so they work on *bsd too.
1628 * mini.h mini.c mini-hhpa.c: Remove more unused code.
1630 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
1632 * mini.h (MonoCompile): Remove new_ir flag.
1634 * regalloc.h regalloc.c: Remove unused code.
1636 * cpu-*.md: Remove more unused opcodes.
1638 * simple-cee-ops.h simple-mini-ops.h: Removed.
1640 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
1642 2008-11-17 Zoltan Varga <vargaz@gmail.com>
1644 * aliasing.h: Removed.
1646 * *.c: Remove references to aliasing.h and inssel.h.
1648 * mini.c: Remove additional unused functions.
1650 * mini-ops.h cpu-*.md: Remove unused opcodes.
1652 2008-11-16 Zoltan Varga <vargaz@gmail.com>
1654 Remove the old JIT code.
1656 * inssel*.brg: Removed.
1658 * ssa.c abcremoval.c aliasing.c: Removed.
1660 * ssa2.c: Renamed to ssa.c.
1662 * abcremoval2.c: Renamed to abcremoval.c.
1664 * *.c: Removed all !cfg->new_ir code.
1666 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
1667 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
1669 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
1671 2008-11-16 Zoltan Varga <vargaz@gmail.com>
1673 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
1674 to simplify the code and cut back on the number of global symbols in the AOT
1677 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
1679 2008-11-15 Zoltan Varga <vargaz@gmail.com>
1681 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
1682 with the got/got_info tables.
1684 * mini.h: Bump AOT file format version.
1686 * unwind.h: New file, contains definitions for stack unwinding.
1688 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
1691 * aot-compiler.c: Generalize the emitting of unwind information to use the
1692 information in cfg->unwind_ops.
1694 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
1696 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
1697 AOT method frames. Enable writing symbols for methods by default.
1699 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
1701 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
1702 and make it work with vectors of element sizes 1, 2 and 4.
1704 * simd-intrinsics.c: Enable getter for all vectors with element size
1707 * simd-methods.h: Add the names of other getters.
1709 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
1715 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
1717 * mini-ppc.h: portability fix.
1719 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1721 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
1722 buggy and will overwrite it.
1724 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1726 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
1727 Use it to emit local symbols for all methods so AOTed methods show up with
1728 their full name in gdb/valgrind output.
1730 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1732 * mini-ppc.c: portability fixes.
1734 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1736 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
1737 entries out of the if (!generic_shared...) code so it is always done.
1738 (mono_class_init_trampoline): Do the patching when running under valgrind
1739 too, newer versions of valgrind have no problems with it.
1741 2008-11-13 Zoltan Varga <vargaz@gmail.com>
1743 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
1746 2008-11-13 Mark Probst <mark.probst@gmail.com>
1748 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
1751 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1753 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
1755 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1757 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
1763 * simd-intrinsics.c: Same.
1765 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1767 * simd-intrinsics.c: Enable constructor intrinsics for all types.
1769 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1771 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
1772 to work with more Vector types.
1774 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1776 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
1777 store the elemens directly instead of using and intermediate.
1779 2008-11-13 Zoltan Varga <vargaz@gmail.com>
1781 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
1783 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
1784 to preserve %eax for aot plt trampolines.
1786 * aot-compiler.c (compile_method): Don't skip synchronized methods.
1787 (encode_method_ref): Flag synchronized methods so they won't go through
1790 * aot-compiler.c: Additional work to support AOTing synchronized methods/
1793 * cpu-ia64.md (jmp): Increase max length.
1795 2008-11-12 Zoltan Varga <vargaz@gmail.com>
1797 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
1798 open generic classes.
1800 * aot-compiler.c: Enable the ELF writer on ELF platforms.
1802 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
1803 box+brtrue optimization since it causes test failures on x86.
1805 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
1807 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
1813 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
1814 for simd ctor values.
1816 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
1817 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
1819 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
1821 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
1824 * simd-instrincs.c: Same.
1826 * basic-simd.cs: Same.
1828 2008-11-12 Zoltan Varga <vargaz@gmail.com>
1830 * ratests.cs: Add more tests.
1832 * regalloc2.c (add_spill_code): Handle more corner cases.
1834 2008-11-11 Zoltan Varga <vargaz@gmail.com>
1836 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
1837 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
1838 both the source an destination of an instruction.
1840 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1842 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
1843 wapihandles.c: more portability changes.
1845 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
1847 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
1848 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
1849 safe to execute in a signal handler and the kernel provides better
1850 the info in /proc/self/smaps. Avoid the assert on sigaction during
1853 2008-11-11 Zoltan Varga <vargaz@gmail.com>
1855 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
1856 do the bblock linking hack if it is actually needed.
1858 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
1861 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
1862 crash problem is fixed.
1864 * branch-opts.c (mono_remove_critical_edges): Link up newly added
1867 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
1869 (mini_method_compile): Set the starting value of next_vreg to
1870 MAX_IREGS + MAX_FREGS when using globalra.
1872 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
1873 filter clauses with BB_EXCEPTION_HANDLER.
1875 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
1877 2008-11-10 Mark Probst <mark.probst@gmail.com>
1879 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
1880 space for stdcall. Fixes regressions on Win32.
1882 2008-11-10 Zoltan Varga <vargaz@gmail.com>
1884 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
1886 (linear_scan): Remove an assert which doesn't seem to be needed.
1888 * local-propagation.c (mono_local_deadce): Avoid a call to
1889 MONO_DELETE_INS which would screw up the instruction linking.
1891 * mini.c (mono_decompose_op_imm): Make this work with globalra.
1893 * regalloc2.c: Upgrade to work the current JIT code.
1895 2008-11-09 Zoltan Varga <vargaz@gmail.com>
1897 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
1900 * aot-runtime.c: Remove some dead code.
1902 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
1904 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
1906 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
1907 trampolines using sscanf since atoi doesn't work on large unsigned values.
1909 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
1910 Initialize code_size.
1912 2008-11-08 Mark Probst <mark.probst@gmail.com>
1914 * method-to-ir.c (mini_emit_inst_for_method): Make
1915 Interlocked.CompareExchange work for Int arguments on 32 bit
1918 2008-11-07 Mark Probst <mark.probst@gmail.com>
1920 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
1922 2008-11-06 Bill Holmes <billholmes54@gmail.com>
1924 * main.c Fix MSVC build.
1926 Contributed under MIT/X11 license.
1928 2008-11-06 Mark Probst <mark.probst@gmail.com>
1930 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
1931 alignment larger than 8 bytes are aligned correctly, too.
1933 * mini.c: Honor the min_align field of MonoClass when laying out
1936 2008-11-06 Zoltan Varga <vargaz@gmail.com>
1938 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
1940 * aot-compiler.c (emit_plt): Fix a warning.
1942 * aot-compiler.c: Implement ARM support in the binary writer.
1944 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1946 * basic-simd.cs: Add test for getter with byref arg.
1947 Fix the naming of a few tests.
1948 Add missing checks to a test.
1950 2008-11-05 Zoltan Varga <vargaz@gmail.com>
1952 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
1954 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
1955 most of the full-aot support for monitor enter/exit trampolines.
1957 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
1958 enter/exit trampoline creation functions.
1960 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
1963 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
1965 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
1966 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
1967 implement the needed functionality without adding crap to the runtime.
1969 2008-11-05 Zoltan Varga <vargaz@gmail.com>
1971 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
1974 * mini.c (mono_build_date): New global version holding the build date in
1977 * Makefile.am (buildver.c): Generate a file containing the build date.
1979 * main.c: Set the build date from the generated file.
1981 * mini.c (mono_get_runtime_build_info): New helper function returning build
1982 information in a string format.
1984 * driver.c (mono_main): Print the build date in --version.
1986 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
1987 file when the bind-to-runtime-version option is used.
1989 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1991 * simd-intrinsics.c: Fix bug when using getters and byref args.
1993 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1995 * simd-methods.h: Rename prefetch methods.
1997 * simd-intrinsics.c: Same.
1999 2008-11-05 Mark Probst <mark.probst@gmail.com>
2001 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
2004 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2006 * aot-compiler.c: Use the bundled elf header files instead of depending on
2009 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
2012 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
2015 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
2017 * cpu-x86.md: Add store nta ops.
2023 * mini.h: Add an enum for simd prefetch modes.
2025 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
2026 of store. Use the changed code to support store nta.
2028 * simd-intrinsics.c: Add prefetch ops for all vector types.
2030 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2032 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
2035 * aot-compiler.c: Use statically allocated buffers for constructing symbol
2038 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
2041 2008-11-04 Mark Probst <mark.probst@gmail.com>
2043 * mini-x86.c: Fixed commit.
2045 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2047 * aot-compiler.c (emit_plt): Align the plt section only on x86.
2049 2008-11-04 Mark Probst <mark.probst@gmail.com>
2051 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
2052 and MONITOR_EXIT, for the ASM fastpaths.
2054 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
2057 * mini.c, patch-info.h: Signature and patch infos for
2058 Monitor.Enter/Exit trampolines.
2060 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
2062 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
2063 Monitor.Enter/Exit ASM fastpath for Linux.
2065 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2067 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
2069 * objects.cs: Add a new test.
2071 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
2073 * aot-runtime.c (load_method): Run class initialization in the PLT case even
2074 if MONO_LOG_LEVEL is set.
2076 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
2078 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
2080 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
2082 * aot-compiler.c: Change the relocation code to use virtual addresses instead
2083 of file offsets. Align the sections belonging to the data segment to
2086 2008-11-03 Zoltan Varga <vargaz@gmail.com>
2088 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
2089 elf.h. Port it to amd64.
2091 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2093 * driver.c: Enable SIMD by default.
2095 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2097 * cpu-x86.md: Add prefetch op.
2103 * mini.h: Add an enum for simd prefetch modes.
2105 * simd-methods.h: Add prefetch function names.
2107 * simd-intrinsics.c: Add prefetch ops for all vector types.
2109 2008-11-03 Zoltan Varga <vargaz@gmail.com>
2111 * aot-compiler.c (emit_bytes): Speed this up a little.
2113 2008-11-02 Zoltan Varga <vargaz@gmail.com>
2115 * aot-compiler.c: Add JIT time etc. statistics.
2117 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
2119 * mini.h (MonoCompile): Add 'got_offset' field.
2121 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
2122 method_got_offsets array.
2124 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
2127 * aot-compiler.c (compile_method): Add generic method instances referenced
2128 by the method to the list of methods to be compiled, this is required so if
2129 A<T> references B<T>, and another assembly references A<int>, then it will
2130 also get a copy of B<int>.
2132 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
2133 when checking for monitor enter/exit.
2135 2008-10-30 Mark Probst <mark.probst@gmail.com>
2137 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
2138 for Monitor.Enter and Monitor.Exit if enabled.
2140 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
2143 2008-10-30 Zoltan Varga <vargaz@gmail.com>
2145 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
2146 of an OP_MOVE. Fixes #440046.
2148 * basic-long.cs: Add a new test.
2150 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
2152 * mini.h: Add synchronization note for the managed counter-part.
2154 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
2155 returns the simd caps of the current cpu.
2157 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
2159 * basic-simd.cs: Remove Console.WriteLine.
2161 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2163 * basic-simd.cs: New tests for Vector2ul.
2165 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2167 * simd-intrinsics.c: Add new vector type Vector2ul.
2169 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2171 * basic-simd.cs: New tests for Vector2l.
2173 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2175 * cpu-x86.md: Add long version of most packed int ops.
2181 * simd-intrinsics.c: Add new vector type Vector2l.
2183 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2185 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
2187 * simd-methods.h: Remove SN_op_BitwiseXor.
2189 2008-10-28 Zoltan Varga <vargaz@gmail.com>
2191 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
2194 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2196 * basic-simd.cs: Test for Vector2d.
2198 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
2201 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2203 * cpu-x86.md: Add double version of all packed float ops.
2209 * simd-intrinsics.c: Add new vector type Vector2d.
2211 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
2213 * simd-methods.h: Add Duplicate.
2215 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2217 * basic-simd.cs: Test for packing with signed saturation.
2219 2008-10-28 Zoltan Varga <vargaz@gmail.com>
2221 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
2222 found in the TYPESPEC table.
2224 2008-10-26 Zoltan Varga <vargaz@gmail.com>
2226 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
2229 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2231 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
2232 instead of the RVA, since the RVA can be changed by tools like the cil
2235 * method-to-ir.c (mono_method_to_ir2): Ditto.
2237 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
2238 (deserialize_variable): Ditto.
2240 2008-10-25 Martin Baulig <martin@ximian.com>
2242 * debug-mini.c (write_variable): Use
2243 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
2245 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2247 * cpu-x86.md: Add unsigned variants of packd and packw.
2251 * mini-x86.h: Emit the right instruction for packd and packw.
2252 Add unsigned variants of packd and packw.
2254 * simd-intrinsics.c: Packd and packw were used in place of their
2255 unsigned variants. Change that.
2256 Add intrinsics for (Signed)PackWithSignedSaturation.
2258 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
2260 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2262 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
2264 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2266 * mini-ops.h: Remove dword packed add/sub with saturation ops.
2268 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
2270 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
2273 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
2275 2008-10-24 Mark Probst <mark.probst@gmail.com>
2277 * method-to-ir.c, mini.c: Special casing for the synchronized
2278 wrapper for the ldtoken+GetTypeFromHandle case.
2280 2008-10-24 Zoltan Varga <vargaz@gmail.com>
2282 * mini.c (mono_replace_ins): Move this to branch-opts.c.
2284 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
2285 created/split bblocks.
2287 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2289 * mini-ops.h: Add packed signed mul high.
2293 * mini-x86.c (mono_arch_output_basic_block): Same.
2295 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
2297 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
2299 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2301 * basic-simd.cs: Tests for Vector16sb.
2303 2008-10-24 Zoltan Varga <vargaz@gmail.com>
2305 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
2307 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2309 * mini-ops.h: Add packed signed min, max and compare greater.
2313 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
2316 * simd-methods.h: Add CompareGreaterThan.
2318 * simd-methods.h: Remove CompareEquals.
2320 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
2322 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
2324 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
2327 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2329 * basic-simd.cs: Fix tests due to change in the API.
2331 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2333 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
2335 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2337 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
2339 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
2340 inst_offset as this has invalid values for LDADDR.
2342 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2344 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2346 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
2348 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2350 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
2351 for accessing field->data.
2353 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2355 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2357 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2359 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
2361 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
2363 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2365 * dominators.c (mono_compute_natural_loops): Allocate GList enties
2366 from the cfg mempool.
2368 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
2370 * basic-simd.cs: Tests for new methods in Vector8us.
2372 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
2374 * mini-ops.h: Add multiply and store high.
2378 * mini-x86.c (mono_arch_output_basic_block): Same.
2380 * simd-methods.h: Same.
2382 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
2385 2008-10-19 Zoltan Varga <vargaz@gmail.com>
2387 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
2388 mono_class_setup_vtable ().
2390 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
2391 mono_class_get_vtable_entry () for accessing klass->vtable.
2393 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
2395 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
2398 * method-to-ir.c (mono_save_token_info): Don't save references made from
2401 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
2402 of generic instances.
2404 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
2406 2008-10-19 Mark Probst <mark.probst@gmail.com>
2408 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
2409 OP_JMP depends on the method signature. Calculate it properly.
2411 2008-10-19 Zoltan Varga <vargaz@gmail.com>
2413 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
2416 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
2418 (emit_extra_methods): Add another table mapping method indexes to
2419 offsets in the extra_method_info table.
2421 * mini.h: Bump AOT file format version.
2423 * aot-runtime.c: Merge most of the code from mono_aot_get_method
2424 and mono_aot_get_method_from_token () into one function.
2426 2008-10-19 Mark Probst <mark.probst@gmail.com>
2428 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
2431 2008-10-18 Zoltan Varga <vargaz@gmail.com>
2433 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
2436 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
2439 * mini.c (mono_patch_info_equal): Compare the generic context as well.
2441 * mini.h: Bump aot file format version.
2443 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
2444 AOT file can contain native code for methods which are not in the METHOD
2445 table. Generate code for non-sharable generic instances of generic methods
2446 found in the METHODSPEC table.
2448 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
2449 encoding generic type handles.
2451 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
2452 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
2454 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
2455 macros + MONO_ADD_INS.
2457 * mini.c (mono_jump_info_token_new2): New function which takes a generic
2460 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
2462 * mini.h: Bump aot file format version.
2464 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
2466 2008-10-17 Mark Probst <mark.probst@gmail.com>
2468 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
2469 platforms, with definable stack alignment value. Set to 16 now
2472 * mini.c, mini.h, driver.c: Command line option for disabling
2475 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2477 * basic-simd.cs: Tests for new methods in Vector4ui.
2479 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2481 * mini-ops.h: Add packed int shuffle.
2485 * mini-x86.c (mono_arch_output_basic_block): Same.
2487 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
2488 extract mask, max, min, shuffle.
2490 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
2492 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2494 * basic-simd.cs: Tests for new methods in Vector8us.
2496 2008-10-17 Mark Probst <mark.probst@gmail.com>
2498 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
2499 RuntimeTypeHandle, not a TypedReference.
2501 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
2503 * simd-intrinsics.c: remove relocations.
2505 2008-10-17 Zoltan Varga <vargaz@gmail.com>
2507 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
2508 optimizations from the x86 backend.
2510 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
2512 * simd-methods.h, simd-intrinsics.c: debloat method names and
2513 prepare for no relocations.
2515 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2517 * mini-ops.h: Add packed min/equal and sum of absolute differences.
2521 * mini-x86.c (mono_arch_output_basic_block): Same.
2523 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
2524 extract mask, max, min and sum of absolute differences.
2526 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
2529 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2531 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
2532 Renamed one test for consistency.
2534 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2536 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
2537 fix to the code that deal with other blocks.
2539 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2541 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
2543 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2545 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
2546 that deals with vreg interference. Explicitly check for OP_LDADDR to be
2547 able to process the source reg.
2549 2008-10-16 Martin Baulig <martin@ximian.com>
2551 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
2553 * inssel.brg: Add `OP_HARD_NOP'.
2555 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
2557 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
2558 `OP_HARD_NOP' instruction when running inside the debugger.
2560 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
2561 `OP_HARD_NOP' instruction when running inside the debugger.
2563 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2565 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
2566 now works. The issue with the regalloc tripping up no longer
2569 * simd-intrinsics.c (load_simd_vreg): Same.
2571 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2573 * basic-simd.cs: Tests for new Vector8ui methods.
2575 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2577 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
2578 only for type. This fixes crashes where MonoInst::klass is checked
2579 for ops of type != VTYPE or OBJ.
2581 * simd-intrinsics.c (load_simd_vreg): Same.
2583 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2585 * mini-ops.h: Add ops for packed shuffle/max/avg and
2590 * mini-x86.c (mono_arch_output_basic_block): Same.
2592 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
2595 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
2596 to emit extract mask op.
2598 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
2599 to emit word shuffles.
2601 2008-10-15 Mark Probst <mark.probst@gmail.com>
2603 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
2604 the largest alignment needed by a variable, but at least
2607 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2609 * basic-simd.cs: Tests for the fixes in the last commit.
2611 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2613 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
2614 no longer handles STACK_PTR input.
2616 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
2618 * simd-intrinsics.c (load_simd_vreg): New function that works like
2619 get_simd_vreg but handles STACK_PTR input.
2621 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
2622 as the input can be an arbitrary pointer.
2624 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
2625 LDADDR local optimization directly otherwise use a store op.
2627 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2629 * basic-simd.cs: Tests for dup low and dup high.
2631 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2633 * mini-ops.h: Add dup low and dup high ops.
2637 * mini-x86.c (mono_arch_output_basic_block): Same.
2639 * simd-intrinsics.c (vector4f_intrinsics): Same.
2641 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2643 * basic-simd.cs: Tests for recently added functionality.
2645 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2647 * mini-ops.h: Add remaining sse1 fp ops.
2649 * cpu-x86.md: Add remaining sse1 fp ops.
2651 * mini-x86.c (mono_arch_output_basic_block): Same.
2653 * mini.h: Add enum for simd FP compare conditions.
2655 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
2657 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
2658 so the backed can generate the appropriate op.
2660 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2661 This patch squeese one more byte from the SimdIntrinsc struct.
2663 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
2664 a a shift amount intead of simply or'ing it.
2666 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
2668 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
2669 byte so we can have an aditional flags field without increasing struct size.
2671 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
2672 against the simd_supported_versions bitmask.
2674 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
2676 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
2678 * mini.c: remove rawbuffer code (the only use here is unsafe because
2679 it takes locks during signal handling and the kernel now provides much
2680 better info in proc/pid/smaps these days).
2682 2008-10-13 Zoltan Varga <vargaz@gmail.com>
2684 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
2685 OP_X86_PUSH_OBJ. Fixes #434620.
2687 * objects.cs: Add a test.
2689 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
2691 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
2692 that the packuswb/packusdw don't work with unsigned numbers for what
2693 would be negative numbers in signed format.
2695 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
2696 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
2698 * mini-ops.h: Add doubleword forms of many ops and packing ones.
2700 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
2702 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
2704 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
2706 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
2709 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
2710 version as the enum in mini.h.
2712 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
2713 for sse3 ops, check the simd_version field if present. This way the code
2714 works with all versions of sse.
2716 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2718 * simd-intrinsics.c: Fixed intrinsic name typo.
2720 * mini.h: Added missing simd exported function.
2722 * basic-simd.cs: Added tests for Vector4ui.
2723 Fixed broken test for Vector16b.
2725 2008-10-10 Zoltan Varga <vargaz@gmail.com>
2727 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
2728 the max length to 64.
2730 2008-10-10 Mark Probst <mark.probst@gmail.com>
2732 * method-to-ir.c: Only do the fast virtual generic method call for
2733 non-wrapper methods.
2735 * mini.h, mini-trampolines.c: The new generic virtual remoting
2736 trampoline handles virtual method calls via the vtable (as done by
2737 the fast virtual generic method calls) to remoting proxies.
2739 * mini.c (mono_jit_create_remoting_trampoline): For generic
2740 methods reate a generic virtual remoting trampoline.
2742 * mini-amd64.h: Enable fast virtual generic method calls again.
2744 2008-10-10 Mark Probst <mark.probst@gmail.com>
2746 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
2747 restore registers when doing tail calls.
2749 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2751 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
2754 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2756 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
2758 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2760 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
2762 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2764 * basic-simd.cs: Retrofit for API changes.
2766 2008-10-10 Mark Probst <mark.probst@gmail.com>
2768 * mini-ppc.c: Handle integer stack arguments for tail calls.
2770 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2772 * optflags-def.h: Removed sse3 optimization.
2776 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
2779 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
2781 * mini.h: Added enumeration with simd versions.
2783 * simd-intrinsics.c (emit_intrinsics): Use the new static var
2786 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
2788 * mini.c (mini_init): Call mono_simd_intrinsics_init.
2790 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2792 * basic-simd.cs: Added tests for Vector8u and Vector16u.
2794 * basic-simd.cs: Fixed test naming.
2796 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2798 * mini-ops.h: Added ops for packed and saturated math, shifts
2799 and packing/unpacking.
2801 * cpu-x86.md: Added descriptors for the above ops.
2803 * mini-x86.c: Added code to emmit the above ops.
2805 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
2807 2008-10-08 Zoltan Varga <vargaz@gmail.com>
2809 * aot-compiler.c (compile_method): Enable AOT for generic code.
2811 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
2813 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
2815 * mini.c: add a workaround for a common screwup that ends up blamed
2816 to mono (other processes blocking signal delivery).
2818 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2820 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
2821 in the LDFLD/STFLD opcodes. Fixes #432673.
2823 * iltests.il.in: Add a new test.
2825 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
2827 * mini-arm.c: attach the thread in unmanaged->managed transitions
2828 using delegates (bug #433148).
2830 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
2832 * basic-simd.cs: Use new ShuffleSel constants.
2834 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
2836 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
2838 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
2839 only disable simd intrinsics if no sse2 is detected.
2841 * optflags-def.h: Added sse3.
2843 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
2846 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2848 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
2849 when adding delegate-invoke wrappers.
2851 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2853 * Makefile.am: Reenable the simd tests.
2855 2008-10-07 Bill Holmes <billholmes54@gmail.com>
2857 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
2858 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
2859 other vreg is allocated to that hreg.
2861 Contributed under MIT/X11 license.
2863 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2865 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
2868 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
2870 * basic-simd.cs: New test suite for SIMD intrinsics.
2872 * Makefile.am: Added new tests.
2874 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
2876 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
2880 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
2882 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
2883 using SSE2 aware opcodes.
2885 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
2886 is enabled, this code path is only reachable if conversion ops are emmited after
2889 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
2891 This optimization saves 6 bytes per conversion against the old version.
2893 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2895 * aot-compiler.c (compile_method): Don't skip methods referencing
2896 generic methods without a corresponding entry in token_info_hash, since
2897 encode_method_ref () can handle all generic methods now.
2899 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
2900 generic context is set.
2902 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
2903 generic sharing of LDTOKEN.
2905 2008-10-06 Mark Probst <mark.probst@gmail.com>
2907 * mini-amd64.h: Temporarily disabled fast virtual generic method
2908 calls because it breaks the System.Runtime.Remoting tests.
2910 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2912 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
2914 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
2915 so inlining actually works.
2916 (check_inline_caller_method_name_limit): Ditto.
2918 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
2920 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
2921 64 bit safety (from Olaf Hering and Andreas Färber).
2923 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2925 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
2926 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
2927 unused virtual call support code.
2929 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
2931 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
2932 which can't use aot trampolines.
2933 (decode_patch): Don't create aot trampolines for methods which can't use
2936 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
2937 use aot trampolines.
2939 * mini.h: Bump AOT image format version.
2941 2008-10-05 Zoltan Varga <vargaz@gmail.com>
2943 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
2944 to save_token_info () since cmethod is inflated for constrained calls.
2946 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
2948 2008-10-04 Andreas Färber <andreas.faerber@web.de>
2950 * Makefile.am: Add build rules for ppc64.
2951 This avoids the build failing at pedump with unresolved symbols
2952 due to lack of arch_sources. Instead it will now fail earlier
2953 due to lack of cpu-ppc64.md.
2955 Contributed under MIT/X11 license.
2957 2008-10-04 Mark Probst <mark.probst@gmail.com>
2959 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
2962 * iltests.il.in: Add test case for tail call with many arguments.
2964 2008-10-03 Zoltan Varga <vargaz@gmail.com>
2966 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
2967 to the fast virtual generic method code until the aot case is fixed.
2969 2008-10-03 Mark Probst <mark.probst@gmail.com>
2971 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
2973 2008-10-03 Mark Probst <mark.probst@gmail.com>
2975 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
2978 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
2980 * simd-intrinsics.c: Forgot to add this one.
2982 * mini-codegen.c: Fix macro in case SIMD is not supported.
2984 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
2986 This patch land initial JIT support for simd intrinsics.
2988 * mini-x86.h: Added new define to make --enable_minimal work on x86.
2990 * Makefile.am: Added simd-intrinsics.c
2992 * simd-intrinsics.c: New file with simd instrinsic related
2995 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
2997 * cpu-x86.md: Add simd related instructions.
2999 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
3001 * driver.c: Added two new --regression variants.
3003 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
3005 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
3007 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
3008 extract some complicated logic to helper functions.
3010 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
3012 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
3014 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
3015 the specialized simplification pass.
3017 * method-to-ir.c (mono_spill_global_vars): Use new macro.
3019 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
3021 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
3024 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
3025 if MONO_ARCH_NEED_SIMD_BANK is defined.
3027 * mini-ops.h: Added the new simd ops.
3029 * mini-x86.c: Added mono_arch_xregname.
3031 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
3033 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
3035 * mini-x86.h: Define simd related MONO_ARCH macros.
3037 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
3039 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
3041 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
3042 MONO_CLASS_IS_SIMD to deal with simd related IR.
3044 * mini.h (MonoInst): Added spill_var to the backend union.
3046 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
3048 * mini.h: Added forward declarations of the new simd fuctions.
3050 * optflags-def.h: Added new optimization names SIMD.
3052 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
3054 * regalloc.h: Added support for working with 3 register banks.
3056 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
3058 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
3060 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
3062 * mini-exceptions.c: remove 64 bit related ifdef clutter.
3064 2008-10-03 Zoltan Varga <vargaz@gmail.com>
3066 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
3067 instead of one on 64 bit systems.
3069 * method-to-ir.c: Remove unused includes.
3071 2008-10-02 Zoltan Varga <vargaz@gmail.com>
3073 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
3074 cfg->used_int_regs, since the two are different on arm.
3076 2008-10-02 Mark Probst <mark.probst@gmail.com>
3078 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
3079 mono_method_get_vtable_index() to get the vtable index.
3081 2008-10-02 Mark Probst <mark.probst@gmail.com>
3083 * method-to-ir.c (mono_method_to_ir2): Don't create native
3084 wrappers for array methods, because they're never called (and if
3085 they were called they wouldn't work).
3087 2008-10-02 Mark Probst <mark.probst@gmail.com>
3089 * method-to-ir.c (mono_method_to_ir2): Array methods are
3090 special-cased and must not be invoked indirectly via the (M)RGCTX
3091 when generic sharing is turned on. Fixes #431413.
3093 2008-10-01 Mark Probst <mark.probst@gmail.com>
3095 * method-to-ir.c: When generic sharing is active, call
3096 non-interface virtual generic methods via the standard trampoline.
3098 * mini-trampolines.c: Handle virtual generic shared methods.
3100 * mini.h, mini-x86.c, mini-x86.h: New argument for
3101 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
3102 method thunks and which is the trampoline to call if the lookup
3103 fails. Enable the virtual generic method thunk for x86.
3105 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
3106 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
3107 argument but assert that it's NULL, because these archs don't yet
3108 implement the virtual generic method thunk. Changes in the IMT
3109 thunk data structures.
3111 2008-10-01 Zoltan Varga <vargaz@gmail.com>
3113 * aot-compiler.c (emit_globals): Avoid invalid characters in
3114 the static linking symbol.
3116 * objects.cs: Add a test for the range check optimization. Fix warnings.
3118 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
3119 optimization from the current JIT.
3121 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
3122 later in decompose_array_access_opts () to allow more optimizations.
3124 * method-to-ir.c (mono_handle_soft_float): Rename this to
3125 mono_decompose_soft_float () for consistency.
3127 * mini-ops.h: Fix arguments of OP_STRLEN.
3129 * method-to-ir.c (save_cast_details): Extract the cast details saving code
3130 into a separate function.
3131 (reset_cast_details): Ditto.
3132 (handle_unbox): Save cast details. Fixes #431254.
3134 * method-to-ir.c: Remove some obsolete FIXMEs.
3136 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3138 * ir-emit.h (alloc_dreg): Write a warning before crashing.
3140 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3142 * mini-codegen.c: More work on macros to make them
3143 ready for multiple regbanks.
3145 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3147 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
3149 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
3151 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3153 * mini-codegen.c (mono_spillvar_offset): Proper support for
3156 2008-09-30 Zoltan Varga <vargaz@gmail.com>
3158 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
3159 the stack overflow changes.
3161 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3163 * mini-codegen.c: Make all bank macros depend on reg_bank.
3165 * mini-codegen.c (mono_local_regalloc): Make free mask
3166 initialization regbank aware.
3168 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3170 * mini-codegen.c (mono_local_regalloc): Extract callee
3171 mask selection to a function and make it regbank aware.
3173 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3175 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
3176 code to deal with many regbanks.
3178 2008-09-30 Zoltan Varga <vargaz@gmail.com>
3180 * mini-codegen.c: More fp->regbank changes.
3182 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
3184 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
3185 of a hardcoded constant.
3187 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
3189 * method-to-ir.c (type_from_stack_type): Fix typo.
3191 2008-09-29 Zoltan Varga <vargaz@gmail.com>
3193 * mini-ia64.c (emit_move_return_value): Convert float return values to
3196 * objects.cs: Add a new test.
3198 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
3199 VARARG methods to fix an assert later.
3201 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
3202 end so it at least compiles.
3204 2008-09-28 Zoltan Varga <vargaz@gmail.com>
3206 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
3208 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
3210 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
3211 optimization to a new function (emit_optimized_ldloca_ir) and enable
3212 it for both ldloca and ldloca_s.
3214 2008-09-28 Zoltan Varga <vargaz@gmail.com>
3216 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
3217 gshared CASTCLASS code.
3219 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
3220 amd64, where the libc stack unwinder encounters stack frames referring to
3221 native code in unmapped memory.
3223 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
3226 * generics.cs: Add new test.
3228 2008-09-27 Zoltan Varga <vargaz@gmail.com>
3230 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
3231 add a check that one of the ARM_FPU_ constants is defined.
3233 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
3235 * mini-exceptions.c: Fix build on non-altstack platforms.
3237 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
3240 * ir-emit.h: Add a comment to NEW_PCONST.
3242 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
3244 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
3246 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
3247 after the changes to MonoJitDomainInfo.
3249 2008-09-27 Mark Probst <mark.probst@gmail.com>
3251 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
3253 2008-09-27 Mark Probst <mark.probst@gmail.com>
3255 * mini-ppc.c: Compiler warning fixes.
3257 2008-09-27 Mark Probst <mark.probst@gmail.com>
3259 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
3262 2008-09-27 Mark Probst <mark.probst@gmail.com>
3264 * exceptions-ppc.c, mini-ppc.h: Compile
3265 mono_arch_handle_altstack_exception() on Darwin, too.
3267 2008-09-27 Mark Probst <mark.probst@gmail.com>
3269 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
3270 work on archs which don't have generic sharing implemented, only
3271 without the vtable_arg.
3273 2008-09-26 Mark Probst <mark.probst@gmail.com>
3275 * mini.c: Added comment explaining why delegate ctor icall
3276 wrappers are compiled.
3278 2008-09-26 Mark Probst <mark.probst@gmail.com>
3280 * mini.c: Don't produce trampolines to delegate ctor icall
3281 wrappers but compile them upfront.
3283 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
3285 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
3286 runtime-set function when going back to managed code. Currently this
3287 is used to set back the protection on the soft ovf pages and/or to
3288 throw the stack overflow exception that happened in unmanaged code.
3290 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
3292 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
3293 runtime-set function when going back to managed code. Currently this
3294 is used to set back the protection on the soft ovf pages and/or to
3295 throw the stack overflow exception that happened in unmanaged code.
3297 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3299 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
3300 the support code for restoring stack protection after stack overflows
3301 that happen in unmanaged code. Don't set the exec permission on the
3304 2008-09-26 Zoltan Varga <vargaz@gmail.com>
3306 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
3307 delegate->method_ptr is set. Fixes #428054.
3309 2008-09-25 Zoltan Varga <vargaz@gmail.com>
3311 * tests.cs: Rename to ratests.cs.
3313 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
3314 emit_get_rgctx_... functions.
3316 2008-09-25 Mark Probst <mark.probst@gmail.com>
3318 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
3320 2008-09-25 Mark Probst <mark.probst@gmail.com>
3322 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
3323 before asserting that method is sharable.
3325 2008-09-25 Mark Probst <mark.probst@gmail.com>
3327 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
3328 whether method needs a static RGCTX wrapper used instead of
3331 * generic-sharing.c, mini.h: A few functions moved to
3332 metadata/generic-sharing.c.
3334 2008-09-25 Mark Probst <mark.probst@gmail.com>
3336 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
3337 Generic code sharing for value types, which essentially means
3338 treating value type methods like static methods. The RGCTX is
3339 passed in the same way.
3341 2008-09-25 Zoltan Varga <vargaz@gmail.com>
3343 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
3344 opcode when creating multi-dimensional arrays of open types.
3346 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
3349 * generics.cs: Add a test.
3351 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
3353 2008-09-24 Zoltan Varga <vargaz@gmail.com>
3355 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
3357 * mini.c (mini_method_compile): Set it when running under the debugger.
3359 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
3360 vreg optimization if the flag is set.
3362 * driver.c (mono_main): Add --attach= option to pass options to
3365 * mini.c (sigquit_signal_handler): Start the attach agent.
3367 * ssapre.c: Disable this to save space since it is not yet ported to
3370 * regalloc2.c: Disable this to save space.
3372 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
3374 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
3376 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
3377 the -v option useful again.
3379 2008-09-24 Zoltan Varga <vargaz@gmail.com>
3381 * mini-amd64.c (mono_arch_output_basic_block): Add support for
3384 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
3385 arrays of arrays. Fixes #428406.
3387 * method-to-ir.c (mini_emit_castclass): Ditto.
3389 * objects.cs: Add new test.
3391 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
3393 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
3394 was wrong at it choked against target_type_is_incompatible for byref types.
3396 2008-09-23 Zoltan Varga <vargaz@gmail.com>
3398 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
3401 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
3403 * mini-exceptions.c: update a few more exceptions-related counters.
3405 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
3407 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
3408 new functions to allocate from persistent mempools.
3410 2008-09-23 Zoltan Varga <vargaz@gmail.com>
3412 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
3413 multiple register banks in the future.
3415 * mini-codegen.c (mono_local_regalloc): Fix a warning.
3417 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
3419 * mini.c (type_to_eval_stack_type): Remove duplicated function.
3421 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
3423 * mini.h: Export type_to_eval_stack_type.
3425 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
3426 is only ins->klass of byref types.
3428 2008-09-22 Zoltan Varga <vargaz@gmail.com>
3430 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
3431 (mini_emit_memcpy2): Ditto.
3433 * mini-amd64.c: Fix a warning.
3435 2008-09-21 Mark Probst <mark.probst@gmail.com>
3437 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
3440 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
3442 * method-to-ir.c: Extract stloc micro-optimization to a
3443 function and apply it to all cases.
3445 2008-09-19 Mark Probst <mark.probst@gmail.com>
3447 * method-to-ir.c: Don't fail generic code sharing in cases we
3450 2008-09-18 Mark Probst <mark.probst@gmail.com>
3452 * mini-ppc.c: Handle structs in tailcalls on Darwin.
3454 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
3456 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
3459 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
3461 * trace.c: make tracing more useful and correct, with per-thread
3464 2008-09-15 Mark Probst <mark.probst@gmail.com>
3466 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
3467 doing a method call and the argument is an R4.
3469 2008-09-14 Zoltan Varga <vargaz@gmail.com>
3471 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
3474 2008-09-13 Mark Probst <mark.probst@gmail.com>
3476 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
3478 2008-09-12 Zoltan Varga <vargaz@gmail.com>
3480 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
3481 (MONO_JUMP_TABLE_FROM_INS): Ditto.
3483 2008-09-11 Zoltan Varga <vargaz@gmail.com>
3485 * driver.c: Add a --agent argument (not supported yet) to load managed
3486 agent assemblies before loading the main assembly, similarly to how the
3487 Java VM handles agents.
3489 2008-09-11 Mark Probst <mark.probst@gmail.com>
3491 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
3492 function to do stack layout of local variables.
3494 2008-09-11 Mark Probst <mark.probst@gmail.com>
3496 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
3499 2008-09-11 Zoltan Varga <vargaz@gmail.com>
3501 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
3502 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
3503 JIT if DISABLE_JIT is defined.
3505 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
3508 2008-09-10 Mark Probst <mark.probst@gmail.com>
3510 * iltests.il.in: Disable the fconv test on PPC (the result is
3511 undefined according to ECMA).
3513 2008-09-10 Mark Probst <mark.probst@gmail.com>
3515 * iltests.il.in: Enable tail call tests for PPC.
3517 * mini.h: Add variable for storing incoming valuetype argument
3518 addresses for tail calls.
3520 * mini-ppc.c: Implement valuetype arguments and return values for
3523 2008-09-09 Mark Probst <mark.probst@gmail.com>
3525 * mini-ppc.c: Partially implement tail calls (struct arguments and
3526 return values not supported).
3528 * method-to-ir.c: Enable tail calls on PPC.
3530 2008-09-08 Zoltan Varga <vargaz@gmail.com>
3532 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
3533 runtime-invoke wrappers to work around the problem of them getting
3534 assigned to a random class.
3536 * aot-runtime.c (mono_aot_get_method): Ditto.
3538 2008-09-07 Zoltan Varga <vargaz@gmail.com>
3540 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
3541 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
3543 2008-09-07 Mark Probst <mark.probst@gmail.com>
3545 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
3546 until they're implemented properly.
3548 * exceptions-ppc.c: Use arch-independent exception-handling code
3549 instead of custom one.
3551 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
3554 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
3556 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
3557 applies when __powerpc__ is defined.
3559 2008-09-06 Zoltan Varga <vargaz@gmail.com>
3561 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
3562 methods to their code to avoid computing the full name of wrappers and
3563 doing a lookup in a string hash table.
3565 2008-09-05 Zoltan Varga <vargaz@gmail.com>
3567 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
3568 we identify bblocks before method_to_ir () is ran.
3570 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
3571 Also avoid optimizing branches pointing to themselves.
3573 * mini.c (mini_method_compile): Ditto. Fixes #422947.
3575 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
3577 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
3579 2008-09-05 Zoltan Varga <vargaz@gmail.com>
3581 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
3582 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
3583 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
3586 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
3587 jumped to the same entry in plt_jump_table.
3589 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3591 * method-to-ir.c (initialize_array_data): Handle field with RVA from
3594 2008-08-31 Zoltan Varga <vargaz@gmail.com>
3596 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
3597 other assignment can be if converted. Saves 1.5% on corlib size and fixes
3600 2008-08-29 Geoff Norton <gnorton@novell.com>
3602 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
3603 segment, and doesn't properly handle .space as .text. Fixes
3606 2008-08-29 Geoff Norton <gnorton@novell.com>
3608 * mini.c: Disable the mach exception handler when running on
3611 2008-08-29 Geoff Norton <gnorton@novell.com>
3613 * aot-compiler.c: Patch from Renaldas Zioma to properly register
3614 globals on Darwin/ARM
3616 2008-08-28 Zoltan Varga <vargaz@gmail.com>
3618 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
3619 since too many things depend on it. Instead, call
3620 mono_runtime_set_no_exec ().
3622 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
3625 * aot-compiler.c: Add an 'asm-only' AOT option.
3627 * mini.c: Avoid initializing the runtime when doing AOT compilation.
3629 * aot-compiler.c (compile_method): Disable gshared support for now as it
3632 2008-08-27 Bill Holmes <billholmes54@gmail.com>
3634 * mini-amd64.h : Fix a compiler warning.
3636 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
3637 Changed to use a callback function to retrieve the unwind info.
3638 This avoids problems observed when code blocks were removed by
3639 unloading an app domain.
3641 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
3642 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
3645 Contributed under MIT/X11 license.
3647 2008-08-27 Bill Holmes <billholmes54@gmail.com>
3649 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
3650 case to keep the stack aligned to 8.
3652 Contributed under MIT/X11 license.
3654 2008-08-26 Zoltan Varga <vargaz@gmail.com>
3656 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
3657 avoid repeated linear searches.
3659 2008-08-25 Zoltan Varga <vargaz@gmail.com>
3661 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
3662 methods it can't handle.
3664 * aot-compiler.c (add_method): Avoid adding a method twice.
3665 (add_wrappers): Add runtime invoke wrappers for all methods.
3667 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
3668 function to create an aot-compatible version of this trampoline.
3670 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
3672 2008-08-24 Zoltan Varga <vargaz@gmail.com>
3674 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
3676 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
3677 with a generic sharing failure.
3679 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
3681 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
3682 CEE_RETHROW. Fixes #419634.
3684 * mini.c (mono_method_to_ir): Ditto.
3686 * exceptions.cs: Add a new test.
3688 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
3689 to mono_type_stack_size_internal () since some callers might not pass in
3692 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
3693 instrument_prolog. Fixes #419878.
3695 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
3696 doubles in soft float mode volatile.
3698 2008-08-23 Zoltan Varga <vargaz@gmail.com>
3700 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
3702 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
3703 to handle soft float correctly.
3705 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
3708 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
3710 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
3711 to sp, since the generics catch code requires it.
3713 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
3716 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
3717 mono_arch_emit_imt_argument ().
3719 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
3721 * mini-arm.c tramp-arm.c: Generic sharing updates.
3723 2008-08-22 Zoltan Varga <vargaz@gmail.com>
3725 * mini-arm.c: Fix the arm build.
3727 * generic-sharing.c (mini_type_get_underlying_type): New helper function
3728 handling enums, generic instances and generic sharing.
3729 (mini_type_stack_size_full): Ditto.
3731 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
3733 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
3735 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
3737 * tramp-arm.c: Implement the rgctx fetch and the generic class init
3740 * mini-arm.c: Various small generic sharing changes.
3742 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
3744 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
3747 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
3748 helper function to return a generic class init trampoline.
3750 * method-to-ir.c mini.c: Use it.
3752 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
3753 arch-specfic function to return a generic class init trampoline.
3755 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
3756 the GENERIC_CLASS_INIT custom code.
3758 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
3759 a fatal error, not a sharing failure.
3761 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
3764 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
3765 trampoline argument from MONO_ARCH_VTABLE_REG.
3767 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3768 order of the arguments to the C trampoline: pass 'slot' as the trampoline
3769 argument, and pass the vtable in VTABLE_REG.
3771 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3772 order of the arguments to the C trampoline: pass 'slot' as the trampoline
3773 argument, and pass the vtable in VTABLE_REG.
3774 (mono_arch_create_trampoline_code_full): Remove some special casing for
3775 the rgctx fetch trampoline.
3777 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
3780 * iltests.il: Add a test for it.
3782 2008-08-21 Zoltan Varga <vargaz@gmail.com>
3784 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
3786 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
3789 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
3790 use mono_jit_info_table_find () to avoid recursion.
3791 (mono_delegate_trampoline): Add a sync wrapper here.
3793 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
3796 * mini.c (mono_method_to_ir): Ditto.
3798 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
3799 add_sync_wrapper argument. Don't add a sync wrapper here.
3800 (mono_create_jump_trampoline): Don't add a sync wrapper here.
3802 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
3804 2008-08-20 Bill Holmes <billholmes54@gmail.com>
3806 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
3807 of nonvolatile registers back from MonoContext to CONTEXT.
3809 Contributed under MIT/X11 license.
3811 2008-08-20 Bill Holmes <billholmes54@gmail.com>
3813 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
3814 arguments on Winx64 there are only 4 argument registers. For this
3815 logic to work the last argument must be pulled from the stack.
3817 Contributed under MIT/X11 license.
3819 2008-08-20 Zoltan Varga <vargaz@gmail.com>
3821 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3823 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
3824 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
3825 encode/decode_method_ref ().
3827 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
3829 * aot-runtime.c (decode_patch): Ditto.
3831 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
3832 MONO_PATCH_INFO_METHOD.
3834 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
3837 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
3840 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
3842 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
3843 one from the caller.
3845 * aot-runtime.c (decode_generic_inst): New function to decode and
3846 return a interned generic inst.
3847 (decode_klass_ref): Use it.
3848 (decode_method_ref): Ditto.
3850 * aot-compiler.c (emit_exception_debug_info): Save
3851 jinfo->has_generic_jit_info too.
3853 2008-08-19 Zoltan Varga <vargaz@gmail.com>
3855 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
3857 * iltests.il.in: Add a test for fconv_to_i.
3859 * liveness.c: Disable the liveness2 pass for now to save space.
3861 * regalloc2.c: Include mempool-internals.h to fix warnings.
3863 * aot-compiler.c (encode_method_ref): Encode the context of generic
3866 * aot-runtime.c (decode_method_ref): Inflate generic methods using
3867 the context saved in the aot file.
3869 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3871 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3873 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
3874 volatile so they won't be optimized away.
3876 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3882 * dominators.c: Remove duplicated functions that now are in
3883 mempool-internals.h.
3885 2008-08-19 Zoltan Varga <vargaz@gmail.com>
3887 * aot-compiler.c: Fix warnings.
3889 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
3891 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
3893 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
3896 * mini.c (mono_resolve_patch_target): Ditto.
3898 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
3899 (encode_klass_ref): Add support for encoding VARs/MVARs.
3901 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
3903 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
3904 the handling of the got entries into a separate 'decode_got_entry' function.
3905 Add support for RGCTX_FETCH.
3907 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
3908 clobbered by the trampoline code.
3910 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
3911 not clobbered by the indirect calling code.
3913 2008-08-18 Zoltan Varga <vargaz@gmail.com>
3915 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
3918 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3920 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
3921 signature using the compilation mempool otherwise we would leak it.
3923 2008-08-18 Zoltan Varga <vargaz@gmail.com>
3925 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
3926 mono_emit_abs_call ().
3928 * patch-info.h: Add GENERIC_CLASS_INIT.
3930 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
3932 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
3933 as their target as a near call.
3935 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
3937 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
3939 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
3940 call to a runtime function described by a patch.
3942 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
3943 mono_emit_abs_call, this has the advantage that the ABS handling code in
3944 mono_codegen () can handle them both, and can handle other stuff in the
3945 future without additional code.
3947 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
3949 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
3952 * mini.h: Add missing bblock related prototypes.
3954 * mini.h (MonoCompile): Remove unused reverse_inst_list and
3955 reverse_inst_list_len fields.
3957 * mini.c: Refactor this file a bit by moving branch optimizations to
3960 * method-to-ir.c: Merge generic sharing changes missed earlier.
3962 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
3964 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
3965 shared patches. Process METHODCONST as a shared patch.
3967 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
3968 as it crashes on the 2.0 mscorlib.
3970 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
3973 * aot-compiler.c: Use is_plt_patch () in a few additional places.
3974 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
3977 * aot-compiler.c: Reorganize the got handling code to be a bit more
3980 2008-08-17 Zoltan Varga <vargaz@gmail.com>
3982 * aot-compiler.c: Make the patch_to_plt_offset hash table use
3983 mono_patch_info_equals/hash, and use it to massively simplify
3986 * mini.c (mono_patch_info_hash): Simplify this and add support for
3989 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
3991 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
3992 handling code, since an offset is not enough to identify a trampoline.
3994 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
3996 2008-08-17 Mark Probst <mark.probst@gmail.com>
3998 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
4000 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
4002 * mini-ops.h: Argument and result types for OVF_CARRY ops.
4004 * decompose.c: PPC decompositions for various ops.
4006 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
4008 2008-08-17 Zoltan Varga <vargaz@gmail.com>
4010 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
4011 call the generic trampoline code using a call, instead of a jump, to
4012 remove some special casing from the generic trampoline code.
4014 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
4015 (mono_codegen): Ditto.
4017 * aot-compiler.c aot-runtime.c: Ditto.
4019 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
4021 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
4022 helper function to find the offset corresponding to a lazy fetch trampoline.
4024 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
4025 when doing generic sharing.
4027 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
4030 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
4031 mini-trampolines.c to be with the other trampoline creation functions.
4033 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
4034 as it is equal to method->signature in most cases, add a
4035 mono_emit_method_call_full variant which takes a signature and an imt
4038 2008-08-16 Zoltan Varga <vargaz@gmail.com>
4040 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
4041 to this function, since it could be computed easily from the method
4043 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
4046 * method-to-ir.c mini.c: Remove references to
4047 compile_generic_method_wo_context.
4049 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
4050 generic method calls.
4052 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
4053 dimensional non-szarrays.
4055 * mini.c (mini_init): Register mono_array_new_1.
4057 * jit-icalls.c (mono_array_new_1): New jit icall.
4059 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
4060 pointing to the method.
4062 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
4063 method addresses belonging to METHOD_JUMP patches in the
4064 jump_target_got_slot_hash.
4065 (mono_aot_load_method): Ditto.
4067 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
4068 METHOD_JUMP patches.
4070 * mini.c (mini_create_jit_domain_info): New helper function which
4071 initializes/frees domain->runtime_info.
4072 (mini_free_jit_domain_info): Ditto.
4073 (mini_init): Install the domain hook functions with the runtime.
4075 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
4076 information maintained by the JIT.
4078 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
4079 insertion into jump_table_hash into mono_codegen (), also implement proper
4082 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
4083 tail calls, it is already done by the aot code.
4085 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
4088 * iltests.il.in: Make the jmp test a bit more complex.
4090 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
4091 generic instances which doesn't have a token.
4093 * aot-runtime.c (decode_method_ref): Ditto.
4095 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
4096 can handle this case now.
4097 (handle_box): Ditto.
4099 2008-08-15 Geoff Norton <gnorton@novell.com>
4101 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
4104 2008-08-15 Zoltan Varga <vargaz@gmail.com>
4106 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
4107 calling generic methods.
4109 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
4111 * aot-runtime.c (decode_patch_info): Ditto.
4113 * mini.c (mono_resolve_patch_target): Ditto.
4115 * patch-info.h: Add METHOD_RGCTX.
4117 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
4119 2008-08-14 Zoltan Varga <vargaz@gmail.com>
4121 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
4122 arguments in registers.
4124 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
4125 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
4127 * mini.c (mini_method_compile): Abort aot compilation for generic
4128 methods if generic sharing is disabled.
4130 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
4133 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
4134 requiring an mrgctx.
4136 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
4137 store instructions when converting a vcall to a normal call.
4139 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
4140 mono_arch_find_jit_info.
4142 2008-08-13 Zoltan Varga <vargaz@gmail.com>
4144 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
4145 avoid calling mono_method_full_name () for every method even if the
4147 (check_inline_caller_method_name_limit): Ditto.
4149 2008-08-12 Zoltan Varga <vargaz@gmail.com>
4151 * driver.c (main_thread_handler): Allow AOT compilation of multiple
4152 assemblies in one run.
4154 * aot-compiler.c (mono_compile_assembly): Only print out a count of
4155 skipped methods if it is not 0.
4157 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
4159 2008-08-12 Bill Holmes <billholmes54@gmail.com>
4161 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
4162 MONO_ARCH_HAVE_UNWIND_TABLE.
4164 Contributed under MIT/X11 license.
4166 2008-08-12 Bill Holmes <billholmes54@gmail.com>
4168 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
4169 from default optimizaton list on Winx64.
4171 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
4173 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
4174 the LMF from the MonoJitTlsData structure.
4176 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
4178 Contributed under MIT/X11 license.
4180 2008-08-12 Zoltan Varga <vargaz@gmail.com>
4182 * mini.c (sigsegv_signal_handler): Fix the build.
4184 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
4185 assembly->aot_module.
4187 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
4188 hash table. This simplifies and speeds up a lot of code, and fixes support
4191 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
4194 * mini-exceptions.c: Ditto.
4196 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
4197 'native_offset' argument, since these are computed in the
4198 mono_find_jit_info () function.
4200 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
4201 is used by exceptions-ppc.c.
4203 * exceptions-ppc.c: Call mono_find_jit_info () instead of
4204 mono_arch_find_jit_info ().
4206 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
4207 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
4208 generic code in mini-exceptions.c.
4210 2008-08-11 Zoltan Varga <vargaz@gmail.com>
4212 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
4214 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
4216 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
4217 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
4218 called while holding the loader lock. Fixes #415608.
4219 (mono_aot_get_method_from_token_inner): Ditto.
4221 2008-08-09 Zoltan Varga <vargaz@gmail.com>
4223 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
4224 to reduce differences between this and the generic implementation in
4226 (ves_icall_get_frame_info): Ditto.
4228 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
4230 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
4233 * exceptions-ppc.c (arch_get_call_filter): Rename this to
4234 mono_arch_get_call_filter () and make it non-static, for consistency with the
4235 other architectures.
4237 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
4240 * local-propagation.c:
4241 * mini-x86.c: Correct the name of arch defines.
4243 2008-08-09 Zoltan Varga <vargaz@gmail.com>
4245 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
4246 NO_EMULATE_LONG_SHIFT_OPS define.
4248 2008-08-08 Zoltan Varga <vargaz@gmail.com>
4250 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
4251 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
4253 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
4254 MACH fixes. Merged from the 2.0 branch.
4256 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
4258 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
4259 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
4261 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
4263 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
4264 mono_marshal_get_native_wrapper () signature changes.
4266 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
4268 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
4269 conversion bug under arm.
4271 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
4273 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
4275 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
4276 with overflow checking.
4278 2008-08-05 Marek Habersack <mhabersack@novell.com>
4280 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
4281 to the genmdesc.pl file
4283 2008-08-05 Zoltan Varga <vargaz@gmail.com>
4285 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
4286 arg_array in the soft-float versions of the LOAD/STORE macros.
4288 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
4291 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
4293 2008-08-02 Zoltan Varga <vargaz@gmail.com>
4295 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
4296 a float HFA. Fixes #413621.
4298 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
4300 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
4301 frame_size to args_size. Fixes build.
4303 2008-08-02 Zoltan Varga <vargaz@gmail.com>
4305 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
4306 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
4308 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
4309 the stack are not unaligned. Fixes #413247.
4311 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
4313 * mini.c: update jitted methods performance counters.
4315 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4317 * mini-exceptions.c: increase the exceptions thrown performance
4318 counter in mono_handle_exception ().
4320 2008-07-29 Zoltan Varga <vargaz@gmail.com>
4322 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
4323 can work with netmodules.
4325 2008-07-28 Geoff Norton <gnorton@novell.com>
4327 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
4330 2008-07-28 Zoltan Varga <vargaz@gmail.com>
4332 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
4335 2008-07-28 Bill Holmes <billholmes54@gmail.com>
4337 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4338 The float param registers and other param registers must be the
4339 same index on Windows x64.
4341 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
4342 ArgValuetypeAddrInIReg argument case. Setting the argument
4343 op to OP_VTARG_ADDR (OP_REGOFFSET)).
4345 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
4346 variable computed above as the copy length for arguments of storage
4347 type ArgValuetypeAddrInIReg.
4349 * mini-amd64.c (mono_arch_emit_call) : Implementing the
4350 ArgValuetypeAddrInIReg argument case. This case will rely on
4351 mono_arch_emit_outarg_vt to emit the correct code later in the process.
4353 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
4354 a 32 byte stack allocation for all calls. We will omit the adjustment for
4355 jump and tail call instructoins as they do not follow the typical call behavior.
4357 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
4358 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
4359 local variable and pass the local variable by reference to the called method.
4361 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
4362 Implementing the ArgValuetypeAddrInIReg argument case. When the address
4363 of a struct is passed in a register it must be saved with the other
4364 volatile argument on the stack.
4366 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
4367 frame pointer the stack adjustment value must be saved to the unwind
4370 Contributed under MIT/X11 license.
4372 2008-07-28 Zoltan Varga <vargaz@gmail.com>
4374 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
4375 which got lost in the merge.
4377 2008-07-27 Zoltan Varga <vargaz@gmail.com>
4379 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
4382 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
4384 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
4385 icalls, since they won't be patched.
4387 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
4388 different code sequence when running under valgrind to prevent some valgrind
4391 * iltests.il.in: Add new regression test.
4393 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
4396 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
4397 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
4399 * iltests.il.in: Add new test.
4401 * aot-compiler.c: Fix some warnings.
4403 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
4406 2008-07-27 Zoltan Varga <vargaz@gmail.com>
4408 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
4409 (mini_usage_jitdeveloper): Add a missing --wapi option.
4411 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4413 * mini-codegen.c: Simplify the is_fp macros.
4414 (free_up_ireg): Remove, use free_up_reg instead.
4415 (free_up_reg): Fix the fp case.
4417 2008-07-26 Zoltan Varga <vargaz@gmail.com>
4419 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
4422 * exceptions-x86.c: Merge some changes which seemed to have got lost
4423 in the linear-ir merge.
4425 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
4427 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
4428 long vreg volatile even if the variable was already created.
4430 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
4433 2008-07-26 Zoltan Varga <vargaz@gmail.com>
4435 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
4437 * mini.c (mono_jit_compile_method_inner): Add support for
4438 MONO_EXCEPTION_BAD_IMAGE.
4440 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
4441 mini_method_get_context () returns NULL. Fixes #356531.
4443 * mini.c (mono_method_to_ir): Ditto.
4445 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
4446 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
4448 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4450 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
4451 in the LDFTN implementation.
4453 2008-07-25 Mark Probst <mark.probst@gmail.com>
4455 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
4456 code, patch calls to icalls, too, even if they're not in the
4457 shared generic code hash. Fixes #411962.
4459 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4461 * cpu-x86.md: Increase the length of the fcall opcodes.
4463 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
4464 calls returning floats.
4466 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
4469 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
4472 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
4473 into the domain->method_code_hash.
4475 * aot-compiler.c: Fix win32 build.
4477 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
4479 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
4480 gshared NEWARR implementation.
4482 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
4484 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
4485 can be used outside of method_to_ir.
4487 * mini.h (MonoCompile): Add arg_types field.
4489 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
4491 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
4492 the values of the local arg_array and param_types array.
4494 2008-07-24 Zoltan Varga <vargaz@gmail.com>
4496 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
4497 got accesses might only get generated later when NEWOBJ is decomposed.
4499 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
4500 looking up the native code of the target method when a delegate is called
4503 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
4506 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
4508 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
4509 AOT work on platforms without a working dlsym implementation.
4511 * mini.h: Bump AOT image format version.
4513 2008-07-24 Mark Probst <mark.probst@gmail.com>
4515 * mini-exceptions.c: Free a MonoType with
4516 mono_metadata_free_type() instead of g_free().
4518 * aot-runtime.c: Free a MonoType.
4520 2008-07-24 Zoltan Varga <vargaz@gmail.com>
4522 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
4525 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
4528 2008-07-23 Massimiliano Mantione <massi@ximian.com>
4529 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
4532 2008-07-23 Zoltan Varga <vargaz@gmail.com>
4534 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
4535 NEWOBJ calls on valuetypes.
4537 * iltests.il.in: Add new test.
4539 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
4541 2008-07-22 Zoltan Varga <vargaz@gmail.com>
4543 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
4544 is no longer needed.
4546 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
4547 non register sized integer arguments.
4548 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
4549 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
4552 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
4555 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
4556 two a binop with different sized arguments is emitted.
4558 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
4559 instruction in the ins==NULL case.
4561 2008-07-23 Zoltan Varga <vargaz@gmail.com>
4563 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
4565 * mini-x86.c: Fix osx build.
4567 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
4570 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
4571 instruction for non int sized variables.
4573 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
4576 2008-07-23 Robert Jordan <robertj@gmx.net>
4578 * method-to-ir.c: Fix MSVC build.
4580 2008-07-22 Zoltan Varga <vargaz@gmail.com>
4582 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
4583 a non int sized type, widen it to an int since newer versions of gcc seem to
4584 generate code which needs this.
4586 * ssa2.c abcremoval2.c: Fix warnings.
4588 * *: Merge the Linear IR branch.
4590 The original branch is at trunk/branches/vargaz/mini-linear-il, and
4591 the ChangeLog file there describes all the changes done over the years.
4592 Further documentation can be found at www.mono-project.com/Linear_IL.
4594 2008-07-21 Bill Holmes <billholmes54@gmail.com>
4596 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4597 The float param registers and other param registers must be the
4598 same index on Windows x64.
4600 Contributed under MIT/X11 license.
4602 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
4604 * mini.c: Make the previous fix GC safe.
4606 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
4608 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
4610 2008-07-21 Bill Holmes <billholmes54@gmail.com>
4612 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
4613 on Winx64. This type will not be passed on the stack (ArgOnStack), but
4614 ArgValuetypeAddrInIReg instead.
4616 Contributed under MIT/X11 license.
4618 2008-07-21 Zoltan Varga <vargaz@gmail.com>
4620 * mini-codegen.c (get_register_spilling): Fix a warning.
4622 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
4624 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
4625 for types which the initialization fails. Raises the provided exception
4626 at the right stop after cleanup.
4628 2008-07-16 Zoltan Varga <vargaz@gmail.com>
4630 * aot-compiler.c: Free most of the memory allocated during compilation.
4632 * mini.c (mini_parse_debug_options): Fix a leak.
4634 * mini.c (mini_method_compile): Don't add the method to the jit info tables
4635 during aot compilation.
4637 2008-07-14 Zoltan Varga <vargaz@gmail.com>
4639 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
4640 it has too much register pressure.
4642 2008-07-13 Zoltan Varga <vargaz@gmail.com>
4644 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
4646 2008-07-12 Zoltan Varga <vargaz@gmail.com>
4648 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4651 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4652 on amd64 similar to the way it is done on arm.
4654 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4656 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
4657 consistency, normalize error messages, avoid loading aot-only modules in
4660 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
4663 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
4665 2008-07-11 Martin Baulig <martin@ximian.com>
4668 (MonoDebuggerInfo): Add `interruption_request'.
4670 2008-07-12 Zoltan Varga <vargaz@gmail.com>
4672 * aot-compiler.c (emit_plt): Remove some dead code.
4674 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
4676 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
4677 return the plt info offset belonging to a given plt entry.
4679 * mini-trampolines.c (mono_aot_plt_trampoline): Use
4680 mono_aot_get_plt_info_offset.
4682 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
4683 similar to the amd64 code by makeing jumps through a separate jump table
4684 instead of embedding the jump addresses into the code.
4686 2008-07-11 Zoltan Varga <vargaz@gmail.com>
4688 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
4691 2008-07-10 Martin Baulig <martin@ximian.com>
4693 * mini.c (mini_method_compile): Disable generics sharing when
4694 running in the debugger.
4696 2008-07-10 Zoltan Varga <vargaz@gmail.com>
4698 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
4700 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
4701 the local register allocator from running out of registers on x86 when
4704 2008-07-10 Bill Holmes <billholmes54@gmail.com>
4706 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
4707 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
4710 Contributed under MIT/X11 license.
4712 2008-07-10 Zoltan Varga <vargaz@gmail.com>
4714 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
4715 speed up the assembler.
4717 2008-07-09 Zoltan Varga <vargaz@gmail.com>
4719 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
4722 * mini.c: Move the soft float handling macros a bit earlier, add
4723 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
4726 * mini.h: Add prototype for mono_arch_fixup_jinfo.
4728 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
4729 read-only to help catch code allocation requests.
4731 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
4732 and turn it off when using --aot-only or when compiling with --aot=full.
4734 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
4735 jump table for switches from the normal domain mempool, not the code
4738 * mini-trampolines.c (get_unbox_trampoline): New function to return an
4739 unbox trampoline which handles aot-only mode too.
4741 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
4742 an AOTed unbox trampoline.
4744 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
4746 2008-07-09 Bill Holmes <billholmes54@gmail.com>
4748 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
4751 Contributed under MIT/X11 license.
4753 2008-07-09 Bill Holmes <billholmes54@gmail.com>
4755 * mini.c (mono_codegen): Allocate space at the end of the code block and store
4756 the unwind information for the method at the end of the allocated block.
4758 * mini-amd64.h: Added declarations for the unwind routines and adding field to
4759 MonoCompileArch to hold the unwind info for SEH on Winx64
4761 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
4762 frame pointer info for the method being compiled.
4764 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
4765 the call to mono_exception_from_token.
4767 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
4768 storing the method prolog information in a format that the Winx64 SEH can understand. This
4769 information is stored a the end of the method block because it is all 32-bit offset based.
4771 Contributed under MIT/X11 license.
4773 2008-07-09 Zoltan Varga <vargaz@gmail.com>
4775 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
4777 * wapihandles.c: Fix warnings.
4779 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
4782 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
4783 mono_jit_compile_method in aot-only mode since that calls the type
4786 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
4787 get_delegate_invoke_impl in aot-only mode.
4789 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
4791 2008-07-08 Zoltan Varga <vargaz@gmail.com>
4793 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
4795 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
4798 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
4800 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
4801 init trampoline from the AOT file as well.
4803 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
4804 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
4807 * mini.c (mini_init): Move the call to mono_exceptions_init () after
4810 * exceptions-amd64.c: Add _full variants for the remaining exception code
4811 creation functions as well, allow emission of relocatable code, remove
4812 caching since that is now done by the caller.
4814 * mini-exceptions.c: Add _full variants for the remaining exception code
4815 creation functions as well, add aot-only support.
4817 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
4818 if we can determine a proper token for them.
4819 (add_wrappers): Add a few more wrappers.
4820 (emit_method_code): Remove some dead code.
4821 (emit_trampolines): Emit exception code too.
4823 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
4825 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
4826 mono_array_new_va which avoids varargs.
4828 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
4830 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
4831 mono_arch_create_specific_trampoline () in all places.
4833 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
4834 a bit so it can be used for other things as well.
4836 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
4839 * exceptions-amd64.c: Rename the caching from the exception code creation
4840 functions, it is done by the caller instead.
4842 * exceptions-amd64.c: Change the signature of the exception code creation
4843 functions to allow the creation of relocatable code later.
4845 * mini-exceptions.c: Add a set of functions to query the various
4846 runtime-generated exception functions.
4848 * mini.c mini-exceptions.c: Use the newly added functions instead of the
4849 mono_arch_.. () functions.
4851 2008-07-07 Zoltan Varga <vargaz@gmail.com>
4853 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
4855 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
4857 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
4858 (mini_get_vtable_trampoline): Ditto.
4860 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
4861 code in the AOT case by returning the code size and a list of relocations to
4864 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
4866 2008-07-07 Bill Holmes <billholmes54@gmail.com>
4868 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
4871 Contributed under MIT/X11 license.
4873 2008-07-07 Zoltan Varga <vargaz@gmail.com>
4875 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
4876 so the buffer size can be computed correctly. Fixes #404735.
4878 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
4879 normally as cfg->debug_info is already freed.
4881 2008-07-06 Zoltan Varga <vargaz@gmail.com>
4883 * mini-amd64.c: For calls returning vtypes in registers, don't store
4884 the return address on the stack, instead allocate a separate local for
4887 2008-07-05 Mark Probst <mark.probst@gmail.com>
4889 * mini-trampolines.c, mini.h: Add an argument to
4890 mono_create_jit_trampoline_in_domain() for turning off the adding
4891 of the sync wrapper.
4893 * mini.c: Use the JIT trampoline without sync instead of
4894 ldftn_nosync in static RGCTX invoke wrappers so that the call can
4897 2008-07-04 Mark Probst <mark.probst@gmail.com>
4899 * driver.c: Turn on GSHARED optimization by default.
4901 2008-07-04 Zoltan Varga <vargaz@gmail.com>
4903 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
4904 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
4906 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
4907 create a variant of the generic trampoline code callable from AOTed trampolines.
4909 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
4910 trampoline code callable from AOTed trampolines.
4912 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
4914 2008-07-04 Mark Probst <mark.probst@gmail.com>
4916 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
4917 pass-through manner.
4919 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
4920 and don't fail sharing for them anymore.
4922 * mini-exceptions.c: Handle exceptions in shared generic methods.
4924 * generic-sharing.c: When checking the context of a generic
4925 method, also check its class's context. Don't treat wrappers as
4928 * mini-trampolines.c: Some code factored out to
4929 metadata/generic-sharing.c. Handle the MRGCTX case.
4931 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
4932 we must deal with the method being of another instantiation of the
4933 class. Add static rgctx invoke wrappers to generic methods.
4935 2008-07-04 Mark Probst <mark.probst@gmail.com>
4937 * mini.c: Provide all jit infos of generic shared methods with a
4940 * mini-exceptions.c: Handle the new situation that a generic info
4941 might be available, but not info about the this/vtable/mrgctx
4944 2008-07-03 Mark Probst <mark.probst@gmail.com>
4946 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
4949 2008-07-03 Zoltan Varga <vargaz@gmail.com>
4951 * dominators.c (check_dominance_frontier): Fix a warning.
4953 * mini.h: Add some missing prototypes.
4955 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
4957 * driver.c (mono_jit_init_version): Correct the comments since the first
4958 argument should be the name of the root domain, not a filename.
4960 * aot-runtime.c (make_writable): Error out if this is called while running
4962 (load_aot_module): Ditto.
4964 * aot-compiler.c: Really fix the computation of method indexes.
4966 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
4967 optimizations as this is no longer called frequently.
4969 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
4970 method and the invoke impl code and pass it to the delegate trampoline instead of
4971 just the delegate class.
4973 2008-07-02 Zoltan Varga <vargaz@gmail.com>
4975 * aot-compiler.c: Fixup the computation of method indexes.
4976 (add_wrappers): Create the base methods of the runtime invoke wrappers using
4977 the method builder infrastructure.
4979 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
4982 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
4983 mode, load the method right away instead of creating a trampoline.
4985 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
4987 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
4990 2008-07-01 Zoltan Varga <vargaz@gmail.com>
4992 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
4993 (mono_aot_load_method): Use method_index instead of method->token.
4995 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
4996 can handle icalls etc. properly.
4998 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5000 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
5002 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
5003 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
5004 JIT_ICALL_ADDR patch type.
5006 * patch-info.h: Add JIT_ICALL_ADDR patch type.
5008 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
5010 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
5012 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
5014 2008-06-30 Zoltan Varga <vargaz@gmail.com>
5016 * mini.c: Use domain->jit_code_hash_lock for controlling access to
5017 domain->jit_code_hash.
5019 2008-06-29 Zoltan Varga <vargaz@gmail.com>
5021 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
5023 2008-06-27 Zoltan Varga <vargaz@gmail.com>
5025 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
5026 get_this_arg_from_call, let it compute it when needed.
5028 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
5029 gsctx from code only when needed.
5031 * mini-trampolines.c (get_generic_context): Rename this to
5032 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
5033 it can be called by the arch backends.
5035 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
5037 2008-06-26 Zoltan Varga <vargaz@gmail.com>
5039 * driver.c (mono_main): Add experimental --aot-only command line option.
5041 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
5044 2008-06-26 Kornél Pál <kornelpal@gmail.com>
5046 * driver.c (DllMain): Remove mono_module_handle.
5048 Contributed under MIT/X11 license.
5050 2008-06-25 Zoltan Varga <vargaz@gmail.com>
5052 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
5053 for emitting methods which are not in the source assembly. Detect and report
5054 failure of assembling+linking.
5056 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
5058 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
5060 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
5062 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
5064 2008-06-24 Zoltan Varga <vargaz@gmail.com>
5066 * mini.h: Remove some obsolete prototypes.
5068 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
5070 2008-06-24 Mark Probst <mark.probst@gmail.com>
5072 * mini.c (get_object_generic_inst): Variable-sized arrays are not
5073 supported by Visual Studio, so use alloca().
5075 2008-06-23 Zoltan Varga <vargaz@gmail.com>
5077 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
5080 2008-06-23 Mark Probst <mark.probst@gmail.com>
5082 * mini.c: Fail sharing of a generic method if it contains an open
5083 catch clause (because we don't pass MRGCTXs yet).
5085 2008-06-23 Mark Probst <mark.probst@gmail.com>
5087 * mini.c: When compiling a method with generic sharing, insert the
5088 method instantiated with an all-Object generic context into the
5089 jit info table, instead of the context of the first instantiation
5090 of the method we happen to compile.
5092 2008-06-18 Martin Baulig <martin@ximian.com>
5094 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
5095 `major_version' and `minor_version'.
5097 2008-06-17 Mark Probst <mark.probst@gmail.com>
5099 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
5100 mono_method_is_generic_sharable_impl() takes an additional
5101 argument specifying whether to treat type variables as reference
5104 2008-06-17 Mark Probst <mark.probst@gmail.com>
5106 * mini.h: Removed obsolete prototypes.
5108 2008-06-17 Mark Probst <mark.probst@gmail.com>
5110 * mini.c: Don't fail generic sharing for initobj and sizeof - we
5111 already handle them.
5113 2008-06-17 Mark Probst <mark.probst@gmail.com>
5115 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
5116 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
5117 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
5118 tramp-x86.c: Added a MonoGenericContext* argument to
5119 mono_arch_get_unbox_trampoline() so that it can call other
5120 functions which require it.
5122 2008-06-17 Mark Probst <mark.probst@gmail.com>
5124 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
5125 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
5126 mono_arch_get_this_arg_from_call() takes a
5127 MonoGenericSharingContext* as well.
5129 2008-06-17 Mark Probst <mark.probst@gmail.com>
5131 * mini.c: Factor out code for emitting unbox into emit_unbox() and
5132 implement generic sharing of unbox.
5134 2008-06-17 Mark Probst <mark.probst@gmail.com>
5136 * mini.c: Don't compute the vtable to determine whether a field is
5137 special static, because it might not work for open types.
5139 2008-06-17 Mark Probst <mark.probst@gmail.com>
5141 * mini.c: Removed the unused token_type and token_source arguments
5142 from get_runtime_generic_context_ptr().
5144 2008-06-17 Marek Habersack <mhabersack@novell.com>
5146 * mini.c (ADD_BINOP): fix the build
5148 2008-06-16 Zoltan Varga <vargaz@gmail.com>
5150 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
5153 2008-06-16 Mark Probst <mark.probst@gmail.com>
5155 * mini.h: Removed class relations enum that's not used anymore.
5157 2008-06-16 Mark Probst <mark.probst@gmail.com>
5159 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
5161 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
5162 the lazy fetch trampoline access code.
5164 2008-06-15 Zoltan Varga <vargaz@gmail.com>
5166 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
5168 2008-06-14 Zoltan Varga <vargaz@gmail.com>
5170 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
5172 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
5174 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
5176 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5178 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
5181 * mini-ops.h: Add MIN/MAX_UN opcodes.
5183 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
5186 * basic-math.cs: Add more min/max tests.
5188 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5190 2008-06-13 Mark Probst <mark.probst@gmail.com>
5192 * mini.c: Small fix in the prologue of emit_castclass.
5194 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5196 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5198 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
5199 do not work even for unsigned types. Fixes #400014.
5201 * basic-math.cs: Add regression tests for unsigned Min/Max.
5203 2008-06-13 Mark Probst <mark.probst@gmail.com>
5205 * mini.c: Added additional context_used argument to several
5206 functions, which will be needed for sharing generic methods. Use
5207 GET_RGCTX macro wherever appropriate. Declare only one
5208 context_used in mono_method_to_ir().
5210 2008-06-13 Mark Probst <mark.probst@gmail.com>
5212 * mini.c, generic-sharing.c: Removed generic class relations.
5214 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
5215 functions due to MRGCTX changes.
5217 2008-06-13 Mark Probst <mark.probst@gmail.com>
5219 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
5220 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
5221 with calculated IMT.
5223 * mini.c: Generic sharing of calls via generic interfaces.
5225 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
5226 generic method with non-constant MonoGenericContext*. Instead,
5227 the context is taken out of the method itself.
5229 2008-06-13 Mark Probst <mark.probst@gmail.com>
5231 * mini.c: Generic sharing of ldvirtftn.
5233 2008-06-13 Mark Probst <mark.probst@gmail.com>
5235 * mini.c: Generic sharing of ldftn.
5237 2008-06-13 Mark Probst <mark.probst@gmail.com>
5239 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
5241 2008-06-13 Mark Probst <mark.probst@gmail.com>
5243 * mini.c: Generic sharing of the special case of ldtoken followed
5244 by a call to GetTypeFromHandle.
5246 2008-06-13 Mark Probst <mark.probst@gmail.com>
5248 * mini.c: Generic sharing of box for nullable types.
5250 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5252 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
5253 are passed on the stack. Fixes #324807.
5255 2008-06-12 Bill Holmes <billholmes54@gmail.com>
5257 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
5258 for the ArgValuetypeAddrInIReg case.
5260 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
5261 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
5263 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
5264 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
5265 local variable and pass the local variable by reference to the called method.
5267 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
5268 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
5270 Contributed under MIT/X11 license.
5272 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
5274 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
5276 * debug-mini.c (mono_debug_print_vars): Release memory after printing
5279 2008-06-10 Martin Baulig <martin@ximian.com>
5282 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
5284 2008-06-09 Kornél Pál <kornelpal@gmail.com>
5286 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
5287 possible error when no arguments are passed.
5289 Contributed under MIT/X11 license.
5291 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
5293 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
5294 where the file name is NULL.
5296 2008-06-09 Zoltan Varga <vargaz@gmail.com>
5298 * mini.c: Fix s390 build.
5300 2008-06-08 Zoltan Varga <vargaz@gmail.com>
5302 * trace.c (mono_trace_parse_options): Fix warnings.
5304 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
5306 2008-06-07 Zoltan Varga <vargaz@gmail.com>
5308 * mini.c (remove_block_if_useless): Avoid printing the method name.
5310 * mini.c: Remove needless setting of ins->cil_code which is now done by
5313 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
5316 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
5317 translated code after it has been patched.
5319 2008-06-06 Zoltan Varga <vargaz@gmail.com>
5321 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
5322 avoid problems during code patching on SMP systems.
5323 (emit_call): Avoid adding a patch info which is already added by
5325 (mono_arch_emit_exceptions): Ditto.
5327 2008-06-05 Zoltan Varga <vargaz@gmail.com>
5329 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
5330 MONO_TYPE_ISSTRUCT already checks for it.
5332 2008-06-05 Bill Holmes <billholmes54@gmail.com>
5334 * mini-amd64.c:merge_argument_class_from_type: When marshaling
5335 structs with floats on Winx64 the float registers are not used.
5336 The integer registers are always used..
5337 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
5338 only one register will be used and only if the size of the struct
5339 is 1,2,4, or 8 bytes.
5341 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
5344 Contributed under MIT/X11 license.
5346 2008-06-05 Martin Baulig <martin@ximian.com>
5348 * debug-debugger.c (debugger_lookup_class): Also call
5349 mono_class_setup_methods() here; we're only called from RTI.
5351 2008-06-05 Andreas Färber <andreas.faerber@web.de>
5353 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
5354 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
5355 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
5356 Post-process object files and add dtrace-generated object, if necessary.
5358 Contributed under MIT/X11 license.
5360 2008-06-04 Mark Probst <mark.probst@gmail.com>
5362 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
5365 * mini.c: Generic sharing for unbox.any and castclass.
5367 2008-06-04 Mark Probst <mark.probst@gmail.com>
5369 * mini.c: Ignore tailcall prefix in shared generic code and when
5370 doing calls which require a vtable/rgctx argument.
5372 2008-06-04 Mark Probst <mark.probst@gmail.com>
5374 * mini.c: Don't free the JIT info.
5376 * driver.c: Changes in the JIT info table testing code.
5378 2008-06-03 Zoltan Varga <vargaz@gmail.com>
5380 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
5381 interruption. Fix some warnings.
5383 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
5384 interruption_checkpoint.
5386 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5388 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
5389 from embedding applications.
5391 2008-06-02 William Holmes <billholmes54@gmail.com>
5393 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
5394 reserving 32 bytes on the stack when making calls.
5396 Contributed under MIT/X11 license.
5398 2008-06-01 Zoltan Varga <vargaz@gmail.com>
5400 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
5401 the linear IL branch.
5403 * driver.c: Print out more information for --version on arm.
5405 2008-05-30 Zoltan Varga <vargaz@gmail.com>
5407 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
5408 bb_exit instead, since out of line bblocks might not actually be emitted
5411 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
5412 maximum epilog size for out of line bblocks if tracing is enabled.
5414 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
5416 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
5418 * arrays.cs: Regression tests for allocating arrays with negative sizes.
5420 2008-05-28 Zoltan Varga <vargaz@gmail.com>
5422 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
5423 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
5426 2008-05-27 Zoltan Varga <vargaz@gmail.com>
5428 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
5429 the 'value' to store is a constant.
5431 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
5433 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
5434 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
5436 2008-05-26 Zoltan Varga <vargaz@gmail.com>
5438 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
5439 for accessing method->generic_container.
5441 2008-05-24 Zoltan Varga <vargaz@gmail.com>
5443 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
5445 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
5447 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
5449 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
5452 2008-05-23 Zoltan Varga <vargaz@gmail.com>
5454 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
5456 * mini.c: Handle the case when mono_class_vtable () fails.
5458 2008-05-23 Massimiliano Mantione <massi@ximian.com>
5459 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
5462 2008-05-22 Mark Probst <mark.probst@gmail.com>
5464 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
5465 together with domain sharing.
5467 2008-05-22 Mark Probst <mark.probst@gmail.com>
5469 * mini.c: Treat callvirts to final methods like non-virtual calls
5470 when doing generic sharing, i.e. look them up in the runtime
5473 2008-05-22 Mark Probst <mark.probst@gmail.com>
5475 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
5476 with computed types (for generic sharing).
5478 * mini.c: Generic sharing for mkrefany and refanyval.
5480 2008-05-22 Zoltan Varga <vargaz@gmail.com>
5482 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
5485 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
5486 the generic sharing code.
5488 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
5491 2008-05-21 Zoltan Varga <vargaz@gmail.com>
5493 * mini.h: Remove the declaration of mono_aot_init_vtable ().
5495 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
5497 * driver.c: updated copyright date
5499 2008-05-21 Zoltan Varga <vargaz@gmail.com>
5501 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
5504 2008-05-19 Martin Baulig <martin@ximian.com>
5506 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
5507 pointing to the new `_mono_debug_using_mono_debugger' variable.
5510 (mono_main): Check mono_debug_using_mono_debugger() rather than
5511 the `MONO_INSIDE_MDB' environment variable to check whether we're
5512 inside the debugger.
5514 2008-05-19 Zoltan Varga <vargaz@gmail.com>
5516 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
5519 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
5521 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
5523 * mini.c: Added mini_assembly_can_skip_verification. This
5524 function checks if the assembly requested to skip verification.
5525 Fixes part of #387274.
5527 2008-05-07 Zoltan Varga <vargaz@gmail.com>
5529 * mini.c (mini_get_method): Disable the check for open generic classes when
5530 using generic sharing.
5532 * generics.cs: Add a test for #387034.
5534 * mini.c (mini_get_method): Check whenever the method class is an open generic
5535 type, and return NULL in that case, causing a verification error. Fixes
5538 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5540 * driver.c (mono_main): Revert r102623. The right
5541 thing to do is to enable the verifier under verifiable
5542 unless a --security flag was passed.
5544 We need this non-trivial behavior for --verify-all otherwise
5545 mcs-compileall won't be able to use it. As it needs everything to
5546 be verified under validil.
5548 2008-05-06 Martin Baulig <martin@ximian.com>
5552 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
5553 (mono_debugger_thread_cleanup): Likewise.
5554 (mono_debugger_extended_notification): Likewise.
5556 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5558 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
5559 against both inflated and non-inflated methods. We need to check against the
5560 generic definition for cases where the instantiated method is not visible.
5561 We need to check against the inflated types for cases where the instantiation
5562 changes any super type. This fixes #382986.
5564 Note that this doesn't need to be applied to other parts of mono_method_to_ir
5565 that check for visibiliy as generic params only appears as the type subject
5566 of tokens on call opcodes. Field manipulation and ldftn must always
5567 target an exact type.
5569 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5571 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
5572 if no related --security flag is passed.
5574 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5576 * mini-arch.h: Prepare support for ppc64.
5578 Contributed under MIT/X11 license.
5580 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5582 * aot-runtime.c: Prepare support for ppc64.
5584 Contributed under MIT/X11 license.
5586 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5588 * mini-ops.h: Prepare support for ppc64.
5590 Contributed under MIT/X11 license.
5592 2008-05-04 Andreas Färber <andreas.faerber@web.de>
5594 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
5596 Contributed under MIT/X11 license.
5598 2008-05-03 Zoltan Varga <vargaz@gmail.com>
5600 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
5601 assemblies, since aot_name is not a full path, causing us to load MS.NET
5602 assemblies on windows.
5604 2008-04-28 Kornél Pál <kornelpal@gmail.com>
5606 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
5607 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
5608 * main.c: Use UTF-8 encoded command line instead of Windows default code
5609 page on Windows to support Unicode.
5610 * driver.c (DllMain): New function for mixed-mode assembly support.
5611 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
5612 export __stdcall functions without decoration.
5614 Contributed under MIT/X11 license.
5616 2008-04-28 Mark Probst <mark.probst@gmail.com>
5618 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
5619 saving it very early.
5621 2008-04-28 Mark Probst <mark.probst@gmail.com>
5623 * mini.h, mini.c: Lots of code for accessing the old RGCTX
5624 deleted. The only way to access the new RGCTX is via the
5627 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
5628 vtable instead of the RGCTX to static methods.
5630 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
5631 accessing the new RGCTX.
5633 * generic-sharing.c: There is no separation between self, type
5634 arguments and other types in the RGCTX anymore.
5636 2008-04-25 Jonathan Chambers <joncham@gmail.com>
5638 * mini-amd64.c (add_general): Remove previous stack adjustment.
5639 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
5640 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
5641 for 32 bytes of stack space reserved for all calls.
5643 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
5644 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
5647 Code contributed under MIT/X11 license.
5649 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5651 * mini.c (mini_method_verify): Only verify non-inflated methods, check
5652 against the root definition, peeling out method and type instantiations.
5653 Cache verify success results, code that fails verification is still
5654 checked multiple times.
5656 2008-04-23 Zoltan Varga <vargaz@gmail.com>
5658 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
5660 2008-04-23 Jonathan Chambers <joncham@gmail.com>
5662 * mini-amd64.c (add_general): Always increment stack on Win64.
5663 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
5666 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
5667 stack based argument handling on Win64.
5669 Code contributed under MIT/X11 license.
5671 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
5673 * Makefile.am (version.h): Add support for git-svn.
5675 2008-04-22 Zoltan Varga <vargaz@gmail.com>
5677 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
5678 so instead of calling g_spawn_command_line_sync, we do everything by hand,
5679 avoiding allocations and libc functions which might deadlock.
5681 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
5682 'no-gdb-backtrace' option is set.
5684 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
5686 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
5688 2008-04-21 Martin Baulig <martin@ximian.com>
5690 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
5691 and `get_lmf_addr'; `notification_address' is no longer a pointer.
5693 2008-04-21 Martin Baulig <martin@ximian.com>
5695 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
5696 `thread_vtable', `event_handler_ptr' and `event_handler'.
5698 2008-04-21 Martin Baulig <martin@ximian.com>
5700 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
5701 allows delayed initialization of the `executable_code_buffer' when
5704 2008-04-21 Martin Baulig <martin@ximian.com>
5706 * mini.h (mono_debugger_create_notification_function): Removed.
5707 * tramp-*.c (mono_debugger_create_notification_function): Removed.
5709 * mdb-debug-info64.s
5710 (MONO_DEBUGGER__notification_function): Added this in the .text section.
5712 * mdb-debug-info32.s
5713 (MONO_DEBUGGER__notification_function): Added this in the .text section.
5715 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
5716 currently only works on x86 and x86_64, so don't create it on ppc.
5718 2008-04-21 Martin Baulig <martin@ximian.com>
5720 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
5723 (mini_method_compile): In the fp elimination check, check
5724 `debug_options.mdb_optimizations' in addition to
5725 mono_debug_using_mono_debugger().
5727 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
5728 disable some JIT optimizations which are only disabled when
5729 running inside the debugger.
5730 Added `--help-debug' option to describe the debugging options.
5731 (parse_debug_options): New static function to parse the `--debug'
5732 options, so we can easily add more stuff in future.
5734 2008-04-20 Zoltan Varga <vargaz@gmail.com>
5736 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
5737 the method has no body.
5739 2008-04-19 Jonathan Chambers <joncham@gmail.com>
5741 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
5742 assembly is not allowed in MSVC 64-bit compiler.
5743 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
5744 as we get floating point exceptions everywhere.
5746 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
5747 correctly align arguments for call to throw_exception.
5748 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
5750 Code contributed under MIT/X11 license.
5752 2008-04-19 Zoltan Varga <vargaz@gmail.com>
5754 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
5756 2008-04-17 Zoltan Varga <vargaz@gmail.com>
5758 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
5760 * mini-amd64.c (NEW_INS): Set cil_code.
5762 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
5763 from mini-amd64.c so all debugger related logic is in one place.
5765 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
5766 later won't have a random ip assigned to them.
5768 2008-04-16 Zoltan Varga <vargaz@gmail.com>
5770 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
5771 the arch specific function initializes code_size.
5772 (mono_create_delegate_trampoline): Ditto.
5774 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
5775 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
5778 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
5779 running under the debugger.
5781 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
5784 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
5785 debugger. Also move the disabling of optimizations here from driver.c.
5786 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
5789 * mini.h (MonoCompile): Add a few new flags.
5791 2008-04-15 Zoltan Varga <vargaz@gmail.com>
5793 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
5794 so the cil_code field of created MonoInst's is properly set.
5795 (mini_select_instructions): Ditto.
5797 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
5798 (MONO_INST_NEW_CALL): Ditto.
5800 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
5801 in many places so the ins->cil_code field is properly initialized.
5803 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
5806 2008-04-14 Zoltan Varga <vargaz@gmail.com>
5808 * mini.c (mini_method_compile): Print a different message when compiling a
5811 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
5814 2008-04-11 Zoltan Varga <vargaz@gmail.com>
5816 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
5819 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
5821 2008-04-11 Zoltan Varga <vargaz@gmail.com>
5823 * mini.c (handle_stack_args): Make this return void since its return value was
5824 never used. Also set cfg->unverifiable for invalid IL instead of calling
5827 2008-04-10 Mark Probst <mark.probst@gmail.com>
5829 * mini.c: Make sure "this" is live in catch clauses with type
5830 variables in shared generic code.
5832 2008-04-08 Mark Probst <mark.probst@gmail.com>
5834 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
5835 generic_class_is_reference_type() to ensure the proper behaviour
5836 when sharing generic code and the type in question is a type
5839 2008-04-08 Zoltan Varga <vargaz@gmail.com>
5841 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
5842 race conditions when printing thread dumps. Fixes #377738.
5844 2008-04-08 Massimiliano Mantione <massi@ximian.com>
5846 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
5847 shows up when both MonoInst arguments can cause aliasig.
5848 There is likely no way in the current JIT to trigger this problem, but
5849 it showed up in the development of generics sharing, when in a new
5850 opcode both args of an OP_GROUP can be aliases (addresses of a local).
5851 When the generics sharing code will be committed, its tests will be
5852 valid also for this bug.
5854 2008-04-08 Zoltan Varga <vargaz@gmail.com>
5856 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
5859 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
5862 2008-04-07 Zoltan Varga <vargaz@gmail.com>
5864 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
5865 use a more detailed exception message for InvalidCastException.
5867 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
5869 * driver.c (mono_main): Add --debug=casts option to turn on better
5870 InvalidCastException message details.
5872 * mini.c (mini_get_debug_options): New helper function to return the address of
5873 the debug_options variable.
5875 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
5876 the jit_tls TLS variable.
5878 * mini.c (mono_jit_tls): New TLS variable.
5880 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
5883 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
5885 * mini.h: Removed verifer related stuff. This code was moved to verify.c
5887 * mini.c: Removed verifer related stuff, code moved to verify.c.
5889 * driver.c: Using code from verify.c instead of mini.c.
5891 2008-04-05 Zoltan Varga <vargaz@gmail.com>
5893 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
5896 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
5898 * mini.c (check_for_method_verify): Enabling verification of
5899 corlib if mono_verify_all is set. Bugs in the verifier preventing that
5902 2008-04-04 Zoltan Varga <vargaz@gmail.com>
5904 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
5905 caller saved registers as well.
5907 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
5908 saved registers as well.
5910 2008-03-30 Zoltan Varga <vargaz@gmail.com>
5912 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
5914 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
5917 2008-03-27 Zoltan Varga <vargaz@gmail.com>
5919 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
5921 (get_call_info): Take a gsctx argument instead of 'cfg'.
5923 2008-03-26 Zoltan Varga <vargaz@gmail.com>
5925 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
5926 mono_verify_all is set.
5928 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
5930 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
5932 2008-03-25 Zoltan Varga <vargaz@gmail.com>
5934 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
5937 * driver.c mini.c mini.h: Add a --verify-all development option to test the
5938 verifier and the code generated by the compiler.
5940 2008-03-25 Mark Probst <mark.probst@gmail.com>
5942 * mini.c: Generic sharing of the non-nullable case of the box
5945 2008-03-24 Zoltan Varga <vargaz@gmail.com>
5947 * inssel.brg: Fix the build.
5949 * iltests.il.in: Add a test for lconv.ovf.u8.un.
5951 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
5953 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
5954 Array:Address. Fixes #372410.
5956 * iltests.il.in: New tests for readonly prefix.
5958 2008-03-23 Zoltan Varga <vargaz@gmail.com>
5960 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
5963 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
5966 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
5968 * mini.c (mono_decompose_op_imm): New helper function.
5970 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
5971 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5974 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
5975 mono_arch_output_basic_block. Fix warnings.
5977 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
5980 2008-03-22 Zoltan Varga <vargaz@gmail.com>
5982 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
5983 since the extra frame is now detected automatically inside the loop.
5985 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
5986 opts which are now in mono_peephole_ins ().
5988 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
5990 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
5991 frames and skip duplicate managed-to-native frames. Fixes #367665.
5993 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5994 opts which are now in mono_peephole_ins ().
5995 (mono_arch_peephole_pass_2): Ditto.
5997 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
5999 * mini-codegen.c (mono_peephole_ins): New helper function containing the
6000 arch independent peephole optimizations.
6002 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
6003 opts which are now in mono_peephole_ins ().
6005 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
6007 * mini-s390.c (mono_arch_output_basic_block): Fix build.
6009 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
6012 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
6013 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
6016 2008-03-21 Zoltan Varga <vargaz@gmail.com>
6018 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
6019 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6022 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
6023 mono_arch_output_basic_block. Fix warnings.
6025 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6027 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6030 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6032 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6035 * iltests.il: Add new tests.
6037 2008-03-20 Kornél Pál <kornelpal@gmail.com>
6039 * mini.c: Removed Windows version macros.
6041 2008-03-20 Mark Probst <mark.probst@gmail.com>
6043 * generic-sharing.c: Put reflection types in the extensible part
6044 of the runtime generic context.
6046 * mini.c: Generic sharing of the GetTypeHandle special case of the
6047 ldtoken instruction.
6049 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6051 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
6053 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
6055 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
6056 consistency with the other version on the linear IR branch.
6058 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
6060 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
6062 * iltests.il.in: Add new tests.
6064 2008-03-19 Zoltan Varga <vargaz@gmail.com>
6066 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
6068 * iltests.il.in: Add new tests.
6070 2008-03-19 Mark Probst <mark.probst@gmail.com>
6072 * mini.c: Two variables with the same name were declared in
6073 nesting contexts and one wasn't initialized. Fixed.
6075 2008-03-19 Mark Probst <mark.probst@gmail.com>
6077 * mini.c: Generic sharing of the initobj instruction.
6079 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6081 * mini.c: make the test to optimize ldtoken from typeof() more
6084 2008-03-18 Mark Probst <mark.probst@gmail.com>
6086 * mini.c: Generic sharing of the initobj instruction for reference
6089 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
6091 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
6092 the mono_breakpoint_clean_code() code to perform bound checks.
6094 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
6096 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
6097 mono_arch_patch_callsite() to include the start of the managed method
6098 to be able to perform bound checks.
6100 2008-03-17 Mark Probst <mark.probst@gmail.com>
6102 * mini.c: Generic sharing for the isinst instruction.
6104 2008-03-17 Mark Probst <mark.probst@gmail.com>
6106 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6107 inssel-long32-mips.brg: Added opcodes for doing indirect calls
6108 with the runtime generic context argument.
6110 * mini.c: Share calls to several types of unsharable methods by
6111 putting the address of the method code in the runtime generic
6112 context and doing an indirect call.
6114 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6117 2008-03-16 Mark Probst <mark.probst@gmail.com>
6119 * generic-sharing.c: Change due to a change in the runtime genric
6122 2008-03-15 Martin Baulig <martin@ximian.com>
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.
6130 (mono_arch_nullify_class_init_trampoline): Add call to
6131 mono_breakpoint_clean_code() to make things work when running
6132 inside the debugger.
6134 2008-03-14 Zoltan Varga <vargaz@gmail.com>
6136 * inssel-long.brg (reg): Fix 64 bit build.
6138 2008-03-14 Mark Probst <mark.probst@gmail.com>
6140 * mini.c, mini.h: Share static generic code by passing it an
6141 implicit argument pointing to the runtime generic context.
6143 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6144 inssel-long32-mips.brg: New opcodes for calling shared static,
6145 which need to be passed the runtime generic context.
6147 * mini-amd64.c, mini-x86.c: Save the runtime generic context
6148 argument on the stack in the prologue if needed. New function for
6149 finding the runtime generic context argument from the registers
6150 saved by the trampoline.
6152 * mini-amd64.h, mini-x86.h: Specify which register to use for the
6153 runtime generic context argument.
6155 * tramp-amd64.c: Also restore the register used for the runtime
6156 generic context argument.
6158 * mini-trampoline.c: Resolve shared static calls by consulting the
6159 runtime generic context via the new argument.
6161 * generic-sharing.c: Add an argument to sharability-checking
6162 functions that specifies whether type variables should be treated
6163 as sharable type arguments.
6165 * inssel-x86.brg: Removed a superfluous, buggy rule.
6167 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6170 2008-03-14 Martin Baulig <martin@ximian.com>
6172 * debug-debugger.c (main_thread_handler): Call
6173 mono_runtime_run_main() without sending any notifications.
6175 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
6177 2008-03-14 Zoltan Varga <vargaz@gmail.com>
6179 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
6181 2008-03-14 Mark Probst <mark.probst@gmail.com>
6183 * tramp-x86.c: Fixed register restore offsets in the trampoline
6184 code for ECX and EDX.
6186 2008-03-12 Geoff Norton <gnorton@novell.com>
6188 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
6189 different ucontext_t implementations.
6190 * exceptions-arm.c: Use the above defines to get exceptions working on
6191 iPhone (based on a patch by Luke Howard lukeh@padl.com)
6192 * mini-arm.c: Implement iPhone icache support (based on a patch by
6193 Luke Howard lukeh@padl.com)
6195 2008-03-12 Mark Probst <mark.probst@gmail.com>
6197 * mini.c: Enable generic sharing of calls to non-static
6198 non-interface non-generic non-value-type methods.
6200 * mini-trampolines.c: Resolve calls from shared generic code.
6202 2008-03-11 Zoltan Varga <vargaz@gmail.com>
6204 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
6206 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
6208 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
6210 * mini.c: some fixes for the AOT compiler.
6212 2008-03-07 Zoltan Varga <vargaz@gmail.com>
6214 * cpu-amd64.md: Add clob:1 to some float opcodes.
6216 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
6218 * mini.h: Added MiniVerifierMode enumeration.
6220 * mini.c: Added mini_verifier_set_mode to control
6221 the usage of the new verifier.
6223 * mini.c (mono_method): Integrated the new verifier.
6225 * driver.c: Extended --security option with validil and
6226 verifiable options to activate the new verifier.
6228 2008-03-07 Zoltan Varga <vargaz@gmail.com>
6230 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
6231 optimization to ctors taking 0 or 2 arguments too.
6233 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
6236 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
6238 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
6240 2008-03-06 Zoltan Varga <vargaz@gmail.com>
6242 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
6243 non-aot case as well.
6245 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
6247 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
6250 * aot-compiler.c (encode_patch): Ditto.
6252 * mini.h (G_MININT32): Fix the definition of this.
6254 2008-03-05 Zoltan Varga <vargaz@gmail.com>
6256 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
6258 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
6260 2008-03-04 Zoltan Varga <vargaz@gmail.com>
6262 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
6263 methods returning vtypes in registers.
6264 (mono_arch_allocate_vars): Ditto.
6266 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
6268 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
6270 * generics.cs: Add a test from the linear IR branch.
6272 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
6274 * mini.c (inline_method): Cache failed inline attempts.
6276 2008-03-04 Mark Probst <mark.probst@gmail.com>
6278 * mini.c: For shared methods of generic classes put the location
6279 of "this" into the MonoGenericJitInfo.
6281 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
6282 register out of a MonoContext by register number. Add the generic
6283 sharing context as an argument to mono_arch_find_this_argument().
6285 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
6286 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
6287 for new arch function.
6289 * mini-exception.c: Handle open exception clauses in shared
6292 * mini-trampolines.c: Supply additional argument to
6293 mono_arch_find_this_argument().
6295 2008-03-04 Zoltan Varga <vargaz@gmail.com>
6297 * Makefile.am (regtests): Run the bench.exe tests last.
6299 2008-03-03 Zoltan Varga <vargaz@gmail.com>
6301 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
6304 2008-03-02 Zoltan Varga <vargaz@gmail.com>
6306 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
6309 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
6311 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
6313 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
6314 whose class has no cctor.
6316 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
6318 2008-03-01 Zoltan Varga <vargaz@gmail.com>
6320 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
6323 2008-02-29 Zoltan Varga <vargaz@gmail.com>
6325 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
6326 to be in sync with the code on the linear IR branch.
6328 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
6330 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
6332 2008-02-27 Zoltan Varga <vargaz@gmail.com>
6334 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
6336 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
6338 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
6340 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
6342 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
6344 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
6347 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
6349 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
6350 OP_LOADR4_MEMBASE emission.
6352 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
6353 (mono_spillvar_offset_float): Ditto.
6355 * mini-mips.c (mono_arch_emit_prolog): Ditto.
6357 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
6360 * basic-long.cs: Add regression tests for them.
6362 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
6364 (mono_arch_allocate_vars): Fix representation of single-precision float
6366 (mono_arch_output_basic_block): Ditto.
6368 * inssel-mips.brg: Ditto, remove duplicate items.
6370 * mini-mips.c (emit_load_volatile_arguments): New function to handle
6371 arguments of tail calls as on other platforms.
6372 (mono_arch_output_basic_block): Handle tail calls.
6374 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
6377 * objects.cs (test_5_pass_static_struct): Add test for it.
6379 Contributed under MIT/X11 license.
6381 2008-02-26 Zoltan Varga <vargaz@gmail.com>
6383 * Makefile.am: Use gmcs for compiling the regression tests.
6385 * *.2.cs *.2.il: Rename to *.cs and *.il.
6387 2008-02-24 Zoltan Varga <vargaz@gmail.com>
6389 * regalloc.h: Make the vassign array smaller.
6391 * mini.c (mini_method_compile): Remove an unused field in cfg.
6393 * mini-codegen.c: Add a bunch of micro optimizations.
6395 2008-02-23 Zoltan Varga <vargaz@gmail.com>
6397 * regalloc.h: Remove some unused fields.
6399 2008-02-22 Zoltan Varga <vargaz@gmail.com>
6401 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
6403 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
6405 2008-02-22 Mark Probst <mark.probst@gmail.com>
6407 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
6409 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
6410 trampoline: Fetch an entry from the runtime generic context. If
6411 it's NULL, jump to the actual trampoline to fill the runtime
6412 generic context. Otherwise, return it.
6414 * mini.c: Call the lazy fetch trampoline to get entries out of the
6415 runtime generic context.
6417 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
6418 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
6419 tramp-sparc.c: Stubs for the lazy fetch trampoline.
6421 2008-02-21 Mark Probst <mark.probst@gmail.com>
6423 * mini.c: Fetch data out of the extensible part of the runtime
6424 generic context instead of calling a helper function.
6426 * generic-sharing.c: Some functions moved into
6427 metadata/generic-sharing.c. Helper function for fetching other
6428 types now checks and asserts against extensible rgctx (just for
6429 debugging purposes - the helper function isn't called anymore
6430 unless for debugging).
6432 2008-02-21 Zoltan Varga <vargaz@gmail.com>
6434 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
6435 for tail calls up to the point that the tests in iltests.exe run. Also add a
6436 dummy CKFINITE implementation.
6437 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
6438 needed for trampoline LMF frames.
6440 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
6441 trampoline LMF frames.
6443 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
6445 * mini.c (inline_method): clean any pending loader error when inlining fail.
6446 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
6448 2008-02-21 Zoltan Varga <vargaz@gmail.com>
6450 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
6452 * aot-runtime.c (decode_patch_info): Ditto.
6454 * mini.c (mono_resolve_patch_target): Ditto.
6456 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
6459 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
6461 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
6462 if it references an icall address.
6464 2008-02-20 Zoltan Varga <vargaz@gmail.com>
6466 * cpu-s390x.md: Remove some more unused opcodes.
6468 * cpu-s390x.md: Remove some unused opcodes.
6470 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
6471 mono_op_imm_to_op ().
6473 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
6474 instead of a switch statement.
6476 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
6477 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
6479 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
6481 * mini-codegen.c: Remove unused mono_regstate2_... functions.
6483 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
6486 2008-02-19 Zoltan Varga <vargaz@gmail.com>
6488 * driver.c (mono_main): Improve error reporting when an assembly cannot be
6489 opened. Fixes #362607.
6491 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
6493 * iltests.il.in: Add a test for static methods in interfaces.
6495 2008-02-18 Zoltan Varga <vargaz@gmail.com>
6497 * genmdesc.c (build_table): Fix a crash on older glib versions.
6499 * cpu-sparc.md: Remove some unused opcodes.
6501 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
6502 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
6504 * cpu-amd64.md: Remove some unused opcodes.
6506 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
6507 like the other opcodes.
6509 2008-02-17 Zoltan Varga <vargaz@gmail.com>
6511 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
6513 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
6515 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
6516 variables 'cfg' instead of 'm' for consistency.
6518 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
6520 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
6521 argument holding the vtype return address, to avoid the ambigious use of
6522 cfg->ret for this purpose.
6524 * mini.c (NEW_RETLOADA): Use vret_addr if set.
6526 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
6528 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
6529 new mono_print_ins () function which only takes one argument.
6531 2008-02-15 Zoltan Varga <vargaz@gmail.com>
6533 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
6536 2008-02-14 Zoltan Varga <vargaz@gmail.com>
6538 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
6540 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
6542 * mini-x86.c: Sync with the version on the linear IR branch by adding new
6543 opcodes and other small changes.
6545 * mini-ops.h: Add some new opcodes from the linear IR branch.
6547 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
6549 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
6550 opcodes, use the REG_MEMBASE opcodes instead.
6552 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
6553 opcodes, use the REG_MEMBASE opcodes instead.
6555 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
6558 * mini.c (mono_op_imm_to_op): New helper function.
6560 * mini-ops.h: Add some opcodes from linear IR branch.
6562 2008-02-13 Zoltan Varga <vargaz@gmail.com>
6564 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
6567 2008-02-12 Zoltan Varga <vargaz@gmail.com>
6569 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
6572 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
6574 2008-02-09 Zoltan Varga <vargaz@gmail.com>
6576 * aot-compiler.c (emit_method_code): Add an assert.
6578 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
6579 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
6582 2008-02-08 Zoltan Varga <vargaz@gmail.com>
6584 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
6585 some load/store opcodes so they are consistent.
6586 (mono_arch_emit_prolog): Simplify some code.
6588 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
6590 * objects.cs: Add tests for large argument offsets on ARM.
6592 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
6593 stack offsets. Fixes #359651.
6595 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
6597 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
6599 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
6601 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
6603 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
6605 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
6606 rid of CEE_CONV_R_UN.
6608 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
6610 2008-02-07 Zoltan Varga <vargaz@gmail.com>
6612 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
6614 * mini.c (mono_normalize_opcodes): Add some more opcodes.
6616 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
6618 * cpu-amd64.md: Remove some unused opcodes.
6620 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
6622 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
6624 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
6625 arch specific functions for its parts. Call the peephole pass after local
6626 regalloc so the prolog can compute a more accurate max_offset.
6628 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
6629 the corresponding OP_I/OP_L opcodes.
6631 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
6633 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
6635 2008-02-06 Zoltan Varga <vargaz@gmail.com>
6637 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
6638 as they are handled in mini.c.
6640 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
6642 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
6643 case since it is handled in mini.c.
6645 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
6647 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
6649 * *.c: Use the new opcodes in the IR and back end code.
6651 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
6653 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
6655 2008-02-06 Mark Probst <mark.probst@gmail.com>
6657 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
6658 an assert because it has a race condition.
6660 2008-02-06 Zoltan Varga <vargaz@gmail.com>
6662 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
6664 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
6666 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
6668 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
6669 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
6671 2008-02-05 Zoltan Varga <vargaz@gmail.com>
6673 * cpu-amd64.md (move): Correct the maximum size of move.
6675 2008-02-05 Mark Probst <mark.probst@gmail.com>
6677 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
6678 the generic class init trampoline to return quickly if the class
6681 2008-02-04 Zoltan Varga <vargaz@gmail.com>
6683 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
6684 issues where an 32 bit callsite cannot be patched by a 64 bit address.
6686 2008-02-03 Zoltan Varga <vargaz@gmail.com>
6688 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
6691 2008-01-31 Zoltan Varga <vargaz@gmail.com>
6693 * objects.cs: Add some soft-float tests.
6695 * mini.c: Fix a couple more soft-float issues.
6697 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
6699 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
6702 2008-01-30 Zoltan Varga <vargaz@gmail.com>
6704 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
6705 exception happens while compiling a virtual method.
6707 2008-01-29 Zoltan Varga <vargaz@gmail.com>
6709 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
6711 * mini-sparc.c: Fix build.
6713 * mini-sparc.c (get_call_info): Add support for generic sharing.
6715 * mini-exceptions.c: Add a FIXME.
6717 2008-01-27 Zoltan Varga <vargaz@gmail.com>
6719 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
6720 altstack handling code.
6722 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
6724 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
6726 * mini-s390.c: Add support for generic sharing.
6728 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
6730 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6732 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
6734 * mini-s390x.c: Add support for generic sharing.
6736 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
6738 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6740 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
6741 can be used since it takes a 16 bit signed immediate.
6743 * inssel-s390x.brg: Fix OP_SETRET.
6745 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
6747 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
6749 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
6751 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
6753 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
6756 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
6759 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
6760 of the unused mono_arch_patch_delegate_trampoline stuff.
6762 2008-01-26 Zoltan Varga <vargaz@gmail.com>
6764 * basic-long.cs: Move the fp related tests to basic-float.cs.
6766 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
6768 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
6770 * basic-calls.cs: Add a test for proper float argument passing.
6772 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
6773 if the context corresponds to an exception received through a signal.
6775 * exceptions.cs: Add a test for nullref handling at the start of a try
6778 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
6780 * jit-icalls.c (mono_break): New JIT icall.
6782 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
6784 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
6786 2008-01-25 Zoltan Varga <vargaz@gmail.com>
6788 * cpu-*.md: Get rid of unused opcodes.
6790 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
6792 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
6795 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
6798 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
6799 the arch independent trampoline code in mini-trampolines.c.
6801 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
6803 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
6805 * mini-s390.h: Remove an unused define.
6807 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
6808 the arch independent trampoline code in mini-trampolines.c.
6810 * mini-arm.c (mono_arch_emit_prolog): Fix build.
6812 2008-01-24 Zoltan Varga <vargaz@gmail.com>
6814 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
6816 * mini-s390.c (mono_arch_emit_prolog): Fix build.
6818 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
6820 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
6822 * cpu-amd64.md: Use smaller sizes for int opcodes.
6824 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
6826 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
6829 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
6832 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
6833 instead of though a pointer to save an indirection when accessing elements of
6836 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
6838 (NOT_IMPLEMENTED): New helper macro.
6839 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
6842 * *.c: Use the new helper macro.
6844 2008-01-21 Zoltan Varga <vargaz@gmail.com>
6846 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
6848 2008-01-20 Zoltan Varga <vargaz@gmail.com>
6850 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
6853 2008-01-18 Zoltan Varga <vargaz@gmail.com>
6855 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
6856 profiling is enabled.
6858 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
6860 (mono_arch_emit_prolog): Add more first bblock optimizations.
6862 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
6863 in order if possible.
6864 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
6865 bblock, since the arguments are still in their original registers.
6867 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
6869 2008-01-17 Zoltan Varga <vargaz@gmail.com>
6871 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
6874 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
6877 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
6879 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
6880 process async exceptions received while in unmanaged code.
6882 * mini.c (mini_init): Install a callback with the runtime which will be called
6883 when a thread receives an async exception while in unmanaged code.
6885 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
6887 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
6889 2008-01-16 Wade Berrier <wberrier@novell.com>
6896 2008-01-16 Zoltan Varga <vargaz@gmail.com>
6898 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
6899 compilation with sun cc.
6901 * cpu-*.md: Fix the build.
6903 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
6905 * mini-amd64.h: Add some comments to the MonoLMF structure.
6907 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
6909 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
6910 in the LMF structure if possible. This saves two instructions in the
6911 managed->native wrappers.
6913 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
6915 2008-01-16 Mark Probst <mark.probst@gmail.com>
6917 * generic-sharing.c: New type argument lookup code which uses the
6918 runtime generic context template.
6920 2008-01-15 Zoltan Varga <vargaz@gmail.com>
6922 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
6924 * mini-arm.c (add_general): Fix arm eabi parameter passing.
6925 (mono_arch_output_basic_block): Fix localloc implementation.
6927 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
6929 * mini-ia64.c (peephole_pass): Fix ia64 build.
6931 * mini-amd64.c (peephole_pass): Fix a warning.
6933 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
6934 at a constant offset from sp/fp.
6936 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
6937 instead of obtaining it from *lmf in the managed method case.
6939 2008-01-14 Zoltan Varga <vargaz@gmail.com>
6941 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
6943 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
6945 * mini.h (MonoInstList): New type.
6946 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
6947 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
6948 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
6949 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
6950 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
6951 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
6952 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
6953 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
6954 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
6955 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
6956 MONO_INST_LIST_FOR_EACH_ENTRY,
6957 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
6958 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
6959 mono_inst_list_first, mono_inst_list_last,
6960 mono_inst_list_next, mono_inst_list_prev): New instruction
6961 list handling interfaces.
6962 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
6963 list head 'ins_list'.
6964 (MonoInst): Replace next pointer with list head 'node'.
6965 (MonoCallInst): Make 'out_args' a MonoInstList.
6966 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
6967 (MonoCompile): Delete reverse_inst_list and
6968 reverse_inst_list_len.
6969 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
6970 mono_arch_lowering_pass, mono_arch_local_regalloc,
6971 mono_arch_output_basic_block, mono_arch_emit_prolog):
6972 Convert to new instruction lists.
6973 (insert_after_ins): Delete.
6974 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
6976 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
6977 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
6978 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
6979 mono_emulate_opcode, mono_emit_load_got_addr,
6980 inline_method, mono_method_to_ir, mono_print_bb_code,
6981 print_dfn, decompose_pass, nullify_basic_block,
6982 replace_out_block_in_code, remove_block_if_useless,
6983 merge_basic_blocks, move_basic_block_to_end,
6984 try_unsigned_compare, optimize_branches, mono_print_code,
6985 mini_select_instructions, remove_critical_edges): Likewise.
6986 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
6987 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
6988 mono_arch_output_basic_block, mono_arch_emit_prolog):
6990 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
6991 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6992 mono_arch_output_basic_block): Likewise.
6993 (inst_list_prepend, insert_after_ins): Delete.
6994 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
6995 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
6997 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
6998 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
6999 mono_arch_emit_prolog): Likewise.
7000 * cfold.c (mono_constant_fold): Likewise.
7001 * liveness.c (visit_bb, mono_analyze_liveness,
7002 optimize_initlocals): Likewise.
7003 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
7004 * graph.c (mono_draw_code_cfg): Likewise.
7005 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
7006 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
7007 mono_ssa_cprop): Likewise.
7008 * abcremoval (get_relations_from_previous_bb, process_block):
7010 * local-propagation (mono_cprop_invalidate_values,
7011 mono_local_cprop_bb): Likewise.
7012 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
7013 peephole_pass, mono_arch_output_basic_block,
7014 mono_arch_emit_prolog): Likewise.
7015 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
7016 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7017 mono_arch_emit_prolog): Likewise.
7018 (insert_after_ins): Delete.
7019 * aliasing.c (print_code_with_aliasing_information,
7020 mono_build_aliasing_information, mono_aliasing_deadce):
7021 Convert to new instruction lists.
7022 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
7023 peephole_pass, NEW_INS, mono_arch_lowering_pass,
7024 mono_arch_local_regalloc, mono_arch_output_basic_block):
7026 (insert_after_ins): Delete.
7027 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
7028 peephole_pass, mono_arch_output_basic_block): Convert to
7029 new instruction lists.
7030 * mini-codegen (InstList, inst_list_prepend,
7031 insert_after_ins): Delete.
7032 (insert_before_ins, get_register_force_spilling,
7033 get_register_spilling, free_up_ireg, free_up_reg,
7034 create_copy_ins, create_spilled_store, alloc_int_reg,
7035 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
7036 to new instruction lists.
7037 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
7038 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7039 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
7040 (insert_after_ins): Delete.
7041 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
7042 mono_arch_local_regalloc, mono_arch_output_basic_block,
7043 mono_arch_call_opcode): Convert to new instruction lists.
7044 (insert_after_ins): Delete.
7045 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
7046 peephole_pass, mono_arch_output_basic_block,
7047 mono_arch_emit_prolog): Convert to new instruction lists.
7049 2008-01-11 Zoltan Varga <vargaz@gmail.com>
7051 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
7053 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
7056 * Makefile.am (version.h): Make this work with non-bash shells.
7058 2008-01-10 Zoltan Varga <vargaz@gmail.com>
7060 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
7062 2008-01-08 Zoltan Varga <vargaz@gmail.com>
7064 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
7065 the InitializeArray optimization.
7067 2008-01-06 Zoltan Varga <vargaz@gmail.com>
7069 * mini.c driver.c: Don't include os/gc_wrapper.h.
7071 2008-01-05 Zoltan Varga <vargaz@gmail.com>
7073 * mini.c (print_jit_stats): Print GC statistics if available.
7075 2008-01-04 Zoltan Varga <vargaz@gmail.com>
7077 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
7079 2007-12-29 Zoltan Varga <vargaz@gmail.com>
7081 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
7083 2007-12-26 Zoltan Varga <vargaz@gmail.com>
7085 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
7087 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7089 * driver.c (mono_main): Ditto.
7091 2007-12-23 Zoltan Varga <vargaz@gmail.com>
7093 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
7095 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
7096 in the vtable can't be encoded.
7097 (compile_method): Ditto.
7099 2007-12-21 Zoltan Varga <vargaz@gmail.com>
7101 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
7104 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
7107 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
7108 the top LMF entry belongs to the current method.
7110 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
7112 2007-12-20 Zoltan Varga <vargaz@gmail.com>
7114 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
7116 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
7118 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
7120 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
7122 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
7124 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
7127 * basic-float.cs: Add an ulong->double cast test.
7129 2007-12-15 Zoltan Varga <vargaz@gmail.com>
7131 * mini.c (mono_method_to_ir): Fix a warning.
7133 2007-12-14 Zoltan Varga <vargaz@gmail.com>
7135 * mini-ops.h: Add OP_SWITCH.
7137 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
7138 CEE_SWITCH in back-end code, use OP_SWITCH instead.
7140 2007-12-11 Geoff Norton <gnorton@novell.com>
7142 * mini-s390x.c: Minor change to the MAX() define to allow
7143 it to compile with other gcc versions.
7145 2007-12-11 Geoff Norton <gnorton@novell.com>
7148 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
7150 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
7152 exceptions-arm.c (mono_arch_get_restore_context): Restore
7155 exceptions-arm.c (throw_exception): Save the frame pointer.
7156 This is a partial fix for #323747. Only the client side is
7159 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
7161 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
7162 was using an unrelated variable to log the class which
7163 needed the cctor to be called. This was crashing on arm.
7165 2007-12-09 Robert Jordan <robertj@gmx.net>
7167 * mini-x86.c (mono_arch_emit_epilog):
7168 Consider all kinds of 64-bit types. Fixes #323114.
7170 2007-12-08 Zoltan Varga <vargaz@gmail.com>
7172 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
7174 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7176 * mini-amd64.c (peephole_pass): Add a missing instruction check.
7178 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7180 * mini.c: run type ctor before allocating an object, not only
7181 when running it's constructor method (fixes at least part of bug #342507).
7183 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7185 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
7187 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
7188 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
7191 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
7192 mono_generic_class_init_trampoline () the same as it is done with the other
7195 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
7196 aot-runtime.c aot-compiler.c: Implement AOT support.
7198 2007-12-07 Mark Probst <mark.probst@gmail.com>
7200 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
7201 build for archs which don't have the vtable trampoline defined
7204 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7206 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
7208 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
7210 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
7212 * tramp-<ARCH>.c: Use the new helper function.
7214 2007-12-07 Mark Probst <mark.probst@gmail.com>
7216 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
7217 trampoline call, which takes a vtable argument.
7219 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
7220 OP_TRAMPCALL_VTABLEs like other calls.
7222 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
7223 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
7224 call. Implemented a support function which fetches the vtable
7225 from a register set.
7227 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
7228 Implemented a generic class init trampoline, using the
7229 OP_TRAMPCALL_VTABLE opcode.
7231 * mini.c: Implemented static field access when sharing generic
7232 code. This implies initing the class using the new
7233 OP_TRAMPCALL_VTABLE call.
7235 2007-12-07 Mark Probst <mark.probst@gmail.com>
7237 * mini.c: Don't compile methods with sharing enabled if their
7238 classes are disabled for sharing.
7240 2007-12-06 Zoltan Varga <vargaz@gmail.com>
7242 * inssel.brg: Add a missing sign extension to the GETCHR and array access
7243 opcodes. Fixes #346563.
7245 * objects.cs: Add a new test.
7247 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
7249 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
7250 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
7252 2007-12-06 Zoltan Varga <vargaz@gmail.com>
7254 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
7256 2007-12-03 Zoltan Varga <vargaz@gmail.com>
7258 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
7261 2007-12-02 Zoltan Varga <vargaz@gmail.com>
7263 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
7265 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
7266 optimization in the AOT case.
7268 2007-11-30 Zoltan Varga <vargaz@gmail.com>
7270 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
7272 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
7274 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
7276 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
7278 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
7279 is created by the inlined delegate ctor.
7281 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7283 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
7285 2007-11-29 Zoltan Varga <vargaz@gmail.com>
7287 * cpu-x86.md: Fix the length of ckfinite.
7289 2007-11-28 Zoltan Varga <vargaz@gmail.com>
7291 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7293 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
7294 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
7296 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
7298 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
7299 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
7301 2007-11-28 Martin Baulig <martin@ximian.com>
7304 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
7305 after creating the trampoline.
7307 2007-11-27 Zoltan Varga <vargaz@gmail.com>
7309 * aot-runtime.c (load_aot_module): Check runtime version if needed.
7311 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
7314 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
7315 instead of the calling method to help AOT.
7317 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
7319 2007-11-26 Zoltan Varga <vargaz@gmail.com>
7321 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
7324 2007-11-23 Zoltan Varga <vargaz@gmail.com>
7326 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
7328 * aot-compiler.c (compile_method): Correct check for generic method definitions.
7329 (encode_method_ref): No need to handle generic method definitions specially.
7331 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
7333 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
7336 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
7338 (compile_method): Enable generic sharing.
7340 2007-11-22 Zoltan Varga <vargaz@gmail.com>
7342 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
7343 (mini_method_compile): Add preliminary support for AOTing shared generic code.
7345 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
7348 * mini-trampolines.c: Fix a warning.
7350 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
7352 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
7353 (generic_class_is_reference_type): Remove unused function.
7355 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
7356 in the generic vtable trampoline case.
7358 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
7360 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
7361 return an AOT method based on a vtable slot.
7363 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
7365 * mini.c (mini_get_vtable_trampoline): Export this.
7367 2007-11-22 Martin Baulig <martin@ximian.com>
7370 (MonoDebuggerInfo): Move `debugger_version' up.
7372 2007-11-22 Martin Baulig <martin@ximian.com>
7375 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
7377 * mini-trampolines.c
7378 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
7379 after compiling the method.
7381 2007-11-20 Martin Baulig <martin@ximian.com>
7384 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
7385 (mono_debugger_remove_breakpoint): Likewise.
7386 (mono_debugger_check_breakpoints): Likewise.
7388 * debug-debugger.c: Implement the new breakpoint interface here.
7390 2007-11-18 Zoltan Varga <vargaz@gmail.com>
7392 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
7393 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
7395 * mini-x86.c (mono_arch_output_basic_block): Ditto.
7397 2007-11-17 Zoltan Varga <vargaz@gmail.com>
7399 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
7401 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
7404 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
7407 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
7408 returning a vtype in a register.
7410 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
7411 here from the arch specific code.
7413 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
7416 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
7417 (mono_arch_emit_prolog): Increment maximum prolog size.
7419 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
7420 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
7422 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
7423 MonoGenericSharingContext.
7425 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
7426 MonoGenericSharingContext. Allocate memory from the cfg mempool.
7428 2007-11-15 Mark Probst <mark.probst@gmail.com>
7430 * mini.c, mini.h, generic-sharing.c: Functions for producing code
7431 which extract fields out of the runtime generic context. Full
7432 sharing of the NEWARR opcode.
7434 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
7436 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
7437 --enable-minimal=ssa.
7439 2007-11-13 Zoltan Varga <vargaz@gmail.com>
7441 * mini-trampolines.c (mono_delegate_trampoline): Update after
7442 mono_marshal_get_delegate_invoke () signature change.
7444 2007-11-13 Mark Probst <mark.probst@gmail.com>
7446 * mini.c: Removed the shared context in favor of the generic
7447 sharing context. Allocate the MonoJitInfo structure with room for
7448 the generic sharing context if it's needed.
7450 * mini.h: Remove MonoGenericSharingContext declaration. It's in
7451 domain-internals.h now.
7453 * mini-x86.c: Pass the generic sharing context to get_call_info ().
7455 * generic-sharing.c: Several changes for working without a shared
7456 context and instead operating on open types instead.
7458 2007-11-12 David S. Miller <davem@davemloft.net>
7460 * inssel-sparc.brg: Fix double instruction emit.
7462 2007-11-12 Zoltan Varga <vargaz@gmail.com>
7464 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
7465 Get/Set/Address methods.
7467 * mini.c debug-debugger.c mini-trampolines.c: Update after
7468 mono_marshal_get_delegate_invoke signature change.
7470 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
7472 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
7473 This can happens with dynamic methods. Fixes the other bug in #322722.
7475 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
7477 * tramp-arm.c (mono_arch_patch_callsite): Support patching
7480 * mini-arm.c (arm_patch): Implement patching of BX call
7481 sequence. Fixes one of the bugs in #322722.
7483 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
7485 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
7486 under Linux. We only need to flush every 32-byte cache line.
7488 2007-11-07 Massimiliano Mantione <massi@ximian.com>
7491 move_basic_block_to_end: Add branches when needed, eventually creating
7493 optimize_branches: added a parameter that tells if it's ok to create
7494 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
7495 and avoid calling move_basic_block_to_end when it's not ok.
7498 2007-11-07 Mark Probst <mark.probst@gmail.com>
7500 * mini.c: Abort inlining call to InitializeArray if something
7501 looks wrong. Let the icall handle it, which now has proper safety
7504 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
7506 * mini.c (mono_spill_call): add support for soft-float.
7508 * mini.c (mono_method_to_ir): add support for soft-float
7509 to inlined functions that return float.
7511 * mini.c (mono_method_to_ir): add support for soft-float
7512 to cee_stsfld opcode on float fields.
7514 2007-11-05 Geoff Norton <gnorton@novell.com>
7516 * mini-x86.h: Fix the structure access for X86 Leopard.
7519 2007-11-05 Martin Baulig <martin@ximian.com>
7521 * mini-trampolines.c
7522 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
7523 after compiling the method to notify the debugger.
7525 2007-11-05 Martin Baulig <martin@ximian.com>
7527 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
7529 2007-11-02 Zoltan Varga <vargaz@gmail.com>
7531 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
7532 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
7534 2007-11-01 Zoltan Varga <vargaz@gmail.com>
7536 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
7537 native-to-managed wrappers.
7539 2007-11-01 Geoff Norton <gnorton@novell.com>
7541 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
7544 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7546 * mini.c, mini-x86.c: when getting back from unmanaged code
7547 to managed via a marshaled delegate we also need to set the
7550 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7552 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
7555 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7557 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
7558 let the debugger or other external agents to tell the JIT when
7559 a sw breakpoint has been inserted in the code that the JIT needs
7560 to be able to inspect.
7562 2007-10-31 Martin Baulig <martin@ximian.com>
7565 (MonoDebuggerInfo): Remove `runtime_class_init'.
7567 2007-10-30 Martin Baulig <martin@ximian.com>
7570 (mono_debugger_thread_created): Added `MonoThread *' argument.
7571 (mono_debugger_extended_notification): New public method.
7572 (mono_debugger_trampoline_compiled): New public method.
7575 (MonoDebuggerThreadInfo): Added `thread' and
7576 `extended_notifications' fields.
7579 (debugger_executable_code_buffer): New static variable.
7582 (MonoDebuggerInfo): Added `executable_code_buffer',
7583 `executable_code_buffer_size', `breakpoint_info_area',
7584 `breakpoint_table' and `breakpoint_table_size'.
7586 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
7588 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
7589 that IP either is an unused value or the vtable pointer. IMT
7590 calls use vtable + offset now. Reduced by almost half the size
7593 2007-10-26 Jonathan Chambers <joncham@gmail.com>
7595 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
7596 defines to access param registers. Replace long usage with
7597 gsize as sizeof(long) != sizeof(void*) on Win64.
7599 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
7600 on Win64. Fix intrinsic, use _AddressOfReturnAddress
7601 instead of non-existant _GetAddressOfReturnAddress.
7603 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
7604 param registers. Save/restore %rdi and %rsi in MonoLMF.
7606 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
7607 param registers. Modify (throw_exception) signature to take
7608 %rdi and %rsi on Win64.
7610 Code is contributed under MIT/X11 license.
7612 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7614 * helpers.c: unlink debugging output files.
7616 2007-10-25 Zoltan Varga <vargaz@gmail.com>
7618 * mini.c: Move mono_create_ftnptr () to object.c.
7620 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
7622 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
7623 optional. This function can now be used to disassemble code generated
7624 outside the JIT such as trampolines and IMT thunks.
7626 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
7628 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
7629 vtable pointer from a ldr instruction.
7631 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
7632 new IMT call sequence.
7634 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
7635 call sequence for interface invocations.
7637 * mini-arm.c (mono_arch_emit_imt_argument): added, required
7638 for imt support. This function is empty since IMT on ARM requires no
7639 special handling on the IR side.
7641 * mini-arm.c (mono_arch_find_imt_method): added, required for
7644 * mini-arm.c (mono_arch_find_this_argument): added, required
7647 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
7648 a ldr instruction to load a value stored in the code stream.
7650 * mini-arm.c (mono_arch_build_imt_thunk):added, required
7654 2007-10-23 Zoltan Varga <vargaz@gmail.com>
7656 * mini.c (mini_init): Install the jump trampoline callback.
7658 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7660 * mini-trampolines.c: handle synchronized methods with the common
7661 vtable trampoline (bug #335601).
7663 2007-10-17 Zoltan Varga <vargaz@gmail.com>
7665 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
7667 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
7670 * mini-ia64.h mini-ia64.c: Add support for IMT.
7672 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
7673 prolog. Fixes #331958.
7675 2007-10-15 Zoltan Varga <vargaz@gmail.com>
7677 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
7679 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7681 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
7684 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7686 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
7689 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
7691 * mini-x86.c, mini-x86.h: x86 support for the common vtable
7694 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
7696 * mini-trampolines.c: changed the magic rampoline to understand
7697 the common vtable trampoline method: the method to invoke is
7698 determined by the vtable displacement of the call.
7700 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7702 * mini.c, mini.h: register the common vtable trampoline if the
7703 architecture supports it.
7705 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7707 * cpu-amd64.md: use the correct max length for tls_get.
7709 2007-10-14 Zoltan Varga <vargaz@gmail.com>
7711 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
7712 CEE_STELEM_ANY. Fixes #333696.
7714 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7716 * exceptions-x86.c: provide more graceful handling of the case where
7717 we followed a bogus function pointer from managed code (bug #332866).
7719 2007-10-11 Mark Probst <mark.probst@gmail.com>
7721 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
7722 replaces the generic_shared flag and will carry more information
7725 * generic-sharing.c: Added mini_type_stack_size() which allows
7726 allows open types if given a generic sharing context.
7727 mini_get_basic_type_from_generic() takes a
7728 MonoGenericSharingContext* instead of a MonoCompile* now.
7730 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
7731 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
7732 mini-sparc.c, mini-x86.c: Trivial changes required by the two
7733 changes above. Just passing arguments through to the right
7736 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7738 * mini-arm.c: unify the call emission to emit_code_seq().
7740 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
7742 * tramp-arm.c: reduced the trampoline size.
7744 2007-10-10 Mark Probst <mark.probst@gmail.com>
7746 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
7747 variable handling out of arch-specific code.
7749 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7751 * mini-arm.c: implemented fast delegate dispatch.
7753 2007-10-09 Zoltan Varga <vargaz@gmail.com>
7755 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
7756 that fp elimination is turned off if the space required by locals is too
7759 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7761 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
7762 ARM to the new style trampoline.
7764 2007-10-09 Zoltan Varga <vargaz@gmail.com>
7766 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
7768 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
7770 2007-10-09 Martin Baulig <martin@ximian.com>
7773 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
7774 `field_info_offset_offset'.
7776 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7778 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
7779 removed more internal usage of the r11 register and made it available
7780 to the register allocator.
7782 2007-10-08 Mark Probst <mark.probst@gmail.com>
7784 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
7785 when sharing generics and treat type variables as references.
7787 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7789 * mini-ppc.c: started removing the internal uses of register r11
7790 to eventually allow the register allocator to manage it as an
7791 additional available register.
7793 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7795 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
7797 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7799 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
7800 specific trampolines as they are not performance critical as a jump
7801 target (maybe align as before only for AOT code?). This saves about
7802 200 KB of native code on x86 for monodevelop startup.
7804 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7806 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
7807 monodevelop startup.
7809 2007-10-06 Zoltan Varga <vargaz@gmail.com>
7811 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
7813 * mini-sparc.h mini-sparc.c: Implement IMT support.
7815 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
7816 its smaller and doesn't clobber sparc_g1.
7818 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
7820 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7822 * mini-ppc.c: optimized the size of the IMT thunks a bit.
7824 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7826 * mini-ppc.c: implemented fast delegate invocation.
7828 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
7830 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
7832 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7834 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
7835 code to the new style trampoline in preparation for IMT support.
7837 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
7839 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
7840 systems already. This also reduces the specific trampiline sizes and
7841 prepares for the use of r12 as the IMT identifier register.
7843 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7845 * mini-mips.h: endianess fix (simplified from a patch by
7846 Thomas Kunze <thommy@tabao.de>, bug #323737).
7848 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7850 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
7851 to access ucontext fields and enable netbsd support
7852 (partially from Magnus Henoch <mange@freemail.hu>).
7854 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7856 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
7857 use the preprocessor from the CPP env var if it is set.
7859 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7861 * mini-trampolines.c: fixed an assertion and moved it earlier in the
7862 code, before interface_offset gets used.
7864 2007-10-02 Zoltan Varga <vargaz@gmail.com>
7866 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
7867 mono_class_setup_vtable () before accessing klass->vtable.
7869 2007-10-01 Zoltan Varga <vargaz@gmail.com>
7871 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
7874 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7876 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
7877 IMT slots (this saves hundreds of KB of memory in programs like
7878 IronPython and Monodevelop).
7880 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
7882 * mini.c: print the delegate counter.
7884 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
7886 * mini-x86.c: make it easier to enable the debugging code for IMT
7889 2007-09-28 Martin Baulig <martin@ximian.com>
7892 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
7893 `mono_method_klass_offset' and `mono_method_token_offset'.
7895 2007-09-20 Mark Probst <mark.probst@gmail.com>
7897 * mini.c: First generics sharing implementation. Can only share
7898 in very simple cases. If sharing doesn't work it falls back to
7899 dedicated compilation.
7901 * mini.h: Flag in MonoCompile to specify whether generic
7902 compilation is shared. Flags enum for marking which generic inst
7903 of a context is used. Prototypes for helper functions.
7905 * generic-sharing.c: Helper functions for generic method sharing.
7907 * optflags-def.h: Optimization flag (gshared) for enabling generic
7908 method sharing added.
7910 * Makefile.am: generic-sharing.c added.
7912 2007-09-19 Daniel Nauck <dna@mono-project.de>
7914 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
7916 2007-09-19 Massimiliano Mantione <massi@ximian.com>
7917 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
7920 2007-09-19 Martin Baulig <martin@ximian.com>
7922 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
7923 mono_debug_cleanup() is now part of mono_cleanup().
7925 2007-09-18 Zoltan Varga <vargaz@gmail.com>
7927 * driver.c (mono_main): Fix a warning.
7929 2007-09-17 Zoltan Varga <vargaz@gmail.com>
7931 * aot-compiler.c: Optimize various parts when processing large assemblies.
7934 * mini.c (mono_patch_info_hash): Improve hash function.
7936 2007-09-14 Jonathan Chambers <joncham@gmail.com>
7938 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
7940 Code is contributed under MIT/X11 license.
7942 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7944 * mini.c (mini_init): Fix a leak.
7946 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
7948 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7950 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
7952 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7954 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
7956 2007-09-13 Zoltan Varga <vargaz@gmail.com>
7958 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
7961 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
7963 * mini.c (handle_alloc): Enable managed allocators in AOT code.
7965 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
7967 * aot-runtime.c (decode_patch_info): Ditto.
7969 2007-09-12 Jonathan Chambers <joncham@gmail.com>
7971 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
7972 static case. Cache delegates in architecture specific code,
7973 based on number of parameters.
7975 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
7976 in architecture specific code, based on number of parameters.
7978 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
7979 caching happen in architecture specific code now.
7981 Code is contributed under MIT/X11 license.
7983 2007-09-12 Jonathan Chambers <joncham@gmail.com>
7985 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
7986 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
7987 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
7989 Code is contributed under MIT/X11 license.
7991 2007-05-15 Massimiliano Mantione <massi@ximian.com>
7992 * mini.c: (mono_thread_abort) Fixed bug #82416.
7994 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7996 * mini.: hook the new managed GC allocation feature into the JIT.
7998 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8000 * mini.c: implementation for the new runtime tls opcode.
8002 2007-09-11 Martin Baulig <martin@ximian.com>
8005 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
8006 `mono_method_inflated_offset'.
8008 2007-09-07 Zoltan Varga <vargaz@gmail.com>
8010 * driver.c mini.h mini.c: Add a new devel command line option for injecting
8011 async exceptions into a method.
8013 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
8014 purpose of testing whenever the unwinder works at every instruction.
8016 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8018 * mini.c: check accessibility of method used in ldftn (fixes
8021 2007-09-04 Zoltan Varga <vargaz@gmail.com>
8023 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
8025 * inssel.brg: Fix a warning.
8027 2007-09-03 Martin Baulig <martin@ximian.com>
8029 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
8030 now takes the `main_method' as argument.
8032 2007-09-02 Zoltan Varga <vargaz@gmail.com>
8034 * cpu-sparc.md (endfilter): Add missing src1:i argument.
8036 2007-08-30 Jonathan Chambers <joncham@gmail.com>
8038 * driver.c: include the cil-coff.h header on Windows.
8040 Code is contributed under MIT/X11 license.
8042 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8044 * mini.c, driver.c: don't include the cil-coff.h header.
8046 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8048 * mini.c: flag places that needs fixes fo soft-float support.
8050 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
8052 * mini.h, inssel-float.brg: fix soft-float constant loads on big
8053 endian systems (partially from Dean Jenkins, bug #81924).
8055 2007-08-28 Mark Probst <mark.probst@gmail.com>
8057 * mini.c (check_linkdemand): Remove embedded reference object in
8058 call to LinkDemandSecurityException.
8059 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
8060 with an IntPtr instead of a reference object.
8062 2007-08-28 Zoltan Varga <vargaz@gmail.com>
8064 * mini.c (handle_initobj): Handle alignment properly.
8066 * inssel.brg (mini_emit_memset): Ditto.
8068 * inssel.brg (mini_emit_memcpy): Ditto.
8070 * inssel-sparc.brg: Ditto.
8072 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
8074 2007-08-26 Zoltan Varga <vargaz@gmail.com>
8076 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
8077 exceptions raised in unmanaged code. Fixes part of #82594.
8079 2007-08-24 Mark Probst <mark.probst@gmail.com>
8081 * mini.c (mono_method_to_ir), declsec.c
8082 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
8084 2007-08-22 Martin Baulig <martin@ximian.com>
8087 (MonoDebuggerThreadInfo): New typedef.
8088 (mono_debugger_thread_table): New global variable.
8089 (mono_debugger_thread_created): New public function.
8090 (mono_debugger_thread_cleanup): New public function.
8094 - removed `get_current_thread' and `lookup_assembly'.
8095 - removed `data_table'.
8096 - added `thread_table'.
8099 (mono_thread_start_cb): Call mono_debugger_thread_created().
8100 (mono_thread_attach_cb): Likewise.
8101 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
8102 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
8105 * driver.c (mono_main): Move mono_debug_init() up, before calling
8106 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
8108 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8110 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
8111 together when passing several arguments of type double (gives a small
8112 speedup and saves a few bytes of generated code).
8114 2007-08-20 Jb Evain <jbevain@novell.com>
8116 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
8118 2007-08-20 Jb Evain <jbevain@novell.com>
8120 * mini.c (mono_method_to_ir): throw MethodAccessException
8121 and FieldAccessException instead of InvalidProgramException.
8123 2007-08-20 Mark Probst <mark.probst@gmail.com>
8125 * mini.c: CoreCLR security checks.
8127 * mini.h: Removed MonoSecurityMode (moved to
8128 metadata/security-manager.h) and mono_security_mode global var
8129 (replaced by set/get functions in security-manager.h).
8131 * driver.c: Added "core-clr-test" security mode for testing. Used
8132 set-function for setting security mode.
8134 2007-08-17 Mark Probst <mark.probst@gmail.com>
8136 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
8137 the new jit_info_table.
8139 * driver.c: Test code for the new jit_info_table (enabled by the
8140 define MONO_JIT_INFO_TABLE_TEST).
8142 2007-08-14 Zoltan Varga <vargaz@gmail.com>
8144 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8145 detection of call <REG> instruction sequence. Fixes build on freebsd.
8147 2007-08-13 Zoltan Varga <vargaz@gmail.com>
8149 * mini-exceptions.c: Fix a warning.
8151 2007-08-11 Zoltan Varga <vargaz@gmail.com>
8153 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
8154 stack overflow handling code on amd64 too.
8156 * mini-exceptions.c (mono_setup_altstack): Make this use
8157 mono_thread_get_stack_bounds ().
8159 * mini-x86.h: Disable sigaltstack on solaris x86.
8161 2007-08-10 Zoltan Varga <vargaz@gmail.com>
8163 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
8165 2007-08-10 Geoff Norton <gnorton@customerdna.com>
8167 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
8169 2007-08-08 Zoltan Varga <vargaz@gmail.com>
8171 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
8173 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
8175 2007-08-03 Neale Ferguson <neale@sinenomine.net>
8177 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
8180 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8182 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
8183 to be emitted (bug #82281).
8185 2007-08-01 Martin Baulig <martin@ximian.com>
8187 Merged the `debugger-dublin' branch.
8189 * debug-debugger.h (MonoDebuggerInfo):
8190 Removed the `old_*' compatibility entries.
8191 Added `debugger_version' and `data_table'.
8192 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
8193 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
8196 (MiniDebugMethodBreakpointInfo): Add `address_list'.
8197 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
8198 instead of a `gconstpointer'.
8199 (mono_debugger_insert_method_breakpoint): Return a
8200 `MonoDebugMethodAddressList *'.
8202 2007-06-28 Martin Baulig <martin@ximian.com>
8204 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8206 2007-08-01 Zoltan Varga <vargaz@gmail.com>
8208 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
8209 __builtin_frame_address () since it is broken on older gcc versions.
8211 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8213 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
8214 on the stack overflow handling and made the managed stack overflows
8215 catchable in most cases using soft guard pages.
8216 * exceptions-x86.c: added code to restore the protection in the soft
8217 guard pages at the end of exception handling.
8219 2007-07-31 Zoltan Varga <vargaz@gmail.com>
8221 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
8223 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8225 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
8228 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8230 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
8231 signal handling support until it has been ported to the new mechanism.
8232 * mini.c: fixed stack overflow detection and use the new
8233 architecture code to handle signals on the altstack.
8235 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8237 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
8238 stack overflows on the alt stack.
8240 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
8242 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
8243 stack overflows on the alt stack.
8245 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
8247 * exceptions-ppc.c: cleanup preparing for altstack support.
8249 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8251 * exceptions-arm.c: cleanup preparing for altstack support.
8253 2007-07-27 Mark Probst <mark.probst@gmail.com>
8255 * mini.c (print_jit_stats): Output hazard pointer stats.
8257 2007-07-26 Mark Probst <mark.probst@gmail.com>
8259 * driver.c, mini.c: Replaced security mode flags with a single
8262 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8264 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
8266 2007-07-25 Mark Probst <mark.probst@gmail.com>
8268 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
8269 (which doesn't do anything yet) for activating Core CLR
8270 (Silverlight) security.
8272 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8274 * mini-codegen.c: work around a possible gcc bug on arm.
8276 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8278 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
8279 message for platforms that don't support AOT compilation.
8281 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8283 * mini.h, mini.c, driver.c: temporary smcs hack.
8285 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
8287 * mini-arm.h, mini-arm.c: arm EABI fixes.
8289 2007-07-22 Zoltan Varga <vargaz@gmail.com>
8291 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
8294 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
8295 trampolines taking a method argument.
8297 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
8299 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
8300 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
8302 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
8303 JIT compilation throws an exception. Fixes #82050.
8305 2007-07-19 Mark Probst <mark.probst@gmail.com>
8307 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
8308 with the MONO_EXCEPTION_ defines.
8310 2007-07-17 Zoltan Varga <vargaz@gmail.com>
8312 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
8315 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
8316 the cause of an assertion.
8318 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
8320 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
8323 2007-07-15 Zoltan Varga <vargaz@gmail.com>
8325 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
8326 assert. Should fix #82103.
8328 2007-07-14 Zoltan Varga <vargaz@gmail.com>
8330 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
8331 here too. Fixes #82095.
8333 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
8336 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
8338 * mini-amd64.h: Enable IMT for amd64.
8340 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
8342 2007-07-12 Zoltan Varga <vargaz@gmail.com>
8344 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
8346 2007-07-12 Mark Probst <mark.probst@gmail.com>
8348 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
8349 as soon as check_linkdemand sets an exception_type.
8351 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8353 * mini-x86.c: fixed offsets for IMT call sequence.
8354 * mini-x86.h: enable IMT again.
8356 2007-07-11 Zoltan Varga <vargaz@gmail.com>
8358 * trace.c (mono_trace_enter_method): Decode MonoType too.
8360 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
8362 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
8364 * mini-amd64.c: Add preliminary IMT implementation.
8366 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8368 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
8369 understand the new IMT-base interface invocation (thanks to
8370 Daniel Nauck for the report and the remote debugging session).
8372 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8374 * mini-x86.c: size and speed optimizations for the IMT bsearch.
8376 2007-07-11 Zoltan Varga <vargaz@gmail.com>
8378 * Makefile.am (aotcheck): Make this actually use the AOTed code.
8380 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
8382 * mini-trampolines.c: implement AOT IMT support.
8383 * mini-x86.h: enable IMT support for wider testing.
8385 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8387 * inssel.brg (emit_imt_argument): Add aot support here.
8389 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
8391 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8393 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
8394 of the IMT implementation, partially from massi, with my
8395 implementation of the bsearch sequence. Disabled by default until
8396 the AOT code is implemented.
8398 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8400 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
8402 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
8404 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8406 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
8407 arch-independent IMT JIT code from Massimiliano
8408 Mantione (massi@ximian.com) with small cleanups from me.
8410 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8412 * Makefile.am: fix svn invocation to get the svn revision to be
8413 independent of the local language (build fix).
8415 2007-07-09 Mark Probst <mark.probst@gmail.com>
8417 * mini.c (inline_method): Reset cfg->exception_type if the
8418 inlining is aborted. Fixes: 82049.
8420 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
8422 * mini.c: remove assert from exception handling code when exception_ptr
8425 2007-07-05 Zoltan Varga <vargaz@gmail.com>
8427 * mini.c (mono_codegen): Add an assert.
8429 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
8430 enter and leave code.
8431 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
8433 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8435 * mini-ppc.c: fixed memory corruption for localloc(0)
8438 2007-07-05 Zoltan Varga <vargaz@gmail.com>
8440 * mini.c: Fix warnings.
8442 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
8444 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
8445 to emit better double->int conversions.
8447 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8449 * mini.c: the provided Min/Max optimizations are valid for unisgned
8452 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
8454 * 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
8456 2007-06-28 Miguel de Icaza <miguel@novell.com>
8458 * mini.c (mono_running_on_valgrind): Add support for reporting the
8459 method and its boundaries to valgrind.
8461 2007-06-28 Martin Baulig <martin@ximian.com>
8463 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8465 2007-06-25 Zoltan Varga <vargaz@gmail.com>
8467 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
8469 * generic.2.cs: Add new test case.
8471 2007-06-25 Martin Baulig <martin@ximian.com>
8473 Merged the `debugger-dublin' branch.
8476 (mono_debugger_insert_method_breakpoint): New public method.
8477 (mono_debugger_remove_method_breakpoint): Likewise.
8478 (mono_debugger_check_breakpoints): New static method.
8479 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
8481 * debug-debugger.h (MonoDebuggerInfo):
8482 Renamed (to keep backward compatibility in the vtable):
8483 `insert_breakpoint' -> `old_insert_breakpoint'.
8484 `remove_breakpoint' -> `old_remove_breakpoint'.
8485 `create_string' -> `old_create_string'.
8486 `lookup_class' -> `old_lookup_class'.
8487 `lookup_type' -> removed; changed into a dummy field.
8488 `lookup_assembly' -> `old_lookup_assembly'.
8489 Added (same functionality, but different signature):
8490 `create_string', `lookup_class', `lookup_assembly'
8492 `get_method_addr_or_bpt', `remove_method_breakpoint',
8493 `runtime_class_init'.
8495 * debug-debugger.c: Merged the `debugger-dublin' branch.
8497 2007-06-23 Zoltan Varga <vargaz@gmail.com>
8499 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
8501 (peephole_pass): Likewise.
8503 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
8505 * driver.c: hopefully make setaffinity work also for ancient
8508 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
8510 * driver.c : win32 build fix.
8512 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8514 * driver.c: check for the MONO_NO_SMP env var and bind to a single
8515 processor if it is set.
8517 2007-06-21 Martin Baulig <martin@ximian.com>
8519 * debug-mini.h: New file.
8522 (mono_debugger_insert_breakpoint_full): Moved here from
8523 ../metadata/mono-debug-debugger.c.
8524 (mono_debugger_remove_breakpoint): Likewise.
8525 (mono_debugger_breakpoint_callback): Likewise.
8527 2007-06-15 Raja R Harinath <rharinath@novell.com>
8529 * jit-icalls.c (mono_helper_compile_generic_method): Update to
8530 changes in MonoGenericClass.
8532 2007-06-14 Zoltan Varga <vargaz@gmail.com>
8534 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
8536 2007-06-14 Raja R Harinath <rharinath@novell.com>
8538 * jit-icalls.c (mono_helper_compile_generic_method): Update to
8539 removal of MonoGenericMethod.
8541 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8543 * mini-exceptions.c: hooks for the exception events profiling API.
8545 2007-06-14 Randolph Chung <tausq@debian.org>
8547 * Makefile.ma: Add hppa target.
8548 * mini-arch.h: Include mini-hppa.h
8549 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
8550 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
8551 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8553 2007-06-14 Randolph Chung <tausq@debian.org>
8555 * inssel.brg: Add rules for "chained" compare-branch operations so that
8556 a single compare op can affect multiple branches. Adjust cost for
8557 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
8558 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
8559 cost for some rules so that they can more easily be overridden by
8560 per-arch rules (with fixes from lupus).
8561 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8563 2007-06-13 Randolph Chung <tausq@debian.org>
8565 * mini-ops.h: Reorder branch ops so that they match the order of the
8566 corresponding CEE_* ops. The code expects them this way.
8567 Add new ops for HPPA target.
8568 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8570 2007-06-13 Randolph Chung <tausq@debian.org>
8572 * mini-exceptions.c: Handle cases where the stack grows towards
8574 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8576 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8578 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
8580 * driver.c: explain where a non-matching corlib is found.
8582 2007-06-13 Mark Probst <mark.probst@gmail.com>
8584 * mini.c (print_jit_stats): Output dynamic code allocation stats.
8586 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
8588 * mini-exceptions.c: Generate a method profile leave event during
8589 an exception to ensure that the profiler gets notified.
8591 2007-06-07 Zoltan Varga <vargaz@gmail.com>
8593 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
8596 * cpu-amd64.md: Add long_and/or/xor opcodes.
8598 2007-06-06 Wade Berrier <wberrier@novell.com>
8600 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
8601 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
8602 length of instruction shr_imm (expected 8, got 10)
8604 2007-06-06 Zoltan Varga <vargaz@gmail.com>
8606 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
8608 2007-06-06 Mark Probst <mark.probst@gmail.com>
8610 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8611 MonoInternalHashTable again (fixed bug in the internal hash table
8614 2007-06-06 Mark Probst <mark.probst@gmail.com>
8616 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
8617 Have to figure out what makes it crash the SWF regression.
8619 2007-06-05 Zoltan Varga <vargaz@gmail.com>
8621 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
8623 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8625 * mini.c: optimize out the type check when storing null in a
8628 2007-06-04 Mark Probst <mark.probst@gmail.com>
8630 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8631 MonoInternalHashTable.
8633 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8635 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
8636 signed integer methods.
8638 2007-06-02 Zoltan Varga <vargaz@gmail.com>
8640 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
8641 permanently since the current approach doesn't work.
8643 2007-06-02 Zoltan Varga <vargaz@gmail.com>
8645 * inssel.brg (stmt): Only call delegate->invoke_impl if
8646 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
8648 2007-06-01 Zoltan Varga <vargaz@gmail.com>
8650 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
8651 the sreg2==rdx case.
8653 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
8654 account if it contains a rex prefix.
8655 (peephole_pass): Handle OP_FMOVE as well.
8657 2007-06-01 Zoltan Varga <vargaz@gmail.com>
8659 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
8660 as it causes regressions.
8662 2007-05-31 Zoltan Varga <vargaz@gmail.com>
8664 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
8665 static case as well.
8667 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
8669 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8670 (mono_arch_get_this_arg_from_call): Ditto.
8672 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
8674 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
8677 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8678 (mono_arch_get_this_arg_from_call): Ditto.
8680 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
8682 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
8683 try to create optimized invoke code and use that for further invocations.
8684 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
8686 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
8688 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
8690 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
8691 sealed classes or methods.
8692 *devirtualization.cs: tests for the new optimization
8694 2007-05-29 Zoltan Varga <vargaz@gmail.com>
8696 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
8697 by the update_volatile () function.
8699 2007-05-27 Zoltan Varga <vargaz@gmail.com>
8701 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
8704 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
8706 2007-05-24 Jonathan Chambers <joncham@gmail.com>
8708 * mini.c: Add configure checks for header files.
8709 * mini-x86.c: Add configure checks for header files.
8710 * trace.c: Add configure checks for header files.
8711 * aot-runtime.c: Add configure checks for header files.
8712 * aot-compiler.c: Add configure checks for header files.
8713 * driver.c: Add configure checks for header files.
8714 * mini-codegen.c: Add configure checks for header files.
8716 Code is contributed under MIT/X11 license.
8718 2007-05-22 Zoltan Varga <vargaz@gmail.com>
8720 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
8721 icompare_imm -128 + op_iclt. Fixes #81703.
8723 2007-05-19 Zoltan Varga <vargaz@gmail.com>
8725 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
8727 2007-05-15 Massimiliano Mantione <massi@ximian.com>
8729 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
8730 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
8731 so that all isinst checks now use "interface_bitmap".
8733 2007-05-15 Zoltan Varga <vargaz@gmail.com>
8735 * cpu-amd64.md (jmp): Fix a warning.
8737 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
8739 * basic.cs: Add new regression test.
8741 * basic.cs: Remove test which is now in basic-long.cs.
8743 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
8745 * basic-long.cs: Add new test.
8747 2007-05-13 Zoltan Varga <vargaz@gmail.com>
8749 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
8751 2007-05-12 Zoltan Varga <vargaz@gmail.com>
8753 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
8755 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
8758 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
8759 throwing code a bit.
8761 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
8762 the exception throwing code a bit.
8764 * mini-x86.c (get_call_info): Allocate result from a mempool.
8766 2007-05-11 Zoltan Varga <vargaz@gmail.com>
8768 * aot-compiler.c (find_typespec_for_class): Fix the assert.
8770 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8772 * mini.h (MonoCompile): Add 'token_info_hash' field.
8774 * mini.c: Save token->method associations during compilation so the AOT
8775 compiler can use it.
8777 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
8778 which reference generic classes and methods.
8780 2007-05-10 Zoltan Varga <vargaz@gmail.com>
8782 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
8784 * aot-compiler.c (compile_method): Fix a typo in a comment.
8786 * aot-runtime.c (decode_cached_class_info): Skip generic types.
8788 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
8791 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
8793 2007-05-09 Zoltan Varga <vargaz@gmail.com>
8795 * mini.h (MonoCompile): Add 'args' field.
8797 * mini.c (mono_compile_create_vars): Store variables representing the arguments
8800 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
8802 2007-05-08 Zoltan Varga <vargaz@gmail.com>
8804 * mini.c (mono_compile_get_interface_var): Remove this unused function.
8806 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
8808 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
8809 opcodes for some opcodes.
8811 * mini.h *.brg *.c: Use the new opcodes.
8813 2007-05-08 Massimiliano Mantione <massi@ximian.com>
8815 * mini.h: Bumped aot revision.
8817 * inssel.brg: modified code generation of type checks for interfaces
8818 to use the new "MonoClass.interface_bitmap" instead of the old
8819 "MonoClass.interface_offsets".
8821 2007-04-30 Zoltan Varga <vargaz@gmail.com>
8823 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
8825 2007-04-29 Zoltan Varga <vargaz@gmail.com>
8827 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
8830 2007-04-27 Neale Ferguson <neale@sinenomine.net>
8832 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
8834 2007-04-27 Wade Berrier <wberrier@novell.com>
8836 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
8837 mini.h) to fix build.
8839 2007-04-26 Zoltan Varga <vargaz@gmail.com>
8841 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
8843 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
8844 causes the corlib unit tests to fail.
8846 2007-04-25 Zoltan Varga <vargaz@gmail.com>
8848 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
8850 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
8852 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
8853 opcodes to the comparison relations.
8855 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
8856 opcodes to their types.
8858 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
8860 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
8861 it in cfg->arch.cinfo.
8863 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
8865 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
8866 cfg->cil_offset_to_bb.
8868 2007-04-24 Zoltan Varga <vargaz@gmail.com>
8870 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
8871 created becase of initlocals.
8873 2007-04-23 Zoltan Varga <vargaz@gmail.com>
8875 * mini-alpha.c cpu-alpha.md: More alpha port work from
8876 Sergey Tikhonov <tsv@solvo.ru>.
8878 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
8880 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
8882 2007-04-19 Zoltan Varga <vargaz@gmail.com>
8884 * cpu-s390.md (break): Correct the length of break instruction.
8886 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8888 * mini.c: fix a couple of soft-float issues and comments.
8890 2007-04-15 Miguel de Icaza <miguel@novell.com>
8892 * trace.c (is_filenamechar): - is also a filename char.
8894 2007-04-15 Neale Ferguson <neale@sinenomine.net>
8896 * mini-s390.c: Correct checking for enum type in return value processing.
8898 2007-04-14 Raja R Harinath <rharinath@novell.com>
8900 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
8901 (version.h): Makefile is in the build directory.
8903 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
8905 * mini-amd64.h: fix for assertion failure on Solaris/amd64
8907 2007-04-11 Martin Baulig <martin@ximian.com>
8909 * mini.c (can_access_member): Fix handling of generic classes;
8912 2007-04-10 Zoltan Varga <vargaz@gmail.com>
8914 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
8916 2007-04-05 Zoltan Varga <vargaz@gmail.com>
8918 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
8920 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
8922 * mini-codegen.c: make sure the right spill amount is
8923 used for fp or integer registers (fixes the float_sub_spill() on ppc).
8925 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
8927 * mini-ppc.c: fixes for the fp_branch_nan test.
8929 2007-03-23 Zoltan Varga <vargaz@gmail.com>
8931 * basic.cs: Comment out new test which still fails on ia64.
8933 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8935 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
8937 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8939 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
8941 2007-03-22 Zoltan Varga <vargaz@gmail.com>
8943 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
8944 on 64 bit machines. Fixes part of #80738.
8946 * basic.cs: Add regression test.
8948 2007-03-17 Zoltan Varga <vargaz@gmail.com>
8950 * inssel.brg basic.cs: Revert previous change to fix build.
8952 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
8955 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
8957 * basic.cs: Add new regression test.
8959 2007-03-17 Zoltan Varga <vargaz@gmail.com>
8961 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
8964 2007-03-16 Neale Ferguson <neale@sinenomine.net>
8966 * cpu-s390x.md: Correct length of break instruction.
8968 2007-03-16 Neale Ferguson <neale@sinenomine.net>
8970 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
8971 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
8973 2007-03-15 Jonathan Chambers <joncham@gmail.com>
8975 * *.c: Begin WIN64 port.
8976 * mini.c: Use correct register in profiler.
8977 * mini-amd64.c: No inline assembly on Win64.
8978 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
8979 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
8980 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
8981 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
8982 mono_arch_ip_from_context for Win64.
8984 Contributed under MIT/X11 license.
8986 2007-03-15 Zoltan Varga <vargaz@gmail.com>
8988 * exceptions-amd64.c (seh_handler): Ditto.
8990 * exceptions-x86.c (seh_handler): Fix a memory leak.
8992 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
8994 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
8995 mini-s390x.c: fixed peephole optimizations to deal
8996 correctly with 1 and 2 byte reload avoidance.
8998 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
9000 * cpu-s390.md, cpu-s390x.md: update localloc length.
9002 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9004 * cpu-g4.md: added missing descriptions.
9006 2007-03-14 Miguel de Icaza <miguel@novell.com>
9008 * Makefile.am: Add support so the tail tests are not executed on
9009 PowerPC as that is a known limitation of the PowerPC port.
9011 2007-03-13 Jonathan Chambers <joncham@gmail.com>
9013 * runmdesc.bat: Move to msvc directory.
9015 2007-03-13 Jonathan Chambers <joncham@gmail.com>
9017 * runmdesc.bat: Run executable that was produced by the current
9018 target and sent via an argument.
9020 2007-03-11 Zoltan Varga <vargaz@gmail.com>
9022 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
9025 * generics.2.cs: Add regression test.
9027 2007-03-09 Wade berrier <wberrier@novell.com>
9029 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
9031 2007-03-09 Zoltan Varga <vargaz@gmail.com>
9033 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
9034 AOT code depends on this.
9036 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9038 * mini.c: more precise tracking of types in the eval stack
9039 (part of fix for bug #81044).
9041 2007-03-07 Zoltan Varga <vargaz@gmail.com>
9043 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
9045 * aot-compiler.c (encode_patch): Remove an obsolete comment.
9047 2007-03-06 Zoltan Varga <vargaz@gmail.com>
9049 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
9051 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
9053 2007-02-22 Zoltan Varga <vargaz@gmail.com>
9055 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
9056 a pointer on 64 bit systems. Fixes #80190.
9058 * iltests.il: Add new regression test.
9060 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9062 * mini.c: inline a constant for Environment.IsRunningOnWindows.
9064 2007-02-19 Geoff Norton <gnorton@customerdna.com>
9066 * trace.c: Remove an erroneous alignemnt check when tracing.
9067 Fixes --trace on OSX86.
9069 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9071 * mini-$(arch).h: initialize SP in context for all the archs.
9073 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
9075 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
9076 regressions in the thread tests.
9078 2007-02-14 Zoltan Varga <vargaz@gmail.com>
9080 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
9081 - fixed implementation of LOCALLOC opcode
9082 - implemented non-un compare for floats
9084 - implementation of FDIV and CKFINITE opcodes
9085 - fixes for latest mono updates
9086 - additional arch opcodes
9088 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9090 * Makefile.am: simplify and merge rules for cross-compilation.
9092 2007-02-07 Massimiliano Mantione <massi@ximian.com>
9094 * local-propagation.c: Actually *apply* the fix for bug 80591...
9096 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9098 * mini-exceptions.c: backuot part of the last change
9099 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
9101 2007-02-06 Massimiliano Mantione <massi@ximian.com>
9102 * inssel.brg: Fix bug 59286.
9105 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
9107 * mini-exceptions.c: patch from Zoltan to correctly check for
9108 stack boundaries (using the stack register, not the frame register),
9109 fixes bugs #80724, #79717.
9111 2007-02-03 Zoltan Varga <vargaz@gmail.com>
9113 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
9114 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
9116 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
9117 presence of frame pointer elimination.
9119 2007-02-01 Geoff Norton <gnorton@customerdna.com>
9121 * mini-x86.h: NetBSD UCONTEX_REG defines.
9123 2007-02-01 Zoltan Varga <vargaz@gmail.com>
9125 * inssel-amd64.brg: Fix amd64 build.
9127 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
9129 * mini.h: remove extern to workaround what looks likes gcc bug 26905
9132 2007-01-31 Zoltan Varga <vargaz@gmail.com>
9134 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
9137 * mini-<ARCH>.c: Use mono_is_regsize_var ().
9139 2007-01-30 Mark Mason <mason@broadcom.com>
9141 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
9142 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
9143 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
9144 beginning support for CEE_JMP [not quite working yet]
9145 * tramp-mips.c: LMF handling now works
9147 2007-01-30 Zoltan Varga <vargaz@gmail.com>
9149 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
9151 * mini.h (NULLIFY_INS): New macro.
9153 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9155 * mini.c: statistical profiler fix for windows, patch
9156 from Tor Lillqvist (tml@novell.com).
9158 2007-01-30 Massimiliano Mantione <massi@ximian.com>
9159 * local-propagation.c: Fix bug 80591.
9161 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9163 * Makefile.am: put back the --export-dynamic option as with
9164 the previous gmodule flags (thanks to Robert Jordan).
9166 2007-01-28 Zoltan Varga <vargaz@gmail.com>
9168 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
9170 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
9171 simplify and speed up the local register allocator. Also rename some fields
9172 like iassign->vassign.
9174 * regalloc.c: Remove some functions which are no longer used since their
9175 inlined version is in mini-codegen.c.
9177 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
9179 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
9181 2007-01-27 Zoltan Varga <vargaz@gmail.com>
9183 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
9184 narrowing. Fixes #80622.
9186 * iltests.il: Add new regresssion test.
9188 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9190 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
9191 debug-debugger.c, debug-debugger.h: warning fixes.
9192 * driver.c: updated copyright year and made it fit in one line.
9194 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
9196 * aot-runtime.c: updated to use mono-dl instead of gmodule.
9198 2007-01-25 Zoltan Varga <vargaz@gmail.com>
9200 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
9202 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
9204 * iltests.il: Add new test for bug #80507.
9206 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9208 * mini-arm.h: use soft-float also on vfp for now.
9210 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9212 * mini.c: fix some more soft-float issues.
9214 2007-01-24 Zoltan Varga <vargaz@gmail.com>
9216 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
9218 2007-01-24 Massimiliano Mantione <massi@ximian.com>
9219 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
9220 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
9221 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
9223 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
9225 * mini-arm.c: typo fix.
9227 2007-01-23 Neale Ferguson <neale@sinenomine.net>
9229 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
9231 2007-01-21 Zoltan Varga <vargaz@gmail.com>
9233 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
9234 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
9236 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
9238 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
9240 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
9242 * inssel.brg: Fix a warning.
9244 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
9246 * abcremoval.c ssa.c ssapre.c: Update after this change.
9248 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
9250 * dominators.c (df_set): Use mono_bitset_union_fast.
9252 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9254 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
9255 mini-codegen.c: reduce relocations and memory usage for the cpu
9258 2007-01-20 Zoltan Varga <vargaz@gmail.com>
9260 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
9262 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
9263 to reduce their size.
9265 2007-01-19 Mark Mason <mason@broadcom.com>
9267 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
9268 * mini-mips.c: more configuration macros, support long conditional branches, additional
9269 asserts, fix epilog instrumentation.
9270 * mini-mips.h: use standard stack walk
9271 * cpu-mips.md: increase size of div, rem and conditional branches
9273 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
9275 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
9278 2007-01-19 Zoltan Varga <vargaz@gmail.com>
9280 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
9281 (compile_method): Ditto.
9283 * aot-runtime.c (decode_klass_info): Ditto.
9285 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
9286 needed by the code generated by inssel.brg. Also fix a warning.
9288 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
9290 * mini.c: deal with enums that become genericinsts by
9291 being nested in a generic class (bug #79956).
9293 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9295 * mini.c: match the generic definition to check for
9296 private access with generic types (bug #78431).
9298 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9300 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
9301 to make life easier for people cross-compiling that insist on not
9304 2007-01-17 Mark Mason <mason@broadcom.com>
9306 * inssel-long.brg: patch to deal with mips missing flags
9307 * inssel-long32-mips.brg: implement overflow checks
9308 * insset-mips.brg: implement overflow checks
9309 * mini-mips.h: implement conditional exception handling
9310 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
9311 Remove unused code, minor cleanups.
9312 * exceptions-mips.c: minor cleanups
9313 * mini-ops.h: add mips conditional exception ops
9314 * cpu-mips.md: add mips conditional exception ops
9317 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9319 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
9320 to deal with mips missing of flags.
9322 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9324 * exceptions-ppc.c: execute fault handlers.
9326 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
9328 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
9330 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9332 * mini.c: handle also floating point values in initialize_array.
9334 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9336 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
9337 array initialization and make it conditional on the intrins option.
9339 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9341 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
9342 relocations and put the patch info names close to the enum definition.
9344 2007-01-15 Mark Mason <mason@broadcom.com>
9346 * basic.cs, exceptions.cs: break up large tests to increase debugability.
9348 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9350 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
9352 2007-01-12 Raja R Harinath <rharinath@novell.com>
9354 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
9356 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9358 * Makefile.am: distribute the mips sources.
9360 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9362 * mini-codegen.h: handle bug #80489 here, by excluding ecx
9365 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
9367 * cpu-x86.md: back out for now as this triggers other regressions.
9369 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9371 * cpu-x86.md: force src1 and dest regpair for long shift instructions
9372 to eax:edx, so ecx can't get allocated to them (bug #80489).
9374 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
9376 * mini.c, mini-exceptions.c: enabled running fault handlers
9379 2007-01-03 Miguel de Icaza <miguel@novell.com>
9381 * driver.c: If nothing fail, do not use the string "failed",
9382 because it makes it very annoying to view test result logs on the
9385 2006-12-30 Miguel de Icaza <miguel@novell.com>
9387 * debug-debugger.c (mono_debugger_main): Rename "main" to
9388 "main_method" to prevent a warning.
9390 Remove a warning for unused field.
9392 2006-12-28 Martin Baulig <martin@ximian.com>
9395 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
9397 2006-12-22 Martin Baulig <martin@ximian.com>
9399 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
9400 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
9401 seperate `.mdb_debug_info' section, so we can access it from the
9402 debugger even if the binary is stripped.
9404 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
9405 from the `.mdb_debug_info' here to prevent the linker from
9406 removing that section.
9408 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
9411 2006-12-19 Robert Jordan <robertj@gmx.net>
9413 * mini-x86: enable the code to return small structures in
9414 registers for FreeBSD as well. Fixes bug #80278.
9415 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
9417 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9419 * mini-x86.c: align the stack when calling the profiler
9420 function instrumenting the prolog (on OSX).
9422 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9424 * mini.c: emit a break opcode where Debugger.Break () is called.
9426 2006-12-13 Miguel de Icaza <miguel@novell.com>
9428 * mini.c (mono_method_to_ir): Provide useful information on this
9429 assert, to prevent others from debugging like I did.
9431 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9433 * mini.c: enable code which was incorrectly commented
9436 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9438 * mini-x86.c: enable on OSX, too, the code to return small
9439 structures in registers.
9441 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9443 * mini-x86.c: remove the use of the dynamic code manager here, too.
9445 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9447 * mini.h, debug-debugger.c, tramp-*.c: fixed
9448 mono_debugger_create_notification_function() to use
9449 mono_global_codeman_reserve () instead of a dynamic code manager.
9451 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
9453 * mini.c, jit-icalls.h, jit-icalls.c: remove the
9454 ves_array_element_address() jit icall and use a generated
9455 managed method instead (which is about 4 times faster for a rank 3
9458 2006-11-29 Mark Mason <mason@broadcom.com>
9460 * basic-calls.cs: additional tests for passing
9461 structures as function arguments.
9463 2006-11-29 Mark Mason <mason@broadcom.com>
9465 * mini-mips.h: disable custom exception handling
9466 * mini-mips.c: throw/rethrow should use jalr to call
9467 exception stubs. Fixed bug with passing structures
9468 by value. More support for tracing floating point
9471 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9473 * mini.c: fixed typo in the soft-float ldind.r4 handling
9476 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9478 * mini.c, mini.h, driver.c: added --runtime command line
9479 option to select a different runtime than the autodetected one.
9480 * jit.h: added API for embedders to initialize with a specific
9483 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9485 * mini.c: handle also boxing of r4 values (bug #80024).
9487 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9489 * mini-ppc.c: force indirect calls until we reserve
9490 enough address space for all the generated code.
9492 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
9494 * exceptions-arm.c: workaround bugs in the libc definition
9497 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9499 * inssel.brg: fixes from me and Mark Mason.
9501 2006-11-23 Dick Porter <dick@ximian.com>
9503 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
9504 semaphore display now we've fixed the initial value
9506 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9508 * inssel.brg: partially revert the last change to fix the build.
9510 2006-11-21 Mark Mason <mason@broadcom.com>
9512 * inssel.brg: Add and use compare-and-branch macros to support
9513 architectures that do not have condition code registers (ie. MIPS).
9514 * *-mips.{c,brg,md}: Fix copyright statements
9516 2006-11-20 Mark Mason <mason@broadcom.com>
9518 * Makefile.am: remove mini-codegen.c from list of MIPS sources
9519 * mini.c: Allow GET_CONTEXT to be specified by the arch port
9520 * mini.h: Added declaration for mono_print_ins()
9521 * mini-codegen.c: added ins_spec initializer for MIPS
9522 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
9523 vreg to be virtual and hreg to be non-virtual.
9524 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
9525 is not yet working/implemented correctly.
9526 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
9527 non-static, fixup calls to print_ins() from other parts in the file.
9529 2006-11-20 Mark Mason <mason@broadcom.com>
9531 * basic-calls.cs: added tests for passing structures as arguments
9534 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9536 * inssel-long32.brg: optimize signed division by power of two.
9538 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9540 * mini-arm.c: added support for interworking with thumb code
9541 (mono must be still be built using the ARM instruction encoding).
9543 2006-11-19 Miguel de Icaza <miguel@novell.com>
9545 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
9546 verifier has different rules for it. Fixes a few verifier issues
9549 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
9550 at the end, so people know what happened.
9552 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9554 * brach-opts.c: in optimize_exception_target() make sure we
9555 are in a catch clause (fixes bug #79871).
9557 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9559 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
9560 more soft-float support fixes.
9562 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
9564 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
9565 that are passed half on the stack and half in registers.
9567 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
9569 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
9570 more mips integration work from Mark E Mason
9571 <mark.e.mason@broadcom.com>.
9573 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9575 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
9576 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
9577 tramp-mips.c: added sources for the mips port, not
9578 integrated in the build yet. Contributed by
9579 Mark E Mason <mark.e.mason@broadcom.com>.
9581 2006-11-14 Neale Ferguson <neale@sinenomine.net>
9583 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
9585 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9587 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
9588 put the soft-float rules in its own file since it seems to
9589 break s390 compilation.
9591 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9593 * mini-arm.c: fixed wrnings.
9595 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
9597 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
9598 inssel-arm.brg: ARM support for soft-float.
9600 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9602 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
9603 loads and stores of 32 bit fp values.
9605 2006-11-10 Zoltan Varga <vargaz@gmail.com>
9607 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
9609 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
9610 works. Fixes #79852 and #79463.
9612 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9614 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
9615 more soft-float support WIP and fixes.
9617 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
9619 * mini-arm.c: some VFP updates.
9621 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9623 * mini-exceptions.c: 0 is a valid local var offset in some
9624 architectures, don't assert (bug #78508).
9626 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
9628 * exceptions-arm.c: fixed off by one error in stack walk code.
9630 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9632 * mini.h, mini.c: more precise tracking of type load exceptions.
9634 2006-11-03 Robert Jordan <robertj@gmx.net>
9636 * Makefile.am: [WIN32] Add monow.exe target.
9637 * driver.c: [WIN32] Don't detach the console when debugging.
9640 2006-10-30 Miguel de Icaza <miguel@novell.com>
9642 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
9644 2006-10-23 Zoltan Varga <vargaz@gmail.com>
9646 * aot-compiler.c (emit_method_info): Add a case missed earlier.
9648 * driver.c (mini_regression): Fix --regression with AOT.
9650 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
9652 2006-10-17 Zoltan Varga <vargaz@gmail.com>
9654 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
9656 * mini-sparc.h: Don't use sigaction on sparc/linux.
9658 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
9660 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
9662 * mini-exceptions.c: Add proper include files for getpid ().
9664 2006-10-16 Zoltan Varga <vargaz@gmail.com>
9666 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
9667 address instead of a MonoJitInfo* to avoid decoding the exception info for the
9670 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
9671 name cache to reduce its size.
9673 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9675 2006-10-15 Zoltan Varga <vargaz@gmail.com>
9677 * mini-x86.c: Save/restore the current LMF structure more efficiently using
9678 the mono_lmf TLS variable.
9680 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
9681 trampoline lmf frames.
9683 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
9685 2006-10-14 Zoltan Varga <vargaz@gmail.com>
9687 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
9688 the mono_lmf TLS variable.
9690 * mini-exceptions.c: Access the LMF structure through accessors.
9692 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
9693 variable instead of in jit_tls->lmf.
9695 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
9697 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
9698 trampoline lmf frames.
9700 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
9702 2006-10-12 Zoltan Varga <vargaz@gmail.com>
9704 * mini.c trace.c mini-x86.c: Revert these too.
9706 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
9709 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
9711 * genmdesc.c: removed now dead code.
9713 2006-10-09 Robert Jordan <robertj@gmx.net>
9715 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
9717 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9719 * mini.h: do not leave gaps in the opcode values.
9721 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
9723 * jit-icalls.h: flag functions as internal here, too.
9725 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
9727 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
9728 functions with the internal attribute.
9730 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
9732 * aot-compiler.c: fclose the file descriptor in the profile read loop.
9734 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
9736 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
9739 2006-10-05 Zoltan Varga <vargaz@gmail.com>
9741 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
9742 tail calls as on other platforms.
9744 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
9746 * iltests.il: Add a few tailcall tests.
9748 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9750 * driver.c: fix loop for old compilers (bug #79521).
9752 2006-10-02 Zoltan Varga <vargaz@gmail.com>
9754 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
9756 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
9758 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
9759 metadata without any code.
9761 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
9762 more precise debugging information using gdb.
9764 2006-09-30 Zoltan Varga <vargaz@gmail.com>
9766 * inssel-ia64.brg: Make the helper methods static.
9768 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9770 * inssel-x86.brg: make the helper methods static.
9772 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
9774 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
9776 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9778 * mini.c: updates for monoburg changes.
9779 * inssel.brg: make a few helper functions static as they should.
9781 2006-09-27 Zoltan Varga <vargaz@gmail.com>
9783 * Makefile.am: Move mini-codegen.c to common_sources.
9785 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9787 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
9789 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
9790 mini-ppc.h: port to use the common local register allocator.
9792 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9794 * mini.h: Remove the comment too then.
9796 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
9798 * mini.h: put back backend.data which is to be used shortly and
9799 doesn't increase the size of MonoInst. If any 64 bit arch aligned
9800 pointers on 4 byte boundaries it'd have much bigger issues running
9801 and you can ifdef it out anyway.
9803 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9805 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
9806 MonoInst size by 4 bytes on 64 bit machines.
9808 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9810 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
9811 replacement with more meaningful field names. Arch maintainers, please
9812 check the assigned names are good enough for your arch.
9814 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9816 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
9817 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
9819 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
9821 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
9822 relocations and memory requirements, put the optimization flags
9823 definitions in their own file.
9825 2006-09-24 Zoltan Varga <vargaz@gmail.com>
9827 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
9829 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
9831 2006-09-22 Zoltan Varga <vargaz@gmail.com>
9833 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
9835 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
9837 * inssel.brg: use the correct function to get the size of an item
9838 in an array, given an element class.
9839 * aot-compiler.c: do not access class->class_size directly.
9841 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
9843 * mini.h, debug-mini.c: added a debugging function to print
9844 info about local variables and arguments in a jitted method.
9846 2006-09-20 Zoltan Varga <vargaz@gmail.com>
9848 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9850 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
9852 2006-09-19 Zoltan Varga <vargaz@gmail.com>
9854 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
9855 inner and outer loops when passing vtypes.
9857 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
9859 * mini-ppc.c: take into account the cpu errata for cache flushing
9860 which caused some random errors (bug #79381).
9862 2006-09-19 Zoltan Varga <vargaz@gmail.com>
9864 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
9865 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
9867 2006-09-17 Zoltan Varga <vargaz@gmail.com>
9869 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
9872 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
9875 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
9876 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
9878 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
9881 2006-09-13 Zoltan Varga <vargaz@gmail.com>
9883 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
9885 2006-09-12 Zoltan Varga <vargaz@gmail.com>
9887 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
9888 macro does not have to be changed during debugging.
9890 * 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>.
9892 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
9894 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
9896 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
9897 MONO_ARCH_NO_EMULATE_MUL is defined.
9899 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
9901 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
9903 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
9905 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
9907 2006-09-11 Zoltan Varga <vargaz@gmail.com>
9909 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
9910 stuff to mini-exceptions.c where it is used.
9912 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
9913 setup code, the real one is in mini-exceptions.c.
9915 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
9916 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
9917 some changes from the freebsd ports tree.
9919 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
9922 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
9924 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
9926 * mini.c: on Linux, check for /proc to be mounted
9927 (bug# 79351, novell bug#201204).
9929 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
9931 * mini.c: handle cases where pthread_attr_getstack() behaves
9932 incorrectly (bug #78096).
9934 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
9936 * mini-arm.c: support larger stack frames (bug #79272).
9938 2006-09-08 Zoltan Varga <vargaz@gmail.com>
9940 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
9942 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
9945 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
9946 mono_class_from_name () to find a class from its name.
9948 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
9950 2006-09-07 Zoltan Varga <vargaz@gmail.com>
9952 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
9954 2006-09-05 Kornél Pál <kornelpal@gmail.com>
9956 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
9958 2006-09-04 Zoltan Varga <vargaz@gmail.com>
9960 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
9961 callinfo->trampoline.
9963 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
9965 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
9968 2006-09-03 Zoltan Varga <vargaz@gmail.com>
9970 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
9972 2006-09-02 Zoltan Varga <vargaz@gmail.com>
9974 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
9975 stats.method_trampolines, it is already done by the generic trampoline code.
9977 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
9979 2006-09-01 Zoltan Varga <vargaz@gmail.com>
9981 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
9983 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
9985 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
9987 * mini.c (print_jit_stats): Print mscorlib mempool size too.
9989 * mini.c (print_jit_stats): Print new stats.
9991 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9993 2006-08-31 Zoltan Varga <vargaz@gmail.com>
9995 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
9996 Address on two dimensional arrays. Fixes #78729.
9998 * mini.h (MonoCompile): Add a 'skip_visibility' field.
10000 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
10003 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
10005 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
10008 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
10010 (mini_get_ldelema_ins): Ditto.
10012 2006-08-30 Zoltan Varga <vargaz@gmail.com>
10014 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
10015 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
10018 2006-08-29 Neale Ferguson <neale@sinenomine.net>
10020 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
10021 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
10023 * exceptions-s390x.c: Cosmetic change.
10025 * tramp-s390.c: Fix warning.
10027 * cpu-s390.md: Correct length of mul_imm.
10029 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
10031 * aot-compiler.c: added binary writer with ELF backend
10032 implementation (only on Linux/x86 for now).
10034 2006-08-18 Zoltan Varga <vargaz@gmail.com>
10036 * Makefile.am: Don't run net 2.0 AOT tests.
10038 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
10039 (mono_compile_assembly): Skip net 2.0 assemblies as well.
10041 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
10043 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10045 * aot-compiler.c: simplified and refactored the asm-writing code
10046 to allow different backends.
10048 2006-08-18 Zoltan Varga <vargaz@gmail.com>
10050 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10052 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
10053 little. Share patches of type TYPE_FROM_HANDLE as well.
10055 * mini.c (mono_patch_info_equal): New helper function.
10056 (mono_patch_info_hash): Ditto.
10058 * aot-compiler.c (emit_method_code): Fix s390 build.
10060 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
10061 is not handled because it is stored as a flag and not as a type ctor. Fixes
10064 2006-08-17 Zoltan Varga <vargaz@gmail.com>
10066 * aot-compiler.c: Fix computation of GOT slot statistics.
10068 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
10069 Also remove support for not PIC AOT.
10071 * mini.h: Bump AOT file format version.
10073 * objects.cs: Add a test for #78990.
10075 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
10076 (peter.dettman@iinet.net.au). Fixes #79087.
10078 * basic-long.cs: Add a test for the above.
10080 2006-08-16 Zoltan Varga <vargaz@gmail.com>
10082 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
10084 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
10087 2006-08-15 Zoltan Varga <vargaz@gmail.com>
10089 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
10092 2006-08-10 Jonathan Chambers <joncham@gmail.com>
10094 * mini.c: Don't verify COM proxy invoke calls
10097 2006-08-10 Dick Porter <dick@ximian.com>
10099 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
10100 which process is holding semaphores locked.
10102 2006-08-08 Zoltan Varga <vargaz@gmail.com>
10104 * mini-ia64.c mini-amd64.c: Fix #79027.
10106 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
10108 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
10110 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
10111 implicit arguments in a vararg call. Fixes #79027.
10113 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
10115 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
10116 (mono_get_array_new_va_signature): Ditto.
10118 2006-08-05 Zoltan Varga <vargaz@gmail.com>
10120 * aot-runtime.c: Call init_plt lazily.
10122 * inssel-long.brg: Fix unsigned long->int conversion.
10124 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
10126 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
10127 that most data is now in the .rss/.data section.
10129 2006-08-04 Zoltan Varga <vargaz@gmail.com>
10131 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
10133 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
10135 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
10137 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
10139 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
10140 virtual call. Fixes #79010.
10142 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
10143 and use the result as the this argument in the real call.
10145 * generics.2.cs: Add a new test for #79010.
10147 2006-08-03 Zoltan Varga <vargaz@gmail.com>
10149 * mini-x86.c: Fix a warning.
10151 * aot-compiler.c: Add a bunch of statistics.
10153 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
10155 2006-08-02 Zoltan Varga <vargaz@gmail.com>
10157 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
10159 2006-08-01 Zoltan Varga <vargaz@gmail.com>
10161 * 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>.
10163 2006-07-13 Miguel de Icaza <miguel@novell.com>
10165 * mini.c (mono_method_to_ir): Obtain the original method in the
10166 CIL stream and use this to perform validation.
10170 2006-07-19 Zoltan Varga <vargaz@gmail.com>
10172 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
10173 (mono_arch_call_opcode): Ditto.
10175 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
10178 * mini.c (mono_patch_info_dup_mp): New helper function.
10180 * aot-compiler.c (compile_method): Fix some of the memory allocated during
10181 compilation. Fixes #78827.
10183 2006-07-18 Kornél Pál <kornelpal@gmail.com>
10185 * declsec.c: Use original security informations for
10186 MONO_WRAPPER_MANAGED_TO_MANAGED.
10188 2006-07-15 Jonathan Chambers <joncham@gmail.com>
10190 * mini.c: Allow Com Interop methods/classes and
10191 don't verify COM wrapper calls
10194 2006-07-13 Zoltan Varga <vargaz@gmail.com>
10196 * inssel-long32.brg: Fix long->i4 checked conversion.
10198 * exceptions.cs: Add a test for the above.
10200 2006-07-08 Zoltan Varga <vargaz@gmail.com>
10202 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
10204 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
10207 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
10210 2006-07-03 Zoltan Varga <vargaz@gmail.com>
10212 * mini.c: Fix solaris/x86 exception handling.
10214 * Makefile.am: Get rid of $(ICU_LIBS).
10216 2006-07-02 Zoltan Varga <vargaz@gmail.com>
10218 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
10219 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
10220 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
10222 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
10224 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
10225 this function causes a SIGSEGV.
10227 2006-06-22 Zoltan Varga <vargaz@gmail.com>
10229 * mini.c: Remove unused solaris/x86 includes.
10231 2006-06-21 Zoltan Varga <vargaz@gmail.com>
10233 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
10235 2006-06-20 Jb Evain <jbevain@gmail.com>
10237 * cpu-g4.md: fix max length of start_handler instruction.
10239 2006-06-20 Massimiliano Mantione <massi@ximian.com>
10240 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
10242 2006-06-16 Massimiliano Mantione <massi@ximian.com>
10243 * ssa.c: Fixed bug 78653 for SSA based deadce.
10244 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
10245 MonoInst.flags, used in SSA based deadce.
10246 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
10247 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
10249 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
10251 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
10252 it can end up using non executable memory on ppc64 systems
10253 running ppc32 userspace (fix from Johannes Berg).
10255 2006-06-14 Dick Porter <dick@ximian.com>
10257 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
10260 2006-06-13 Massimiliano Mantione <massi@ximian.com>
10261 * mini.c: Made so that inline is locally disabled if it would
10262 trigger a .cctor, because too many apps depend on this behavior
10263 (which seems to be also the one of the MS CLR).
10265 2006-06-13 Zoltan Varga <vargaz@gmail.com>
10267 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
10268 No idea why this worked before.
10270 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
10271 which branch to outer exception clauses since they could skip the
10272 inner finally clauses. Fixes #78633.
10274 * exceptions.cs: Add a test for the above.
10276 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
10279 * iltests.il: Add a test for the above.
10281 2006-06-12 Zoltan Varga <vargaz@gmail.com>
10283 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
10284 after the end of a try bblock, to prevent asserts in mini_method_compile ().
10286 * iltests.il: Add a test for the above.
10288 2006-06-10 Zoltan Varga <vargaz@gmail.com>
10290 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
10292 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
10293 methods as instrinsics.
10295 2006-06-09 Wade Berrier <wberrier@novell.com>
10297 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
10298 (simple-cee-ops.h ssapre-mini-ops.h)
10300 2006-06-09 Neale Ferguson <neale@sinenomine.net>
10302 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
10303 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
10305 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
10306 * cpu-s390x.md: Fix max. length values for a couple of instructions.
10308 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
10310 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
10312 2006-06-08 Massimiliano Mantione <massi@ximian.com>
10314 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
10315 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
10316 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
10317 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
10318 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
10319 of opcodes, so that bug 78549 should not happen again.
10320 * ssapre.c: Updated to use the renamed files.
10322 2006-06-08 Zoltan Varga <vargaz@gmail.com>
10324 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
10325 in OP_ATOMIC_EXCHANGE_I4.
10327 2006-06-07 Wade Berrier <wberrier@novell.com>
10329 * tramp-s390.c: Fix s390 build (add missing pointer declarations
10330 in mono_debugger_create_notification_function)
10332 2006-06-06 Zoltan Varga <vargaz@gmail.com>
10334 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
10336 * mini.c (type_from_stack_type): Disable some changes which do not
10339 * driver.c: Reenable opts.
10341 * mini.h (MonoStackSlot): New structure to keep track of the verification state
10342 of the evaluation stack.
10344 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
10345 evaluation stack trace at entry to the bblock.
10347 * mini.c (merge_stacks): New function to perform verification of stack merges.
10348 Turned off by default.
10350 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
10353 2006-06-06 Massimiliano Mantione <massi@ximian.com>
10355 * local-propagation.c: Fixed bug 78549.
10357 2006-06-04 Zoltan Varga <vargaz@gmail.com>
10359 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
10361 2006-06-02 Miguel de Icaza <miguel@novell.com>
10363 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
10364 tramp-arm.c, tramp-ia64.c
10365 (mono_debugger_create_notification_function): Update signature to
10366 new signature and use new protocol for creating the notification
10369 Should fix the build.
10371 2006-06-02 Geoff Norton <gnorton@customerdna.com>
10373 * exceptions-ppc.c (mono_jit_walk_stack)
10374 (ves_icall_get_frame_info): Fix the build
10376 2006-06-02 Zoltan Varga <vargaz@gmail.com>
10378 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
10380 2006-05-31 Raja R Harinath <rharinath@novell.com>
10382 * il2tests.2.il: New file for generics CIL tests. Add test for
10384 * Makefile.am: Update.
10387 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
10390 2006-05-30 Massimiliano Mantione <massi@ximian.com>
10392 * aliasing.c: Fixed bug 78311.
10394 2006-05-29 Martin Baulig <martin@ximian.com>
10396 * mini-exceptions.c (mono_find_jit_info): When computing the
10397 native offset, check whether we're actually inside the method's
10398 code; call mono_debug_print_stack_frame() to format the frame.
10399 (ves_icall_System_Exception_get_trace): Call
10400 mono_debug_print_stack_frame() to format the stack frame.
10401 (ves_icall_get_trace): Update to the new debugging API.
10402 (mono_jit_walk_stack_from_ctx): Likewise.
10403 (ves_icall_get_frame_info): Likewise.
10405 * mini.c (get_method_from_ip): Use the new debugging API.
10406 (mono_print_method_from_ip): Likewise.
10409 (mono_jit_walk_stack): Use the new debugging API.
10410 (ves_icall_get_frame_info): Likewise.
10412 2006-05-27 Zoltan Varga <vargaz@gmail.com>
10414 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
10416 2006-05-25 Massimiliano Mantione <massi@ximian.com>
10418 * mini.c: Added "limitator" to inline for debugging.
10420 2006-05-24 Martin Baulig <martin@ximian.com>
10422 * debug-debugger.c (mono_debugger_init): Create a private,
10423 malloc()-based code manager for the notification function and
10424 intentionally leak it on exit. This fixes the crash-on-exit race
10428 (mono_debugger_create_notification_function): Added
10429 `MonoCodeManager *' argument.
10432 (mono_debugger_create_notification_function): Added
10433 `MonoCodeManager *' argument.
10435 2006-05-23 Massimiliano Mantione <massi@ximian.com>
10437 * aliasing.c: Fixed 64 bit issue.
10438 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10439 default since all known bugs are fixed (one more time!).
10441 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10443 * mini.c: write barrier support.
10445 2006-05-23 Martin Baulig <martin@ximian.com>
10447 * debug-debugger.c: Revert Paolo's change. Add comment and #error
10448 check at the top of the file.
10450 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10452 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
10453 reverting changes without reason and without changelog entries.
10455 2006-05-18 Zoltan Varga <vargaz@gmail.com>
10457 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
10458 to a few opcodes. Fixes #78439.
10460 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
10461 consistency with other archs.
10463 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
10465 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10467 * debug-debugger.c: fix the build.
10469 2006-05-17 Martin Baulig <martin@ximian.com>
10472 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
10473 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
10474 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
10475 (debugger_attach): Call GC_mono_debugger_add_all_threads().
10477 2006-05-11 Zoltan Varga <vargaz@gmail.com>
10479 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
10481 2006-05-10 Zoltan Varga <vargaz@gmail.com>
10483 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
10484 MONO_TYPE_GENERICINST.
10486 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
10487 MONO_TYPE_GENERICINST.
10489 2006-05-09 Zoltan Varga <vargaz@gmail.com>
10491 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
10494 2006-05-08 Zoltan Varga <vargaz@gmail.com>
10496 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
10498 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
10500 2006-05-06 Zoltan Varga <vargaz@gmail.com>
10502 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
10503 mono_trace_cleanup ().
10505 * iltests.il: Fix problem with the newly added test.
10507 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
10508 due to register constraints, free up the previous hreg. Fixes #78314.
10510 * iltests.il: Add new test for #78314.
10512 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
10513 Interlocked.Add. Fixes #78312.
10515 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
10517 2006-05-05 Zoltan Varga <vargaz@gmail.com>
10519 * inssel.brg (mini_emit_virtual_call): Fix a warning.
10521 2006-05-05 Martin Baulig <martin@ximian.com>
10523 * debug-mini.c (mono_debug_open_block): New method.
10526 (mono_arch_output_basic_block): Call mono_debug_open_block() at
10527 the beginning of each basic block.
10530 (mono_arch_output_basic_block): Call mono_debug_open_block() at
10531 the beginning of each basic block.
10533 2006-05-04 Massimiliano Mantione <massi@ximian.com>
10535 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10536 default until I understand why they break the build on amd64.
10538 2006-05-04 Zoltan Varga <vargaz@gmail.com>
10540 * mini.c (mini_cleanup): Call mono_cleanup ().
10542 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
10545 2006-05-04 Massimiliano Mantione <massi@ximian.com>
10547 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
10548 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10549 default since all known bugs are fixed, and I cannot reproduce bug
10550 77944... I'm asking Matt Hargett to test again after this commit.
10552 2006-04-28 Massimiliano Mantione <massi@ximian.com>
10554 * mini-codegen.c: Fixed typo that thrashed inline.
10556 2006-04-28 Zoltan Varga <vargaz@gmail.com>
10558 * dominators.c (compute_dominators): Avoid using a worklist since
10559 it is not correct in some cases. Instead, iterate over all bblocks as
10560 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
10562 2006-04-28 Miguel de Icaza <miguel@novell.com>
10564 * mini.c (mono_jit_compile_method_inner): Use
10565 mono_prepare_exception_from_error that resets the value
10568 2006-04-27 Miguel de Icaza <miguel@novell.com>
10570 * mini.c: Move the mini_loader_error_to_exception to metadata.
10572 2006-04-27 Massimiliano Mantione <massi@ximian.com>
10574 * aliasing.c: Fixed bug 78210.
10576 2006-04-27 Massimiliano Mantione <massi@ximian.com>
10578 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10579 default until all their problems (or the ones they trigger) are fixed.
10581 2006-04-26 Zoltan Varga <vargaz@gmail.com>
10583 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
10585 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
10586 as loaded only after resolving patches since that could invoke the same method.
10588 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
10590 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
10593 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
10596 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
10599 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
10600 made from AOT code through the PLT table.
10602 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
10603 holding the plt offset when a call is made to the aot plt trampoline.
10605 2006-04-25 Zoltan Varga <vargaz@gmail.com>
10607 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
10610 * Makefile.am (common_sources): Fix build breakage.
10612 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
10613 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
10614 intra-assembly calls if possible.
10616 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
10618 * mini-trampolines.c: Handle PLT entries.
10620 * mini.c: Avoid creating a GOT var for calls.
10622 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
10623 from mscorlib code.
10625 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
10626 from mscorlib code.
10628 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
10631 * mini.h: Bump AOT file format version.
10633 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
10636 2006-04-25 Martin Baulig <martin@ximian.com>
10638 * driver.c: Disable copyprop, consprop and inline when running
10639 inside the debugger.
10641 2006-04-25 Martin Baulig <martin@ximian.com>
10643 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
10644 with `get_current_thread' and added `detach'.
10645 (MonoDebuggerMetadataInfo): Added `thread_size',
10646 `thread_tid_offset', `thread_stack_ptr_offset' and
10647 `thread_end_stack_offset'.
10649 2006-04-25 Zoltan Varga <vargaz@gmail.com>
10651 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
10654 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
10655 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
10657 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
10659 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
10661 * aot.c: Add support for ADJUSTED_IID.
10663 2006-04-24 Zoltan Varga <vargaz@gmail.com>
10665 * aot.c (emit_method_order): Don't align method_order_end.
10667 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
10668 the interface ID changes.
10670 2006-04-21 Dick Porter <dick@ximian.com>
10672 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
10673 cleaning up a thread. Fixes the new part of bug 77470.
10675 2006-04-20 Geoff Norton <gnorton@customerdna.com>
10677 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
10678 to managed wrapper.
10680 2006-04-19 Zoltan Varga <vargaz@gmail.com>
10682 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
10684 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
10685 SIGSEGV. Fixes #78072.
10687 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
10688 unregister our SIGABRT handler.
10690 2006-04-19 Massimiliano Mantione <massi@ximian.com>
10692 * mini.c: Disabled inline where it can alter the call stack in a
10693 way visible from managed code.
10694 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
10697 2006-04-16 Zoltan Varga <vargaz@gmail.com>
10699 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
10700 on other platforms. Fixes #78089.
10702 2006-04-13 Martin Baulig <martin@ximian.com>
10704 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
10705 determine whether we're inside the debugger.
10708 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
10710 2006-04-12 Zoltan Varga <vargaz@gmail.com>
10712 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
10713 handler clauses. Fixes #78024.
10715 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
10716 in the CALL_MEMBASE opcodes. Fixes #78088.
10717 (mono_arch_get_vcall_slot_addr): Ditto.
10719 2006-04-10 Martin Baulig <martin@ximian.com>
10721 * debug-debugger.c: The thread handling code has now been moved
10722 into ../metadata/threads.c.
10724 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10726 * driver.c (mono_main): Fix --with-gc=none build.
10728 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
10729 (mono_spillvar_offset_float): Ditto.
10730 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
10731 hreg, not when its !global, since on ia64, there is a third category: stacked
10734 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
10736 * mini.c: set MonoInst->klass for load field address and a few other
10739 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10741 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
10743 2006-04-07 Zoltan Varga <vargaz@gmail.com>
10745 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
10746 the branch opt changes.
10748 2006-04-06 Dick Porter <dick@ximian.com>
10750 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
10752 * wapihandles.c (mini_wapi_seminfo):
10753 * driver.c (mono_main): Add semaphore info option
10755 2006-04-05 Zoltan Varga <vargaz@gmail.com>
10757 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
10758 branch optimization changes. Fixes #78009.
10760 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10762 * mini.c: ignore accessibility of methods in managed->native wrappers.
10764 2006-04-04 Zoltan Varga <vargaz@gmail.com>
10766 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
10768 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
10770 2006-04-03 Zoltan Varga <vargaz@gmail.com>
10772 * mini.c: Modify the branch optimizations to preserve the invariant that
10773 the entries inside the in_bb and out_bb arrays are unique.
10774 (mono_unlink_bblock): Avoid creation of new arrays.
10776 2006-04-02 Zoltan Varga <vargaz@gmail.com>
10778 * mini.c (mono_unlink_bblock): Fix regression caused by previous
10781 2006-04-01 Zoltan Varga <vargaz@gmail.com>
10783 * mini.c (optimize_branches): Remove the "optimizations" in
10784 the cbranch1/cbranch2 -> branch cases which were causing several
10785 problems in the past. Fixes #77986.
10787 2006-03-31 Chris Toshok <toshok@ximian.com>
10789 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
10790 default optimizations :(
10792 2006-03-31 Zoltan Varga <vargaz@gmail.com>
10794 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
10797 2006-03-31 Massimiliano Mantione <massi@ximian.com>
10799 * local-propagation.c: Added comments to structs and removed
10800 "Mono" prefixes from local tree mover types.
10802 2006-03-30 Zoltan Varga <vargaz@gmail.com>
10804 * Makefile.am (arch_sources): Define this for each architecture so
10805 libmono_la_SOURCES is defined in one place.
10807 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
10809 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
10812 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
10814 * driver.c: print the GC name supplied by configure.
10816 2006-03-29 Massimiliano Mantione <massi@ximian.com>
10818 * local-propagation.c: Added tree mover, and moved here all the
10819 local propagation code from mini.c
10820 * mini.c: Added support for treeprop, and moved all the local
10821 propagation code to local-propagation.c
10822 * mini.h: Added support for treeprop
10823 * driver.c: Added support for treeprop, enabled consprop, copyprop,
10824 treeprop, inline and deadce by default
10825 * Makefile.am: Added local-propagation.c
10827 2006-03-25 Zoltan Varga <vargaz@gmail.com>
10829 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
10831 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
10833 * debug-debugger.c: make it compile without the Boehm GC.
10835 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10837 * mini.c: fixed issue with mismatch when an icall is registered
10838 with multiple names but same address.
10840 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
10842 * declsec.c, mini-exceptions.c: use write barrier to set reference
10843 fields of managed objects.
10845 2006-03-19 Zoltan Varga <vargaz@gmail.com>
10847 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
10848 (can_access_internals): Fix a warning.
10850 * mini.c (print_method_from_ip): Rename this to
10851 mono_print_method_from_ip so it gets exported.
10853 * trace.c: Deal with strings inside StringBuilder's containing garbage
10854 and fix memory leaks. Fixes #77848.
10856 2006-03-19 Zoltan Varga <vargaz@gmail.com>
10858 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
10861 2006-03-16 Neale Ferguson <neale@sinenomine.net>
10863 * mini-s390.c: Remove OP_X86_TEST_NULL.
10865 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
10867 * mini.c: use the correct GetHashCode() for the moving collector.
10869 2006-03-16 Massimiliano Mantione <massi@ximian.com>
10871 * liveness.c: Regalloc spill cost tuning.
10873 2006-03-15 Neale Ferguson <neale@sinenomine.net>
10875 * mini-s390x.h: Correct S390_LONG macro.
10877 * mini-s390x.c: Cleanup unused code.
10879 2006-03-15 Zoltan Varga <vargaz@gmail.com>
10881 * jit-icalls.h: New file.
10883 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
10884 icalls and include that instead of including jit-icalls.c.
10886 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
10889 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
10891 * mini.c: when checking for member accessibility, also check for
10892 friend assemblies and for explicit interface implementations.
10894 2006-03-14 Zoltan Varga <vargaz@gmail.com>
10896 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
10898 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
10900 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10901 common cases are done first.
10903 * mini-ops.h: Only define platform specific opcodes on the given platform.
10905 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
10908 2006-03-14 Martin Baulig <martin@ximian.com>
10910 Revert Paolo's change from r57348:
10912 * mini.h: don't use gboolean for bitfields.
10913 * mini.c: verifier changes for fields and methods accessibility.
10915 2006-03-13 Neale Ferguson <neale@sinenomine.net>
10917 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
10919 * mini-s390x.c: Fix conv_r_un.
10921 * cpu-s390, cpu-s390x.md: Fix lengths.
10923 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
10925 * mini.c: nested types have access to all the nesting
10926 levels, not just the enclosing types.
10928 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10930 * mini.c: added a few more verification checks.
10932 2006-03-12 Zoltan Varga <vargaz@gmail.com>
10934 * liveness.c: Merge optimizations from the linear-il branch.
10936 2006-03-11 Zoltan Varga <vargaz@gmail.com>
10938 * mini-ia64.c (emit_call): Add a comment.
10940 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
10942 * tramp-ia64.c: Fix some warnings.
10944 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10946 * mini.h: don't use gboolean for bitfields.
10947 * mini.c: verifier changes for fields and methods accessibility.
10949 2006-03-11 Zoltan Varga <vargaz@gmail.com>
10951 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
10952 lazy icall wrapper changes.
10954 * dominators.c: Replace all the dominator algorithms with faster
10955 ones from the linear-il branch.
10957 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
10960 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10961 common cases are done first.
10963 * mini-amd64.c: Fix some warnings.
10965 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
10968 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
10971 * mini.h: Add a missing prototype.
10973 2006-03-10 Zoltan Varga <vargaz@gmail.com>
10975 * mini.c: Compile icall wrappers lazily.
10977 * mini-codegen.c: Use printf instead of g_print since its much faster.
10979 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
10982 * mini.c (optimize_branches): Cache the negative result from
10983 remove_block_if_useless ().
10985 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
10986 Also fix some bblock linking issues.
10988 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
10991 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
10993 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
10994 accessed fields first, for better cache behavior.
10996 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10998 * mini.c: speedup IList<T> array accesses.
11000 2006-03-09 Zoltan Varga <vargaz@gmail.com>
11002 * mini.c (mono_method_to_ir): Handle large methods overflowing the
11003 inline_costs counter. Fixes #77190.
11005 2006-03-06 Zoltan Varga <vargaz@gmail.com>
11007 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
11008 trace messages. Fixes #77706.
11010 2006-03-04 Martin Baulig <martin@ximian.com>
11012 * tramp-amd64.c, tramp-x86.c
11013 (mono_debugger_create_notification_function): Use
11014 mono_global_codeman_reserve() to allocate a buffer at runtime and
11017 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
11019 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
11020 notification function at runtime and then call `initialize' in the
11021 `MONO_DEBUGGER__debugger_info' vtable.
11023 2006-03-04 Zoltan Varga <vargaz@gmail.com>
11025 * iltests.il: Fix a visibility problem.
11027 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11029 * driver.c, mini.c: add hooks for the counters API.
11031 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11033 * driver.c: show disabled options.
11035 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11037 * linear-scan.c: always use cost-driven selection.
11039 2006-02-28 Raja R Harinath <rharinath@novell.com>
11041 * jit-icalls.c (helper_compile_generic_method): Revert change from
11044 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
11046 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
11048 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
11050 * inssel.brg: style fixes, mostly to force the updated monoburg
11051 to run for people using svn.
11053 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11055 * mini.c: match monoburg changes.
11057 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11059 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
11060 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
11061 declaration in the header file.
11063 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11065 * helpers.c: reduce relocations and mem usage.
11067 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11069 * mini.h, mini-codegen.c: disable logging features if
11070 requested by configure.
11072 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
11074 * mini.c: tiny verifier changes.
11076 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11078 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
11079 cpu-pentium.md: stack alignment changes for osx/x86,
11080 partially from Geoff Norton <gnorton@customerdna.com>.
11082 2006-02-24 Raja R Harinath <harinath@gmail.com>
11084 * jit-icalls.c (helper_compile_generic_method): Update to changes
11085 in metadata/class.c.
11087 2006-02-24 Zoltan Varga <vargaz@gmail.com>
11089 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
11091 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
11092 interface calls with large offsets.
11094 2006-02-23 Raja R Harinath <rharinath@novell.com>
11096 * jit-icalls.c (helper_compile_generic_method): Document the
11097 special-case we depend on so that we can inflate the method twice
11098 with the same context with no bad side-effects.
11100 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
11102 * mini-x86.c, mini-amd64.c: fix for case when xen support
11105 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
11107 * mini-x86.c, mini-amd64.c: generate code to access tls items
11108 in a faster way for Xen systems.
11110 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11112 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
11113 updates and compilation fixes for the OSX/x86 port, mostly from
11114 Geoff Norton <gnorton@customerdna.com>.
11116 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11118 * inssel.brg: faster interface call implementation
11119 to sync with the interface_offsets MonoVTable changes.
11121 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11123 * mini.c: more verification checks.
11125 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
11127 * mini.c: added a few more verification checks.
11129 2006-02-17 Neale Ferguson <neale@sinenomine.net>
11131 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
11132 facility on the processor and use it if available.
11134 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11136 * driver.c, aot.c, mini.c: throw exception if the IL code is
11137 invalid or unverifiable.
11139 2006-02-17 Raja R Harinath <rharinath@novell.com>
11141 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
11144 2006-02-16 Zoltan Varga <vargaz@gmail.com>
11146 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
11148 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11150 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
11151 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
11152 handling of instantiated generic valuetypes.
11154 2006-02-11 Zoltan Varga <vargaz@gmail.com>
11156 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
11157 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
11160 * generics.2.cs: Revert the nullable reftypes tests.
11162 2006-02-10 Zoltan Varga <vargaz@gmail.com>
11164 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
11165 using __builtin_frame_address (1) as it doesn't work in the presence
11166 of optimizations. Hopefully fixes #77273.
11168 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
11169 -> generics.cs change as it doesn't work with some automake versions.
11171 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11173 * mini.c: handle systems that sue a different way to
11174 retrieve the stack address of the current thread.
11176 2006-02-09 Zoltan Varga <vargaz@gmail.com>
11178 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
11179 it specially in the makefile.
11181 * generics.2.cs: Add tests for nullable reference types.
11183 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11185 * mini.c: always handle the case when mono_jit_init()
11186 is called in a thread different from the main thread,
11187 confusing libgc (bug #77309).
11189 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
11191 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
11193 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11195 * mini.c: change optimize_branches () to use a single loop
11196 and introduce a new optimization to simplify some range checks.
11198 2006-02-03 Martin Baulig <martin@ximian.com>
11200 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
11201 and merged with debugger_thread_manager_add_thread().
11202 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
11203 inform the debugger about the main thread.
11205 2006-02-03 Zoltan Varga <vargaz@gmail.com>
11207 * basic.cs: Add test for div.un/rem.un constant folding.
11209 2006-02-03 Neale Ferguson <neale@sinenomine.net>
11211 * cpu-s390x.md: correct int_xor_imm length
11213 2006-02-03 Zoltan Varga <vargaz@gmail.com>
11215 * generics.2.cs: New test for #77442.
11217 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
11220 2006-02-02 Martin Baulig <martin@ximian.com>
11222 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
11223 <mono/metadata/mono-debug-debugger.h>
11225 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
11227 2006-02-02 Martin Baulig <martin@ximian.com>
11229 * debug-debugger.h: New header file for debug-debugger.c.
11231 * debug-debugger.c: Big API cleanup; don't run the managed Main()
11232 function is a separate thread anymore; add support for attaching.
11234 2006-02-01 Zoltan Varga <vargaz@gmail.com>
11236 * tramp-x86.c: Fix a warning.
11238 2006-01-31 Zoltan Varga <vargaz@gmail.com>
11240 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
11241 on very large methods.
11243 * aot.c (load_patch_info): Fix a warning.
11245 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11247 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
11248 mini-ops.h: alu membase optimizations.
11250 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
11252 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
11253 to speedup StringBuilder.
11255 2006-01-27 Zoltan Varga <vargaz@gmail.com>
11257 * dominators.c (mono_compute_natural_loops): Fix detection of
11258 loop body start blocks.
11260 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
11262 2006-01-26 Zoltan Varga <vargaz@gmail.com>
11264 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
11267 2006-01-25 Massimiliano Mantione <massi@ximian.com>
11269 * aliasing.c: Fixed aliasing issue on 64 bit archs.
11271 2006-01-25 Martin Baulig <martin@ximian.com>
11273 * debug-debugger.c: Moved the `MonoDebuggerManager' and
11274 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
11275 started to cleanup this file a little bit.
11277 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
11279 * mini.c: optimize a codepath frequently happening in generics code.
11281 2006-01-23 Martin Baulig <martin@ximian.com>
11283 * Makefile.am: Only compile debug-debugger.c on supported platforms.
11285 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
11286 functions directly.
11288 * driver.c: debug-debugger.c is only available if
11289 `MONO_DEBUGGER_SUPPORTED' is defined.
11291 2006-01-23 Martin Baulig <martin@ximian.com>
11293 * debug-debugger.c: Only enable this on platforms where the Mono
11294 Debugger is working (x86 and x86_64).
11296 2006-01-21 Martin Baulig <martin@ximian.com>
11298 The Mono Debugger is now using the normal `mono' instead of the
11299 `mono-debugger-mini-wrapper' when executing managed code.
11301 * debug-debugger.c: New file; previously known as
11302 debugger/wrapper/wrapper.c.
11304 * debug-mini.c (mono_init_debugger): Removed.
11306 * driver.c (mono_main): Added new `--inside-mdb' command line
11307 argument which is used when running inside the debugger.
11309 2006-01-20 Zoltan Varga <vargaz@gmail.com>
11311 * liveness.c (mono_analyze_liveness): Remove some unused data
11314 2006-01-17 Zoltan Varga <vargaz@gmail.com>
11316 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
11318 2006-01-16 Zoltan Varga <vargaz@gmail.com>
11320 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
11321 depends on implementation details of monobitset.
11323 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
11326 2006-01-15 Zoltan Varga <vargaz@gmail.com>
11328 * liveness.c: Update after monobitset changes.
11330 2006-01-14 Zoltan Varga <vargaz@gmail.com>
11332 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
11334 2006-01-11 Neale Ferguson <neale@sinenomine.net>
11336 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
11338 * mini-s390x.c: Remove warning messages.
11340 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
11342 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
11344 2006-01-10 Zoltan Varga <vargaz@gmail.com>
11346 * generics.2.cs: Add ldelem/stelem_any test.
11348 2006-01-10 Neale Ferguson <neale@sinenomine.net>
11350 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
11352 2006-01-07 Zoltan Varga <vargaz@gmail.com>
11354 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
11356 2006-01-06 Zoltan Varga <vargaz@gmail.com>
11358 * generics.2.cs: Reenable vtype tests.
11360 * inssel-x86.brg: Remove an icorrect valuetype rule.
11362 2006-01-06 Neale Ferguson <neale@sinenomine.net>
11364 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
11365 initial support for OP_ABS.
11367 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11369 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
11371 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11373 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
11374 conversion and implement LADD/LSUB.
11376 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
11379 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11381 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
11383 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
11386 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11388 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
11389 localloc is encountered. Fixes crash in test-183.cs when using gmcs
11390 (stack walk problem).
11392 2006-01-04 Zoltan Varga <vargaz@gmail.com>
11394 * aot.c (mono_aot_load_method): Fix a warning.
11396 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11398 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
11400 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11402 * iltests.il: Add test for #77148.
11404 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
11407 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11409 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
11411 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11413 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
11414 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
11416 * basic-long.cs: Add lconv-to-r4/r8 tests.
11418 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11420 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
11422 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
11423 here as on other archs.
11425 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11427 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
11429 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11431 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
11433 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
11435 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
11436 instrument_prolog; Add memory_barrier instruction.
11438 2005-12-26 Zoltan Varga <vargaz@gmail.com>
11440 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
11442 2005-12-23 Zoltan Varga <vargaz@gmail.com>
11444 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
11446 * aliasing.c inssel.brg: Fix warnings.
11448 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
11449 could skip initialization of some parts of memory.
11451 * mini.c mini-ia64.c: Fix warnings.
11453 * inssel-sparc.brg: Add an implementation of lneg which actually works.
11455 2005-12-22 Zoltan Varga <vargaz@gmail.com>
11457 * aliasing.c (mono_build_aliasing_information): Add a workaround for
11458 a crash seen on sparc.
11460 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
11462 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
11464 2005-12-21 Neale Ferguson <neale@sinenomine.net>
11466 * mini-ops.h: Add s390_backchain instruction
11468 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
11470 * cpu-s390.md: Add s390_backchain instruction
11472 * mini-s390.c: Significant ABI changes
11474 * mini-s390.h: Cater for zero length structures
11476 2005-12-20 Neale Ferguson <neale@sinenomine.net>
11478 * mini-s390.c: ABI fixes
11480 * inssel-s390.brg: Remove debug statements
11482 * cpu-s390.md: Fix length of ATOMIC_xx operations
11484 2005-12-19 Zoltan Varga <vargaz@gmail.com>
11486 * basic-float.cs: Add float<->long conversion tests.
11488 2005-12-16 Neale Ferguson <neale@sinenomine.net>
11490 * mini-s390.c: Fix LOCALLOC processing.
11492 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
11494 2005-12-15 Zoltan Varga <vargaz@gmail.com>
11496 * iltests.il: Add tests for some opcodes not covered by the other
11499 2005-12-15 Neale Ferguson <neale@sinenomine.net>
11501 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
11502 register loading for Tail processing; Correct trace output.
11504 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
11506 * cpu-s390.md: Correct size of jmp instruction.
11508 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11510 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
11512 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11514 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
11515 Bring s390 up to current level.
11517 2005-12-12 Zltan Varga <vargaz@gmail.com>
11519 * generics.2.cs: Disable the newly added tests as they do not work yet.
11521 * generics.2.cs: Add valuetype tests.
11523 2005-12-09 Zoltan Varga <vargaz@gmail.com>
11525 * basic-long.cs: Add i4->u8 test.
11527 * objects.cs: Add tests for JIT intrinsic.
11529 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
11530 optimizations lost by a mistake.
11532 2005-12-07 Zoltan Varga <vargaz@gmail.com>
11534 * basic-long.cs: Remove a test moved to objects.cs.
11536 * arrays.cs: Add more array tests.
11538 2005-12-06 Zoltan Varga <vargaz@gmail.com>
11540 * arrays.cs: Add new tests for multi-dimensional arrays.
11542 2005-12-06 Raja R Harinath <rharinath@novell.com>
11544 * Makefile.am (test_sources2): Add generics.2.cs.
11545 (EXTRA_DIST): Add test_sources2.
11547 2005-12-05 Ben Maurer <bmaurer@ximian.com>
11549 Support for boxing and unboxing nullable types as well as the
11550 isinst operation on nullables, per the CLI ammendment.
11552 * inssel.brg (CEE_ISINST): Special case for nullable
11554 * mini.c (handle_unbox_nullable): new method
11555 (handle_box): Special case for nullable types
11556 (mono_method_to_ir): Call handle_unbox_nullable in correct
11559 * generics.2.cs: New test suite
11561 * Makefile.am: Support for regression tests with generics.
11563 2005-12-03 Zoltan Varga <vargaz@gmail.com>
11565 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
11566 allocated to registers. Fixes #76800.
11568 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
11570 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
11572 2005-11-30 Zoltan Varga <vargaz@gmail.com>
11574 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
11577 2005-11-29 Zoltan Varga <vargaz@gmail.com>
11579 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
11582 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
11584 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
11585 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
11587 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
11588 single precision before storing to a single precision location.
11590 2005-11-28 Raja R Harinath <rharinath@novell.com>
11592 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
11594 2005-11-27 Zoltan Varga <vargaz@gmail.com>
11596 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
11599 * basic.cs: Remove test_0_byte_compares test which was moved to
11600 objects.cs a long time ago.
11602 2005-11-22 Massimiliano Mantione <massi@ximian.com>
11604 * aliasing.c: Fixed aliasing issue on 64 bit archs.
11606 2005-11-20 Zoltan Varga <vargaz@gmail.com>
11608 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
11609 handlers are called.
11611 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
11614 * mini-ia64.c: Add support for the throw->branch exception
11617 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
11619 2005-11-18 Massimiliano Mantione <massi@ximian.com>
11621 * mini.c: Enabled "fastpath" deadce :-)
11623 2005-11-18 Massimiliano Mantione <massi@ximian.com>
11625 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
11626 alias analysis pass to support it.
11627 * mini.h: Likewise.
11629 * liveness.c: Likewise (liveness computation can use aliasing
11630 information to be more accurate).
11631 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
11632 moreover made so that "--compile-all" uses the given optimization
11633 flags and not the default ones.
11634 * aliasing.c: Alias analysis (new file).
11635 * aliasing.h: Likewise.
11636 * Makefile.am: added "aliasing.c" and "aliasing.h".
11638 2005-11-17 Zoltan Varga <vargaz@gmail.com>
11640 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
11643 2005-11-13 Zoltan Varga <vargaz@gmail.com>
11645 * mini-exceptions.c (mono_handle_exception_internal): Remove the
11646 fp >= end_of_stack exit condition, as it is not needed, and it might
11647 become true for fp eliminated frames.
11649 2005-11-11 Zoltan Varga <vargaz@gmail.com>
11651 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
11654 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
11656 * mini-arm.c: fixed alignment of doubles/longs to match
11657 the C ABI (bug #76635).
11659 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
11661 * aot.c: fix compilation with --enable-minimal=aot.
11663 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
11665 * mini-arm.c: fixed compatibility with the new
11666 floating point emulator package for compares.
11668 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
11670 * mini.c : reverted sig->pinvoke changes (r51396-51397).
11672 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
11674 * mini-exceptions.c (print_stack_frame): Output to stderr.
11675 (mono_handle_native_sigsegv): Ditto.
11677 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
11679 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
11680 OP_LCONV_TO_OVF_I implementation.
11682 * mini-amd64.c: Add support for the throw->branch exception
11685 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
11686 when the catch clause catches a more general exception, i.e. Object.
11688 2005-10-30 Zoltan Varga <vargaz@gmail.com>
11690 * cpu-ia64.md: Remove unused opcodes.
11692 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
11693 specific defines for architectures defining USE_SIGACTION.
11695 * mini-ia64.c: Fix some warnings.
11697 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
11698 version seemed to skip a frame.
11700 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
11702 * mini.c: Clean up the usage of sig->pinvoke flag. Now
11703 only calls which are made to native code use this flag.
11705 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
11707 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
11708 varargs methods as well.
11710 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
11711 which have save_lmf set. Reorganize methods prologs a bit.
11713 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
11714 debugger to the proper place.
11716 2005-10-29 Martin Baulig <martin@ximian.com>
11718 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
11719 when running inside the debugger until the debugger has support
11722 2005-10-26 Zoltan Varga <vargaz@gmail.com>
11724 * mini.h: Fix a warning.
11726 2005-10-24 Miguel de Icaza <miguel@novell.com>
11728 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
11729 we expose publicly, this returns the string.
11731 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
11733 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
11734 with fp elimination.
11736 2005-10-21 Zoltan Varga <vargaz@gmail.com>
11738 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
11739 native stacktrace using the glibc 'backtrace' function if available.
11741 2005-10-20 Zoltan Varga <vargaz@gmail.com>
11743 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
11745 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
11746 handle SIGSEGVs received while in native code.
11748 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
11749 code, call mono_handle_native_sigsegv which will abort the runtime
11750 after printing some diagnostics, instead of converting it into a
11751 confusing NullReferenceException.
11753 2005-10-18 Zoltan Varga <vargaz@gmail.com>
11755 * cpu-pentium.md: Remove unused opcodes.
11757 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
11759 * mini-amd64.h (MonoLMF): Add rsp field.
11761 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
11764 2005-10-17 Zoltan Varga <vargaz@gmail.com>
11766 * mini-codegen.c (get_register_spilling): Fix some warnings.
11768 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
11770 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
11771 elimination during exception handling. Enable fp elimination by
11774 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
11777 2005-10-16 Martin Baulig <martin@ximian.com>
11779 * mini-exceptions.c
11780 (mono_debugger_run_finally): New public method for the debugger.
11782 2005-10-10 Zoltan Varga <vargaz@gmail.com>
11784 * debug-mini.c (mono_debug_init_method): Fix warning.
11786 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
11787 the 'exname' parameter const to fix some warnings.
11789 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
11791 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
11792 introduced by the previous patch.
11794 2005-10-08 Zoltan Varga <vargaz@gmail.com>
11796 * basic-float.cs: Add test for precision of float arithmetic.
11798 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
11799 when loading/storing single values from/to memory.
11801 * mini.c (mono_jit_compile_method_with_opt): Create the function
11802 pointers in the correct domain.
11804 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
11806 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
11807 introduced by previous patch.
11809 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
11810 when out_filter_idx is NULL.
11812 * mini-exceptions.c: Don't run filter clauses twice during exception
11813 handling. Fixes #75755.
11815 2005-10-07 Zoltan Varga <vargaz@gmail.com>
11817 * aot.c: Add support for ldflda wrappers.
11819 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
11822 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
11824 * mini.c, mini.h: do not consider exception handlers blocks when
11825 setting up interface variables.
11827 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
11829 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
11831 2005-10-03 Zoltan Varga <vargaz@gmail.com>
11833 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
11834 causes a regression.
11836 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
11838 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
11840 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
11841 of the OP_P definitions.
11843 * TODO: Add a proposal for dealing with the CEE/OP mess.
11845 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
11846 optimizations from the x86 port.
11848 * cpu-amd64.md: Ditto.
11850 * basic.cs basic-long.cs: Add tests.
11852 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
11854 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
11855 Patrik Torstensson's implementation of my exception-handling
11856 optimization idea, when the exception object is not used
11859 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
11861 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
11862 of the mul_imm optimizations from the old jit.
11864 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
11866 * mini.c, liveness.c: patch by Patrik Torstensson and
11867 Zoltan Varga to improve performance in methods with
11870 2005-09-30 Zoltan Varga <vargaz@gmail.com>
11872 * driver.c: Remove 'Globalization' entry from --version.
11874 2005-09-28 Zoltan Varga <vargaz@gmail.com>
11876 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
11877 there is a profiler interested in JIT events.
11879 * aot.c: Load profile files produced by the AOT profiling module, and
11880 reorder methods based on the profiling info. Add a 'method_order' table
11881 to the AOT file to make mono_aot_find_jit_info work with the reordered
11884 * mini.h: Bump AOT file version info.
11886 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
11888 * mini-arm.h: work around what looks like a gcc bug when optimizations
11891 2005-09-28 Raja R Harinath <rharinath@novell.com>
11893 * Makefile.am (AM_CFLAGS): Don't use += to append inside
11894 conditionals. Use ...
11895 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
11897 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
11899 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
11900 to determine the amount of memory to copy when passing valuetypes.
11902 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
11903 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
11905 2005-09-27 Zoltan Varga <vargaz@gmail.com>
11907 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
11908 information about aot.
11910 2005-09-27 Ben Maurer <bmaurer@ximian.com>
11912 * *.c: Replace the use of {Enter,Leave}CriticalSection with
11913 macros. This will allow a deadlock debugger to easily be plugged
11916 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
11918 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
11920 2005-09-27 Raja R Harinath <rharinath@novell.com>
11922 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
11923 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
11924 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
11925 ($(arch_built)) [CROSS_COMPILING]: Error out.
11927 2005-09-26 Zoltan Varga <vargaz@gmail.com>
11929 * aot.c: Add support for the no_special_static flag for classes.
11931 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
11933 * Reapply reverted patches.
11935 * *: Revert r50174 as well.
11937 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
11939 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
11941 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
11943 2005-09-23 Miguel de Icaza <miguel@novell.com>
11945 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
11946 part of the SIG_HANDLER_SIGNATURE.
11948 2005-09-23 Zoltan Varga <vargaz@gmail.com>
11950 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
11953 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
11954 introduced by previous patch.
11956 2005-09-21 Zoltan Varga <vargaz@gmail.com>
11958 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
11959 saved registers too.
11961 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
11962 upon the information returned by get_call_info ().
11964 * mini-x86.c (add_float): Fix stack size calculation.
11965 (mono_arch_call_opcode): Rewrite this so it works based up the
11966 information returned by get_call_info ().
11967 (mono_arch_get_this_vret_args): Ditto.
11969 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
11971 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
11972 in cinfo to determine the registers which need to be used.
11974 2005-09-20 Miguel de Icaza <miguel@novell.com>
11976 * driver.c (mono_main): Add --server and --desktop flags.
11978 2005-09-16 Zoltan Varga <vargaz@gmail.com>
11980 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
11981 registers as global registers.
11983 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
11984 longer needed with the new register allocator.
11986 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
11988 * cpu-ia64.md: Remove unused opcodes.
11990 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
11992 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
11994 * cpu-amd64.md: Remove unused opcodes.
11996 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
11997 needed with the new register allocator.
11999 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
12002 2005-09-16 Raja R Harinath <rharinath@novell.com>
12004 * Makefile.am (check-local): Don't invoke semdel-wrapper.
12006 2005-09-16 Martin Baulig <martin@ximian.com>
12008 * exceptions-amd64.c
12009 (throw_exception): Don't call mono_debugger_throw_exception() if
12010 we're a rethrow - see the FIXME in the code.
12012 2005-09-15 Geoff Norton <gnorton@customerdna.com>
12014 * mini.c (mono_init_exceptions): This only works on some architectures.
12016 2005-09-15 Zoltan Varga <vargaz@gmail.com>
12018 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
12021 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
12023 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
12024 now in mini-exceptions.c.
12026 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
12028 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
12029 now in mini-exceptions.c.
12031 2005-09-15 Zoltan Varga <vargaz@gmail.com>
12033 * exceptions-x86.c: Applied patch from Patrik Torstensson
12034 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
12036 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
12037 code into mini-exceptions.c. Add some assertions to it.
12039 2005-09-12 Zoltan Varga <vargaz@gmail.com>
12041 * aot.c (emit_section_change): Applied patch from "The Software Team"
12042 (<software@solmersa.com>). Fix as errors on windows.
12044 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
12046 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
12047 method info into the LMF.
12049 2005-09-11 Zoltan Varga <vargaz@gmail.com>
12051 * mini-ia64.c: Add proper unwind info for method epilogs.
12053 * exceptions-ia64.c: Add some code to help debugging.
12055 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
12057 * mini-exceptions.c: Fix warning.
12059 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
12061 * mini.c: Really fix build.
12063 * mini-x86.c mini-amd64.c: Fix build.
12065 2005-09-11 Zoltan Varga <vargaz@gmail.com>
12067 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
12069 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
12070 some Interlocked methods as intrinsics.
12072 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
12073 for Thread methods as well.
12075 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
12077 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
12079 * mini-ia64.c mini-x86.c mini-amd64.c
12080 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
12083 * mini.c (mono_init_exceptions): Fix build breakage.
12085 2005-09-10 Zoltan Varga <vargaz@gmail.com>
12087 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
12088 of instructions. Use the new ia64_unw_op macros for emitting unwind
12091 * mini.c (mono_init_exceptions): Initialize exception handling
12092 related trampolines at startup.
12094 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
12096 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
12098 2005-09-09 Zoltan Varga <vargaz@gmail.com>
12100 * mini.c: Handle type loading errors gracefully during compilation and
12101 throw the appropriate exception.
12103 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
12105 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
12106 for the mono binary.
12108 2005-09-09 Martin Baulig <martin@ximian.com>
12110 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
12113 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12115 * mini-arm.h: use emulation for conv.r.un for the release.
12117 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12119 * mini-arm.c, objects.cs: more fixes and tests for them.
12121 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12123 * mini-arm.c: align structures to at least 4 bytes to be able
12124 to keep our current optimized memcpy.
12126 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
12128 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
12130 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12132 * mini.c: ignore SIGPIPE.
12134 2005-09-04 Zoltan Varga <vargaz@gmail.com>
12136 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
12138 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
12140 2005-09-02 Zoltan Varga <vargaz@gmail.com>
12142 * mini.h: Add prototype for mono_allocate_stack_slots_full.
12144 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12146 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
12147 exception handling support.
12148 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
12149 patch by Brian Koropoff <briank@marakicorp.com>).
12151 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
12153 * mini.c: revert another 'optimization' which breaks when
12154 items on the eval stack need to be saved at a basic block end
12157 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12159 * jit-icalls.c: for arrays, ensure we always provide
12162 2005-08-30 Zoltan Varga <vargaz@gmail.com>
12164 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
12166 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
12168 2005-08-29 Zoltan Varga <vargaz@gmail.com>
12170 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
12171 arguments in their original register.
12173 2005-08-28 Zoltan Varga <vargaz@gmail.com>
12175 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
12178 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
12179 when ssapre is enabled.
12181 * inssel-long.brg: Fix bug in previous patch.
12183 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
12184 multiplication by a constant.
12186 2005-08-27 Zoltan Varga <vargaz@gmail.com>
12188 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
12191 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
12194 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
12196 * inssel-arm.brg: apply changes tested by Brian Koropoff
12197 <briank@marakicorp.com>.
12199 2005-08-25 Zoltan Varga <vargaz@gmail.com>
12201 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
12203 2005-08-24 Zoltan Varga <vargaz@gmail.com>
12205 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
12206 to the same register if dreg is just a base register.
12207 (print_ins): Improve printing of membase opcodes.
12209 * inssel-x86.brg: Add optimized ldind(reg) rules.
12211 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
12213 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
12215 * mini.c: when running under valgrind, set the stack bottom for
12216 the GC at the actual approximate stack for the app (fixes running
12217 mono with valgrind).
12219 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
12221 * mini.c: do no break at the first valuetype to init found
12222 (fixes bug #75791).
12224 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
12226 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
12228 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
12230 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
12232 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
12234 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
12236 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12238 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
12240 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
12243 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
12246 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
12249 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
12251 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
12253 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12255 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
12256 in the tail recursion optimization.
12258 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
12259 debug info into the assembly file.
12261 * iltests.il: Add test for filter regions.
12263 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
12264 initial stack of filter regions. Fixes #75755.
12266 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
12268 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
12269 stack requirements.
12271 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12273 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
12274 the check for an already compiled method on non-ia64 platforms.
12275 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
12278 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
12280 * inssel-x86.brg: Add some optimized call rules.
12282 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
12284 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
12287 * mini.h mini-trampolines.c: Pass the trampoline argument to
12288 mono_arch_patch_delegate_trampoline.
12290 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
12292 * mini-trampolines.c: Fix build.
12294 * mini-amd64.h: Add delegate trampolines.
12296 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
12298 * inssel-amd64.brg: Add optimized call rules.
12300 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
12302 * inssel-ia64.brg: Add optimized ldind(reg) rules.
12304 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
12306 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
12309 * mini-ia64.c: Remove LMF fixmes.
12311 * mini-ia64.h: Remove most fields from LMF.
12313 * inssel-ia64.brg (stmt): Fix unaligned access errors.
12315 * mini-trampolines.c: Add support for IA64 function descriptors.
12317 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
12318 for IA64 function descriptors.
12320 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
12322 * tramp-arm.c: patch the vtable for virtual calls. Added
12323 support code to register/unregister the LMF.
12324 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
12327 2005-08-19 Dick Porter <dick@ximian.com>
12329 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
12330 bit value if needed.
12332 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
12334 * mini.c (mini_get_method): Move handling of wrapper data here.
12336 * mini.c (mono_method_to_ir): Add support for dynamic methods.
12338 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
12341 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
12342 bblock->code does not remain empty.
12344 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
12346 * arrays.cs: Add regression test for #75832.
12348 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
12349 rules. Fixes #75832.
12351 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
12352 instruction scheduling.
12354 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
12356 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
12358 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
12360 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
12362 * mini-codegen.c: Fix VC build.
12364 * cpu-pentium.md: Increase length of atomic_exhange_i4.
12366 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12368 * mini.h: fix signature for mono_register_opcode_emulation.
12370 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
12372 * mini.c: Get rid of most of the helper_sig_... constants using
12373 mono_create_icall_signature ().
12375 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
12377 * jit-icalls.c (helper_ldstr): New helper function.
12379 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
12381 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
12382 throw, load the string using a helper call instead of creating a string object.
12384 * aot.c: Update after LDSTR changes.
12386 * mini.h: Bump AOT file version.
12388 * aot.c: Save class size info into the AOT file. Print more statistics during
12391 * mini.h: Bump AOT file version.
12393 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
12394 ordering of disasm cases. Fixes #74957.
12396 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
12398 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
12399 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
12400 the generic code needed for the ARM port.
12402 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
12404 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
12405 inssel-arm.brg: more ARM features and fixes.
12407 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
12409 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
12410 ARM port work in progress.
12412 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
12414 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
12416 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
12418 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
12420 * inssel.brg (mini_emit_memset): Add support for unaligned access.
12422 * *-ia64.*: Ongoing IA64 work.
12424 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
12426 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
12428 * TODO: Remove out-of-data todo stuff.
12430 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
12433 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
12435 * mini.h: Bump corlib version.
12437 2005-07-27 Martin Baulig <martin@ximian.com>
12440 (create_copy_ins): Added `const unsigned char *ip' argument; set
12441 `copy->cil_code' from it.
12443 2005-07-27 Martin Baulig <martin@ximian.com>
12445 * mini-exceptions.c (mono_handle_exception): Don't call
12446 mono_debugger_handle_exception() for filters.
12448 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
12450 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
12453 2005-07-26 Martin Baulig <martin@ximian.com>
12455 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
12457 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
12458 helper_compile_generic_method() if the method is actually virtual
12461 2005-07-26 Martin Baulig <martin@ximian.com>
12464 (trampoline_code): Renamed to `mono_trampoline_code' and made it
12465 public; this is now accessed directly by the debugger.
12466 (mono_generic_trampoline_code): Removed.
12469 (mono_debug_init_method): Also add interncalls and wrappers.
12471 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
12473 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
12475 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
12477 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
12479 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
12481 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
12483 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
12485 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
12486 getting TLS offsets on AMD64 too.
12488 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
12490 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
12492 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
12494 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
12495 inssel-arm.brg, mini-arm.h: ARM port work in progress.
12497 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
12499 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
12501 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
12504 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
12505 mono_sparc_is_virtual_call ().
12507 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
12509 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
12510 trampoline parameters.
12512 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
12514 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
12515 to mono_arch_get_vcall_slot_addr.
12517 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
12520 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
12522 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
12524 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
12526 2005-07-19 Martin Baulig <martin@ximian.com>
12528 * exceptions-amd64.c (throw_exception): Call
12529 mono_debugger_throw_exception() here like we're doing it on i386.
12531 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
12533 * mini-ia64.c: Add optimized TLS access support.
12535 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
12537 * mini-exceptions.c: Ongoing IA64 work.
12539 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
12541 * mini.c: Use the default optimization set when embedding. Fixes
12544 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
12546 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
12547 of trampolines to a separate file.
12549 * mini-trampolines.c: New file.
12551 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
12554 * tramp-x86.c: Reorganize the trampoline code to be similar to the
12557 * mini-codegen.c: Fix cygwin build.
12559 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
12561 * mini.c: Add some minor changes needed by the IA64 port.
12563 * *-ia64.*: Ongoing IA64 work.
12565 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
12567 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
12568 trampolines into arch-independent and arch-dependent parts.
12570 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
12572 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
12574 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
12576 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
12577 the xp-regalloc-branch for amd64.
12579 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
12580 xp-regalloc-branch for x86.
12582 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
12584 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
12586 2005-07-06 Martin Baulig <martin@ximian.com>
12589 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
12590 (mono_jit_runtime_invoke): Likewise.
12592 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
12594 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
12597 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
12598 without loading their metadata. Reorganize the file format so exception handling+
12599 debug info is kept separate from normal method info. Create MonoJitInfo
12600 structures for methods lazily.
12602 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
12604 (x86_class_init_trampoline): Patch AOT class init trampolines too.
12606 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
12608 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
12611 * mini.h: Bump AOT file version.
12613 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
12615 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12617 2005-07-01 Raja R Harinath <rharinath@novell.com>
12619 * Makefile.am (check-local): Call semdel-wrapper.
12621 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
12623 * mini-x86.c: Revert the last change as it seems to break the build..
12625 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
12627 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12629 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
12631 2005-06-27 Ben Maurer <bmaurer@ximian.com>
12633 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
12634 outside of the macro, so strange stuff doesn't happen with gcc4
12635 (NEW_AOTCONST_TOKEN): Likewise.
12637 2005-06-28 Martin Baulig <martin@ximian.com>
12639 * mini.c (mini_class_is_system_array): New static method; use this
12640 instead of `klass->parent == mono_defaults.array_class' everywhere
12641 since this also works for the new generic array class.
12643 2005-06-26 Ben Maurer <bmaurer@ximian.com>
12645 * inssel.brg: Remove warnings.
12647 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
12649 * mini-ia64.c: Ongoing IA64 work.
12651 * basic-float.cs: Add float->i1 conversion test.
12653 * iltests.il: Add conv.u4 test.
12655 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
12657 * inssel-long.brg: Fix bug caused by last change.
12659 2005-06-23 Geoff Norton <gnorton@customerdna.com>
12661 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
12662 BSDs. Allows the x86 JIT to work on OSX86
12664 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
12666 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
12669 * mini-ia64.c: Ongoing IA64 work.
12671 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
12673 * mini-ia64.c: Ongoing IA64 work.
12675 * driver.c: Clean up jit_code_hash as well when using --regression.
12677 * inssel-long.brg: Fix long->i4/u4 conversion rules.
12679 * basic-long.cs: Add tests for long->u4 conversion.
12681 2005-06-18 Ben Maurer <bmaurer@ximian.com>
12683 * mini.c: Take mono_get_domainvar out of macros. This makes sure
12684 that we do not depend on undefined C behavior: the order stuff
12685 gets evaluated within an expression. Fixes mono when compiled on
12688 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
12690 * *-ia64.*: Ongoing IA64 work.
12692 * aot.c: Lower memory usage while loading AOT methods.
12694 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
12696 * mini.h: Bump AOT file format version.
12698 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
12700 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
12702 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
12704 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
12705 not on callee assembly). Fixed some comments.
12707 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
12709 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
12710 it gets proper disassembly.
12711 (emit_method_info): Remove some dead code.
12713 * mini.c (mini_method_compile): Allways allocate the GOT var in
12714 mono_method_to_ir for emulating opcodes.
12716 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
12718 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
12719 before freeing the code memory. Fixes #74990.
12721 * objects.cs: Add regression test for #74992.
12723 * liveness.c: Extend live ranges of arguments to the beginning of the
12724 method. Fixes #74992.
12726 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
12727 so it points into the faulting instruction.
12729 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
12731 * jit-icalls.c (mono_imul_ovf): Add exception handling.
12733 * *-ia64.*: Ongoing IA64 work.
12735 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
12737 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
12739 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
12741 * *-ia64.*: Ongoing IA64 work.
12743 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
12745 * basic-long.cs: Add tests for add/sub.ovf.
12747 * basic.cs: Add tests for sub.ovf.
12749 * *-ia64.*: Ongoing IA64 work.
12751 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
12753 * *-ia64.*: Ongoing IA64 work.
12755 * basic.cs: Add conv.ovf.i4.un test.
12757 2005-06-09 Massimiliano Mantione <massi@ximian.com>
12759 * mini.c: (remove_block_if_useless) Fixed bug 75061.
12761 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12763 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
12765 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
12767 * *-ia64.*: Ongoing IA64 work.
12769 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12772 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
12774 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
12776 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
12778 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
12780 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
12782 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
12783 of a call is callable by a near call.
12785 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
12787 * mini-ia64.c: Ongoing IA64 work.
12789 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
12791 * genmdesc.c: Make the generated array non-static.
12793 * inssel-long.brg: Fix LSHR_IMM rule.
12795 * *-ia64.*: Ongoing IA64 work.
12797 * *-ia64.*: Ongoing IA64 work.
12799 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
12801 * *-ia64.*: Ongoing IA64 work.
12803 * *-ia64.*: Ongoing IA64 work.
12805 * mini-ia64.c: Ongoing IA64 work.
12807 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
12809 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
12811 * objects.cs basic-calls.cs: Move some tests to objects.cs.
12813 * objects.cs basic-long.cs: Move some tests to objects.cs.
12815 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
12817 * *-ia64.*: Ongoing IA64 work.
12819 * iltests.il: Add a new test.
12821 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
12822 newobj. Fixes #75042.
12824 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
12826 * *-ia64.*: Ongoing IA64 work.
12828 * *-ia64.*: Ongoing IA64 work.
12830 * *-ia64.*: Ongoing IA64 work.
12832 * basic.cs objects.cs: Move tests accessing static variables as well.
12834 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
12836 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
12838 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
12840 * driver.c: Always print failed tests.
12842 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
12845 * *ia64*: Ongoing IA64 work.
12847 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
12849 * basic.cs: Add tests for add.ovf. Fix warnings.
12851 2005-05-18 Miguel de Icaza <miguel@novell.com>
12853 * driver.c (mono_main): Avoid crash if no argument is passed to
12854 --break; Do not use g_error, but f_printf. And fix all other
12855 ocurrences of the same crash.
12857 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
12859 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
12860 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
12863 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
12865 * *-ia64.*: Add beginnings of IA64 backend.
12867 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
12869 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
12871 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
12874 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
12876 * mini-amd64.c: Fix a warning.
12878 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
12880 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
12881 in float_neg. Fixes #74897.
12883 * mini-amd64.c (emit_call): Fix another near call bug.
12885 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
12887 * declsec.c: Keep the appdomain information in the structure. Added a
12888 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
12889 value gets overwritten).
12890 * declsec.h: Set the default MonoArray for the the stack to 6. Added
12891 an MonoAppDomain member to MonoSecurityFrame.
12892 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
12893 used in the stack walk. Now use a MonoArray which grow (double) when
12896 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
12898 * mini.c: Re-enabled runtime cleanup, since running threads should
12899 now properly stop when exiting.
12901 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
12903 * mini-codegen.c: New file contaning the arch-independent local
12904 register allocator. Not used by any architectures yet.
12906 * mini.h linear-scan.c: Merge some changes from the
12907 mini-xp-local-regalloc branch.
12909 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
12911 * mini-amd64.c (emit_call): Fix calls to native functions when the
12912 runtime is compiled as a shared library. Fixes #74756.
12914 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
12915 on a literal field. Fixes #74751.
12917 2005-04-25 Raja R Harinath <rharinath@novell.com>
12919 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
12921 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
12923 * objects.cs: Add missing null casting test.
12925 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
12927 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
12928 in wrapper methods. Also rename 'address' variable to 'offset'.
12930 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
12932 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
12935 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
12937 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
12940 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12942 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
12944 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
12946 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
12947 just the last bytes.
12949 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
12951 * aot.c (mono_compile_assembly): Fix warning.
12953 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
12954 by the _MSC_VER stuff.
12956 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
12958 * inssel-long.brg: Fix #74588.
12960 * cpu-amd64.md: Fix #74591.
12962 * iltests.il: Add new regression tests.
12964 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
12966 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
12969 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
12971 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
12973 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
12974 from Bill Middleton <flashdict@gmail.com>.
12976 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
12978 * arrays.cs: Add new regression test. Fix warnings.
12980 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
12982 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
12983 and leakage in CKFINITE.
12985 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
12986 this to a null op since it is called on amd64 too.
12988 * exceptions-amd64.c (get_throw_trampoline): Align stack.
12990 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
12991 body since this is not used on amd64.
12993 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
12995 * mini-amd64.c: Remove obsolete fixmes.
12997 * mini.c (print_method_from_ip): Fix debugging support.
12999 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13001 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
13002 so that expressions that don't give much gain are not reduced.
13003 * ssapre.h: Likewise.
13005 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
13007 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
13009 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
13011 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
13013 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
13015 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
13017 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
13019 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
13021 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
13024 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
13026 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
13028 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
13030 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
13031 MONO_ARCH_USE_SIGACTION. Fixes #74252.
13033 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
13035 * mini-x86.c: Fix up stack overflow handling.
13037 * exceptions.cs: Add new regression test.
13039 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
13041 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
13042 mono_jit_thread_attach.
13044 * mini.c (mono_method_to_ir): Verify called method is not abstract.
13046 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
13048 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
13049 avoid calling constructors using callvirt.
13051 * inssel.brg: Fix #74073.
13053 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
13055 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
13056 compilation with non-GCC compilers.
13057 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
13058 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
13060 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13062 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
13063 klass->interface_offsets (will likely fix bug#74073).
13065 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
13067 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
13069 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
13071 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
13072 to amd64_div_reg_size ().
13074 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
13076 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
13078 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
13080 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
13082 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
13084 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
13086 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
13088 * mini.c (mono_precompile_assembly): Load and precompile referenced
13089 assemblies as well. Fixes #74015.
13091 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
13093 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
13095 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
13097 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
13098 a lot of checks and (anyway) permissions cannot work until corlib is
13101 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
13103 * mini-ppc.c: fixed ABI issue on sysv/ppc.
13105 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
13107 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
13108 calls (fixes bug#72824).
13110 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13112 * mini.c: fix tail recursion elimination (see test in bug#73936).
13114 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
13116 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
13117 some fp functions in sse2 mode.
13119 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
13121 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
13123 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
13125 * mini.h mini.c: Add mono_get_jit_tls_key ().
13127 * mini-x86.c: Enable fast TLS support on windows.
13129 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
13131 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
13132 * mini.c: Check for p/invoke method when generating code. If a
13133 p/invoke method, or it's class, isn't decorated with [Suppress
13134 UnmanagedCodeSecurity] then generate code to call System.Security.
13135 UnmanagedDemand (only if the security manager is active).
13137 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
13139 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
13140 last change as it seems to cause strange crashes.
13142 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13144 * *.c: handle unsafe function pointers where needed.
13146 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
13148 * mini.c (mono_jit_free_method): Remove the fixme too.
13150 2005-03-15 Miguel de Icaza <miguel@novell.com>
13152 * mini.c: As discussed, make the code actually free the delegate
13153 thunk now, to enable the debugging of delegate problems, use
13154 MONO_DEBUG=1 when running Mono.
13156 This takes also care of parts of the leaks as seen by Joe.
13158 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
13160 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
13161 thread_tls_offset calculation.
13163 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
13165 * declsec.c: Reworked linkdemand checks for icall. The previous code
13166 was using the declaration code (untrusted) and didn't work as expected
13167 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
13170 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
13172 * iltests.il: Add new localloc test.
13174 * mini-amd64.c: Handle large stack allocations the same way as on
13175 windows if stack overflow handling is working.
13177 * mini-amd64.c: Allocate the signal stack using mmap.
13179 * mini.c (sigsegv_signal_handler): Fix reading of context.
13181 * mini-exceptions.c: Fix up stack overflow handling.
13183 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
13185 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
13187 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
13189 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
13191 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
13192 tramp_init functions as they are no longer needed.
13194 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
13196 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
13198 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
13200 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
13202 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
13205 * mini-ops.h: Add OP_LMUL_IMM.
13207 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
13208 long mul/div opcodes as intrinsic.
13210 * mini-amd64.c (emit_call): Handle the case when the callee might be
13213 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
13215 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
13218 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
13220 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
13222 2005-03-09 Ben Maurer <bmaurer@ximian.com>
13224 * mini.c (mono_codegen): Don't leak here, to help people running
13227 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
13229 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
13230 conversions in sse2 mode.
13232 * basic-float.cs: Add regression test.
13234 * mini-amd64.c: Reenable sse2.
13236 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
13238 * mini-amd64.c: Disable sse2 until some regressions are fixed.
13240 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
13242 * driver.c: Copyright text should include 2005.
13244 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
13246 * cpu-amd64.md (load_membase): Fix more max lengths.
13248 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
13250 * cpu-amd64.md (load_membase): Fix max length.
13252 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
13254 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
13256 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
13257 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
13259 * basic-float.cs: Add rounding regression test.
13261 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
13263 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
13265 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
13266 structures in registers for pinvoke wrappers.
13268 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
13270 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
13272 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
13274 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
13275 wrapper to mono_jit_thread_attach.
13277 * mini.c (mini_jit_thread_attach): New jit icall.
13279 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
13280 native->managed wrappers.
13282 * exceptions.cs: Add new regression test.
13284 * mini.c (optimize_branches): Check regions in the cbranch to throw
13285 block case as well. Fixes #73242.
13287 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13289 * mini.c: thread safety fixes.
13291 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
13293 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
13294 patching stuff, since delegates use jump trampolines so there is
13297 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
13300 * tramp-amd64.c: Fix build.
13302 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
13303 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
13305 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
13306 Rename this to mono_arch....
13307 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
13309 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
13311 * mini-amd64.c (emit_call): If both the caller and the callee is
13312 guaranteed to have 32 bit addresses, emit a normal call.
13314 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
13316 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
13317 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
13318 method_ptr inside delegates.
13320 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
13322 * mini.c (mono_jit_free_method): Free the method info even if the native code is
13323 invalidated. Fixes #73001.
13325 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
13327 * mini-x86.c: Only use stdcall for pinvokes on windows.
13329 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13331 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
13332 * mini-x86.c: remove unreliable __thread var offset detection,
13333 use the correct accessors and enable by default.
13335 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
13337 * mini.c (mono_jit_free_method): Fix memory leak.
13339 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
13341 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
13343 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
13345 * cpu-amd64.md: Fix lengths of atomic opcodes.
13347 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13349 * driver.c: try to not imply using ICU is any good.
13351 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
13353 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
13354 functions as inline ops.
13356 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
13357 some Interlocked functions as inline ops.
13359 * mini.c (move_basic_block_to_end): Fix bug in last patch.
13361 * mini.h (MonoBasicBlock): Reorganize fields a bit.
13363 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
13365 * mini.c: Add support for OP_NOT_TAKEN.
13367 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
13368 structures in registers for pinvoke wrappers.
13370 * mini-amd64.c: Fix warnings.
13372 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
13374 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
13376 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
13378 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
13379 address instead of loading the address from it.
13381 * mini-x86.c: Add support for returning small structs in registers
13382 on Win32. Fixes part of #70864.
13384 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
13386 * trace.c (get_token): Improve error checking.
13388 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
13390 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
13392 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
13394 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
13395 it can be reused for MonoClass.
13396 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
13399 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
13401 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
13402 instead of a MonoReflectionMethod. The method information wasn't used
13403 when displaying SecurityException details (but will be now).
13405 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
13407 * Makefile.am : windows build fix.
13409 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
13411 * iltests.il: Add new regression test.
13413 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
13416 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
13418 * mini.c: Moved linkdemand check into helper function check_linkdemand
13419 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
13422 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
13424 * declsec.c: Added statistics counter for different kinds of
13426 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
13427 (and commented) declaration.
13428 * mini.c: Added statistics counter for security Demand code
13429 generation. Added display of security statistics.
13431 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
13433 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
13434 Fix compilation errors under gcc-2.95.
13436 2005-02-12 Ben Maurer <bmaurer@ximian.com>
13438 * mini.c, driver.c: Use the new jit trampoline hashtable
13440 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13442 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
13444 2005-02-11 Martin Baulig <martin@ximian.com>
13446 * debug-mini.c (mono_debug_close_method): Free the line number array.
13448 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
13450 * aot.c: Break up large methods into smaller ones. Share GOT slots for
13453 * mini.h: Bump AOT file format version.
13455 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
13457 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
13459 * declsec.h: Added macros to get/set lazyly initialized security
13460 informations about assemblies. Added new enum for different type of
13461 possible LinkDemand violation. Added function to check LinkDemands.
13462 * mini.h: Added a field to MonoCompile to hold any security violation
13463 detected when JITting a method (so it can be thrown later).
13464 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
13465 and CEE_CALLVIRT. Added code to throw exception at the end of
13466 mini_method_compile (note: the exception is unhandled right now).
13468 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13470 * mini.c, jit-icalls.c: use the managed implementation of
13471 memset for initobj and memset, to avoid managed <-> unmanaged
13474 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
13476 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
13477 optimization if it would need a GOT var.
13479 * basic.cs: Add tests for constant propagation and switch statements.
13481 * ssa.c: Fix out-of-range constant propagation and switch statements.
13483 2005-02-09 <vargaz@freemail.hu>
13485 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
13487 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
13489 * cpu-amd64.md (load_membase): Fix max length of load_membase.
13491 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13493 * mini.c: update to new signature of mono_class_get_allocation_ftn().
13495 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
13497 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
13498 arithmetic operations.
13500 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
13502 * mini-ppc.c: add a workaround for broken user code that
13503 DllImports vararg functions with non-vararg signatures.
13505 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
13507 * mini.c (mono_jit_compile_method_inner): Add detection and a
13508 meaningfull error message for assemblies written in Managed C++.
13510 * tramp-amd64.c mini-amd64.h: Add support for
13511 create_trampoline_from_token ().
13513 * aot.c mini-x86.c abcremoval.c: Applied patch from
13514 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
13516 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
13518 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
13519 which takes a MonoImage/token as parameter instead of a MonoMethod.
13521 * aot.c: Use the new trampoline for initializing vtables.
13523 * aot.c: Add support for ldfld/stfld_remote wrappers.
13525 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
13526 rules for compare <MEM>, IMM.
13528 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
13530 * aot.c: Handle inherited finalizers correctly.
13532 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
13534 * inssel.brg (stmt): Add a missing _setup_... ().
13536 * aot.c: Save some parts of the class state to the AOT file and use it
13537 to recompute that state when a class is initialized.
13539 * mini.c: Install AOT hooks into the runtime.
13541 * mini.h: Bump AOT file format version.
13543 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
13546 * iltests.il: Add new test.
13548 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
13550 * mini.c: fix typo.
13552 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
13554 * mini.c: setup the statistical profiler in the thread attach
13555 callback to cope with the new single thread code.
13557 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
13559 * mini-ppc.c: ensure we have enough room for the profiler
13560 calls (fixed bug#72084).
13562 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
13564 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
13567 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13569 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
13571 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13573 * ssapre.c: Fixed an issue with down safety (this allows IronPython
13574 to succesfully execute parrotbench).
13575 * ssapre.h: Likewise.
13577 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13579 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
13580 variable for stores to method arguments (fixes a SSAPRE issue).
13582 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13584 * mini.c: handle value types in dup, fixes gen-112.cs.
13586 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
13588 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
13589 sequence for calls in dynamic methods to avoid thunks.
13591 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13593 * mini.c: correctly remove dynamic methods from the hashtable.
13595 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13597 * driver.c: Disabled SSAPRE until fix the bug that appears
13598 in IronPython's parrotbench.
13600 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
13602 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
13604 * mini.c (mono_method_to_ir): Revert the previous change.
13606 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
13607 when AOT compiling.
13609 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
13610 mono_jit_info_table_find () etc. when running under valgrind.
13612 * inssel.brg: Fix warnings.
13614 * mini-exceptions.c: Fix warnings.
13616 2005-01-31 Martin Baulig <martin@ximian.com>
13618 * driver.c (compile_all_methods_thread_main): Don't try to compile
13619 generic methods or anything which has type parameters.
13621 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
13623 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
13625 * TestDriver.cs: Add --verbose flags.
13627 * graph.c ssa.c: Fix 64 bit warnings.
13629 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
13630 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
13631 Fix 64 bit warnings.
13633 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
13634 variable not spotted by gcc.
13636 * mini-amd64.c inssel-amd64.brg: Applied patch from
13637 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
13638 X86_COMPARE_MEMBASE opcodes.
13640 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
13642 2005-01-29 Ben Maurer <bmaurer@ximian.com>
13644 * *: MonoMethod->signature might be NULL now. You *MUST* use
13645 mono_method_signature.
13647 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13649 * driver.c (compile_all_methods_thread_main): Compile the methods
13650 without invoking cctors.
13652 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13654 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
13655 * basic-calls.cs: test for the above.
13657 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13659 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
13660 MonoJitInfo changes.
13662 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
13664 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
13665 eagerly if it contains dynamic methods.
13667 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
13669 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
13670 trace, it is now computed by an icall from trace_ips.
13672 * mini-exceptions.c: Fix a warning.
13674 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
13676 * mini-exceptions.c: don't bother getting stack trace info if
13677 it's not going to be used.
13679 2005-01-27 Raja R Harinath <rharinath@novell.com>
13681 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
13684 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
13686 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
13688 * aot.c: Avoid calling mono_method_get_header () if not needed.
13690 * mini.h: Bump AOT file format version.
13692 * mini.c (mono_emit_native_call): Allocate a GOT var here.
13694 * mini.c (mono_print_tree): Print more info for calls.
13696 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
13698 * declsec.h: Remove warning by adding missing include for marshal.h
13700 2005-01-26 Martin Baulig <martin@ximian.com>
13702 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
13705 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
13707 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
13710 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
13712 * aot.c (mono_compile_assembly): Fix a warning.
13714 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
13716 * declsec.c: Look for security attributes on the original MonoMethod
13717 (and not the wrapped one). This fix permissions on icalls.
13719 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
13721 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13723 * mini.c (mono_allocate_stack_slots): Add a fixme.
13725 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13727 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13729 * inssel.brg: optimize casts of sealed types (more
13730 optimizations waiting for fixes in remoting).
13732 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
13734 * inssel.brg (stmt): Add another dummy rule.
13736 * driver.c: Fix warnings.
13738 * driver.c (mono_main): If running under valgrind, instruct glib to use
13739 the system allocation functions so valgrind can track the memory
13740 allocated by the g_... functions.
13742 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
13744 * mini-ops.h: Add OP_DUMMY_STORE opcode.
13746 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
13748 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
13749 variables in try regions.
13751 * mini.c (mini_method_compile): Don't disable optimizations on large
13752 methods when AOT compiling.
13754 * mini.c (mono_allocate_stack_slots): New arch independent method to
13755 allocate stack slots. Not yet used.
13757 2005-01-22 Ben Maurer <bmaurer@ximian.com>
13759 * debug-mini.c (mono_debug_close_method): Plug some leaks.
13761 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
13763 * mini-ppc.c: make the branch info relative as the code
13764 buffer can be reallocated.
13766 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
13768 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
13769 * driver.c: Removed the AOT/security restriction. Now initialize the
13770 security manager (in metadata) if --security is used.
13771 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
13772 rather than the pointer to declarative security, when AOT is used.
13774 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
13776 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
13777 basic blocks, reduced intrinsic exception throwing code size.
13779 2005-01-22 Miguel de Icaza <miguel@ximian.com>
13781 * driver.c (mini_usage): Reorder the usage screen.
13783 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
13785 * mini.c (mono_resolve_patch_target): Fix warning.
13787 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
13789 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
13792 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
13794 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
13795 breaks the amd64 build.
13797 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
13798 register allocation. Fixes #71454.
13800 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
13802 * arrays.cs: Add new regression test.
13804 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13806 * ssapre.c: Turned usage of snprintf to GString.
13807 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
13808 (I left it on by mistake in my previous commit).
13810 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
13812 * mini.c, cfold.c, basic-calls.cs: preserve side effects
13813 on cond branch optimization (fixes bug# 71515).
13815 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13817 * abcremoval.c: Fixed bug 71062.
13818 * abcremoval.h: Likewise.
13820 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13822 * mini.c: Added a new functionality to optimize_branches, the removal
13823 of useless basic blocks, and fixed some problem in the removal of
13824 critical edges; some utility functions added for both purposes.
13825 * ssapre.c: Added complex expression support, and fixed bug 70637.
13826 * ssapre.h: Likewise.
13827 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
13829 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
13830 * driver.c: Re-enabled SSAPRE.
13832 2005-01-19 Martin Baulig <martin@ximian.com>
13834 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
13835 the result of mono_get_method_constrained().
13837 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
13839 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
13842 2005-01-18 Geoff Norton <gnorton@customerdna.com>
13844 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
13845 be detected. Fixes #59296.
13847 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
13849 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
13850 which can happen. Fixes #71361.
13852 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
13854 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
13857 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
13859 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
13860 appdomain-unload.exe to fail.
13862 * mini.c: Fix some memory leaks.
13864 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
13866 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
13867 Fixed bug and sped up some codepaths.
13869 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
13871 * mini.c: Fix some memory leaks.
13873 * exceptions.cs basic-long.cs: Add test for checked ulong->int
13876 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
13878 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
13881 * iltests.il: Add regression test for #71320.
13883 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
13885 * mini.c (mono_codegen): Fix installation of profiler hooks.
13887 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
13889 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
13891 * mini.h, mini.c, cfold.c: optimize access to enum
13892 readonly fields, too. Eval conditional branches if possible
13893 to perform unreachable code removal in more cases.
13895 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
13897 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
13899 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
13902 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
13903 WinXP DEP. Fixes #71244.
13905 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
13907 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
13909 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
13911 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
13913 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
13915 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
13918 * mini.h: Bump AOT version.
13920 * mini.h (MonoCompile): Change exvar to a hash table.
13922 * mini.c: Allocate a separate exvar for each handler block.
13924 * mini.c: Get rid of the computation of filter_lengths, its not needed.
13926 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
13927 ex var with the pending exception and only throw if the two are equal.
13930 * exceptions.cs: Add tests for rethrow and nested catch clauses.
13932 * mini-x86.c: Fix warnings.
13934 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
13935 used by all the ports now.
13937 * aot.c: Add write-symbols and save-temps options.
13939 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
13941 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
13943 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
13945 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
13948 * tramp-s390.c: Check vtable slot belongs to the domain.
13950 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
13951 as per other platforms.
13953 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
13955 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
13957 * driver.c: we don't run the Main() code in a subthread anymore.
13959 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
13961 * mini.c: added experimental rtc support in the statistical
13962 profiler: if the user has the permission, more accurate statistics
13963 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
13964 The MONO_RTC value must be restricted to what the linux rtc allows:
13965 power of two from 64 to 8192 Hz.
13967 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
13969 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
13971 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
13973 * mini-ppc.c: better icache flush for smp.
13975 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
13977 * mini-amd64.c (emit_move_return_value): Fix memory leak.
13979 * mini-x86.c (get_call_info): Add the get_call_info () code from the
13980 amd64 port, not yet used.
13982 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
13984 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
13987 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
13989 * driver.c: Added --security option to activate the security manager.
13990 Right now this will allow code generation for declarative demands and
13991 is disabled when AOT is specified.
13992 * mini.c: Add code generation for declarative security demands.
13993 * mini.h: Add mono_use_security_manager as an extern gboolean.
13995 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
13997 * aot.c (mono_compile_assembly): Speed up compilation a bit by
13998 emitting more dense assembly code.
14000 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
14001 exception throwing stuff.
14003 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
14005 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
14008 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
14009 left in by mistake.
14011 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
14014 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
14016 * tramp-*.c: Only patch vtable slots if the object is in the current
14017 domain. Fixes appdomain-unload.exe.
14019 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
14021 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
14024 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
14026 * mini.c (reverse_branch_op): New helper function.
14028 * mini.c (optimize_branches): Run the new optimization only on
14029 platforms which support it. Also reverse all kinds of branches.
14031 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
14033 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
14036 * mini.c (optimize_branches): Reverse not-equals branches if the false
14037 bblock is a throw. This happens a lot of time with argument checking in
14040 * mini.c (mono_codegen): Add support for placing basic blocks after
14041 the function epilogue.
14043 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
14046 2005-01-05 Miguel de Icaza <miguel@ximian.com>
14048 * mini.c (setup_stat_profiler): Only set this up if the platform
14049 supports ITIMER_PROF.
14051 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
14053 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
14056 * inssel.brg: Fix a warning.
14058 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
14060 * mini.c: added support for statistical profiler
14061 (run with: --profile=default:stat).
14063 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
14065 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
14067 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
14069 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
14070 related to global registers from the amd64 port.
14072 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
14074 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
14076 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
14077 with global registers.
14078 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
14080 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
14082 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
14084 * debug-mini.c (encode_value): Fix off-by-one.
14086 * aot.c (encode_value): Likewise.
14088 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
14090 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
14092 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
14095 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
14097 * aot.c (emit_method_info): Increase size of temp buffer.
14099 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
14102 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
14104 * aot.c (emit_method_info): Fix build.
14106 * aot.c: Further rework of the AOT file format to reduce the size of
14107 the method info data.
14109 * mini.h: Bump AOT file format version.
14111 2004-12-27 Martin Baulig <martin@ximian.com>
14113 * mini.c (mini_get_method): New static method; call
14114 mono_get_method_full() and mono_get_inflated_method().
14115 (mono_method_to_ir): Use mini_get_method() instead of
14116 mono_get_method_full().
14118 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
14120 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
14122 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
14124 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
14126 * inssel-amd64.brg: Add some optimization rules.
14128 2004-12-24 Ben Maurer <bmaurer@ximian.com>
14130 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
14131 standard not GC'd stuff is fine.
14133 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
14135 * aot.c: Rework the AOT file format to get rid of most of the global
14136 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
14138 * mini.h: Bump AOT file format version.
14140 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
14142 * mini.h: Bump AOT file format version.
14144 * aot.c (mono_aot_is_got_entry): New function to determine if an
14145 address is inside a GOT.
14147 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
14149 * cpu-pentium.md: Increase the maximum size of some instructions which
14150 might involve a got access.
14152 * mini.c (get_method_from_ip): Another debug helper function.
14154 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
14155 when got var accesses are created during the decompose phase.
14157 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
14159 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
14160 argument mini_compile_method and to MonoCompile, and use this to
14161 determine whenever a given method is compiled for AOT. This allows the
14162 other methods compiled during AOT compilation to be free of AOT stuff,
14163 so the backends does not need to add special support for them by
14164 creating a fake GOT etc.
14166 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
14169 2004-12-21 Ben Maurer <bmaurer@ximian.com>
14171 * mini.c (mono_method_to_ir): It turns out that some of the
14172 x-appdomain wrappers are lax with types, so just ignore this for
14175 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
14176 at the vtable->klass. If it is non-shared code we can just use the
14179 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
14181 * mini-ppc.c: access MonoDomain from tls, too.
14183 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
14185 * declsec.c: Removed unused variable (and related warning ;-)
14187 2004-12-21 Ben Maurer <bmaurer@ximian.com>
14189 * iltests.il: New test for LDELEMA on an array of ref types.
14191 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
14192 all ldelema's on reftypes.
14193 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
14194 it was the wrong place to put it.
14196 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
14197 register to pop to make this cleaner, at the request of Paolo.
14199 2004-12-20 Ben Maurer <bmaurer@ximian.com>
14201 * mini-ops.h (OP_GETHASHCODE): New op.
14203 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
14205 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
14208 For a microbenchmark, this reduces the cost of Hashtable.get_Item
14211 * mini-x86.c (mono_arch_output_basic_block): Rather than
14219 The first is 3 bytes while the second is 1. This saves 36 kb on
14220 mscorlib, quite a big saving. When bootstraping mcs, I was able to
14221 see a small boost because of icache locality.
14223 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
14225 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
14227 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
14228 started code sharing with the generic code.
14230 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
14232 * mini-ppc.c, cpu-g4.md: added code for direct access to
14235 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
14237 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
14238 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
14241 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
14243 * declsec.c|h: Added functions to cache the declarative stack modifiers
14244 in MonoJitInfo and to create a security frame from a MonoJitInfo
14246 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
14247 created. Register internal calls for System.Security.SecurityFrame::
14248 _GetSecurityFrame and _GetSecurityStack.
14249 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
14250 the definitions for the new stack walk/callback mechanism.
14251 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
14252 first security frame for LinkDemands and InheritanceDemands) and
14253 GetSecurityStack for Demands. Both use the new mono_walk_stack code
14255 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
14256 walk initialization (lupus).
14258 2004-12-20 Ben Maurer <bmaurer@ximian.com>
14260 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
14262 (handle_loaded_temps): Do not create a temporary variable for
14263 things that we know are temps. They will never be modified.
14264 (mono_spill_call): Set MONO_INST_IS_TEMP
14265 (mono_emulate_opcode): ditto
14267 (mono_method_to_ir.CEE_DUP): ditto
14269 2004-12-19 Ben Maurer <bmaurer@ximian.com>
14271 * mini.c (type_to_eval_stack_type): Make this handle the void type
14272 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
14273 (emit_tree): use ip_in_bb to special case some common idioms
14274 Update all callers to pass in the IP.
14275 (mono_method_to_ir): Make CEE_CALL* do the above as well.
14277 This gives us a nice 2% speedup in mcs bootstrap.
14279 * mini-x86.c (peephole_pass): Peephole pass to make
14288 * mini.c (ip_in_bb): new method.
14289 (mono_method_to_ir): use this method rather than doing the hash
14292 * linear-scan.c (mono_linear_scan): When expiring actives, you
14293 don't need to keep around variables that expire on this
14294 instruction. This makes it so that:
14297 store (ebx add (ebx, 1))
14301 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
14303 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
14304 combination to avoid doing two copies. Fix up problems with previous
14307 * mini.c: Fix 64 bit warnings.
14309 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
14311 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
14313 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
14314 changes from the x86 code.
14316 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
14318 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
14320 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
14321 throwing code to reduce its size, unify the AOT and non-aot code and
14322 get rid of relocations in the AOT case.
14324 * mini-x86.h mini.c exceptions-x86.c
14325 (mono_arch_get_throw_corlib_exception): New arch specific function to
14326 raise corlib exceptions which doesn't require relocations in the
14329 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
14331 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
14333 * mini.c (mono_emit_method_call): Only allocate the got var when it is
14336 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
14339 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14341 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
14342 with add function when used from Inc/dec atomic
14343 functions. Re-enabled optimization on x86.
14344 * mini-ops.h: renamed atomic_add functions to
14345 allow _add to match the Interlocked::Add and
14346 _add_next to match Interlocked::Inc/Dec.
14348 2004-12-15 Massimiliano Mantione <massi@ximian.com>
14350 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
14351 linking of BBs to the end BB, and enabled SSAPRE also with
14352 consprop and copyprop (which was prevented by that bug).
14354 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14356 * mini-x86.c: disabling the Interlocked optimizing code.
14358 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
14360 * aot.c (load_aot_module): Move reading of got_addr after the AOT
14361 file version check.
14363 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14365 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
14366 interlocked optimization due lack of support on x86, rewrote
14367 exchange to take into account that base may be in eax.
14369 xsp works again; activated Interlocked optimizing code.
14371 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
14373 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
14375 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
14377 * mini-ops.h: Add new opcodes.
14379 * mini.h: Add new patch types. Add got_var to MonoCompile.
14381 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
14382 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
14383 make it work with all kinds of patchable code.
14385 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
14386 address of the GOT, and referencing entries in the GOT.
14388 * mini.c: Add code to load the GOT address if needed by an opcode.
14390 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
14391 independent AOT code on the x86 using an elf-style Global Offset Table.
14393 2004-12-14 Raja R Harinath <rharinath@novell.com>
14395 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
14397 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14399 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
14402 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
14404 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
14405 of Interlocked:Increment/Decrement/Add as inline ops.
14406 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
14408 2004-12-12 Geoff Norton <gnorton@customerdna.com>
14410 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
14411 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
14413 2004-12-12 Duncan Mak <duncan@ximian.com>
14415 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
14416 again. `patch_info->table_size' is no longer valid after Zoltan's
14419 2004-12-12 Martin Baulig <martin@ximian.com>
14421 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
14422 if we are the "real" method, ie. not an inlined method inside it.
14424 2004-12-11 Ben Maurer <bmaurer@ximian.com>
14426 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
14427 before we look in the special fields table. This fixes
14428 ../tests/thread-static-init.cs.
14430 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14432 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
14433 for Array get_Rank and get_Length. Fixes bug #70465.
14435 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
14437 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
14438 separate structure to reduce the size of MonoJumpInfo.
14440 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14442 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
14444 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
14446 * mini.c (mini_get_inst_for_method): Changed to allow ports
14447 to return a MonoInst instead of opcode
14448 (renamed mini_get_opcode_for_method to better reflect the new functionality)
14450 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
14451 Allow ports to return a created MonoInst instead of op-code, will enable
14453 (renamed mini_get_opcode_for_method to better reflected the functionality)
14455 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
14457 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
14459 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
14461 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
14464 2004-12-08 Martin Baulig <martin@ximian.com>
14466 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
14467 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
14469 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
14471 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
14474 * exceptions.cs: Disable some tests which depend on properties of x86 fp
14477 2004-12-08 Raja R Harinath <rharinath@novell.com>
14479 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
14481 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
14483 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
14484 bug introduced by the previous patch.
14486 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14488 * mini-ppc.c, objectc.cs: handle large structs passed by value
14489 (fixes bug #69972).
14491 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
14493 * mini-ppc.c: OP_ARGLIST implementation from
14494 Geoff Norton <gnorton@customerdna.com>.
14496 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14498 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
14499 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
14501 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14503 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
14505 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14507 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
14510 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
14512 * mini-sparc.c: Zero out localled-ed memory.
14514 * iltests.il: Add tests for zeroing out localloc-ed memory.
14516 2004-12-04 Martin Baulig <martin@ximian.com>
14518 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
14519 mono_method_get_signature_full().
14521 2004-12-03 Massimiliano Mantione <massi@ximian.com>
14523 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
14524 and some utility functions (always for SSAPRE), integrated SSAPRE.
14525 * mini.h: Likewise.
14526 * driver.c: Added ssapre option.
14527 * ssa.c: Small fix on OP_ARG handling.
14528 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
14529 * Makefile.am: Likewise.
14531 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
14533 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
14534 now in the xp code.
14536 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
14539 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14541 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
14543 * cpu-s390.md : Increase instruction length of oparglist.
14545 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
14547 2004-11-30 Martin Baulig <martin@ximian.com>
14549 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
14550 virtual generic methods. We call a special helper_compile_generic_method()
14551 icall to retrieve the method from the vtable, inflate and compile
14552 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
14554 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
14556 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
14558 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
14560 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
14562 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
14565 2004-11-27 Ben Maurer <bmaurer@ximian.com>
14567 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
14568 platforms with PIC aot.
14570 2004-11-28 Martin Baulig <martin@ximian.com>
14572 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
14575 2004-11-28 Martin Baulig <martin@ximian.com>
14577 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
14578 the result of mono_type_get_underlying_type() to check whether
14581 2004-11-26 Martin Baulig <martin@ximian.com>
14584 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
14587 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
14589 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
14590 the same way as the other arguments so they won't get clobbered.
14592 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
14593 calls through R11 since it is clobbered by the trampoline code.
14595 2004-11-26 Raja R Harinath <rharinath@novell.com>
14597 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
14598 pick up in-tree mscorlib.dll.
14600 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
14602 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
14604 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
14605 runtime data/code are now stored in a table similar to the GOT in ELF.
14606 This allows the code itself to be position independent.
14608 * aot.c: Fix loading of referenced assemblies after the lazy assembly
14611 * aot.c: Attach ELF type (object/function) directives to all global
14614 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
14616 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
14618 * mini-amd64.h: Turn on PIC AOT code.
14620 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
14621 returning the offset within an OP_AOTCONST instruction where the GOT
14622 offset needs to be added.
14624 * mini.h: Bump AOT file format version.
14626 2004-11-25 Martin Baulig <martin@ximian.com>
14628 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
14629 uninflated generic methods.
14631 2004-11-25 Martin Baulig <martin@ximian.com>
14633 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
14635 2004-11-24 Martin Baulig <martin@ximian.com>
14637 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
14638 original klass (this only applies for generic instances).
14640 2004-11-24 Martin Baulig <martin@ximian.com>
14642 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
14643 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
14646 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
14648 * mini.c (mono_method_to_ir): Disable inlining for methods containing
14649 localloc. Fixes #69678.
14651 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
14653 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
14655 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
14656 used SSE registers on pinvoke calls. Fixes #69774.
14658 2004-11-23 Geoff Norton <gnorton@customerdna.com>
14660 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
14661 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
14663 2004-11-23 Raja R Harinath <rharinath@novell.com>
14665 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
14666 Refer directly to the mcs/ tree.
14668 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14670 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
14671 Check if a trampoline for a synchronized method is required.
14673 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
14675 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
14676 with localloc if needed. Throe arithmetric exception in
14677 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
14678 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
14680 2004-11-19 Geoff Norton <gnorton@customerdna.com>
14682 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
14683 types before switching on type. Fixes #69622.
14685 2004-11-19 Raja R Harinath <rharinath@novell.com>
14687 * Makefile.am (check-local): New. Integrate into 'make check'.
14688 (MCS,RUNTIME): Define using in-tree mono and mcs.
14690 (%.exe): Use $(ILASM).
14692 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
14694 * mini-ppc.c: adjust initial prolog size (bug #69691).
14696 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
14698 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
14701 2004-11-17 Raja R Harinath <rharinath@novell.com>
14703 * Makefile.am (clean-local): Rename from 'clean'.
14705 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14707 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
14708 to mono_arch_is_int_overflow.
14709 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
14712 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
14714 * declsec.c|h: New files to support declarative security attributes.
14715 Added function to check if a method has (applicable) security.
14716 * mini.c|h: Add check for declarative security attributes in
14717 mono_method_check_inlining.
14718 * Makefile.am: Added declsec.c and declsec.h to the build.
14720 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
14722 * mini.c, mini.h: update to keep dynamic code info per-domain.
14724 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
14726 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
14727 (mini_init): Get rid of it from here too.
14729 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14731 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
14732 implemented OP_RETHROW (patch by Geoff Norton
14733 <gnorton@customerdna.com>).
14735 2004-11-10 Geoff Norton <gnorton@customerdna.com>
14737 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
14738 between appdomains. Fixes appdomain-unload on PPC.
14740 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
14742 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14743 mini-exceptions.c: handle the new wrapper types.
14744 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
14745 token value as a MonoClass* when compiling a wrapper.
14746 mono_jit_create_remoting_trampoline now takes an additional
14747 MonoRemotingTarget parameter.
14749 2004-11-10 Martin Baulig <martin@localhost>
14751 * mini.c (mono_method_to_ir): Use `generic_container->context'
14752 rather than creating a new one.
14754 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14756 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
14758 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
14760 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
14762 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
14763 the experimental aot cache stuff.
14765 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14767 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14768 mini-exceptions.c: update to exception clause structure changes.
14770 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14772 * exceptions-x86.c (throw_exception): Fix warnings.
14774 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
14777 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14779 * exceptions-sparc.c (get_throw_exception): Really fix this.
14781 2004-11-07 Ben Maurer <bmaurer@ximian.com>
14783 * tramp-*.c: we no longer support icalls without wrappers, so
14784 a bit of code can be removed here
14786 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
14788 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
14791 * cpu-sparc.md: Add op_rethrow.
14793 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
14795 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
14797 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
14798 * mini-ops.h: Add OP_RETHROW.
14800 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
14802 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
14804 2004-11-05 Geoff Norton <gnorton@customerdna.com>
14806 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
14807 Makes the output much easier to read
14809 2004-11-05 Ben Maurer <bmaurer@ximian.com>
14811 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
14812 prevents another huge leak when compiling with ssa. Secondly, the
14813 performance of doing this rather than freeing the lists is much
14814 better. GList does a lock every time you allocate a list link,
14815 so that it can use a memory pool. So, it is better to just use
14816 a memory pool of our own.
14818 * ssa.c, linear-scan.c: replace g_list_remove_link with
14819 g_list_delete. The remove one does not free the GList, so we were
14820 leaking memory. On -O=all --compile-all with corlib, this cut down
14821 3 MB of allocations.
14823 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
14825 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
14827 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
14829 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
14830 into a new function mono_create_jit_trampoline ().
14832 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
14834 * trace.c (get_spec): Allow tracing of classes without a namespace.
14836 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
14838 * mini.c: Fix pointer overwrite in mini_method_compile.
14840 2004-11-2 Geoff Norton <gnorton@customerdna.com>
14842 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
14843 The darwin ABI needs some special handling for 1 and 2 byte structs
14844 Lets use lbz/lhz instead of lwz everywhere.
14845 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
14846 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
14847 Use stb/sth for the former, and put the latter always on stack instead of in
14848 argument registers.
14850 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
14852 * trace.c (is_filenamechar): Add '_'.
14854 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14856 * mini-s390.c: Fix prolog length to allow for large trace requirements.
14858 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
14860 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
14862 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
14863 depends on libmonogc. Fixes #68805.
14865 2004-10-26 Miguel de Icaza <miguel@ximian.com>
14867 * mini.c (mono_jit_free_method): Provide extra information for
14868 this error. Currently this leaks, but will be turned into a
14869 developer option in the future.
14871 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
14873 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
14875 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
14877 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
14878 boundary. Fixes reading of PATCH_INFO_R4 and R8.
14879 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
14881 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
14883 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
14884 trampolines for AOT code.
14886 2004-10-22 <vargaz@freemail.hu>
14888 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
14889 constructed types. Fixes #68136.
14891 2004-10-21 Martin Baulig <martin@ximian.com>
14893 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
14894 if it returns true, unwind the stack to the call instruction.
14896 2004-10-21 <vargaz@freemail.hu>
14898 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
14900 * mini.h: Bump AOT version number.
14902 * objects.cs: Add another test for unbox trampolines.
14904 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
14907 2004-10-20 <vargaz@freemail.hu>
14909 * driver.c: Add SHARED to the set of optimizations tested.
14911 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
14913 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
14914 used by CEE_NEWARR.
14916 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
14918 2004-10-20 Martin Baulig <martin@ximian.com>
14920 * mini-exceptions.c (mono_handle_exception): Call
14921 mono_debugger_handle_exception() to tell the debugger about
14922 catch/finally clauses.
14924 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
14926 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
14928 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
14931 2004-10-15 Geoff Norton <gnorton@customerdna.com>
14933 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
14934 methods as their native size, fixed bug #57543, #57545.
14935 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
14936 This saves a temporary register and mullw call down into 1 (minor perf
14937 increase for cases like sum = sum * 5; This use to translate into:
14940 It now translates to
14943 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
14945 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
14948 2004-10-11 Martin Baulig <martin@ximian.com>
14950 * mini.c (mono_method_to_ir): If we're a generic method, get the
14951 MonoGenericContainer from our MonoMethodNormal and create a
14952 MonoGenericContext from it.
14954 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
14956 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
14958 * basic-long.cs: Add test for checked i8->i2 cast.
14960 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14962 * inssel-ppc.brg: added a couple of speedup rules.
14964 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
14966 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
14967 to speed up rebuilds.
14969 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14971 * mini-s390.c: Minor fix to OP_OR_IMM.
14973 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
14975 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
14976 better. Fixes appdomain-unload.exe on sparc.
14978 2004-10-02 Massimiliano Mantione <massi@ximian.com>
14980 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
14981 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
14984 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
14986 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
14988 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
14990 * mini.c: Always generate a field read/write wrapper for members
14991 of the class MarshalByRefObject since the actual instance could
14994 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
14996 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
14998 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
15000 * driver.c mini.h trace.c: Move the setting of the main assembly into
15001 a separate function called mono_trace_set_assembly () and call it after
15002 actually loading the main assembly. Fixes #66872.
15004 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
15006 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
15007 using the code manager.
15009 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
15011 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
15013 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
15015 * cpu-amd64.md: Fix bug in previous patch.
15017 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
15020 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
15022 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15023 mini-exceptions.c: updates for changed stack walk interface.
15025 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15027 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
15029 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
15031 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
15033 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
15035 * driver.c (mini_regression_list): Do not call mono_assembly_close
15036 since assemblies can't be unloaded.
15038 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
15040 * cpu-amd64.md: Fix more instruction lengths.
15042 * cpu-amd64.md: Fix lengths of some instructions.
15044 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
15046 * inssel.brg: Make the array ldelema check aot friendly.
15048 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
15050 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
15052 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
15054 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
15056 * mini-x86.c: Fix build.
15058 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
15059 mono_type_get_underlying_type () helper function to simplify code.
15061 2004-09-09 Martin Baulig <martin@ximian.com>
15063 * mini-amd64.c: Don't access `type->data.klass' directly, call
15064 mono_class_from_mono_type() instead since the type may be a
15067 2004-09-09 Martin Baulig <martin@ximian.com>
15069 * mini-amd64.c (get_call_info): Fix support for generic instances.
15070 (add_valuetype): Use mono_class_from_mono_type() to get the class
15071 since we can be a generic instance.
15073 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
15075 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
15077 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
15079 * liveness.c: reset spill costs on each scan: bug 62107
15081 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
15083 * exceptions-sparc.c (mono_arch_find_jit_info): remove
15084 unnecessary line that doesn't compile
15086 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
15088 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
15089 trampolines, make them call an error function so people can fix their
15092 2004-09-06 Martin Baulig <martin@ximian.com>
15094 * mini.c (mono_method_to_ir): When initializing locals, handle a
15095 generic instances like a valuetype if it's a valuetype and like a
15096 class if it's a class.
15098 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15100 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
15101 stack. Fixes #64674.
15103 * exceptions.cs: Add test for unwinding of call arguments.
15105 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
15107 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
15108 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
15109 set the carry/borrow flag). The sparc and s390 implementations
15110 can now use optimized versions (and simplify the code). ppc bugfixes.
15112 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15114 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
15116 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
15118 * inssel-amd64.brg: Remove leftover 32 bit rule.
15120 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
15122 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
15124 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
15125 mono_arch_find_jit_info functions into a new function. Fix a memory
15128 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
15131 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15133 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
15136 * exceptions.cs: Add array size tests.
15138 * mini.c: Allocate a separate icall wrapper for each arity of
15139 mono_array_new_va. Fixes #59509.
15141 * exceptions.cs: Add testcase for 64578.
15143 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
15145 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
15147 2004-09-02 Martin Baulig <martin@ximian.com>
15149 * mini.c (mono_method_to_ir): When initializing the locals, call
15150 handle_initobj() on the generic instance itself, not its
15153 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15155 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
15156 MonoJitInfo for dynamic methods.
15158 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
15160 * mini.c: Add support for freeing JIT data for dynamic methods.
15162 2004-09-01 Martin Baulig <martin@ximian.com>
15164 * mini-x86.c (is_regsize_var): Added support for generic
15166 (mono_arch_emit_prolog): Make this compile again, use
15167 `x86_push_imm_template (code)'.
15169 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
15171 * mini-x86.c: make all push_imm instructions that get
15172 patched always emit the long form
15174 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
15176 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
15177 in a per-domain hash.
15179 * mini-amd64.c (merge_argument_class_from_type): Handle generic
15182 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
15184 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
15187 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
15190 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
15191 Beginnings of SSE2 support.
15193 * exceptions.cs: Add more tests for checked int<->uint casts.
15195 2004-08-28 Martin Baulig <martin@ximian.com>
15197 * mini-x86.c (mono_arch_instrument_epilog): Added support for
15201 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
15202 Handle generic instances recursively.
15204 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15206 * iltests.il: test for conv.u8 on a constant
15208 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15210 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
15211 LCONV_x4 (shrun_32 (membase)).
15213 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15215 * inssel-x86.brg: c&p rules for push/setret of long
15217 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
15219 * inssel-x86.brg: c&p rules for compare (base, regvar) and
15220 compare (regvar, base)
15222 * inssel-x86.brg: more burg love
15224 * inssel.brg: more cleanup
15226 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
15228 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
15230 * basic-long.cs, basic-calls.cs: new tests for optimization.
15232 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
15234 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
15237 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
15239 * mini-amd64.c (read_tls_offset_from_method): Add another case.
15241 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
15243 * inssel.brg (mini_emit_memcpy): use
15244 NO_UNALIGNED_ACCESS to disable memcpy optimization
15246 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
15248 * mini-amd64.c: Handle generic types in various places.
15250 * mini.c (mono_method_to_ir): Handle generic types in init locals.
15252 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
15254 * mini.c (handle_box): Fix warning.
15256 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
15258 * mini-amd64.h: Enable the emit_state optimization.
15260 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
15262 * mini-amd64.c: Add some new 64 bit peephole opts.
15264 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
15266 * cpu-amd64.md: sreg1 of div instructions must be %rax.
15268 * mini-amd64.c: Register allocator fixes.
15270 * mini.c: Add an optimization to emit_state to avoid allocation of new
15271 registers on some platforms.
15273 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
15275 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
15277 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
15278 allocation. Fixes #63085.
15280 * basic-long.cs: Add new regression test.
15282 * mini-amd64.c: Register allocator improvements.
15284 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
15286 * mini-amd64.c (read_tls_offset_from_method): Add another code
15289 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
15290 instruction sequence for nullifying class init trampolines.
15292 * objects.cs: Add new regalloc test.
15294 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
15296 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
15298 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
15300 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
15303 * driver.c: Fix profiling after TLS changes.
15305 * driver.c (mono_main): Set mono_stats.enabled if needed.
15307 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
15310 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
15312 * mini-x86.c: use a 1 op rather than a 2 op tls access
15313 instruction -> faster.
15315 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
15317 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15320 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
15322 * exceptions-sparc.c (throw_exception): fix typo
15324 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
15326 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
15327 set tree->dreg correctly with tls. Allow any
15328 register to be used.
15330 * mini-x86.c (read_tls_offset_from_method): add new code
15331 generation pattern seen with GCC.
15334 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15336 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
15337 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15338 exceptions-sparc.c: fix some performance issues in exception
15339 handling and setting of the stack trace for exceptions that were
15342 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
15344 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15347 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
15350 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
15352 This patch inlines tls access, when possible.
15354 * mini.h: new arch functions for TLS intrinsics.
15355 All platforms updated with a stub.
15357 * mini.c: use the new intrinsics
15359 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
15360 arch specific intrinsic for tls variables
15362 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
15364 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
15367 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
15369 * mini.c: thread local allocation
15371 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
15373 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
15375 * Makefile.am: Link against the static version of libmonogc.
15377 * Makefile.am: Link the static versions of the convenience libraries
15378 into the mono executable.
15380 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
15382 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
15384 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
15385 on integer overflow.
15387 * mini-amd64.c: Reorganize function call code.
15389 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
15391 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15393 * inssel-x86.brg: use xor eax,eax.
15395 * basic.cs: new tests
15397 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15399 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
15400 in exception throwing code.
15402 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15404 * inssel-x86.brg: use xor esi,esi.
15406 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15408 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
15409 can trace methods compiled during mini_init () too.
15411 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
15414 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15416 * Makefile.am: static link on x86 (r=zoltan)
15418 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15420 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
15421 code since it causes some programs to fail.
15423 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
15425 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
15427 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
15429 * mini.c: ovfops_op_map - add STACK_OBJ case for
15431 * basic.cs: add test_0_pin_string as test
15434 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
15436 * Makefile.am: build C# if srcdir != builddir
15438 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15440 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
15441 fall-through blocks.
15443 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15445 * driver.c: enable loop by default again and include abcrem in -O=all.
15447 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
15449 * iltests.il: Add some localloc tests.
15451 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
15453 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
15456 * inssel-amd64.brg: Add some optimizations.
15458 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
15461 * Makefile.am: Statically link mono against libmono on AMD64.
15463 * mini-amd64.c inssel-amd64.brg: Optimizations.
15465 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
15467 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
15469 * tramp-amd64.c: Patch calling code in trampolines.
15471 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
15473 * mini-amd64.c: pinvoke struct passing fixes.
15475 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
15477 * mini-sparc.c: redo change, make mono_arch_cpu_init call
15478 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
15480 2004-08-05 Duncan Mak <duncan@ximian.com>
15482 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15485 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15487 * mini-amd64.c (emit_move_return_value): Move return value for normal
15490 2004-08-05 Martin Baulig <martin@ximian.com>
15492 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
15493 `type->type'; just modify `type' itself when dealing with enums
15494 and generic instances.
15495 (check_call_signature): Make `simple_type' a `MonoType *'.
15497 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15499 * mini.c: Use OP_PADD to add offsets to addresses.
15501 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
15503 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
15505 * mini-sparc.c (mono_arch_emit_epilog): fix check
15506 for folding last op into restore instruction
15508 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15510 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
15511 helper methods using the code manager.
15513 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
15515 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
15517 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15519 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
15520 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
15522 * mini-s390.c: fix tail processing
15524 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
15526 * mini-ppc.c: mul.ovf.un exception name fix.
15528 2004-08-03 Martin Baulig <martin@ximian.com>
15530 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
15531 instances; before jumping to `handle_enum', also modify `ptype'.
15533 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
15535 * cpu-sparc.md: fcall maximal length too small.
15537 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
15539 * mini-amd64.c mini.h: Add initial support for passing/returning
15540 structures to/from pinvoked methods.
15542 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
15544 * mini-ppc.c: reg allocator fix.
15546 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
15548 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
15550 * inssel.brg: Optimize memset on 64 bit machines.
15552 * mini-amd64.c: Fix some vararg cases.
15554 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15556 * mini-s390.c: Corrected macro in emit_float_to_int
15558 * s390-abi.cs: Tests to exercise the s390 ABI
15560 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15562 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
15565 * basic.cs: Add a test for add.ovf.un.
15567 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
15569 * mini-sparc.c: add case for OP_IDIV_UN
15571 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15573 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
15575 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
15577 2004-07-30 Ben Maurer <bmaurer@ximian.com>
15579 * basic.cs: regression tests.
15581 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
15584 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15586 * basic.cs: Add a new test.
15588 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
15589 and AOT. Various fixes and optimizations.
15591 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
15593 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15595 * mini-ppc.c: make sure temp regs are not used for global reg
15598 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
15600 * cpu-sparc.md: conv_i8 fix for 64bits
15602 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
15604 2004-07-29 Ben Maurer <bmaurer@ximian.com>
15606 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
15607 add opcode for cmp BYTE PTR [eax], imm.
15609 * inssel.brg: Make memcpy and memset takes bases.
15611 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
15613 * *-amd64.*: More AMD64 work.
15615 2004-07-28 Ben Maurer <bmaurer@ximian.com>
15617 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
15618 add a compare-not-equal opcode.
15620 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
15622 * mini.c: Use mono_init_from_assembly instead of mono_init.
15624 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
15626 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
15628 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
15630 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
15632 * inssel.brg: 64 bit fixes.
15634 * mini.h (MonoCallInst): Add some AMD64 specific data.
15636 * mini.h: Add some OP_P opcodes.
15638 2004-07-28 Ben Maurer <bmaurer@ximian.com>
15640 * basic.cs: tests for 61797 and 61740
15642 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15644 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
15645 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
15647 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
15649 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
15651 * *-amd64*.*: Ongoing AMD64 work.
15653 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
15655 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
15657 * *-amd64*: Ongoing AMD64 work.
15659 * mini-arch.h: Add AMD64 support.
15661 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
15663 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
15665 * mini-ops.h: Add new opcodes.
15667 * Makefile.am: Add AMD64 support.
15669 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
15670 rules into the inssel-long*.brg files.
15672 * *-amd64.*: Add beginnings of AMD64 backend.
15674 2004-07-22 Ben Maurer <bmaurer@ximian.com>
15676 * mini.c (print_dfn): commenting out the code that prints
15677 the cil. With -O=deadce, this makes -v -v crash.
15679 * cpu-pentium.md: make checkthis have a length of 2
15681 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
15683 * mini-sparc.h: fix implementations of __builtin
15684 functions for Sun compiler for V9.
15686 2004-07-16 Ben Maurer <bmaurer@ximain.com>
15688 * mini.c: use the new stelem.ref wrapper
15689 * exceptions.cs, arrays.cs: new stelem.ref tests
15691 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15693 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
15694 new XSP should work with these changes).
15696 2004-07-14 Ben Maurer <bmaurer@ximain.com>
15698 * inssel-{long32,x86,}.brg: trivial optimizations.
15700 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15702 * mini.c: load value when emitting box operation in
15705 2004-07-12 Ben Maurer <bmaurer@ximian.com>
15707 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
15708 is one byte shorter than cmp DWORD PTR [eax], 0.
15710 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15712 * inssel-ppc.brg: arguments on the stack are always
15713 relative to the stack pointer (spotted by Neale Ferguson).
15715 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15717 * exceptions-x86.c: delay appending the method name to the trace until
15718 after mono_jit_info_table_find is called, as this gets the real
15721 2004-07-09 Ben Maurer <bmaurer@ximian.com>
15723 * aot.c: register roots
15725 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15727 * aot.c : I could just use PLATFORM_WIN32 flag.
15729 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15731 * aot.c : Reverting the previous fix. This time it broke linux build.
15733 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15735 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
15737 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
15739 * mini.c (handle_stack_args): Remove some more debugging code.
15741 * mini.c (handle_stack_args): Remove debug output left in by mistake.
15743 * driver.c mini.h aot.c: Allow additional options to be specified with
15744 --aot and pass them to mono_compile_assembly.
15746 * aot.c: Add experimental code to AOT compile all loaded assemblies
15747 on demand and save the code into a cache in the filesystem.
15749 * aot.c: Add support for more wrapper methods.
15751 * mini.c (handle_stack_args): Handle some corner cases. Fixes
15754 * cpu-*.md: Remove removed opcodes.
15756 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
15757 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
15758 related icalls to marshal.c.
15760 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
15762 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
15764 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
15766 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
15768 2004-07-06 Ben Maurer <bmaurer@ximian.com>
15769 * liveness.c: If liveness is recomputated we need to reset the information
15770 for each variable. This way, if the liveness range has been narrowed
15771 by optimizations that happened after the last computation, we can return
15774 For example, if you have
15779 // Tons of code that does not affect i
15785 i = 0 is dead code and will be removed by SSA. However, when
15786 linear scan gets to the code, i will still appear to be live
15787 throughout the entire block. This prevents good register allocation.
15789 2004-07-06 Martin Baulig <martin@ximian.com>
15791 * debug-mini.c (mono_debug_init_method): Allow
15792 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
15793 (mono_debug_add_icall_wrapper): New method.
15795 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
15797 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
15799 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
15802 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
15804 * aot.c (mono_aot_load_method): Fix loading of debug info.
15806 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15808 * aot.c: Add logging support.
15810 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
15812 * mini.h: Add prototype for mono_print_method_from_ip.
15814 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
15816 * inssel.brg: 64 bit fixes.
15818 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
15821 * Makefile.am: Add SPARC64 support.
15823 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15825 * aot.c: Fix alignment problems on 32 bit platforms.
15827 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
15829 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
15832 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
15835 * mini.h: Bump AOT file version. Some 64 bit fixes.
15837 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
15839 * inssel-sparc.brg: Add new rule to avoid register moves.
15841 * inssel.brg: Add ldind_to_load_membase helper function.
15843 2004-06-30 Ben Maurer <bmaurer@ximian.com>
15845 * mini.c: OffsetToStringData intrinsic.
15847 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
15849 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
15851 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
15854 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
15855 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15857 * mini.c: reinstated mono_compile_get_interface_var()
15858 on x86, too, since the change breaks the Gtk# build there as well.
15860 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15862 * driver.c: remove loop from the default optimizations: it seems to
15863 interact badly with some of the other options (see bug #60613).
15865 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
15867 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
15868 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
15870 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
15872 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
15873 vararg-using methods.
15875 2004-06-21 Martin Baulig <martin@ximian.com>
15877 * mini/mini-exceptions.c
15878 (mono_handle_exception): Added `gpointer original_ip' argument.
15879 After calling mono_unhandled_exception(), call
15880 mono_debugger_unhandled_exception() and if that returns true,
15881 restore the context and return.
15883 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
15885 * mini-ppc.c: prefer the use of relative branches so
15886 they won't need to be patched in aot code (patch from Patrick Beard).
15888 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
15890 * aot.c: patch from Patrick Beard to make the output assembly
15891 more correct for the MacOSX assembler. Small tweak to
15892 generate sane images on Linux/PPC, too.
15894 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15896 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
15897 case until bug #59509 is fixed (shows up in #60332).
15899 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15901 * mini.c: make sure the needed wrappers are compiled, too, with
15904 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
15906 * driver.c: remove NPTL reference in --version output.
15908 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15910 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
15911 generate valid assembly for the Mach-O assembler.
15913 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
15915 * driver.c: don't include abcrem in the all optimization specifier
15916 since it slows down jit compilation too much for now.
15918 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
15920 * mini.c: use BIGMUL only if both operands have the same signage.
15921 * iltests.il: Test for bug 60056. (errors related to signage in
15926 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
15928 * mini.c, aot.c: memory leak fixes.
15930 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15932 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
15934 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
15936 * Makefile.am: remove the -static hack completely, it links in
15937 statically glib as well.
15939 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
15941 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
15942 * exceptions.cs: make it compile with new mcs/csc.
15944 2004-06-03 Massimiliano Mantione <massi@ximian.com>
15945 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
15946 and added relevant test case.
15948 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
15950 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
15951 regressions in gtk-sharp.
15953 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
15955 * exceptions.cs: New regression tests.
15957 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
15959 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
15961 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
15963 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
15965 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
15967 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
15969 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
15971 * mini.c (mono_jit_runtime_invoke): Init class in this
15972 method instead of trusting mono_jit_compile_method to
15973 do the work (because wrappers can be in object class)
15975 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
15977 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
15979 * basic-long.cs: New regression test.
15981 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
15983 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
15984 and div/rem checks.
15986 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
15988 * Makefile.am: fix miguel's change to build mono statically against
15989 libmono (track build dependencies).
15991 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
15993 * cfold.c: Some glib versions do not have G_MININT32.
15995 2004-05-26 Massimiliano Mantione <massi@ximian.com>
15997 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
15998 with precision of tan, atan, sin and cos, and implemented related
15999 regressions tests (fixes bug 54467, but one new problem appeared and
16002 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
16004 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
16006 * exceptions.cs: Add test for constant folding && division by zero.
16008 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
16009 since driver.c is in libmono too, so the optimization was useless.
16011 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
16012 variable to driver.c so the compiler can emit more efficient code to
16015 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16017 * Makefile.am: don't distribute generated inssel.[ch] files.
16019 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
16021 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
16022 into the default appdomain. Fixes #58707.
16024 * jit-icalls.c: Remove the broken approximation for truncl, doing
16025 no conversion is better.
16027 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
16030 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16032 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
16033 of the mcrxr instruction which is not available on some processors
16034 even if it's documented to be. Implement add and sub overflow correctly
16035 (still not complete for long unsigned). Speed up icalls a bit.
16037 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
16039 * mini.c (mono_jit_compile_method_with_opt): Make sure that
16040 we run .cctor in the current domain instead of target_domain.
16042 Fixes bug #58558, .cctor not being called in -O=shared.
16044 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16046 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
16048 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
16050 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
16051 which can be done with an imm8, do it that way.
16052 (mono_arch_output_basic_block): ditto for a jmp
16053 (mono_arch_emit_prolog): Computate maximum offset of a label.
16055 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
16057 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
16058 now tries to allocate prefered physical reg's for virtual
16059 regs. This reduces the number of emited spills/loads with
16060 20-30% on our core assemblies.
16062 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16064 * jit-icalls.c: truncl() is not needed and trunc() is
16065 the correct thing to do anyway (bug #58287).
16067 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
16069 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
16072 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16074 * driver.c: enable loop optimizations by default.
16076 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16078 * mini-x86.c: fix calc of max loop size when aligning loops start.
16080 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
16082 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
16085 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
16087 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
16090 * basic-long.cs: Add tests for add/subtract of immediates with carry.
16092 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
16094 * mini.c (inline_method): Allways inline some wrappers even if the cost
16095 is too large. Fixes #58785.
16097 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
16099 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
16101 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
16102 (crichton@gimp.org). Beginning of support for sparc/linux.
16104 * mini-sparc.c: Optimize retrieval of LMF address.
16106 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
16108 * exceptions-ppc.c: handle alloca in methods with clauses.
16110 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
16112 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
16114 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
16116 * mini.c: Delegate most of the abort signal work to
16117 mono_thread_request_interruption, which also handles Stop and Suspend
16120 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
16122 * mini.c mini.h: Allow inlining of icall wrappers if the backend
16123 supports the save/restore lmf opcodes.
16125 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
16127 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
16128 by gcc-3.4 as well.
16130 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
16132 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
16134 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
16135 methods which contain array accesses.
16137 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
16138 boundaries. Fixes #58537.
16140 * iltests.il: Add regression test for #58537.
16142 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
16144 * mini-x86.c (mono_arch_local_regalloc): Last part of
16145 fix for bug #58633 (releasing register to early).
16147 2004-05-18 Miguel de Icaza <miguel@ximian.com>
16149 * basic-long.cs: Add new regression test.
16151 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
16153 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
16154 register too early on the chain.
16156 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
16158 * mini.c (create_helper_signature): Use a helper function to reduce
16159 the code which needs to be written. Also set the calling convention of
16160 icalls on windows. Fixes #57840.
16162 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16164 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
16165 exceptions-ppc.c: added helper function to get the instruction address
16166 from a signal handler context.
16168 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
16170 * helpers.c: use g_get_tmp_dir. Invokes happyness
16173 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
16175 * helpers.c: Add new env variable to pass args to objdump.
16176 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
16178 2004-05-17 Radek Doulik <rodo@ximian.com>
16180 * Makefile.am (common_sources): added abcremoval.h so it get
16181 disted and daily mono packages on go-mono.com will build again
16183 2004-05-17 Massimiliano Mantione <massi@ximian.com>
16185 * abcremoval.c: Fixed coding style, added copyright header.
16187 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
16189 * mini.h: Added prototype for abc removal main function.
16191 * build_relations_propagation_table.pl: Added copyright header.
16193 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
16195 * basic-long.cs: reg test for complex ceq_long bug.
16197 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
16199 * mini-x86.c (mono_arch_local_regalloc): Correctly free
16200 reg in long and clob case (bug #58343). Fixed/added comments.
16202 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
16204 * mini.c (mono_jit_runtime_invoke): Follow new convention
16205 of calling the invoke method with an function pointer.
16207 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
16209 * ChangeLog: Fix author of memory leak patch.
16211 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
16213 * Makefile.am: fix make dist as well...
16216 2004-05-14 Massimiliano Mantione <massi@ximian.com>
16218 * cfold.c: Made so that conversions from pointer to int4 are no-ops
16219 on archs where pointers are 4 bytes long.
16221 * Makefile.am: Added abcremoval.c source file.
16223 * abcremoval.c: Added abcremoval.c.
16225 * abcremoval.h: Added abcremoval.h.
16227 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
16229 * inssel.brg: Enabled bounds check removal.
16231 * mini.c: Added support for abcrem optimization.
16233 * mini.h: Added abcrem optimization label.
16235 * driver.c: Added support for abcrem optimization.
16237 * propagated_relations_table.def: Added propagated_relations_table.def.
16239 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
16241 * mini.c, cfold.c: fix style.
16243 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16245 * mini.c: handle issue with the low-level implementation of
16246 some long opcodes (bug #54209).
16248 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
16250 * basic.cs: test for my new cmov stuff.
16252 2004-05-13 Patrik Torstensson
16254 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
16255 opt and added peephole documentation.
16257 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
16259 * tramp-ppc.c: rewrote the generic trampoline code.
16261 2004-05-11 Patrik Torstensson
16263 * mini-x86.c: optimize long shl/shr asm code (one less branch)
16265 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
16267 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
16269 * mini.h mini.c dominators.c: Applied patch from Derek Woo
16270 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
16272 * mini.c: Add new icalls for AsAny marshalling.
16274 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16276 * tramp-ppc.c, mini-ppc.c: more cleanups.
16278 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16280 * mini.c: no warnings.
16282 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16284 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
16286 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
16288 * mini.c: In the thread abort signal handler, if the thread is in the
16289 process of being stoped, don't throw the Abort exception, just stop the
16292 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
16294 * tramp-ppc.c: removed old code.
16296 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16298 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
16299 do some simple speed optimizations on ppc.
16301 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16303 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
16304 and large offsets in load/store.
16306 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
16308 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
16309 it causes regressions.
16311 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
16313 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
16316 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16318 * jit-icalls.c: remove warnings.
16319 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
16320 speedups for unsafe code.
16322 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
16324 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
16326 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
16328 * basic-calls.cs: Add new regression test.
16330 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
16333 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
16335 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
16338 2004-05-06 Patrik Torstensson
16340 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
16341 long reg allocation in any reg (not only eax:edx) and implemented
16342 long shl/shr ops in asm instead of helpers.
16344 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
16346 * mini-sparc.h: Fix warnings.
16348 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
16351 * mini-exceptions.c (mono_handle_exception): Call the filter in a
16352 separate statement for clarity.
16354 * mini-sparc.c: Update status.
16356 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
16358 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
16361 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16363 * inssel-ppc.brg: another small pre-release workaround:
16364 we don't do overflow detection for long_sub_un.
16366 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16368 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
16369 (also works around a weird ppc bug: 57957).
16371 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
16373 * tramp-ppc.c: trampoline fixes.
16375 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
16377 * mini-ppc.c: fixed typos.
16379 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16381 * mini-ppc.c, exceptions-ppc.c: more code saves registers
16382 at the top of the stack. Fixed typos. Use a frame registers
16383 for all the methods with exception clauses.
16385 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16387 * exceptions-ppc.c: restore fp registers.
16389 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16391 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
16392 order from the stack top (moved the stack room to save the
16393 return value for trace after the param area). Fixed corruption
16394 in restoring registers on unwind.
16396 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16398 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
16400 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16402 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
16403 and prolog/epilog for methods that use it. Allow
16404 enough param area room for varargs methods. Fix miguel's
16405 breakage in exception handling.
16407 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16409 * Makefile.am: run genmdesc only on current arch.
16411 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16413 * exceptions-x86.c:
16414 * mini-x86.h: fix the build on windows.
16416 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
16418 * 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.
16420 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
16422 * mini-exceptions.c: New file.
16424 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
16425 Move some parts of the x86 exception handling code to an
16426 arch-independent file so it can be shared with other ports.
16428 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16430 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
16432 2004-04-26 David Waite <mass@akuma.org>
16434 * driver.c: remove comma from end of enumeration declaration
16436 2004-04-26 Jackson Harper <jackson@ximian.com>
16438 * driver.c: parse config file before loading first assembly. This
16439 allows the user gac to be enabled/disabled.
16441 2004-04-23 Miguel de Icaza <miguel@ximian.com>
16443 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
16444 simpler mechanism: we do not care what is encoded initially
16445 (branch absolute or relative), we care about the code and its
16446 target. I kept the old code for reference for now.
16448 The new code tries first to determine if the jump is anywhere in
16449 the -/+32 absolute meg range, if it succeeds, it encodes using the
16450 absolute branch; If not, it tried to find something in the
16451 relative range, if not, it uses the handle_thunk code.
16453 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
16455 * exceptions-ppc.c: use the correct ip register on macosx.
16457 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
16459 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
16461 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
16463 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
16464 Raise exception on integer divide by zero by hand since the hw
16465 doesn't support it. Handle NaNs in FP compares.
16467 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
16469 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
16470 code reducing duplication between the platforms and enabled
16471 signal exception handling (on linux for now).
16473 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
16475 * exceptions-ppc.c: more macosx support.
16477 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16479 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
16481 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
16483 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
16485 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
16487 * iltests.il: more tests.
16489 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
16491 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
16494 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16496 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
16498 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
16500 * liveness.c: Mark variables as volatile in all basic blocks reachable
16501 from exception clauses.
16503 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
16505 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
16508 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
16510 * iltests.il, basic.cs: more tests for regalloc.
16512 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
16514 * iltests.il: Some tests for register allocation modifications
16517 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
16519 * exceptions.cs: Add regression test for bug #56782.
16521 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
16522 original stack trace if an exception is rethrown. Fixes #56782. Oh,
16523 the beauty of fixing the same thing in 5 different files...
16525 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
16527 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
16530 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
16532 * mini.c: Add support for STRWLPARRAY marshalling convention.
16534 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16536 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
16537 to init the context to setup the regs pointer).
16539 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16541 * exceptions-ppc.c: more exceptions work.
16543 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16545 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
16548 2004-04-13 Miguel de Icaza <miguel@ximian.com>
16550 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
16551 can use the memory directly.
16553 * cpu-pentium.md: Update documentation from a post from Zoltan.
16555 add x86_add_membase, x86_sub_membase, x86_mul_membase
16557 2004-04-13 Miguel de Icaza <miguel@ximian.com>
16559 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
16560 GENERAL_REGS they were also hardcoded for all PPC ports.
16562 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
16564 Remove hard-coded limit for floating point registers, use
16565 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
16567 Notice that in MacOS X calling conventions you can fit a lot more
16568 floating point values in registers, so I should update the PInvoke
16569 test to excercise the passing of floating point values on the
16570 stack (currently broken).
16572 2004-04-06 Miguel de Icaza <miguel@ximian.com>
16574 * tramp-ppc.c (create_trampoline_code): Added
16575 JUMP_TRAMPOLINE_SIZE.
16576 (ppc_magic_trampoline): Follow the pattern from
16577 x86_magic_trampoline: if code is set to zero, return.
16578 (create_trampoline_code): Always pass MonoMethod to the jump
16579 trampoline, before it was passing a null.
16580 (mono_arch_create_jump_trampoline): Implement the jump stub, could
16581 share the code with mono_arch_create_jit_trampoline.
16583 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
16585 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
16588 * cpu-g4.md: Added length for jmp instruction, the worst case
16589 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
16592 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
16594 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
16596 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
16598 * mini.c: Only set bblock->real_offset when adding a new bblock, and
16599 before each IL instruction.
16601 * mini.c (CEE_BOX): Fix warnings.
16603 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16605 * mini.c: removed a few unused vars and extra whitespace.
16607 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
16609 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
16611 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
16613 (OP_GETCHR): use the above
16614 (CEE_LDELEMA): use the above.
16616 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
16617 version of the generic impl.
16618 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
16619 (CEE_LDELEMA): use the above.
16621 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
16623 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
16626 * iltests.il: Added new regression test for #56317.
16628 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
16630 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
16631 under NetBSD. Fixes #56450.
16633 * liveness.c (update_gen_kill_set): Fix previous patch.
16635 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16637 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
16639 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
16641 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
16642 ldsfld and ldsflda.
16644 * inssel-sparc.brg: Add more optimizations.
16646 * mini-sparc.c: Replace multiply/divide with shifts if possible.
16648 2004-04-01 Martin Baulig <martin@ximian.com>
16650 * mini.c (handle_box): New static function; moved the
16651 implementation of CEE_BOX here.
16652 (mono_method_to_ir): Added `constrained_call' variable.
16653 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
16654 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
16655 mono_method_get_constrained() to get the method.
16657 2004-04-01 Martin Baulig <martin@ximian.com>
16659 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
16660 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
16661 (mono_method_to_ir): We don't need these macros anymore since
16662 mono_class_get_full() already takes care of it.
16664 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16666 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
16667 use @function (as doesn't accept #function here) and check the return
16668 value of system and stop if fails.
16670 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16672 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
16674 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
16676 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
16678 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
16680 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
16683 * basic-long.cs: Add test for negation of Int64.MinValue.
16685 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
16687 * mini-sparc.c: Update status.
16689 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
16691 * exceptions-sparc.c: Fix return value in filters.
16693 * inssel-sparc.brg: Fix register allocation in some rules.
16695 2004-03-28 Martin Baulig <martin@ximian.com>
16697 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
16700 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
16702 * mini-x86.c (mono_arch_patch_code): Fix warnings.
16704 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
16705 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
16706 remove unused conv_u4 opcode.
16708 * mini-x86.c: Remove valgrind workaround since it slows down things
16709 even when mono is not run under valgrind.
16711 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
16713 * mini-sparc.c: Update status.
16715 * inssel-sparc.brg: Add some optimizations.
16717 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
16718 future delay slot filling. Add support for varargs, tail calls and JMP.
16720 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
16721 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
16723 * inssel.brg: Fix register allocation in OP_ARGLIST.
16725 * inssel.brg: Fix warnings.
16727 2004-03-25 Martin Baulig <martin@ximian.com>
16729 * mini.c (inflate_generic_field): Removed.
16730 (mini_get_method): Removed, use mono_get_method_full(),
16731 (mini_get_class): Removed, use mono_class_get_full().
16732 (mono_method_to_ir): Pass our generic context to
16733 mono_field_from_token().
16735 2004-03-25 Martin Baulig <martin@ximian.com>
16737 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
16738 of a `MonoMethod *'.
16739 (mini_get_method): Take a `MonoGenericContext *' instead
16740 of a `MonoMethod *'.
16741 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
16742 a new local variable called `generic_context' which holds the
16743 current `MonoGenericContext *'; use it to lookup things.
16745 2004-03-24 Martin Baulig <martin@ximian.com>
16747 * mini.c (mini_get_class): New static method; if we're inside a
16748 generic instance, inflate the class if neccessary.
16749 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
16751 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
16753 * iltests.il: New regression test for #55976.
16755 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
16758 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
16760 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
16763 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
16765 * liveness.c: Consider SSA stores as well as loads when making vars
16768 * exceptions.cs: New regression tests for register allocation.
16770 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
16772 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
16773 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
16774 domain lock only to protect puntual access to data structures.
16775 Added access lock for sighash, jit_icall_hash_name,
16776 jit_icall_hash_addr and domain->code_mp.
16778 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
16780 * driver.c: Print SIGSEGV handling method.
16782 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
16784 * mini.c (setup_jit_tls_data): Handle case when this is called
16785 multiple times for a thread.
16787 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
16788 is different from fbxx_un. Fixes #54303. Also use constants instead of
16789 magic numbers in a lot of places.
16791 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
16793 * exceptions.cs: Fix cctor test when --regression is used.
16795 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
16797 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
16800 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16802 * inssel-ppc.brg: fixed register assignments for some rules.
16804 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
16806 * exceptions.cs: Add test for exceptions in static constructors.
16808 * mini.c (mono_jit_compile_method_with_out): Move the calling of
16809 static constructors outside the domain lock. Fixes #55720.
16811 2004-03-17 Martin Baulig <martin@ximian.com>
16813 * mini.c (get_generic_field_inst): Removed, this'll never happen.
16814 (inflate_generic_field): Take the `MonoMethod *' instead of the
16815 `MonoClass *' and added support for generic method.
16816 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
16817 have a `field->parent->gen_params', only inflate the field if it's
16818 an open constructed type.
16820 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
16822 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
16823 exception object instead of the preconstructed ones.
16825 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16827 * mini.c: reverted changed to sigsegv_signal_handler commited
16828 accidentally in the previous patch.
16830 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16833 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
16834 running --aot with an old assembly.
16836 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
16838 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
16841 * mini-sparc.c: Add support for v9 branches with prediction.
16843 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
16845 * mini.c (mini_init): #warning is GNUC only
16847 * mini-sparc.h: implement __builtin_frame_address
16848 and __builtin_return_address for Sun C compiler
16850 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
16852 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
16854 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
16856 * basic-calls.cs: Add test for unaligned byref long argument passing.
16858 * mini-ops.h: Add sparcv9 compare and branch instructions.
16860 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
16861 v9 instructions if we have a v9 cpu.
16863 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
16864 registers for global allocation.
16866 * exceptions-sparc.c: Fixes.
16868 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
16870 * liveness.c (mono_analyze_liveness): Optimized version.
16872 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
16874 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
16877 * basic-float.cs basic-calls.cs: New regression tests.
16879 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
16881 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
16882 sigaltstack implementation.
16884 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
16886 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
16887 stuff if SIGSEGV_ON_ALTSTACK is not defined.
16889 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
16891 * mini.c: Fix warnings.
16893 * mini.c (mono_resolve_patch_target): New function which contains the
16894 arch independent part of the patching process.
16896 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
16897 patching code to a separate function.
16899 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
16901 * mini.c (add_signal_handler): ifdef out on Windows
16903 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
16905 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
16906 cpu-sparc.md: Add exception handling support + other fixes.
16908 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
16909 typed GC detection in --version.
16911 * basic.cs exceptions.cs: New regression tests.
16913 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
16914 the arch specific code can store data during a compilation.
16916 * mini-ops.h: Add OP_SETFRET.
16918 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
16919 function, register a separate icall for each arity, so the icalls can
16922 * mini.c (mono_print_tree): Print negative offsets in a more readable
16925 * mini.c: Make signal handling work on sparc.
16927 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
16929 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
16931 * jit-icalls.c: Emulate truncl by aintl on solaris.
16933 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
16935 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
16937 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
16939 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
16941 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
16942 a MarshalByRef type, inline a method that performs the check, taking into
16943 account that the object can be a proxy. Also implemented tow new opcodes:
16944 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16945 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
16946 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16948 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16950 * mini-ppc.c: if a relative branch displacement is too big
16951 but it points to and area reachable with an absolute branch,
16954 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16956 * mini.c: optimize small copies in cpblk.
16958 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
16960 * basic-calls.cs basic-float.cs: New regression tests.
16962 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
16963 negative offsets from %fp. Implement localloc. Fix local register
16964 allocation. Fix the case when the this argument needs to be saved to
16965 the stack. Implement some missing opcodes.
16967 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
16969 * mini.c (mini_method_compile): Reenable global regalloc in methods
16970 with exception handlers.
16972 * linear-scan.c (mono_varlist_sort): Fix warning.
16974 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
16976 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
16979 * liveness.c: Make all variables uses in exception clauses volatile, to
16980 prevent them from being allocated to registers. Fixes #42136.
16982 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
16984 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
16985 causes regressions.
16987 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
16988 argument to mono_arch_regalloc_cost.
16990 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
16993 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
16995 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
16996 Make the cost of allocating a variable to a register arch dependent.
16998 * basic-calls.cs: Fix compilation of tests.
17000 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
17001 helper function to cut back on the number of #ifdefs needed.
17003 * mini-ppc.c: Fix compilation.
17005 * basic-calls.cs: New regression tests.
17007 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
17009 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
17010 of l0 since that is callee saved.
17012 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
17015 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
17016 of delay instruction.
17018 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
17020 * mini.h (MonoCallInst): Add 'virtual' flag.
17022 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
17024 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
17026 * *.cs: New regression tests.
17028 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
17031 * mini.c (mono_runtime_install_handlers): Fix build.
17033 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
17034 'signal_stack_size' members.
17036 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
17037 alternate signal stack.
17039 * exceptions-x86.c: Add stack overflow handling.
17041 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
17042 functions to arch independent code.
17044 * mini.c (mono_print_tree): Print more detailed info for load_membase
17047 2004-02-23 Martin Baulig <martin@ximian.com>
17049 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
17051 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
17053 * mini-x86.c: fixed reg allocation for div/rem.
17055 2004-02-22 Miguel de Icaza <miguel@ximian.com>
17057 * driver.c (mono_main): Report some configuratio options on --version.
17059 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
17061 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
17062 low in the address space. Correctly flush memory in thunks where we
17063 output native code.
17065 2004-02-20 Martin Baulig <martin@ximian.com>
17067 * mini.c (mini_get_method): New static method; inflate all generic
17068 methods and methods in open generic instances.
17069 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
17070 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
17072 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
17074 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
17076 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
17078 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
17080 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
17082 * mini-sparc.c (flushi mono_arch_output_basic_block): make
17083 it compile using Sun's compiler.
17085 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
17087 * 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.
17089 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
17091 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17093 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
17095 * mini-ppc.c: handle calls outside of the allowed range with thunks
17096 allocated using the code manager.
17097 * tramp-ppc.c: use the code manager to hold generated native code.
17098 Fixed the magic trampoline to just patch vtable entries.
17100 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
17102 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
17105 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
17107 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
17110 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
17111 if we have a working __thread implementation.
17113 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
17114 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
17116 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
17118 * mini-x86.c: Fix compilation under gcc 2.
17120 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
17122 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
17123 contains a call to the wrapped function.
17125 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
17126 OP_<CALL>_IMM opcodes, and use them under X86.
17128 * mini.c (mono_jit_find_compiled_method): Fix warning.
17130 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
17132 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
17134 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
17135 functionality to mini.c.
17137 * mini.c (mono_create_jump_trampoline): New function to create a jump
17138 trampoline. Return a compiled method instead of a trampoline if it
17139 exists. Add a cache for jump trampolines.
17141 * mini.c (mono_jit_find_compiled_method): New function to return a
17142 compiled method if it exists.
17144 * mini-x86.c: Call mono_create_jump_trampoline instead of
17145 mono_arch_create_jit_trampoline.
17147 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
17148 a jump trampoline. Fixes #52092.
17150 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
17152 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
17153 which is not up-to-date. Add check_corlib_version () instead.
17155 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
17158 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
17159 since newer valgrind versions do not need it.
17161 * mini.c (mono_jit_compile_method_with_opt): New helper function to
17162 compile a method with a given set of optimizations.
17164 * mini.c: Compile icall wrappers on-demand instead of at startup.
17166 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
17167 wrapper for an icall.
17169 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
17171 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
17174 * iltests.il: Add test for non-empty stack before switch instruction.
17176 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
17178 * mini.c: Add support for new stringbuilder marshalling conventions.
17180 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
17182 2004-02-01 Martin Baulig <martin@ximian.com>
17184 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
17185 in `ginst->mtype_argv'.
17187 2004-01-31 Miguel de Icaza <miguel@ximian.com>
17189 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
17190 facilitate grepping.
17192 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
17194 * mini.c: fixed buglet in initobj generic implementation for references.
17196 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
17198 * Makefile.am: make the version script conditional.
17199 * jit-icalls.c: handle missing truncl().
17201 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
17203 * exceptions.cs: Add more tests for double->int conversion.
17205 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
17206 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
17208 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
17210 * driver.c: make --verbose --version emit an error
17211 if the loaded corlib doesn't match the runtime version.
17213 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17215 * mini-ppc.h: export ppc_patch().
17216 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
17217 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
17218 on par or better than on MacOSX.
17220 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
17222 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
17223 mono_lookup_pinvoke_call.
17225 * mini-x86.c: Under windows, the default pinvoke calling convention is
17226 stdcall. Fixes #52834.
17228 * mini.c (optimize_branches): Add an upper bound to the number of
17229 iterations to prevent infinite loops on strange loops. Fixes #53003.
17231 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
17233 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
17234 and ISINST. Fixes #52093.
17236 * objects.cs (test_0_vector_array_cast): New tests.
17238 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
17240 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
17241 checking in Array.Set ().
17243 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
17246 * object.cs (test_0_multi_array_cast): New regression test.
17248 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
17250 * exceptions-ppc.c: fix build on Linux/PPC.
17252 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
17254 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
17255 running under valgrind.
17256 (x86_magic_trampoline): Fix build bustage.
17258 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
17259 negative values as well. This is needed for the encoding of the line number
17260 info, since sometimes the line numbers are not in increasing order.
17262 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
17264 * cpu-pentium.md (localloc): Increase the size of the localloc
17265 instruction since it is a loop under Win32.
17267 * debug-mini.c (record_line_number): Get rid of unneccesary memory
17270 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
17272 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
17273 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
17274 Max Horn (max@quendi.de). Fix file names in comments.
17276 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
17278 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
17279 avoid stack overflow.
17280 (replace_usage): Avoid uninitialized variable warnings.
17282 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
17283 and taking the address of valuetype variables.
17285 2004-01-03 Patrik Torstensson
17287 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
17288 for other purposes than FP later on.
17290 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
17292 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
17295 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17297 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
17299 2003-12-30 Patrik Torstensson <p@rxc.se>
17301 * mini-x86.h: Decreased number of availiable fp regs.
17302 Solves corner cases with FP spilling.
17304 2003-12-23 Patrik Torstensson <p@rxc.se>
17306 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
17307 for floating point stack tracking / spilling on x86.
17310 * basic-float.cs: added float mul overflow test.
17312 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
17314 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
17316 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17318 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
17319 supports for cond branches that overflow the immediate
17320 overflow offset. mcs can compile simple programs.
17322 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17324 * exceptions-ppc.c: exception handling support wip:
17325 finally handlers get run on exception.
17327 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
17329 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
17332 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17334 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
17335 initial support for stack walking and unwinding.
17337 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
17339 * driver.c (mono_main): Make corlib-out-of-sync message more
17340 descriptive. Also remove verify_corlib call.
17342 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17344 * mini.c: make CEE_NEWARR calls and other emulated opcodes
17345 not overlap with other call's arguments, too.
17347 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
17349 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
17350 move to arch-specific code the choice of arch-specific
17351 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
17352 * mini.c: ensure emulation calls will not interleave
17355 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
17357 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
17358 the magic trampoline stack frame is dropped before executing
17361 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17363 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
17364 and integer to fp conversions. Added support for overflowing
17365 arguments on the stack. Reserve a couple more registers as temps.
17366 Added support for aot compilation (as output still needs to be
17369 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17371 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
17372 Don't overwrite return register in some corner cases.
17374 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
17376 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
17377 static constructors when AOT compiling.
17379 * driver.c (mono_main): Call mono_check_corlib_version.
17381 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17383 * cpu-g4.md, basic.cs: fixed div target register.
17385 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
17387 * mini-ppc.c, basic.cs: shl_imm fix with test.
17389 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17391 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
17392 structures by value. Misc fixes.
17393 * objects.cs: more tests.
17395 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
17397 * mini-ppc.c: lconv.ovf.i implemented.
17399 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17402 (mini_init): don't error out if someone already called g_thread_init.
17404 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17406 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
17407 to be any type per the spec. Fix abnormal memory usage when
17408 the same object is repeatedly thrown.
17410 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
17412 * mini.c: check for overruns in IL code.
17414 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
17416 * TODO: Add/remove some todo entries.
17418 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
17420 * driver.c (mono_main): Call mono_verify_corlib.
17422 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
17424 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
17425 This has been moved to mini.c
17426 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
17427 type being casted is marshalbyref it could be a proxy, so instead of
17428 emitting the type check code, emit a call to a runtime method that will
17429 perform the check by calling CanCastTo if needed.
17431 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
17433 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
17434 methods with large stack frames under Win32.
17436 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
17438 * Makefile.am: Distribute regression tests.
17440 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
17441 at the end instead of inserting each variable into the sorted list.
17443 * linear-scan.c (mono_varlist_sort): New helper function.
17445 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17447 * mini.c: ensure arguments and locals are within bounds.
17449 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17451 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
17454 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
17456 * mini.c (mono_cprop_copy_values): Fix crash.
17458 * aot.c: Set verbosity back to 0.
17460 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17462 * regalloc.c: complete memory leak fix by Laurent Morichetti
17465 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
17467 * driver.c (main_thread_handler): Revert the previous patch.
17469 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
17472 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
17473 memory from the memory pool.
17475 * driver.c (main_thread_handler): Turn on all optimizations when
17478 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
17479 an array for better performance.
17481 * regalloc.c (mono_regstate_assign): Fix memory leak.
17483 * debug-mini.c (mono_debug_serialize_debug_info): New function to
17484 serialize the debug info.
17486 * debug-mini.c (mono_debug_add_aot_method): New function to load the
17487 debug info from the serialized representation.
17489 * aot.c: Save debug info into the generated file and load it when
17492 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17494 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17496 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
17497 More FP-related fixes.
17499 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17501 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
17502 and register allocation buglet. Hello world now runs.
17504 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17506 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
17507 * tramp-ppc.c: fixed class init trampoline.
17508 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
17510 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17512 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
17513 mini.c: more ppc changes/fixes.
17515 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
17517 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
17518 Also optimize the case when the arguments are the same in the caller
17521 * iltests.il: Add tests for tail calls with valuetype arguments.
17523 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17525 * mini-ppc.c: fixes for struct return type.
17527 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
17529 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17530 mono_spillvar_offset() to arch-specific code.
17532 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17534 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
17536 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
17538 * exceptions-x86.c: Fix stack space leaks.
17540 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
17541 registers from the lmf if the method has save_lmf set.
17543 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
17545 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
17546 of icall wrappers into InvokeInDomain, since these are now per-domain.
17548 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
17550 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
17551 make some opcode emulation and intrinsic ops enabled/disabled
17552 according to the architecture. More fixes.
17554 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17556 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
17558 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17560 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17561 arch-specific handling for 'this' and struct return type to
17562 arch-specific code.
17564 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17566 * aot.c: prevent divide by zero error when reporting (it happened with
17567 Accessibility.dll).
17569 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
17571 * mini.h (inst_switch): Remove unused macro.
17573 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17576 (load_aot_module): free 'info->methods' and 'info' properly. No more
17577 "free(): invalid pointer blah" messages when you have an old aot
17580 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
17582 * jit-icalls.c, mini.c: Added support for context static fields.
17584 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
17586 * mini.c (mono_method_blittable): Methods which set LastError are not
17587 blittable either. Fixes #51108.
17589 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17591 * mini.c: flush icache.
17592 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
17594 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
17596 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
17598 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
17600 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
17603 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
17606 * inssel.brg (CEE_MKREFANY): Fix AOT case.
17608 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
17610 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
17611 instruction when the result is discarded.
17613 * iltests.il (test_0_div_regalloc): New regression test.
17615 * arrays.cs: Fix compilation error.
17617 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
17619 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
17620 float rules to inssel-x86.brg: sane architectures with FP registers
17621 don't need to implement these rules.
17623 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17625 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
17627 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17629 * mini.h, inssel-long32.brg: fixed endianess issues in int64
17630 implementation of 32 bit systems.
17632 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17634 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
17635 (Jeroen Zwartepoorte).
17637 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
17639 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
17640 the caller and the callee matches.
17642 * mini.c (mono_method_to_ir): Add comment.
17644 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
17645 signbit is missing on some platforms.
17647 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
17649 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
17651 * mini.c (setup_jit_tls_data): Call the new function.
17653 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
17655 * mini-x86.c: Add experimental support for fast access to the lmf
17656 structure under NPTL/Linux 2.6.x.
17658 2003-11-06 Martin Baulig <martin@ximian.com>
17660 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
17661 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
17664 2003-11-02 Martin Baulig <martin@ximian.com>
17666 * mini.c (inflate_generic_field): New static method.
17667 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
17668 generic instance and the field is declared in a generic type, call
17669 inflate_generic_field() to inflate it. Fixes gen-28.cs.
17671 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
17673 * mini.h mini.c (mono_method_same_domain): New function to return
17674 whenever the caller and the callee are in the same domain.
17676 * tramp-x86.c (x86_magic_trampoline): Use the new function.
17678 2003-10-30 Martin Baulig <martin@ximian.com>
17680 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
17681 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
17683 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
17684 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
17686 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
17688 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
17691 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
17692 object here, so it is in the correct appdomain etc.
17694 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
17696 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
17698 (mono_method_to_ir): Avoid freeing the type created returned from
17699 mono_type_create_from_typespec, since it is put into an internal cache
17700 by the function. Fixes pointer.exe.
17702 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
17703 trampolines for icalls and pinvokes as well. Fixes #33569.
17705 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
17707 * mini.c: Update after appdomain changes.
17709 * mini.c (mono_jit_compile_method_inner): Allways compile native
17710 method wrappers in the root domain, since there can only be one
17711 instance of them, whose address is stored in method->info.
17713 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
17715 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
17716 environment variable. Instead detect automatically whenever running
17717 under valgrind using the magic macro RUNNING_ON_VALGRIND from
17720 2003-10-16 Miguel de Icaza <miguel@ximian.com>
17722 * trace.c, trace.h: New files that implement the new trace option
17725 * driver.c: Document new --trace options.
17727 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
17730 - if (mono_jit_trace_calls)
17731 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
17733 * mini.h: prototypes.
17735 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
17737 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
17739 * mini.c inssel.brg: Implement typedefbyref opcodes.
17741 * mini.c (mono_jit_compile_method): Remove unused local variable.
17743 * mini.c (mono_jit_compile_method_inner): Ditto.
17745 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
17747 * tramp-x86.c (x86_class_init_trampoline): Fix build.
17749 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
17751 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
17753 * mini.c (mono_no_aot): Remove unused global variable.
17755 * mini.c: Thread safety fixes.
17757 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
17759 * mini.c (mono_create_class_init_trampoline): Add a lock around
17760 class_init_hash_addr.
17762 * arrays.cs (test_0_newarr_emulation): Add new regression test for
17765 * mini.c: Decompose the NEWARR instruction before decomposing its
17766 arguments. Fixes #30073.
17768 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
17770 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
17773 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
17775 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
17777 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
17779 * driver.c: Add support for compiling icall wrappers to --compile.
17781 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
17783 * inssel.brg: The empty value in class->interface_offsets is -1, not
17786 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
17788 * objects.cs: New test for 'is' operator on an array of interfaces.
17790 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17792 * tramp-ppc.c: update trampoline code to support jumps
17793 and class initialization.
17795 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
17797 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
17799 * inssel.brg (OP_UNBOXCAST): Fix #46027.
17801 * inssel.brg (OP_UNBOX): Remove unused rule.
17803 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
17804 region instead of one for each method. Fixes #47813.
17806 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
17808 * exceptions.cs (test_0_nested_finally): New regression test for
17809 nested exception handlers.
17811 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
17813 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
17815 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
17818 * mini.c (mono_method_check_inlining): Make the inlining limit
17819 configurable by an environment variable.
17821 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
17823 * mini.h: Bump AOT file version.
17825 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
17826 token, store the image along with the token, since the token might not
17827 refer to the same image as the method containing the relocation,
17828 because of inlining.
17830 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
17832 * mini.c (mono_precompile_assemblies): New function to compile
17833 all methods in all loaded assemblies.
17835 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
17837 * regalloc.h regalloc.c (MonoRegState): Change the type of
17838 iassign and fassign to int*, since they can contain large negative
17839 values if the register is spilled. Also added some comments. Fixes
17842 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
17843 under Win32. Fixes #42964.
17845 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
17847 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
17849 * aot.c: Added support for AOT compiling methods which contain calls
17850 to wrappers. Currently, only remoting-invoke-with-check wrappers are
17853 * driver.c (compile_all_methods): Run the compilation in a thread
17854 managed by mono. Fixes #44023.
17856 * mini.c (mono_codegen): Print full method name in verbose output.
17858 * mini-x86.c (mono_arch_patch_code): Fix warning.
17860 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
17861 jumps, since the method we are jumping to might be domain-specific.
17863 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
17865 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17867 * inssel.brg: string chars are unsigned.
17869 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
17871 * TODO: New todo item.
17873 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
17874 which calls mono_runtime_class_init and patches the call site to
17875 avoid further calls.
17876 (mono_arch_create_class_init_trampoline): New arch specific function
17877 to create a class init trampoline.
17878 (create_trampoline_code): Generalized so it can create
17879 class init trampolines as well.
17881 * mini.c (helper_sig_class_init_trampoline): New helper variable.
17882 (mono_create_class_init_trampoline): New function to create and cache
17883 class init trampolines.
17884 (mono_find_class_init_trampoline_by_addr): New function to lookup the
17885 vtable given the address of a class init trampoline. Used by the
17887 (mono_codegen): Generate a call to a trampoline instead of
17888 mono_runtime_class_init in LDSFLD[A].
17889 (mono_codegen): Add relocations for the new trampoline.
17891 * mini.h mini-x86.c aot.c: Added a new relocation type:
17892 MONO_PATCH_INFO_CLASS_INIT.
17894 * mini.h: Bump AOT version number.
17896 * aot.c: Create a copy of the loaded code instead of using the original
17897 so methods which call each other will be close in memory, improving
17900 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
17901 patch since it breaks the regression tests.
17903 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
17904 for the register saving instruction sequence since the
17905 frame_state_for function in glibc 2.3.2 don't seem to detect it.
17907 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
17909 * TODO: Fix todo item && remove another.
17911 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
17913 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
17916 * aot.c: Moved the check for MONO_LASTAOT into the initialization
17917 function of the module.
17919 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
17920 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
17921 --no-aot command line option.
17923 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
17925 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
17926 by Bernie Solomon (bernard@ugsolutions.com).
17928 * inssel.brg: Refactor the interface offset table related code into
17929 its separate functions and add support for the AOT case.
17931 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
17933 * aot.c (mono_aot_get_method_inner): Fix memory leak.
17935 * aot.c: Added mono_aot_verbose variable and made all debugging
17936 output depend on the value of this variable.
17938 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
17939 method_label and info_label.
17941 * mini.h mini-x86.c aot.c: Added a new relocation type
17942 MONO_PATCH_INFO_IID for klass->interface_id.
17944 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
17945 the MonoJitInfo structure.
17947 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
17948 a non-root appdomain in shared mode.
17950 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17952 * aot.c: make aot loader less verbose. Remove free of unused variable.
17954 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
17956 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
17958 * .cvsignore: Added *.dll.
17960 * mini.c (mono_print_tree_nl): New function callable while debugging.
17962 * mini.c (mono_print_code): Export this.
17964 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
17967 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
17969 * mini.h (MonoCompile): Added 'jit_info' field.
17971 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
17972 the cfg structure, since it is needed by the AOT compiler.
17974 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17976 * aot.c: A major rewrite. Changes include:
17977 - save exception tables for methods which have them.
17978 - cache failed lookups in aot_get_method () to avoid the (slow) calls
17979 to g_module_symbol.
17980 - reworked the file format so it is now much smaller and needs
17981 fewer relocation entries.
17983 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
17985 * aot.c (load_aot_module): Fix build bustage on platforms without
17988 2003-09-04 Martin Baulig <martin@ximian.com>
17990 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
17992 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
17994 * TODO: Some new optimization ideas.
17996 * aot.c: Move AOT module loading logic here from mono_assembly_open.
17998 * aot.c: Save the optimization flags used to compile the code into
18001 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
18002 support emitting domain specific code.
18004 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
18005 no longer domain neutral. It can be made domain neutral by compiling
18006 with --optimize=shared.
18008 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
18009 between appdomains.
18011 * driver.c mini.h mini.c: New --no-aot debugging option which disables
18012 loading of AOT code.
18014 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
18016 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
18017 if there is no domain neutrality information.
18019 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
18021 * aot.c (mono_compile_assembly): Emit a symbol containing the file
18022 format version into the generated library.
18024 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
18025 callee method into the caller since one of them could be shared.
18027 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
18028 system exceptions from AOT code now works.
18030 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
18031 method if it is domain neutral and the callee is not.
18033 * graph.c (cfg_emit_one_loop_level): Fix warning.
18035 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
18037 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
18040 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
18042 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
18043 is needed by code which is executed before mono_runtime_init ().
18044 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
18046 * mini.c (mono_thread_abort): Fix warning.
18047 (mono_jit_compile_method): Call static constructor in the AOT case too.
18049 * aot.c (mono_compile_assembly): Fix warning.
18051 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18053 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
18055 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
18057 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
18059 * cpu-pentium.md: Fix the length of call opcodes so they include the
18060 ESP restoring instruction. Fixes #47968.
18062 2003-08-28 Martin Baulig <martin@ximian.com>
18064 * mini-x86.c (mono_arch_call_opcode): Added support for
18065 MONO_TYPE_GENERICINST.
18067 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
18069 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
18071 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
18072 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
18074 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
18077 2003-08-26 Martin Baulig <martin@ximian.com>
18079 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
18080 when reporting an error, set this to the actual error location.
18081 (mono_method_to_ir): Report the correct error location if
18082 get_basic_blocks() returned an error.
18084 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
18086 * mini.c (mono_type_blittable): OBJECT is not blittable.
18087 (mono_method_blittable): Methods which have marshalling descriptors
18088 are not blittable either. Fixes #47842.
18090 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
18092 * driver.c mini.c: Use an environment variable instead of a global
18093 variable. Also fix the build.
18095 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
18096 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
18099 * driver.c mini.c: Added --with-valgrind option to turn off some
18100 code which prevents mono from running under valgrind.
18102 * mini.c (mono_emit_call_args): Fixed warning.
18104 * mini.c (mono_emulate_opcode): Fixed warning.
18106 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18108 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
18109 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
18110 regalloc.c, regalloc.h: specify available registers in arch-specific
18111 code and support floats in the regallocator (patch by Laurent Morichetti
18114 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18116 * mini.c: mono_thread_current() can be called only after
18117 mono_runtime_init(): rearrange code to not call it early on.
18119 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18121 * mini.c: allocate jump tables in the code mempools.
18123 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18125 * mini.c, mini.h: make sure per-thread data allocated by the jit is
18128 2003-08-10 Miguel de Icaza <miguel@ximian.com>
18130 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
18131 12 to 16. This fixes bug #47453.
18134 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18136 * mini-ppc.c: fixed indexed load and unsigned compares.
18138 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
18140 * mini.c: reenabled installation of handler for
18141 thread abort signal.
18143 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18145 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
18146 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
18147 until it's fixed and actually useful.
18149 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18151 * inssel-long32.brg: couple more opcodes implemented.
18153 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18155 * mini-sparc.c: Even more opcodes implemeted.
18157 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
18159 * mini-sparc.c: More opcodes implemented.
18161 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
18163 * mini-sparc.c: More opcodes implemented.
18165 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18167 * inssel-sparc.brg: Add some needed rules. Direct
18169 * Makefile.am: Use inssel-sparc.brg
18170 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
18171 an assert happy for now.
18173 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
18175 * mini-sparc.c: Fixed compile errors.
18176 * exceptions-sparc.c: Same. We now produce a mono binary
18177 on sparc-linux. Yea.
18179 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
18181 * mini-sparc.c: Renamed registers. Also some macro cleanups.
18182 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
18183 They compile, but do not work.
18185 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18187 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
18188 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
18189 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
18192 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18194 * mini.c: more opcodes implemented and better support for generics.
18196 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18198 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
18199 * mini.c, mini.h: first cut at generics support: some new instructions
18200 added and changed the behaviour of some of the existing ones.
18202 2003-07-21 Miguel de Icaza <miguel@ximian.com>
18204 * mini.c: Removed definition of metadata_shared mutex here.
18206 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18208 * mini-x86.c: make vararg calls work for instance methods.
18210 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18212 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
18213 returns the arguments in a separte list, now.
18215 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18217 * aot.c, mini.c: updates for array type representation changes.
18219 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
18221 * mini.c: register function to perform jit shutdown.
18223 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18225 * mini.c: use a faster allocator if possible.
18227 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18229 * aot.c: some cleanups and portability changes.
18231 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18233 * mini.c: use faster allocation for CEE_BOX if possible.
18235 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18237 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
18238 Moved inlined mempcy code to its own function so that is can be
18239 reused. Added an inline memset function as well (optimized initobj).
18240 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
18242 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18244 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
18246 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18248 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
18249 arch code can setup the cpu for CLR execution, if needed.
18250 We use it on x86 to set the precision of FP operations.
18252 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18254 * mini.c: disable some optimizations if we can guess they'll cost too
18255 much for a given method.
18257 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18259 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
18261 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18262 * mini.h mini.c mini-x86.c: Added instruction level coverage
18263 info collection support.
18265 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18267 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
18268 is now implemented in the profiling API. Get rid of a couple of
18269 unnecessary global variables.
18271 2003-06-15 Nick Drochak <ndrochak@gol.com>
18273 * basic-long.cs: tests for negative values for bigmul, and unsigned.
18274 * cpu-g4.md: add op_bigmul and op_bigmul_un
18275 * cpu_pentium.md: add op_bigmul_un
18276 * inssel-long32.brg: add rule for unsigned bigmul
18277 * mini-ops.h: define OP_BIGMUL_UN
18278 * mini-x86.c: THE BUG: handle (un)signed properly
18279 * mini.c: choose unsigned opcode if needed.
18280 This set of patches fixes bug #44291
18282 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
18284 * mini.c (optimize_branches): improved to handle all kinds of
18285 conditional branches.
18287 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18289 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
18290 don't raise exceptions.
18292 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18294 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
18295 to arch-specific files.
18297 2003-06-09 Martin Baulig <martin@ximian.com>
18299 * Makefile.am (libs): Added $(LIBGC_LIBS).
18301 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
18303 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
18304 and OP_ATAN (fixes bug#44293).
18306 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
18308 * Makefile.am, mini-x86.c: rename cpu description array to
18309 pentium_desc, since some compilers define the 'pentium' preprocessor
18312 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
18314 * mini.c (mini_select_instructions): add explicit branch if the
18315 following block is not the false target of a conditional branch -
18316 we need this with any optimization that reorder or remove bblocks
18318 * mini.c (optimize_branches): bug fixes
18320 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
18322 * mini.c (mono_method_to_ir): inline static readonly fields
18324 * ssa.c (fold_tree): start cfold support for long (very simple
18327 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
18329 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18331 * inssel.brg: fixed memcpy (bug #44219).
18333 2003-06-05 Dick Porter <dick@ximian.com>
18335 * driver.c: Set the glib log levels to not abort if g_message
18338 g_set_prgname() has to happen before mini_init() so that the
18339 process handle gets the info.
18341 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18343 * driver.c: add intrins to the default optimizations to get wider
18346 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18348 * mini.h: some large basic blocks will overflow a 16-bit
18349 integers for symbolic registers.
18351 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
18353 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
18354 (mono_arch_output_basic_block): fix bug 43499
18356 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18358 * mini.c: kill duplicated definition of mono_debug_format.
18360 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18362 * mini-x86.c, arrays.cs: fixed register allocation bug.
18364 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
18366 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
18368 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
18370 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18373 (print_method_from_ip): also print source location information if
18376 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
18378 * mini.c (mono_find_block_region): bug fix in region code
18379 (mini_method_compile): enable removing unreachable code again, but
18380 only in methods without exception clauses.
18382 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18384 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
18385 Implemented arglist opcode and handling of TypedReference type.
18386 Fixed x86 call convention when a structure is returned.
18387 Minimal support for calling static vararg methods.
18389 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
18391 * mini.c (mini_method_compile): always remove unreachable code,
18392 because the code in them may be inconsistent (access to dead
18393 variables for example).
18395 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18397 * driver.c, debug-mini.c: warning fixes.
18399 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
18401 * Makefile.am, jit.h, mini.h: install header for embedding mono.
18403 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
18405 * mini.c: thread-static fields are registered in mono_class_vtable(),
18406 so ensure the function is called before checking for them.
18408 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
18410 * mini.c (optimize_branches): fix for bug 43586
18412 * jit-icalls.c (mono_llmult_ovf): added an additional check for
18413 overflow (fixes Bug #43639)
18415 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18417 * mini.c, objects.cs: allow the use of stobj for primitive types.
18419 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18421 * mini.c: be less strict about argument checking until we support
18422 running the verifier.
18424 2003-05-27 Nick Drochak <ndrochak@gol.com>
18426 * basic-long.cs: tests for (ulong)int * (ulong)int also
18427 * mini.c: use the same trick for (ulong)int * (ulong)int
18429 2003-05-27 Nick Drochak <ndrochak@gol.com>
18431 * basic-long.cs: add regression test for (long)int * (long)int
18432 * cpu-pentium.md: add op_bigmul specification
18433 * inssel-long32.brg: add OP_BIGMUL rule
18434 * mini-ops.h: add OP_BIGMUL
18435 * mini-x86.c: register allocator: handle case where src1 needs to be
18437 * mini.c: substitute special BIGMUL opcode in the tree for
18438 (long)int * (long)int
18440 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18442 * jit-icalls.c: call the type ctor on field access if needed.
18444 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18446 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
18447 to a method (including results of ldelema, bug#43207).
18449 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
18451 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
18452 colors to show exception handler blocks.
18454 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
18455 (fix for pinvoke7.cs).
18457 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18459 * mini.h, mini.c: ensure correct initialization order for types that
18460 require it. Prepare for lazy compilation of jit icall wrappers.
18461 Provide a name for opcode emulation to reduce unneeded mallocing.
18463 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18465 * mini-x86.c: better register restoring code and profiling
18466 support for tail calls.
18468 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18470 * mini.h, driver.c: prepare for leaf methods optimization.
18472 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18474 * mini.c: get targets of branches before converting a method.
18476 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
18478 * mini.c (optimize_branches): added some experimental code (disbaled)
18480 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
18482 * mini.c (optimize_branches): fix branch to branch optimization
18484 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
18486 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
18488 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
18490 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
18493 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
18495 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
18496 enable use of interface variables again.
18498 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
18499 I1 to registers because there is no simply way to sign extend 8bit
18500 quantities in caller saved registers on x86.
18502 * inssel-float.brg: set costs of some rules to 2 so
18503 that monobure always select the arch. specific ones if supplied,
18504 regardless of the order we pass the files to monoburg.
18506 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18508 * mini.c, mini-x86.c: since the magic trampoline for jumps
18509 can't patch the code directly, we do it as soon as the
18510 method gets compiled.
18512 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18514 * mini-x86.c, mini.h: introduce a new patching method
18515 to support CEE_JMP and tail calls.
18516 * mini.c: obey tail.call. Don't precompile methods target
18518 * tramp-x86.c: new trampoline code to handle methods
18519 reached through a jump.
18521 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
18523 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
18524 bit values to registers
18526 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
18528 * mini.c (mono_compile_get_interface_var): share interface
18529 variables if possible.
18531 2003-05-16 Martin Baulig <martin@ximian.com>
18533 * debug-mini.c (mono_init_debugger): New function to initialize
18534 the debugger. This is not in the debugger since it needs to
18535 access some of mini's internals.
18537 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
18539 * mini.c (mono_method_to_ir): inlining fixes/cleanups
18541 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
18543 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
18544 for value type handling.
18546 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
18548 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
18549 (mono_method_check_inlining): enable inlining of all kinds of wrappers
18551 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
18553 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
18554 the constructor through a proxy.
18556 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18558 * jit-icalls.c, inssel.brg: fixes to array element address
18561 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
18563 * mini-x86.c (is_regsize_var): allocate pointer to registers
18565 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18567 * driver.c: fixed typo, added intrins to the set of optimizations
18568 tested with regressions.
18570 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18572 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
18573 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
18576 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
18578 * inssel.brg: remove some common pop instructions without side effects
18580 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18582 * inssel-x86.brg: fixed thinko in int to double conversions.
18584 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18586 * mini.c, jit-icalls.c: added runtime thread-static variable support.
18588 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18590 * inssel-long32.brg: two more missing instructions.
18592 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
18594 * mini.c (mono_emit_call_args): set the cil_code for all arguments
18595 if not already set.
18597 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
18599 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
18602 * basic-float.cs: Added tests for negative zero.
18604 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18606 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
18607 a couple of missing operations for long casts, with test cases.
18609 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18611 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
18613 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
18615 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
18616 code size estimation.
18618 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
18620 * mini.c (mono_jit_create_remoting_trampoline): make it work with
18621 abstract methods (fix bug 42542)
18623 * aot.c: add ability to handle array types
18625 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
18627 * mini.c: Call the _specific versions of the object allocation
18628 functions if possible.
18630 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18632 * driver.c: call setlocale ().
18634 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18636 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
18639 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
18641 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
18643 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
18644 wrappers (fix bug 42122)
18646 2003-05-04 Martin Baulig <martin@ximian.com>
18648 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
18650 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
18651 s/mini_set_defaults/mono_set_defaults/g.
18653 2003-05-04 Martin Baulig <martin@ximian.com>
18655 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
18657 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18659 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
18660 (reported by Don Roberts).
18662 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18664 * mini.c: temporarily work around two bugs for this release.
18666 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18668 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
18669 that contains -export-dynamic and it makes using the ld script
18671 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
18673 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18675 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
18678 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18680 * mini.c: make sure leave calls all the needed finally blocks,
18681 even when the target jumps out of multiple exception clauses.
18683 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18685 * ldscript, Makefile.am: add linker script to reduce the number of
18686 exported symbols (should also fix the issues with libwine defining
18687 some of the same symbols in io-layer).
18689 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
18691 * driver.c (mini_main): Avoid assertion when no file name is given on
18694 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
18696 * driver.c: added --version/-V command line option.
18697 Added the inline optimization in the regression tests.
18699 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18701 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
18702 to the type in the method signature (fixes bug#42134).
18704 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
18706 * mini.c: when inlining, check this is not null only when needed (bug #42135).
18708 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
18710 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
18712 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18714 * driver.c: fixed bug #42100.
18716 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
18718 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
18720 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18722 * mini.c: moved most of the code required to do inlining to its own
18723 function so it can be reused. Inline also ctors if appropriate.
18725 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
18727 * Makefile.am: Link with -export-dynamic so shared libs loaded by
18728 the runtime can call mono API functions.
18730 2003-04-27 Martin Baulig <martin@ximian.com>
18732 * debug-mini.c (mono_debug_init_method): Added
18733 `guint32 breakpoint_id' argument; if the method has a breakpoint,
18734 send a notification to the debugger.
18736 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
18737 running in the Mono Debugger, just pass the breakpoint number to
18738 mono_debug_init_method().
18740 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
18742 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
18744 * mini.c: allow some more unsafe compares.
18746 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18748 * mini-x86.c, Makefile.am: make distcheck works (partially from
18749 a patch by Richard Lee <r.h.lee@attbi.com>).
18750 * regset.c, regset.h: removed, they are unused.
18752 2003-04-25 Dick Porter <dick@ximian.com>
18754 * driver.c: Usage reports the name as 'mono' not 'mini'
18755 * exceptions-x86.c: Build and run on freebsd
18757 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18759 * Makefile.am: install the program with the 'mono' name and
18760 the library as libmono instead of mini and libmini.
18762 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18764 * driver.c: provide the APIs for the embedding interface of the old jit.
18766 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
18768 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
18770 2003-04-23 Martin Baulig <martin@ximian.com>
18772 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
18774 * driver.c: Added `--debug' command line argument to enable
18777 2003-04-23 Martin Baulig <martin@ximian.com>
18779 * debug.[ch]: Removed. The code is now in
18780 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
18782 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
18785 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
18787 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
18789 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18792 (mini_cleanup): moved mono_runtime_cleanup call after the call to
18793 mono_domain_finalize.
18794 (mini_method_compile): use mono_method_profile* if the the option is
18797 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
18799 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18800 methods with their wrapper.
18802 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18803 methods with their wrapper.
18805 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
18808 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
18811 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
18814 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
18816 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
18818 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
18820 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
18821 of the mempool. This is slightly faster and uses less memory
18823 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18825 * mini.c: avoid O(n) allocation for variables.
18827 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18829 * mini.c: handle items on the stack after inlining methods.
18831 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18833 * mini.c: make the method->opcode optimization dependent
18834 on MONO_OPT_INSTRINS and do it lazily.
18836 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18838 * driver.c: print overall results at the end of regression run.
18840 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
18842 * inssel.brg: don't overwrite symbolic registers.
18844 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18846 * inssel-x86.brg: fix conversion from long to float.
18848 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
18850 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
18852 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
18854 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
18856 * driver.c: Added --print-vtable option as in the old JIT.
18858 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18860 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
18862 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18864 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
18866 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
18868 * mini.c regalloc.c regalloc.h: Fix memory leak.
18870 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
18872 * aot.c (mono_aot_get_method): register all used strings
18874 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18876 * mini.c: always intern strings references with ldstr at compile time.
18878 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18880 * Makefile.am: add BUILT_SOURCES.
18882 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18884 * driver.c: give a better error message when the assembly to execute
18885 doesn't have an entry point.
18887 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
18889 * Makefile.am: added hack for automake
18891 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
18894 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
18896 22003-04-07 Martin Baulig <martin@ximian.com>
18898 * Makefile.am: Added Makefile.am.
18900 * debugger-main.c: Removed, this is now in the debugger where it
18903 * mini.pc.in: Call this package `mini' for the moment.