1 2009-02-03 Zoltan Varga <vargaz@gmail.com>
3 * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
5 * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
6 the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
9 * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
10 the live ranges of variables.
12 * mini.h (struct MonoMethodVar): Add two fields containing the live range
13 of the variable in terms of native offsets.
15 2009-02-03 Rodrigo Kumpera <rkumpera@novell.com>
17 * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
19 2009-02-02 Mark Probst <mark.probst@gmail.com>
21 Contributed under the terms of the MIT/X11 license by Steven
22 Munroe <munroesj@us.ibm.com>.
24 * exceptions-ppc.c (restore_regs_from_context): Correct operand
25 order (offset then base reg) for ppc_load_multiple_regs.
26 (emit_save_saved_regs) Correct operand order for
27 ppc_store_multiple_regs.
28 (mono_arch_get_call_filter): Correct operand order for
29 ppc_load_multiple_regs.
31 * mini-ppc.c (emit_memcpy): Fix operand order for
32 ppc_load_reg_update and ppc_store_reg_update.
33 (mono_arch_output_basic_block): Correct operand order for ppc_lha.
34 (mono_arch_emit_epilog): Correct operand order for
35 ppc_load_multiple_regs.
37 * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
38 order for ppc_store_multiple_regs and ppc_load_multiple_regs.
40 2009-02-02 Mark Probst <mark.probst@gmail.com>
42 * cpu-ppc64.md: Fixed storer4_memindex length.
44 2009-02-02 Zoltan Varga <vargaz@gmail.com>
46 * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
49 * aot-compiler.c (emit_line_number_info): Optimize this.
51 2009-02-01 Zoltan Varga <vargaz@gmail.com>
53 * aot-compiler.c: Disassemble tokens in the IL disassembly.
55 * aot-compiler.c: Add debug info for methods without debug info by
56 emitting an IL file and having the line number info referencing that file.
58 * aot-compiler.c: Optimize the size of the generated line number info.
60 * aot-compiler.c: Emit line number info in xdebug mode.
62 * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
65 2009-01-31 Zoltan Varga <vargaz@gmail.com>
67 * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
69 * driver.c (mono_main): Enable debugging support automatically if XDEBUG
72 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
74 * basic-calls.cs: Test for the weird crash found on arm.
76 2009-01-31 Rodrigo Kumpera <rkumpera@novell.com>
78 * cpu-arm.md: Increase the size of storer8_membase_reg and
79 loadr8_membase_reg to 24 bytes to accomodate the extra add.
81 * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
82 OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
83 reg to LR otherwise we'll be loading/storing from just the offset.
85 2009-01-30 Miguel de Icaza <miguel@novell.com>
87 Question: if we are storing gint32's inside the "*native_offset",
88 should we change the signature to "gint32 *native_offset" to
89 ensure that we do not have type definition problems?
91 * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
92 an int * as this is what the other function expects, causes
93 problems with Freescale's compiler that defined int32_t to be a
94 long and makes int incompatible
96 2009-01-30 Miguel de Icaza <miguel@novell.com>
98 * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
99 filename conflict with bjam.
101 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
103 * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
104 as it might use decomposed ops.
106 2009-01-30 Zoltan Varga <vargaz@gmail.com>
108 * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
110 * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
113 * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
115 * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
118 * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
119 way registers are stored in MonoContext on arm.
121 * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
122 instead of locking so mono_get_cached_unwind_info () becomes signal safe.
124 * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
126 * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
128 * mini.c (mini_init): Register mono_isfinite.
130 * jit-icalls.c (mono_isfinite): New jit icall.
132 * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
134 * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
135 set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
138 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
140 * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
141 separate frame and stack pointers, so we must use FP to find the register
143 The FP reg is retrieved from the MonoContext::regs array.
145 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
147 * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
150 2009-01-30 Rodrigo Kumpera <rkumpera@novell.com>
152 * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
153 return R4 and R8 when not running under softfloat.
155 Fixes basic-calls.exe
157 2009-01-30 Zoltan Varga <vargaz@gmail.com>
159 * mini-arm.c: Implement some overflow opcodes.
161 2009-01-29 Miguel de Icaza <miguel@novell.com>
163 * ssa.c: handle another alloca.h
165 * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
166 PLATFORM_WIN32 for detecting if we have sigaction. Instead use
167 MONO_ARCH_USE_SIGACTION.
169 * aot-runtime.c, mini-exceptions.c: Replace platform define with
172 * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
174 * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
175 PPC targets as sigaction does not exist on all platforms, define
176 this on a per-platform basis.
178 Instead of erroring out if the platform is not defined, include
179 mini-ppc-os.h, and expect that the OS specific setting provides
180 the required information.
182 2009-01-30 Zoltan Varga <vargaz@gmail.com>
184 * aot-compiler.c: Fix --enable-minimal=aot.
186 2009-01-30 Zoltan Varga <vargaz@gmail.com>
188 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
191 2009-01-29 Zoltan Varga <vargaz@gmail.com>
193 * exceptions-arm.c: Fix warnings.
195 * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
198 * mini-x86.c: Fix --enable-minimal=jit build.
200 * mini.c: Really fix --enable-minimal=jit build.
202 * mini.c (construct_object_context_for_method): Move this outside
203 the DISABLE_JIT block to fix the --enable-minimal=jit build.
205 "Backported" of r124984 from 2.0 branch.
207 * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
209 "Backport" of r124977 + r124978 from 2.0 branch.
211 * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
212 to avoid calling mono_exception_from_token () from the throw trampoline.
213 (mono_arch_get_throw_exception_generic): call throw_exception_by_token
214 for throwing corlib exceptions, this fixes full-aot support for corlib
217 * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
219 2009-01-29 Miguel de Icaza <miguel@novell.com>
221 * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
222 part of the changes to split the code in mini into operating
223 system specific files.
225 This patch was done by copying mini.c to the respective files to
226 preserve SVN history.
228 2009-01-29 Zoltan Varga <vargaz@gmail.com>
230 * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
232 2009-01-28 Zoltan Varga <vargaz@gmail.com>
234 * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
235 remoting-invoke-with-check wrappers of shared methods.
237 * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
239 2009-01-27 Mark Probst <mark.probst@gmail.com>
241 * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
242 optimization if the top of stack is the last instruction in the
243 bblock. Otherwise it might have been used after its definition.
246 2009-01-27 Zoltan Varga <vargaz@gmail.com>
248 * mini-trampolines.c (mono_magic_trampoline): Print out the caller
249 method as well when get_vcall_slot () fails to match a code sequence.
251 * mini-arm.c: Fix the android build, which doesn't have
254 2009-01-26 Zoltan Varga <vargaz@gmail.com>
256 * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
259 2009-01-26 Rodrigo Kumpera <rkumpera@novell.com>
261 * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
263 2009-01-26 Zoltan Varga <vargaz@gmail.com>
265 * mini.c (mini_method_compile): Save the unwind info generated by the JIT
266 and put its id into jinfo->used_regs. This is only used on amd64,
267 which is currently the only platform generating unwind info.
269 * exceptions-amd64.c: Instead of unwinding based on a register mask, use
270 the dwarf unwinder. This is required to correctly handle async exceptions
271 like thread abort and stack overflows, which can happen while a method
272 is in the middle of its prolog or epilog.
274 * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
275 the unwind info belonging to an AOTed method.
277 * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
278 into cfg->unwind_ops.
280 * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
282 * mini.c (mini_init): Call mono_unwind_init ().
283 (mini_cleanup): Call mono_unwind_cleanup ().
285 * unwind.c: Add functions for managing a set of unwind info entries, allowing
286 unwind info to be shared between methods.
288 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
291 * exceptions-amd64.c (mono_arch_exceptions_init): Call
292 get_throw_pending_exception () to avoid initialization races.
294 * mini-exceptions.c (mono_exceptions_init): Call an arch specific
295 mono_arch_exceptions_init () function.
297 * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
299 2009-01-25 Zoltan Varga <vargaz@gmail.com>
301 * mini.c (mono_get_domain_intrinsic): New helper function.
302 (mono_get_thread_intrinsic): Ditto.
304 * mini-arm.c mini-ia64.c: Use the new helper functions.
306 * method-to-ir.c (mono_method_to_ir): Fix the comment for
307 the last constrained_call change, since it is needed in the non-AOT
310 * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
312 * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of
313 mono_get_lmf_addr () on arm eabi linux.
315 2009-01-24 Zoltan Varga <vargaz@gmail.com>
317 * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
318 code sequence which matches a non-virtual call.
320 2009-01-23 Mark Probst <mark.probst@gmail.com>
322 * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
325 2009-01-23 Zoltan Varga <vargaz@gmail.com>
327 * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
328 runtime-invoke wrappers, since they are also shared based on signature.
330 2009-01-22 Mark Probst <mark.probst@gmail.com>
332 * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
333 info from the (correct) context.
335 2009-01-22 Zoltan Varga <vargaz@gmail.com>
337 * unwind.c (mono_unwind_frame): Remove a stray g_free ().
339 * unwind.c (mono_unwind_frame): New function to unwind through a frame
340 using dwarf unwinding info. Not yet used.
342 * mini.c (mini_init): When using xdebug, disable freeing of domains.
344 2009-01-21 Mark Probst <mark.probst@gmail.com>
346 * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
349 * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
350 special case and handle mono_arch_delegate_invoke_impl() returning
351 function descriptors.
353 * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
354 trampolines return function descriptors, too.
356 2009-01-21 Zoltan Varga <vargaz@gmail.com>
358 * method-to-ir.c (handle_alloc): Avoid generic instances in the
359 out_of_line optimization.
361 2009-01-21 Martin Baulig <martin@ximian.com>
364 (MonoCompile): Added `disable_deadce_vars' to disable removing
368 (mini_method_compile): Set `cfg->disable_deadce_vars' when running
371 * liveness.c (mono_analyze_liveness): Don't remove any unused
372 variables if `cfg->disable_deadce_vars' is set.
374 2009-01-21 Mark Probst <mark.probst@gmail.com>
376 * method-to-ir.c: Only apply exception constructor optimization if
377 the the method actually belongs to an exception class. Fixes
380 2009-01-21 Zoltan Varga <vargaz@gmail.com>
382 * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
383 change inside a #ifdef __mono_ppc64__.
385 * aot-compiler.c (compile_method): Remove the previous limitation.
387 * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
388 on type variables in AOTed code.
390 * aot-compiler.c (compile_method): Skip generic methods having type
391 constraints on their generic parameters.
393 * aot-compiler.c (compile_method): Check for methods which cannot be
394 encoded inside RGCTX_FETCH patches as well.
396 * mini-exceptions.c (mono_print_thread_dump): Fix the windows
399 2009-01-20 Mark Probst <mark.probst@gmail.com>
401 * method-to-ir.c: Force the vtable variable in shared generic code
402 for the case that they might show up on a stack trace where they
405 * mini-exceptions.c: Save and use generic sharing info as well as
406 IP in stack traces to resolve shared generic instantiations.
408 2009-01-20 Zoltan Varga <vargaz@gmail.com>
410 * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
411 added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
413 2009-01-20 Mark Probst <mark.probst@gmail.com>
415 * method-to-ir.c: Do generic sharing for array constructors.
417 2009-01-20 Rodrigo Kumpera <rkumpera@novell.com>
419 * mini-exceptions.c (mono_print_thread_dump): Add information
420 about the thread state using wapi_current_thread_desc.
422 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
424 * basic-simd.cs: Tests for the new constructors.
426 2009-01-19 Rodrigo Kumpera <rkumpera@novell.com>
428 * mini-ops.h: Added OP_EXPAND_*
432 * mini-x86.c (mono_arch_output_basic_block): Same.
434 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
436 2009-01-19 Zoltan Varga <vargaz@gmail.com>
438 * iltests.il.in: Add a test for #467385.
440 2009-01-18 Rodrigo Kumpera <rkumpera@novell.com>
442 * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
443 thread been cleaned up is not the same currently in execution.
445 Fixes appdomain-unload crashes on windows, osx and linux variants
446 without the __thread keyword.
448 2009-01-18 Zoltan Varga <vargaz@gmail.com>
450 * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
451 (koush@koushikdutta.com). Implement this for android.
453 * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
456 * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
457 mono_marshal_get_write_barrier ().
459 2009-01-17 Rodrigo Kumpera <rkumpera@novell.com>
461 * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
462 of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
463 that pass them on a register pair.
465 This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
466 test was crashing due to that.
468 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
470 * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
471 trampoline code. Include ucontext.h only if available.
473 2009-01-15 Mark Probst <mark.probst@gmail.com>
475 * mini.c: mono_domain_lookup_shared_generic() takes an open method
476 and doesn't check whether it's sharable, like it was before
477 removing the shared generics hash. This brings IronPython
478 performance back to what it was before that change.
480 2009-01-14 Mark Probst <mark.probst@gmail.com>
482 * method-to-ir.c: Handle delegate invocation optimization earlier,
483 otherwise it would be handled (much more slowly) by the
484 final/sealed optimization.
486 2009-01-13 Zoltan Varga <vargaz@gmail.com>
488 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
489 domain is not set. Fixes #465864.
491 2009-01-12 Mark Probst <mark.probst@gmail.com>
493 * method-to-ir.c: Don't stop sharing of generic methods with catch
494 clauses - we already handle those.
496 2009-01-12 Mark Probst <mark.probst@gmail.com>
498 * mini.c, mini.h: lookup_generic_method() is now
499 mono_domain_lookup_shared_generic() and uses the jit_code_hash,
500 making the shared_generics_hash obsolete.
502 2009-01-12 Mark Probst <mark.probst@gmail.com>
504 * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
505 use the red zone. Make room on the stack first and then use it,
506 not the other way around.
508 2009-01-12 Zoltan Varga <vargaz@gmail.com>
510 * mini.c (mini_init): Call mono_xdebug_init ().
512 * aot-compiler.c (mono_xdebug_init): Make this non-static.
514 2009-01-11 Zoltan Varga <vargaz@gmail.com>
516 * TestDriver.cs: Add an --iter argument to run tests multiple times.
518 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
521 * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
522 debug+unwind info for trampolines.
524 * mini.c (mono_create_unwind_op): New helper function.
526 * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
528 2009-01-10 Zoltan Varga <vargaz@gmail.com>
530 * aot-compiler.c: Fix the build.
532 2009-01-09 Zoltan Varga <vargaz@gmail.com>
534 * Makefile.am: Update dtrace-prelink.sh location.
536 2009-01-08 Zoltan Varga <vargaz@gmail.com>
538 * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr
539 optimization. Fixes #464520.
541 2009-01-07 Bill Holmes <billholmes54@gmail.com>
543 * mini-amd64.c : Adding code to save/restore non-volatile registers
546 * exceptions-amd64.c : Adding code to save/restore non-volatile
549 Contributed under MIT/X11 license.
551 2009-01-07 Zoltan Varga <vargaz@gmail.com>
553 * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
554 __GNUC_MINOR__ which can break when the major version changes.
556 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
558 * basic-simd.cs: Add tests for usage of the sizeof opcode.
560 2009-01-07 Geoff Norton <gnorton@novell.com>
562 * helpers.c: Allow mono -v -v -v to work on darwin.
564 2009-01-05 Bill Holmes <billholmes54@gmail.com>
566 * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
569 Contributed under MIT/X11 license.
571 2009-01-05 Zoltan Varga <vargaz@gmail.com>
573 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
574 instead of directly accessing type->data.klass. Fixes #462016.
575 (mono_allocate_stack_slots_full): Ditto.
577 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
578 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
580 * aot-compiler.c (emit_plt): Fix ARM build.
582 2009-01-04 Zoltan Varga <vargaz@gmail.com>
584 * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
586 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
589 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
590 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
593 * iltests.il.in: Add a regression test.
595 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
597 * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
599 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
601 * basic-simd.cs: Add a regression test for #462457.
603 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
605 * mini-ops.h: Add a definition of XPHI.
607 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
609 * ssa.c (op_phi_to_move): Handle XPHI.
611 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
615 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
617 * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
619 2008-12-31 Geoff Norton <gnorton@novell.com>
621 * mini-ppc.c: The prolog size allocated can be too small for darwin
622 ppc32 under certain circumstances. Also fix a small logic bug.
624 2008-12-29 Zoltan Varga <vargaz@gmail.com>
626 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
627 while loading AOT methods.
629 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
630 since only the former is nulled out after a successful cast. This prevents
631 crashes with rethrown exceptions when using --debug=casts.
633 2008-12-24 Mark Probst <mark.probst@gmail.com>
635 * mini.h: New macro for checking whether a method is final,
636 i.e. whether the method or its class is marked final.
638 * method-to-ir.c: Use the new macro for all final-checks
639 consistently. Fixes the crash in the System.ServiceModel tests.
641 2008-12-23 Mark Probst <mark.probst@gmail.com>
643 * mini-exceptions.c (get_exception_catch_class): Corrected another
644 overly strict assertion.
646 2008-12-23 Mark Probst <mark.probst@gmail.com>
648 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
649 Clobbering it is not allowed because the caller might use it as
650 the vtable register in the interface call.
652 2008-12-19 Mark Probst <mark.probst@gmail.com>
654 * mini-exceptions.c (get_exception_catch_class): Corrected an
655 overly strict assertion.
657 2008-12-18 Mark Mason <mmason@upwardaccess.com>
659 * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
661 * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
663 * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
665 * cpu-mips.md: correct lengths for certain long_ opcodes.
667 * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
669 * 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().
671 2008-12-17 Mark Mason <mmason@upwardaccess.com>
673 * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
675 2008-12-17 Mark Mason <mmason@upwardaccess.com>
677 * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
679 2008-12-16 Rodrigo Kumpera <rkumpera@novell.com>
681 * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
684 2008-12-16 Mark Mason <mmason@upwardaccess.com>
686 * 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
688 * 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)
690 2008-12-15 Mark Mason <mmason@upwardaccess.com>
692 * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
694 2008-12-14 Zoltan Varga <vargaz@gmail.com>
696 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
697 gshared code. Fixes #458947.
699 * generics.cs: Add a test.
701 2008-12-12 Mark Mason <mmason@upwardaccess.com>
703 * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
705 * mini-mips.c: first pass n32 code generation.
707 * mini-mips.h: datatypes and defines for n32 support.
709 * exceptions-mips.c: first pass n32 code generation.
711 * tramp-mips.c: first pass n32 code generation.
713 * cpu-mips.md: add long_ opcodes.
715 2008-12-12 Mark Mason <mmason@upwardaccess.com>
717 * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
719 * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
721 * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
723 * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
725 * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
727 * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
729 * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
731 * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
733 * helpers.c: for mips/n32, don't pass -mips32 to objdump
735 2008-12-12 Zoltan Varga <vargaz@gmail.com>
737 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
739 2008-12-12 Andrés G. Aragoneses <aaragoneses@novell.com>
741 * driver.c: Sync --help-trace with man page (EXPR,EXPR).
743 2008-12-12 Mark Probst <mark.probst@gmail.com>
745 * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
746 descriptors for helper functions directly in front of the code.
748 2008-12-11 Mark Probst <mark.probst@gmail.com>
750 * method-to-ir.c: Removed an unnecessary assertion.
752 2008-12-10 Zoltan Varga <vargaz@gmail.com>
754 * method-to-ir.c: Merge SGEN changes from the old JIT.
756 2008-12-10 Zoltan Varga <vargaz@gmail.com>
758 * driver.c (compile_all_methods_thread_main): Handle failure of
761 2008-12-10 Mark Probst <mark.probst@gmail.com>
763 * mini-ppc.c: Merged with mini-ppc64.c.
765 * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
767 * Makefile.am: Use the same sources for PPC and PPC64.
769 * mini-ppc64.c: Removed.
771 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
773 * branch-opts.c (remove_block_if_useless): Extract fall through detection
774 code to mono_bb_is_fall_through.
776 * branch-opts.c (mono_remove_critical_edges): Same.
778 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
780 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
781 expect that an OP_BR_REG will be there.
783 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
785 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
786 for the many branch ops. The original check miss OP_BR_REG.
790 2008-12-09 Mark Mason <mmason@upwardaccess.com>
792 * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
794 2008-12-09 Zoltan Varga <vargaz@gmail.com>
796 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
797 while holding the aot lock.
799 2008-12-09 Mark Mason <mmason@upwardaccess.com>
801 * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
803 2008-12-09 Bill Holmes <billholmes54@gmail.com>
805 * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws
806 to release all runtime callable wrappers held by the runtime.
808 Contributed under MIT/X11 license.
810 2008-12-09 Bill Holmes <billholmes54@gmail.com>
812 * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
815 Contributed under MIT/X11 license.
817 2008-12-09 Zoltan Varga <vargaz@gmail.com>
819 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
820 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
822 2008-12-09 Mark Mason <mmason@upwardaccess.com>
824 * cpu-mips.md: fix ckfinite length
826 * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
827 (mono_arch_lowering_pass): cleanup, rearrange for clarity
828 (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
830 2008-12-08 Mark Mason <mmason@upwardaccess.com>
832 * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
834 2008-12-08 Geoff Norton <gnorton@novell.com>
836 * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
837 size by 8 bytes as well.
839 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
841 * basic-simd.cs: Fix method names for Vector16b.
843 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
845 * basic-simd.cs: Fix method names for Vector16sb.
847 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
849 * basic-simd.cs: Fix method names for Vector8us.
851 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
853 * basic-simd.cs: Fix method names for Vector8s.
855 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
857 * basic-simd.cs: Fix method names for Vector4ui.
859 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
861 * basic-simd.cs: Fix method names for Vector2l.
863 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
865 * basic-simd.cs: Fix method names for Vector2d.
867 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
869 * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
870 that are extension methods.
872 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
874 * basic-simd.cs: Fix method names for Vector4f.
876 2008-12-08 Zoltan Varga <vargaz@gmail.com>
878 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
879 as such. Fixes #456669.
881 2008-12-07 Mark Mason <mmason@upwardaccess.com>
883 * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
885 2008-12-07 Mark Mason <mmason@upwardaccess.com>
887 * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
888 (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
889 (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
890 (mips_adjust_stackframe): handle FP spills
892 * mini-ops.h: add mips_mtc1_s2
894 * cpu-mips.md: add mips_mtc1_s2
896 2008-12-07 Zoltan Varga <vargaz@gmail.com>
898 * unwind.c: New file, move the unwind info encoding functions here from
899 aot-compiler.c, so they could be used at runtime too.
901 2008-12-05 Mark Mason <mmason@upwardaccess.com>
903 * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
904 (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
906 2008-12-05 Mark Mason <mmason@upwardaccess.com>
908 * mini-mips.c: cleanup warnings
909 (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
910 (mips_adjust_stackframe): handle case of taking the address of stack locals
912 2008-12-05 Zoltan Varga <vargaz@gmail.com>
914 * aot-compiler.c: Implement a few functions missing from the asm writer.
915 (emit_method_code): Only write symbols for methods when using the bin
916 writer, since the assembler can't deal with the characters in our method
919 * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
921 * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
924 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
925 a bit to also restore %rax.
927 2008-12-05 Mark Probst <mark.probst@gmail.com>
929 * mini-ppc.c: Some simple merges from mini-ppc64.c.
931 2008-12-05 Zoltan Varga <vargaz@gmail.com>
933 * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
936 2008-12-05 Mark Probst <mark.probst@gmail.com>
938 * exceptions-ppc.c: Merged with exceptions-ppc64.c.
940 * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
941 MONO_ARCH_FRAME_ALIGNMENT. Struct for PPC64 function descriptors.
943 * exceptions-ppc64.c: Removed.
945 * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
947 2008-12-05 Mark Probst <mark.probst@gmail.com>
949 * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
952 * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
954 * tramp-ppc64.c: Removed.
956 2008-12-05 Zoltan Varga <vargaz@gmail.com>
958 * aot-compiler.c (add_generic_instances): Skip non-generic classes in
961 2008-12-05 Mark Probst <mark.probst@gmail.com>
963 * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
965 * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
966 mini-ppc.h instead of mini-ppc64.h.
968 * mini-ppc64.h: Removed.
970 2008-12-04 Mark Mason <mmason@upwardaccess.com>
972 * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
974 * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
976 2008-12-05 Mark Probst <mark.probst@gmail.com>
978 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
979 Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
982 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
984 * basic-simd.cs: Tests for operator == and != on Vector8us and Vector16b.
986 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
988 * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
990 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
992 * basic-simd.cs: Tests for operator == and != on Vector4f.
994 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
996 * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
998 * simd-intrinsics.c: Kill useless enum.
1000 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1002 * cpu-mips.md: add long_conv_to_ovf_i4_2
1003 * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
1005 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1007 * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
1009 * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
1011 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1013 * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
1015 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1017 * basic-simd.cs: Add tests for new methods.
1019 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1021 * simd-intrinsics.c: Add support for operator == and !=
1024 * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
1026 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
1028 * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
1030 2008-12-04 Zoltan Varga <vargaz@gmail.com>
1032 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
1034 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
1035 MONO_PATCH_INFO_ICALL_ADDR.
1037 * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
1039 * aot-compiler.c: Resurrect full-aot support.
1041 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1043 * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
1045 2008-12-04 Mark Mason <mmason@upwardaccess.com>
1047 * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
1049 2008-12-03 Rodrigo Kumpera <rkumpera@novell.com>
1051 * basic-simd.cs: Fix tests to work under ppc.
1052 Remove tests for methods that will be removed.
1054 2008-12-03 Mark Probst <mark.probst@gmail.com>
1056 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
1057 generic type (via a typedef or typeref) correctly.
1059 2008-12-03 Zoltan Varga <vargaz@gmail.com>
1061 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
1062 diagnose an assertion failure.
1064 2008-12-02 Mark Probst <mark.probst@gmail.com>
1066 * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
1067 Fix trampoline size.
1069 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
1070 conversion opcodes are implemented natively instead via emulation.
1072 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1074 * cpu-mips.md: remove mips_xori
1076 * mini-ops.h: remove mips_xori
1078 * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
1080 * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
1082 * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
1084 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1086 * cpu-mips.md: fix instruction lengths.
1088 * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
1090 * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
1092 * mini-ops.h: fix slti / sltiu op profiles.
1094 2008-12-02 Martin Baulig <martin@ximian.com>
1096 * method-to-ir.c (mono_method_to_ir): Disable debugging
1097 information for the init locals block to make the debugger stop
1098 after all locals have been initalized.
1100 2008-12-02 Martin Baulig <martin@ximian.com>
1102 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
1103 running inside the debugger.
1105 2008-12-01 Zoltan Varga <vargaz@gmail.com>
1107 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
1110 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
1111 alu->alu imm optimization which only shows if deadce is disabled.
1113 * aot-compiler.c: Rename the function names for the binary and asm writers
1114 so they can coexist in the same process. Rework the xdebug code to use the
1115 asm writer. This avoids the need to call into the runtime to dump the
1116 debugging info. Add more debugging info for types.
1118 * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
1120 * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
1121 cpu description tables, they can't occur in cpu-<ARCH>.md.
1123 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
1124 the stack in CEE_LDFLDA. Fixes #450542.
1126 * generics.cs: Add a new test.
1128 2008-12-01 Mark Mason <mmason@upwardaccess.com>
1130 * mini-ops.h: updated MIPS opcodes
1131 * mini-mips.c: decompose long opts
1132 * mini-mips.h: decompose long opts
1134 2008-11-29 Mark Mason <mmason@upwardaccess.com>
1136 * cpu-mips.md: fix length on int_rem_un
1137 * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
1139 2008-11-29 Zoltan Varga <vargaz@gmail.com>
1141 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
1143 * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
1145 2008-11-29 Martin Baulig <martin@ximian.com>
1147 * mini-exceptions.c (mono_handle_native_sigsegv): Check
1148 mono_debug_using_mono_debugger() in addition to the
1149 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
1151 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1153 * mini-ops.h: updated more MIPS opcodes
1154 * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
1155 * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
1157 2008-11-28 Mark Probst <mark.probst@gmail.com>
1159 * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
1161 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1163 * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
1164 * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
1165 * mini-ops.h: correct selected mips opcode entries
1167 2008-11-28 Mark Probst <mark.probst@gmail.com>
1169 * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
1172 2008-11-28 Mark Probst <mark.probst@gmail.com>
1174 * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
1176 2008-11-28 Mark Mason <mmason@upwardaccess.com>
1178 * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
1179 * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
1180 * mini-mips.h: disable IMT
1181 * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
1183 2008-11-28 Mark Probst <mark.probst@gmail.com>
1185 * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
1187 2008-11-28 Mark Probst <mark.probst@gmail.com>
1189 * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
1191 2008-11-28 Zoltan Varga <vargaz@gmail.com>
1193 * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
1196 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1198 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1199 for Set/GetVector aligned versions.
1201 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1203 * basic-simd.cs: Add tests for Get/SetVector.
1205 2008-11-27 Mark Probst <mark.probst@gmail.com>
1207 * mini.c: Removed g_slist_append_mempool(). Now in
1210 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
1212 * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
1213 size properly and make the bounds check optional.
1215 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1216 for SetVector and IsAligned.
1218 2008-11-27 Zoltan Varga <vargaz@gmail.com>
1220 * mini.c: Remove unused mono_normalize_opcodes () function.
1222 2008-11-26 Mark Probst <mark.probst@gmail.com>
1224 * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
1225 using the new atomic add ops now.
1227 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
1230 2008-11-26 Mark Probst <mark.probst@gmail.com>
1232 * mini-ppc64.c: Several fixes.
1234 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1236 * cpu-mips.md: added jump_table
1237 * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.
1239 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1241 * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
1243 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1245 * mini-ops.h: corrected a handful of MIPS opcodes.
1247 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1249 * aot-compiler.c: MIPS to use ELF writer
1251 2008-11-25 Mark Mason <mmason@upwardaccess.com>
1253 * mini-codegen.c: remove MIPS specific assert.
1255 2008-11-25 Mark Probst <mark.probst@gmail.com>
1257 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
1258 fixes. PPC64 now passes most of the runtime regressions.
1260 2008-11-24 Zoltan Varga <vargaz@gmail.com>
1262 * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
1263 volatile intervals a bit.
1265 2008-11-24 Mark Probst <mark.probst@gmail.com>
1267 * basic-long.cs: New test case.
1269 2008-11-23 Zoltan Varga <vargaz@gmail.com>
1271 * mini.c (mini_method_compile): Disable globalra for large methods for
1274 * regalloc2.c (order_moves): Add fp support.
1276 * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
1277 source bblock ends with an OP_BR_REG.
1279 * ratests.cs: Add a new test.
1281 2008-11-23 Mark Probst <mark.probst@gmail.com>
1283 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
1284 sharing. PPC64 now passes generics.exe.
1286 2008-11-23 Mark Probst <mark.probst@gmail.com>
1288 * mini-ppc64.c: Several fixes. PPC64 now runs iltests.exe.
1290 2008-11-23 Zoltan Varga <vargaz@gmail.com>
1292 * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
1293 memory when mono_jit_info_table_find () can't find the method in the
1296 * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
1299 * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
1302 2008-11-23 Mark Probst <mark.probst@gmail.com>
1304 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
1305 Several fixes. PPC64 now runs exceptions.exe and
1306 devirtualization.exe.
1308 2008-11-22 Mark Probst <mark.probst@gmail.com>
1310 * mini-ppc64.c, tramp-ppc64.c: Small fixes. PPC64 now runs
1311 arrays.exe and basic-math.exe.
1313 2008-11-22 Mark Probst <mark.probst@gmail.com>
1315 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
1316 cpu-ppc64.md: Several fixes. PPC64 now runs objects.exe.
1318 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1320 * simd-intrinsics.c: Add support ArrayExtension intrinsics.
1322 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1324 * method-to-ir.c: Move bounds checking macros to ir-emit.h
1326 * ir-emit.h: Move macros from method-to-ir.c to here.
1328 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
1330 * mini-ops.h: Correct the long simd ops to use LREG.
1332 2008-11-21 Zoltan Varga <vargaz@gmail.com>
1334 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
1336 * mini-ops.h: Correct the dreg type of a few long opcodes.
1338 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
1341 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
1343 * mini-ppc.c: remove negative stack references in epilog
1344 for platforms that don't support the red zone.
1346 2008-11-21 Mark Probst <mark.probst@gmail.com>
1348 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
1349 point regs. Now PPC64 passes basic-calls.exe.
1351 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1353 * basic-simd.cs: Add tests for accessors of Vector2l.
1355 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1357 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
1359 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
1361 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
1363 2008-11-21 Mark Probst <mark.probst@gmail.com>
1365 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
1366 PPC64 passes basic-long.exe.
1368 2008-11-20 Mark Probst <mark.probst@gmail.com>
1370 * decompose.c: Decompose carry and overflow add on PPC64 like on
1371 other 64 bit archs. Don't decompose sub at all on PPC64.
1373 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
1374 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
1377 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1379 * basic-simd.cs: Add tests for accessors of Vector2d.
1381 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1383 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
1387 * mini-x86.c (mono_arch_output_basic_block): Same.
1389 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
1391 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1393 * basic-simd.cs: Add tests for accessors of Vector4f.
1395 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1397 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
1401 * mini-x86.c (mono_arch_output_basic_block): Same.
1403 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
1405 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1407 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
1409 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1411 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
1415 * mini-x86.c (mono_arch_output_basic_block): Same.
1417 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
1419 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1421 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
1423 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1425 * simd-intrinsics.c: Enable setters for Vector16sb.
1427 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
1429 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
1433 * mini-x86.c (mono_arch_output_basic_block): Same.
1435 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
1437 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
1439 * simd-intrinsics.c: Implement setter for Vector8us.
1441 2008-11-19 Zoltan Varga <vargaz@gmail.com>
1443 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
1446 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1448 * mini-ppc.c: remove references to the red zone in the prolog
1449 (for systems that don't support it).
1451 2008-11-19 Mark Probst <mark.probst@gmail.com>
1453 * cpu-ppc64.md: Fixed a few instruction lengths.
1455 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
1458 2008-11-19 Mark Probst <mark.probst@gmail.com>
1460 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
1463 2008-11-19 Zoltan Varga <vargaz@gmail.com>
1465 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
1467 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
1469 * mini-ops.h: Added OP_INSERT_I2.
1473 * mini-x86.c (mono_arch_output_basic_block): Same.
1475 * simd-intrinsics.c: Implement setter for Vector8s.
1477 * simd-methods.h: Add the names of get setters of Vector8s.
1479 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1481 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
1483 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
1486 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1488 2008-11-18 Mark Probst <mark.probst@gmail.com>
1490 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
1491 for PPC64. An empty program runs now.
1493 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1495 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1497 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
1498 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
1499 info for JITted code is emitted into a shared library, loadable into gdb.
1501 2008-11-18 Mark Probst <mark.probst@gmail.com>
1503 * Makefile.am: Changes to build PPC64.
1505 * mini-arch.h: Include mini-ppc64.h on PPC64.
1507 2008-11-18 Mark Probst <mark.probst@gmail.com>
1509 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
1510 in PPC code up to r119147.
1512 2008-11-18 Mark Probst <mark.probst@gmail.com>
1514 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1515 cpu-ppc64.md: Changes for PPC64.
1517 Based on code submitted by andreas.faerber@web.de at
1518 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
1521 2008-11-18 Mark Probst <mark.probst@gmail.com>
1523 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1524 cpu-ppc64.md: Copied from the corresponding PPC files from
1527 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
1529 * mini-ops.h: Added OP_ROUND.
1531 * cpu-x86.md: Added round.
1533 * mini-x86.c: Added support for intrinsicing Math.Round (double).
1535 * basic-math.cs: Added test_0_round to test rounding.
1537 Contributed under MIT/X11 license.
1539 2008-11-17 Bill Holmes <billholmes54@gmail.com>
1541 * aot-compiler.c : Fix the Winx64 build.
1543 Contributed under MIT/X11 license.
1545 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1547 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
1548 in OP_EXTRACT_R8 to avoid possible stack corruption.
1550 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1552 * mini-ops.h: Added OP_EXTRACT_R8/I8.
1554 * cpu-x86.md: Added extract_r8.
1556 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
1558 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
1559 a couple of OP_EXTRACT_I4.
1561 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
1563 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
1565 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1567 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
1570 2008-11-17 Zoltan Varga <vargaz@gmail.com>
1572 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
1573 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
1575 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
1576 are not needed any more.
1578 * mini.h: Remove the unused INS_LIST macros.
1580 * mini.c (mini_method_compile): Remove a disable globalra case which is no
1583 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
1586 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
1587 mono_alloc_ireg () instead.
1589 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
1592 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
1595 * aot-runtime.c (load_aot_module): Disable AOT when running under
1598 * mini-amd64.h: Change the monitor fastpath defines to check for
1599 !PLATFORM_WIN32 so they work on *bsd too.
1601 * mini.h mini.c mini-hhpa.c: Remove more unused code.
1603 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
1605 * mini.h (MonoCompile): Remove new_ir flag.
1607 * regalloc.h regalloc.c: Remove unused code.
1609 * cpu-*.md: Remove more unused opcodes.
1611 * simple-cee-ops.h simple-mini-ops.h: Removed.
1613 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
1615 2008-11-17 Zoltan Varga <vargaz@gmail.com>
1617 * aliasing.h: Removed.
1619 * *.c: Remove references to aliasing.h and inssel.h.
1621 * mini.c: Remove additional unused functions.
1623 * mini-ops.h cpu-*.md: Remove unused opcodes.
1625 2008-11-16 Zoltan Varga <vargaz@gmail.com>
1627 Remove the old JIT code.
1629 * inssel*.brg: Removed.
1631 * ssa.c abcremoval.c aliasing.c: Removed.
1633 * ssa2.c: Renamed to ssa.c.
1635 * abcremoval2.c: Renamed to abcremoval.c.
1637 * *.c: Removed all !cfg->new_ir code.
1639 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
1640 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
1642 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
1644 2008-11-16 Zoltan Varga <vargaz@gmail.com>
1646 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
1647 to simplify the code and cut back on the number of global symbols in the AOT
1650 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
1652 2008-11-15 Zoltan Varga <vargaz@gmail.com>
1654 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
1655 with the got/got_info tables.
1657 * mini.h: Bump AOT file format version.
1659 * unwind.h: New file, contains definitions for stack unwinding.
1661 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
1664 * aot-compiler.c: Generalize the emitting of unwind information to use the
1665 information in cfg->unwind_ops.
1667 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
1669 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
1670 AOT method frames. Enable writing symbols for methods by default.
1672 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
1674 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
1675 and make it work with vectors of element sizes 1, 2 and 4.
1677 * simd-intrinsics.c: Enable getter for all vectors with element size
1680 * simd-methods.h: Add the names of other getters.
1682 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
1688 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
1690 * mini-ppc.h: portability fix.
1692 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1694 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
1695 buggy and will overwrite it.
1697 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1699 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
1700 Use it to emit local symbols for all methods so AOTed methods show up with
1701 their full name in gdb/valgrind output.
1703 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1705 * mini-ppc.c: portability fixes.
1707 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1709 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
1710 entries out of the if (!generic_shared...) code so it is always done.
1711 (mono_class_init_trampoline): Do the patching when running under valgrind
1712 too, newer versions of valgrind have no problems with it.
1714 2008-11-13 Zoltan Varga <vargaz@gmail.com>
1716 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
1719 2008-11-13 Mark Probst <mark.probst@gmail.com>
1721 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
1724 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1726 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
1728 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1730 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
1736 * simd-intrinsics.c: Same.
1738 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1740 * simd-intrinsics.c: Enable constructor intrinsics for all types.
1742 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1744 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
1745 to work with more Vector types.
1747 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1749 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
1750 store the elemens directly instead of using and intermediate.
1752 2008-11-13 Zoltan Varga <vargaz@gmail.com>
1754 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
1756 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
1757 to preserve %eax for aot plt trampolines.
1759 * aot-compiler.c (compile_method): Don't skip synchronized methods.
1760 (encode_method_ref): Flag synchronized methods so they won't go through
1763 * aot-compiler.c: Additional work to support AOTing synchronized methods/
1766 * cpu-ia64.md (jmp): Increase max length.
1768 2008-11-12 Zoltan Varga <vargaz@gmail.com>
1770 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
1771 open generic classes.
1773 * aot-compiler.c: Enable the ELF writer on ELF platforms.
1775 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
1776 box+brtrue optimization since it causes test failures on x86.
1778 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
1780 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
1786 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
1787 for simd ctor values.
1789 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
1790 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
1792 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
1794 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
1797 * simd-instrincs.c: Same.
1799 * basic-simd.cs: Same.
1801 2008-11-12 Zoltan Varga <vargaz@gmail.com>
1803 * ratests.cs: Add more tests.
1805 * regalloc2.c (add_spill_code): Handle more corner cases.
1807 2008-11-11 Zoltan Varga <vargaz@gmail.com>
1809 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
1810 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
1811 both the source an destination of an instruction.
1813 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1815 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
1816 wapihandles.c: more portability changes.
1818 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
1820 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
1821 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
1822 safe to execute in a signal handler and the kernel provides better
1823 the info in /proc/self/smaps. Avoid the assert on sigaction during
1826 2008-11-11 Zoltan Varga <vargaz@gmail.com>
1828 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
1829 do the bblock linking hack if it is actually needed.
1831 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
1834 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
1835 crash problem is fixed.
1837 * branch-opts.c (mono_remove_critical_edges): Link up newly added
1840 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
1842 (mini_method_compile): Set the starting value of next_vreg to
1843 MAX_IREGS + MAX_FREGS when using globalra.
1845 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
1846 filter clauses with BB_EXCEPTION_HANDLER.
1848 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
1850 2008-11-10 Mark Probst <mark.probst@gmail.com>
1852 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
1853 space for stdcall. Fixes regressions on Win32.
1855 2008-11-10 Zoltan Varga <vargaz@gmail.com>
1857 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
1859 (linear_scan): Remove an assert which doesn't seem to be needed.
1861 * local-propagation.c (mono_local_deadce): Avoid a call to
1862 MONO_DELETE_INS which would screw up the instruction linking.
1864 * mini.c (mono_decompose_op_imm): Make this work with globalra.
1866 * regalloc2.c: Upgrade to work the current JIT code.
1868 2008-11-09 Zoltan Varga <vargaz@gmail.com>
1870 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
1873 * aot-runtime.c: Remove some dead code.
1875 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
1877 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
1879 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
1880 trampolines using sscanf since atoi doesn't work on large unsigned values.
1882 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
1883 Initialize code_size.
1885 2008-11-08 Mark Probst <mark.probst@gmail.com>
1887 * method-to-ir.c (mini_emit_inst_for_method): Make
1888 Interlocked.CompareExchange work for Int arguments on 32 bit
1891 2008-11-07 Mark Probst <mark.probst@gmail.com>
1893 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
1895 2008-11-06 Bill Holmes <billholmes54@gmail.com>
1897 * main.c Fix MSVC build.
1899 Contributed under MIT/X11 license.
1901 2008-11-06 Mark Probst <mark.probst@gmail.com>
1903 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
1904 alignment larger than 8 bytes are aligned correctly, too.
1906 * mini.c: Honor the min_align field of MonoClass when laying out
1909 2008-11-06 Zoltan Varga <vargaz@gmail.com>
1911 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
1913 * aot-compiler.c (emit_plt): Fix a warning.
1915 * aot-compiler.c: Implement ARM support in the binary writer.
1917 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1919 * basic-simd.cs: Add test for getter with byref arg.
1920 Fix the naming of a few tests.
1921 Add missing checks to a test.
1923 2008-11-05 Zoltan Varga <vargaz@gmail.com>
1925 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
1927 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
1928 most of the full-aot support for monitor enter/exit trampolines.
1930 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
1931 enter/exit trampoline creation functions.
1933 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
1936 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
1938 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
1939 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
1940 implement the needed functionality without adding crap to the runtime.
1942 2008-11-05 Zoltan Varga <vargaz@gmail.com>
1944 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
1947 * mini.c (mono_build_date): New global version holding the build date in
1950 * Makefile.am (buildver.c): Generate a file containing the build date.
1952 * main.c: Set the build date from the generated file.
1954 * mini.c (mono_get_runtime_build_info): New helper function returning build
1955 information in a string format.
1957 * driver.c (mono_main): Print the build date in --version.
1959 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
1960 file when the bind-to-runtime-version option is used.
1962 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1964 * simd-intrinsics.c: Fix bug when using getters and byref args.
1966 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1968 * simd-methods.h: Rename prefetch methods.
1970 * simd-intrinsics.c: Same.
1972 2008-11-05 Mark Probst <mark.probst@gmail.com>
1974 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
1977 2008-11-04 Zoltan Varga <vargaz@gmail.com>
1979 * aot-compiler.c: Use the bundled elf header files instead of depending on
1982 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
1985 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
1988 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
1990 * cpu-x86.md: Add store nta ops.
1996 * mini.h: Add an enum for simd prefetch modes.
1998 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
1999 of store. Use the changed code to support store nta.
2001 * simd-intrinsics.c: Add prefetch ops for all vector types.
2003 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2005 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
2008 * aot-compiler.c: Use statically allocated buffers for constructing symbol
2011 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
2014 2008-11-04 Mark Probst <mark.probst@gmail.com>
2016 * mini-x86.c: Fixed commit.
2018 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2020 * aot-compiler.c (emit_plt): Align the plt section only on x86.
2022 2008-11-04 Mark Probst <mark.probst@gmail.com>
2024 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
2025 and MONITOR_EXIT, for the ASM fastpaths.
2027 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
2030 * mini.c, patch-info.h: Signature and patch infos for
2031 Monitor.Enter/Exit trampolines.
2033 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
2035 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
2036 Monitor.Enter/Exit ASM fastpath for Linux.
2038 2008-11-04 Zoltan Varga <vargaz@gmail.com>
2040 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
2042 * objects.cs: Add a new test.
2044 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
2046 * aot-runtime.c (load_method): Run class initialization in the PLT case even
2047 if MONO_LOG_LEVEL is set.
2049 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
2051 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
2053 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
2055 * aot-compiler.c: Change the relocation code to use virtual addresses instead
2056 of file offsets. Align the sections belonging to the data segment to
2059 2008-11-03 Zoltan Varga <vargaz@gmail.com>
2061 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
2062 elf.h. Port it to amd64.
2064 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2066 * driver.c: Enable SIMD by default.
2068 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
2070 * cpu-x86.md: Add prefetch op.
2076 * mini.h: Add an enum for simd prefetch modes.
2078 * simd-methods.h: Add prefetch function names.
2080 * simd-intrinsics.c: Add prefetch ops for all vector types.
2082 2008-11-03 Zoltan Varga <vargaz@gmail.com>
2084 * aot-compiler.c (emit_bytes): Speed this up a little.
2086 2008-11-02 Zoltan Varga <vargaz@gmail.com>
2088 * aot-compiler.c: Add JIT time etc. statistics.
2090 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
2092 * mini.h (MonoCompile): Add 'got_offset' field.
2094 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
2095 method_got_offsets array.
2097 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
2100 * aot-compiler.c (compile_method): Add generic method instances referenced
2101 by the method to the list of methods to be compiled, this is required so if
2102 A<T> references B<T>, and another assembly references A<int>, then it will
2103 also get a copy of B<int>.
2105 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
2106 when checking for monitor enter/exit.
2108 2008-10-30 Mark Probst <mark.probst@gmail.com>
2110 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
2111 for Monitor.Enter and Monitor.Exit if enabled.
2113 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
2116 2008-10-30 Zoltan Varga <vargaz@gmail.com>
2118 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
2119 of an OP_MOVE. Fixes #440046.
2121 * basic-long.cs: Add a new test.
2123 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
2125 * mini.h: Add synchronization note for the managed counter-part.
2127 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
2128 returns the simd caps of the current cpu.
2130 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
2132 * basic-simd.cs: Remove Console.WriteLine.
2134 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2136 * basic-simd.cs: New tests for Vector2ul.
2138 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2140 * simd-intrinsics.c: Add new vector type Vector2ul.
2142 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2144 * basic-simd.cs: New tests for Vector2l.
2146 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2148 * cpu-x86.md: Add long version of most packed int ops.
2154 * simd-intrinsics.c: Add new vector type Vector2l.
2156 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
2158 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
2160 * simd-methods.h: Remove SN_op_BitwiseXor.
2162 2008-10-28 Zoltan Varga <vargaz@gmail.com>
2164 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
2167 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2169 * basic-simd.cs: Test for Vector2d.
2171 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
2174 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2176 * cpu-x86.md: Add double version of all packed float ops.
2182 * simd-intrinsics.c: Add new vector type Vector2d.
2184 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
2186 * simd-methods.h: Add Duplicate.
2188 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
2190 * basic-simd.cs: Test for packing with signed saturation.
2192 2008-10-28 Zoltan Varga <vargaz@gmail.com>
2194 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
2195 found in the TYPESPEC table.
2197 2008-10-26 Zoltan Varga <vargaz@gmail.com>
2199 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
2202 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2204 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
2205 instead of the RVA, since the RVA can be changed by tools like the cil
2208 * method-to-ir.c (mono_method_to_ir2): Ditto.
2210 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
2211 (deserialize_variable): Ditto.
2213 2008-10-25 Martin Baulig <martin@ximian.com>
2215 * debug-mini.c (write_variable): Use
2216 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
2218 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2220 * cpu-x86.md: Add unsigned variants of packd and packw.
2224 * mini-x86.h: Emit the right instruction for packd and packw.
2225 Add unsigned variants of packd and packw.
2227 * simd-intrinsics.c: Packd and packw were used in place of their
2228 unsigned variants. Change that.
2229 Add intrinsics for (Signed)PackWithSignedSaturation.
2231 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
2233 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2235 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
2237 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2239 * mini-ops.h: Remove dword packed add/sub with saturation ops.
2241 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
2243 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
2246 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
2248 2008-10-24 Mark Probst <mark.probst@gmail.com>
2250 * method-to-ir.c, mini.c: Special casing for the synchronized
2251 wrapper for the ldtoken+GetTypeFromHandle case.
2253 2008-10-24 Zoltan Varga <vargaz@gmail.com>
2255 * mini.c (mono_replace_ins): Move this to branch-opts.c.
2257 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
2258 created/split bblocks.
2260 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2262 * mini-ops.h: Add packed signed mul high.
2266 * mini-x86.c (mono_arch_output_basic_block): Same.
2268 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
2270 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
2272 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
2274 * basic-simd.cs: Tests for Vector16sb.
2276 2008-10-24 Zoltan Varga <vargaz@gmail.com>
2278 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
2280 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2282 * mini-ops.h: Add packed signed min, max and compare greater.
2286 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
2289 * simd-methods.h: Add CompareGreaterThan.
2291 * simd-methods.h: Remove CompareEquals.
2293 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
2295 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
2297 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
2300 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
2302 * basic-simd.cs: Fix tests due to change in the API.
2304 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2306 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
2308 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2310 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
2312 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
2313 inst_offset as this has invalid values for LDADDR.
2315 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2317 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2319 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
2321 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2323 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
2324 for accessing field->data.
2326 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2328 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2330 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
2332 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
2334 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
2336 2008-10-21 Zoltan Varga <vargaz@gmail.com>
2338 * dominators.c (mono_compute_natural_loops): Allocate GList enties
2339 from the cfg mempool.
2341 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
2343 * basic-simd.cs: Tests for new methods in Vector8us.
2345 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
2347 * mini-ops.h: Add multiply and store high.
2351 * mini-x86.c (mono_arch_output_basic_block): Same.
2353 * simd-methods.h: Same.
2355 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
2358 2008-10-19 Zoltan Varga <vargaz@gmail.com>
2360 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
2361 mono_class_setup_vtable ().
2363 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
2364 mono_class_get_vtable_entry () for accessing klass->vtable.
2366 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
2368 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
2371 * method-to-ir.c (mono_save_token_info): Don't save references made from
2374 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
2375 of generic instances.
2377 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
2379 2008-10-19 Mark Probst <mark.probst@gmail.com>
2381 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
2382 OP_JMP depends on the method signature. Calculate it properly.
2384 2008-10-19 Zoltan Varga <vargaz@gmail.com>
2386 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
2389 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
2391 (emit_extra_methods): Add another table mapping method indexes to
2392 offsets in the extra_method_info table.
2394 * mini.h: Bump AOT file format version.
2396 * aot-runtime.c: Merge most of the code from mono_aot_get_method
2397 and mono_aot_get_method_from_token () into one function.
2399 2008-10-19 Mark Probst <mark.probst@gmail.com>
2401 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
2404 2008-10-18 Zoltan Varga <vargaz@gmail.com>
2406 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
2409 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
2412 * mini.c (mono_patch_info_equal): Compare the generic context as well.
2414 * mini.h: Bump aot file format version.
2416 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
2417 AOT file can contain native code for methods which are not in the METHOD
2418 table. Generate code for non-sharable generic instances of generic methods
2419 found in the METHODSPEC table.
2421 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
2422 encoding generic type handles.
2424 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
2425 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
2427 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
2428 macros + MONO_ADD_INS.
2430 * mini.c (mono_jump_info_token_new2): New function which takes a generic
2433 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
2435 * mini.h: Bump aot file format version.
2437 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
2439 2008-10-17 Mark Probst <mark.probst@gmail.com>
2441 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
2442 platforms, with definable stack alignment value. Set to 16 now
2445 * mini.c, mini.h, driver.c: Command line option for disabling
2448 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2450 * basic-simd.cs: Tests for new methods in Vector4ui.
2452 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2454 * mini-ops.h: Add packed int shuffle.
2458 * mini-x86.c (mono_arch_output_basic_block): Same.
2460 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
2461 extract mask, max, min, shuffle.
2463 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
2465 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
2467 * basic-simd.cs: Tests for new methods in Vector8us.
2469 2008-10-17 Mark Probst <mark.probst@gmail.com>
2471 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
2472 RuntimeTypeHandle, not a TypedReference.
2474 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
2476 * simd-intrinsics.c: remove relocations.
2478 2008-10-17 Zoltan Varga <vargaz@gmail.com>
2480 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
2481 optimizations from the x86 backend.
2483 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
2485 * simd-methods.h, simd-intrinsics.c: debloat method names and
2486 prepare for no relocations.
2488 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2490 * mini-ops.h: Add packed min/equal and sum of absolute differences.
2494 * mini-x86.c (mono_arch_output_basic_block): Same.
2496 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
2497 extract mask, max, min and sum of absolute differences.
2499 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
2502 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2504 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
2505 Renamed one test for consistency.
2507 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2509 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
2510 fix to the code that deal with other blocks.
2512 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2514 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
2516 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2518 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
2519 that deals with vreg interference. Explicitly check for OP_LDADDR to be
2520 able to process the source reg.
2522 2008-10-16 Martin Baulig <martin@ximian.com>
2524 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
2526 * inssel.brg: Add `OP_HARD_NOP'.
2528 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
2530 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
2531 `OP_HARD_NOP' instruction when running inside the debugger.
2533 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
2534 `OP_HARD_NOP' instruction when running inside the debugger.
2536 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2538 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
2539 now works. The issue with the regalloc tripping up no longer
2542 * simd-intrinsics.c (load_simd_vreg): Same.
2544 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2546 * basic-simd.cs: Tests for new Vector8ui methods.
2548 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2550 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
2551 only for type. This fixes crashes where MonoInst::klass is checked
2552 for ops of type != VTYPE or OBJ.
2554 * simd-intrinsics.c (load_simd_vreg): Same.
2556 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2558 * mini-ops.h: Add ops for packed shuffle/max/avg and
2563 * mini-x86.c (mono_arch_output_basic_block): Same.
2565 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
2568 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
2569 to emit extract mask op.
2571 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
2572 to emit word shuffles.
2574 2008-10-15 Mark Probst <mark.probst@gmail.com>
2576 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
2577 the largest alignment needed by a variable, but at least
2580 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2582 * basic-simd.cs: Tests for the fixes in the last commit.
2584 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2586 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
2587 no longer handles STACK_PTR input.
2589 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
2591 * simd-intrinsics.c (load_simd_vreg): New function that works like
2592 get_simd_vreg but handles STACK_PTR input.
2594 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
2595 as the input can be an arbitrary pointer.
2597 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
2598 LDADDR local optimization directly otherwise use a store op.
2600 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2602 * basic-simd.cs: Tests for dup low and dup high.
2604 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2606 * mini-ops.h: Add dup low and dup high ops.
2610 * mini-x86.c (mono_arch_output_basic_block): Same.
2612 * simd-intrinsics.c (vector4f_intrinsics): Same.
2614 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2616 * basic-simd.cs: Tests for recently added functionality.
2618 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2620 * mini-ops.h: Add remaining sse1 fp ops.
2622 * cpu-x86.md: Add remaining sse1 fp ops.
2624 * mini-x86.c (mono_arch_output_basic_block): Same.
2626 * mini.h: Add enum for simd FP compare conditions.
2628 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
2630 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
2631 so the backed can generate the appropriate op.
2633 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2634 This patch squeese one more byte from the SimdIntrinsc struct.
2636 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
2637 a a shift amount intead of simply or'ing it.
2639 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
2641 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
2642 byte so we can have an aditional flags field without increasing struct size.
2644 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
2645 against the simd_supported_versions bitmask.
2647 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
2649 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
2651 * mini.c: remove rawbuffer code (the only use here is unsafe because
2652 it takes locks during signal handling and the kernel now provides much
2653 better info in proc/pid/smaps these days).
2655 2008-10-13 Zoltan Varga <vargaz@gmail.com>
2657 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
2658 OP_X86_PUSH_OBJ. Fixes #434620.
2660 * objects.cs: Add a test.
2662 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
2664 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
2665 that the packuswb/packusdw don't work with unsigned numbers for what
2666 would be negative numbers in signed format.
2668 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
2669 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
2671 * mini-ops.h: Add doubleword forms of many ops and packing ones.
2673 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
2675 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
2677 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
2679 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
2682 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
2683 version as the enum in mini.h.
2685 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
2686 for sse3 ops, check the simd_version field if present. This way the code
2687 works with all versions of sse.
2689 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2691 * simd-intrinsics.c: Fixed intrinsic name typo.
2693 * mini.h: Added missing simd exported function.
2695 * basic-simd.cs: Added tests for Vector4ui.
2696 Fixed broken test for Vector16b.
2698 2008-10-10 Zoltan Varga <vargaz@gmail.com>
2700 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
2701 the max length to 64.
2703 2008-10-10 Mark Probst <mark.probst@gmail.com>
2705 * method-to-ir.c: Only do the fast virtual generic method call for
2706 non-wrapper methods.
2708 * mini.h, mini-trampolines.c: The new generic virtual remoting
2709 trampoline handles virtual method calls via the vtable (as done by
2710 the fast virtual generic method calls) to remoting proxies.
2712 * mini.c (mono_jit_create_remoting_trampoline): For generic
2713 methods reate a generic virtual remoting trampoline.
2715 * mini-amd64.h: Enable fast virtual generic method calls again.
2717 2008-10-10 Mark Probst <mark.probst@gmail.com>
2719 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
2720 restore registers when doing tail calls.
2722 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2724 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
2727 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2729 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
2731 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2733 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
2735 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2737 * basic-simd.cs: Retrofit for API changes.
2739 2008-10-10 Mark Probst <mark.probst@gmail.com>
2741 * mini-ppc.c: Handle integer stack arguments for tail calls.
2743 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2745 * optflags-def.h: Removed sse3 optimization.
2749 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
2752 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
2754 * mini.h: Added enumeration with simd versions.
2756 * simd-intrinsics.c (emit_intrinsics): Use the new static var
2759 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
2761 * mini.c (mini_init): Call mono_simd_intrinsics_init.
2763 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2765 * basic-simd.cs: Added tests for Vector8u and Vector16u.
2767 * basic-simd.cs: Fixed test naming.
2769 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2771 * mini-ops.h: Added ops for packed and saturated math, shifts
2772 and packing/unpacking.
2774 * cpu-x86.md: Added descriptors for the above ops.
2776 * mini-x86.c: Added code to emmit the above ops.
2778 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
2780 2008-10-08 Zoltan Varga <vargaz@gmail.com>
2782 * aot-compiler.c (compile_method): Enable AOT for generic code.
2784 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
2786 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
2788 * mini.c: add a workaround for a common screwup that ends up blamed
2789 to mono (other processes blocking signal delivery).
2791 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2793 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
2794 in the LDFLD/STFLD opcodes. Fixes #432673.
2796 * iltests.il.in: Add a new test.
2798 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
2800 * mini-arm.c: attach the thread in unmanaged->managed transitions
2801 using delegates (bug #433148).
2803 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
2805 * basic-simd.cs: Use new ShuffleSel constants.
2807 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
2809 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
2811 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
2812 only disable simd intrinsics if no sse2 is detected.
2814 * optflags-def.h: Added sse3.
2816 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
2819 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2821 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
2822 when adding delegate-invoke wrappers.
2824 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2826 * Makefile.am: Reenable the simd tests.
2828 2008-10-07 Bill Holmes <billholmes54@gmail.com>
2830 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
2831 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
2832 other vreg is allocated to that hreg.
2834 Contributed under MIT/X11 license.
2836 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2838 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
2841 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
2843 * basic-simd.cs: New test suite for SIMD intrinsics.
2845 * Makefile.am: Added new tests.
2847 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
2849 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
2853 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
2855 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
2856 using SSE2 aware opcodes.
2858 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
2859 is enabled, this code path is only reachable if conversion ops are emmited after
2862 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
2864 This optimization saves 6 bytes per conversion against the old version.
2866 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2868 * aot-compiler.c (compile_method): Don't skip methods referencing
2869 generic methods without a corresponding entry in token_info_hash, since
2870 encode_method_ref () can handle all generic methods now.
2872 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
2873 generic context is set.
2875 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
2876 generic sharing of LDTOKEN.
2878 2008-10-06 Mark Probst <mark.probst@gmail.com>
2880 * mini-amd64.h: Temporarily disabled fast virtual generic method
2881 calls because it breaks the System.Runtime.Remoting tests.
2883 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2885 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
2887 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
2888 so inlining actually works.
2889 (check_inline_caller_method_name_limit): Ditto.
2891 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
2893 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
2894 64 bit safety (from Olaf Hering and Andreas Färber).
2896 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2898 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
2899 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
2900 unused virtual call support code.
2902 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
2904 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
2905 which can't use aot trampolines.
2906 (decode_patch): Don't create aot trampolines for methods which can't use
2909 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
2910 use aot trampolines.
2912 * mini.h: Bump AOT image format version.
2914 2008-10-05 Zoltan Varga <vargaz@gmail.com>
2916 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
2917 to save_token_info () since cmethod is inflated for constrained calls.
2919 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
2921 2008-10-04 Andreas Färber <andreas.faerber@web.de>
2923 * Makefile.am: Add build rules for ppc64.
2924 This avoids the build failing at pedump with unresolved symbols
2925 due to lack of arch_sources. Instead it will now fail earlier
2926 due to lack of cpu-ppc64.md.
2928 Contributed under MIT/X11 license.
2930 2008-10-04 Mark Probst <mark.probst@gmail.com>
2932 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
2935 * iltests.il.in: Add test case for tail call with many arguments.
2937 2008-10-03 Zoltan Varga <vargaz@gmail.com>
2939 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
2940 to the fast virtual generic method code until the aot case is fixed.
2942 2008-10-03 Mark Probst <mark.probst@gmail.com>
2944 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
2946 2008-10-03 Mark Probst <mark.probst@gmail.com>
2948 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
2951 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
2953 * simd-intrinsics.c: Forgot to add this one.
2955 * mini-codegen.c: Fix macro in case SIMD is not supported.
2957 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
2959 This patch land initial JIT support for simd intrinsics.
2961 * mini-x86.h: Added new define to make --enable_minimal work on x86.
2963 * Makefile.am: Added simd-intrinsics.c
2965 * simd-intrinsics.c: New file with simd instrinsic related
2968 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
2970 * cpu-x86.md: Add simd related instructions.
2972 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
2974 * driver.c: Added two new --regression variants.
2976 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
2978 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
2980 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
2981 extract some complicated logic to helper functions.
2983 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
2985 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
2987 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
2988 the specialized simplification pass.
2990 * method-to-ir.c (mono_spill_global_vars): Use new macro.
2992 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
2994 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
2997 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
2998 if MONO_ARCH_NEED_SIMD_BANK is defined.
3000 * mini-ops.h: Added the new simd ops.
3002 * mini-x86.c: Added mono_arch_xregname.
3004 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
3006 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
3008 * mini-x86.h: Define simd related MONO_ARCH macros.
3010 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
3012 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
3014 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
3015 MONO_CLASS_IS_SIMD to deal with simd related IR.
3017 * mini.h (MonoInst): Added spill_var to the backend union.
3019 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
3021 * mini.h: Added forward declarations of the new simd fuctions.
3023 * optflags-def.h: Added new optimization names SIMD.
3025 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
3027 * regalloc.h: Added support for working with 3 register banks.
3029 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
3031 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
3033 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
3035 * mini-exceptions.c: remove 64 bit related ifdef clutter.
3037 2008-10-03 Zoltan Varga <vargaz@gmail.com>
3039 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
3040 instead of one on 64 bit systems.
3042 * method-to-ir.c: Remove unused includes.
3044 2008-10-02 Zoltan Varga <vargaz@gmail.com>
3046 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
3047 cfg->used_int_regs, since the two are different on arm.
3049 2008-10-02 Mark Probst <mark.probst@gmail.com>
3051 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
3052 mono_method_get_vtable_index() to get the vtable index.
3054 2008-10-02 Mark Probst <mark.probst@gmail.com>
3056 * method-to-ir.c (mono_method_to_ir2): Don't create native
3057 wrappers for array methods, because they're never called (and if
3058 they were called they wouldn't work).
3060 2008-10-02 Mark Probst <mark.probst@gmail.com>
3062 * method-to-ir.c (mono_method_to_ir2): Array methods are
3063 special-cased and must not be invoked indirectly via the (M)RGCTX
3064 when generic sharing is turned on. Fixes #431413.
3066 2008-10-01 Mark Probst <mark.probst@gmail.com>
3068 * method-to-ir.c: When generic sharing is active, call
3069 non-interface virtual generic methods via the standard trampoline.
3071 * mini-trampolines.c: Handle virtual generic shared methods.
3073 * mini.h, mini-x86.c, mini-x86.h: New argument for
3074 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
3075 method thunks and which is the trampoline to call if the lookup
3076 fails. Enable the virtual generic method thunk for x86.
3078 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
3079 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
3080 argument but assert that it's NULL, because these archs don't yet
3081 implement the virtual generic method thunk. Changes in the IMT
3082 thunk data structures.
3084 2008-10-01 Zoltan Varga <vargaz@gmail.com>
3086 * aot-compiler.c (emit_globals): Avoid invalid characters in
3087 the static linking symbol.
3089 * objects.cs: Add a test for the range check optimization. Fix warnings.
3091 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
3092 optimization from the current JIT.
3094 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
3095 later in decompose_array_access_opts () to allow more optimizations.
3097 * method-to-ir.c (mono_handle_soft_float): Rename this to
3098 mono_decompose_soft_float () for consistency.
3100 * mini-ops.h: Fix arguments of OP_STRLEN.
3102 * method-to-ir.c (save_cast_details): Extract the cast details saving code
3103 into a separate function.
3104 (reset_cast_details): Ditto.
3105 (handle_unbox): Save cast details. Fixes #431254.
3107 * method-to-ir.c: Remove some obsolete FIXMEs.
3109 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3111 * ir-emit.h (alloc_dreg): Write a warning before crashing.
3113 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3115 * mini-codegen.c: More work on macros to make them
3116 ready for multiple regbanks.
3118 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3120 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
3122 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
3124 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3126 * mini-codegen.c (mono_spillvar_offset): Proper support for
3129 2008-09-30 Zoltan Varga <vargaz@gmail.com>
3131 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
3132 the stack overflow changes.
3134 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3136 * mini-codegen.c: Make all bank macros depend on reg_bank.
3138 * mini-codegen.c (mono_local_regalloc): Make free mask
3139 initialization regbank aware.
3141 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3143 * mini-codegen.c (mono_local_regalloc): Extract callee
3144 mask selection to a function and make it regbank aware.
3146 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
3148 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
3149 code to deal with many regbanks.
3151 2008-09-30 Zoltan Varga <vargaz@gmail.com>
3153 * mini-codegen.c: More fp->regbank changes.
3155 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
3157 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
3158 of a hardcoded constant.
3160 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
3162 * method-to-ir.c (type_from_stack_type): Fix typo.
3164 2008-09-29 Zoltan Varga <vargaz@gmail.com>
3166 * mini-ia64.c (emit_move_return_value): Convert float return values to
3169 * objects.cs: Add a new test.
3171 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
3172 VARARG methods to fix an assert later.
3174 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
3175 end so it at least compiles.
3177 2008-09-28 Zoltan Varga <vargaz@gmail.com>
3179 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
3181 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
3183 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
3184 optimization to a new function (emit_optimized_ldloca_ir) and enable
3185 it for both ldloca and ldloca_s.
3187 2008-09-28 Zoltan Varga <vargaz@gmail.com>
3189 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
3190 gshared CASTCLASS code.
3192 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
3193 amd64, where the libc stack unwinder encounters stack frames referring to
3194 native code in unmapped memory.
3196 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
3199 * generics.cs: Add new test.
3201 2008-09-27 Zoltan Varga <vargaz@gmail.com>
3203 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
3204 add a check that one of the ARM_FPU_ constants is defined.
3206 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
3208 * mini-exceptions.c: Fix build on non-altstack platforms.
3210 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
3213 * ir-emit.h: Add a comment to NEW_PCONST.
3215 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
3217 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
3219 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
3220 after the changes to MonoJitDomainInfo.
3222 2008-09-27 Mark Probst <mark.probst@gmail.com>
3224 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
3226 2008-09-27 Mark Probst <mark.probst@gmail.com>
3228 * mini-ppc.c: Compiler warning fixes.
3230 2008-09-27 Mark Probst <mark.probst@gmail.com>
3232 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
3235 2008-09-27 Mark Probst <mark.probst@gmail.com>
3237 * exceptions-ppc.c, mini-ppc.h: Compile
3238 mono_arch_handle_altstack_exception() on Darwin, too.
3240 2008-09-27 Mark Probst <mark.probst@gmail.com>
3242 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
3243 work on archs which don't have generic sharing implemented, only
3244 without the vtable_arg.
3246 2008-09-26 Mark Probst <mark.probst@gmail.com>
3248 * mini.c: Added comment explaining why delegate ctor icall
3249 wrappers are compiled.
3251 2008-09-26 Mark Probst <mark.probst@gmail.com>
3253 * mini.c: Don't produce trampolines to delegate ctor icall
3254 wrappers but compile them upfront.
3256 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
3258 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
3259 runtime-set function when going back to managed code. Currently this
3260 is used to set back the protection on the soft ovf pages and/or to
3261 throw the stack overflow exception that happened in unmanaged code.
3263 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
3265 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
3266 runtime-set function when going back to managed code. Currently this
3267 is used to set back the protection on the soft ovf pages and/or to
3268 throw the stack overflow exception that happened in unmanaged code.
3270 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3272 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
3273 the support code for restoring stack protection after stack overflows
3274 that happen in unmanaged code. Don't set the exec permission on the
3277 2008-09-26 Zoltan Varga <vargaz@gmail.com>
3279 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
3280 delegate->method_ptr is set. Fixes #428054.
3282 2008-09-25 Zoltan Varga <vargaz@gmail.com>
3284 * tests.cs: Rename to ratests.cs.
3286 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
3287 emit_get_rgctx_... functions.
3289 2008-09-25 Mark Probst <mark.probst@gmail.com>
3291 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
3293 2008-09-25 Mark Probst <mark.probst@gmail.com>
3295 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
3296 before asserting that method is sharable.
3298 2008-09-25 Mark Probst <mark.probst@gmail.com>
3300 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
3301 whether method needs a static RGCTX wrapper used instead of
3304 * generic-sharing.c, mini.h: A few functions moved to
3305 metadata/generic-sharing.c.
3307 2008-09-25 Mark Probst <mark.probst@gmail.com>
3309 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
3310 Generic code sharing for value types, which essentially means
3311 treating value type methods like static methods. The RGCTX is
3312 passed in the same way.
3314 2008-09-25 Zoltan Varga <vargaz@gmail.com>
3316 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
3317 opcode when creating multi-dimensional arrays of open types.
3319 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
3322 * generics.cs: Add a test.
3324 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
3326 2008-09-24 Zoltan Varga <vargaz@gmail.com>
3328 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
3330 * mini.c (mini_method_compile): Set it when running under the debugger.
3332 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
3333 vreg optimization if the flag is set.
3335 * driver.c (mono_main): Add --attach= option to pass options to
3338 * mini.c (sigquit_signal_handler): Start the attach agent.
3340 * ssapre.c: Disable this to save space since it is not yet ported to
3343 * regalloc2.c: Disable this to save space.
3345 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
3347 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
3349 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
3350 the -v option useful again.
3352 2008-09-24 Zoltan Varga <vargaz@gmail.com>
3354 * mini-amd64.c (mono_arch_output_basic_block): Add support for
3357 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
3358 arrays of arrays. Fixes #428406.
3360 * method-to-ir.c (mini_emit_castclass): Ditto.
3362 * objects.cs: Add new test.
3364 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
3366 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
3367 was wrong at it choked against target_type_is_incompatible for byref types.
3369 2008-09-23 Zoltan Varga <vargaz@gmail.com>
3371 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
3374 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
3376 * mini-exceptions.c: update a few more exceptions-related counters.
3378 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
3380 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
3381 new functions to allocate from persistent mempools.
3383 2008-09-23 Zoltan Varga <vargaz@gmail.com>
3385 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
3386 multiple register banks in the future.
3388 * mini-codegen.c (mono_local_regalloc): Fix a warning.
3390 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
3392 * mini.c (type_to_eval_stack_type): Remove duplicated function.
3394 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
3396 * mini.h: Export type_to_eval_stack_type.
3398 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
3399 is only ins->klass of byref types.
3401 2008-09-22 Zoltan Varga <vargaz@gmail.com>
3403 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
3404 (mini_emit_memcpy2): Ditto.
3406 * mini-amd64.c: Fix a warning.
3408 2008-09-21 Mark Probst <mark.probst@gmail.com>
3410 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
3413 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
3415 * method-to-ir.c: Extract stloc micro-optimization to a
3416 function and apply it to all cases.
3418 2008-09-19 Mark Probst <mark.probst@gmail.com>
3420 * method-to-ir.c: Don't fail generic code sharing in cases we
3423 2008-09-18 Mark Probst <mark.probst@gmail.com>
3425 * mini-ppc.c: Handle structs in tailcalls on Darwin.
3427 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
3429 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
3432 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
3434 * trace.c: make tracing more useful and correct, with per-thread
3437 2008-09-15 Mark Probst <mark.probst@gmail.com>
3439 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
3440 doing a method call and the argument is an R4.
3442 2008-09-14 Zoltan Varga <vargaz@gmail.com>
3444 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
3447 2008-09-13 Mark Probst <mark.probst@gmail.com>
3449 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
3451 2008-09-12 Zoltan Varga <vargaz@gmail.com>
3453 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
3454 (MONO_JUMP_TABLE_FROM_INS): Ditto.
3456 2008-09-11 Zoltan Varga <vargaz@gmail.com>
3458 * driver.c: Add a --agent argument (not supported yet) to load managed
3459 agent assemblies before loading the main assembly, similarly to how the
3460 Java VM handles agents.
3462 2008-09-11 Mark Probst <mark.probst@gmail.com>
3464 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
3465 function to do stack layout of local variables.
3467 2008-09-11 Mark Probst <mark.probst@gmail.com>
3469 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
3472 2008-09-11 Zoltan Varga <vargaz@gmail.com>
3474 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
3475 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
3476 JIT if DISABLE_JIT is defined.
3478 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
3481 2008-09-10 Mark Probst <mark.probst@gmail.com>
3483 * iltests.il.in: Disable the fconv test on PPC (the result is
3484 undefined according to ECMA).
3486 2008-09-10 Mark Probst <mark.probst@gmail.com>
3488 * iltests.il.in: Enable tail call tests for PPC.
3490 * mini.h: Add variable for storing incoming valuetype argument
3491 addresses for tail calls.
3493 * mini-ppc.c: Implement valuetype arguments and return values for
3496 2008-09-09 Mark Probst <mark.probst@gmail.com>
3498 * mini-ppc.c: Partially implement tail calls (struct arguments and
3499 return values not supported).
3501 * method-to-ir.c: Enable tail calls on PPC.
3503 2008-09-08 Zoltan Varga <vargaz@gmail.com>
3505 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
3506 runtime-invoke wrappers to work around the problem of them getting
3507 assigned to a random class.
3509 * aot-runtime.c (mono_aot_get_method): Ditto.
3511 2008-09-07 Zoltan Varga <vargaz@gmail.com>
3513 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
3514 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
3516 2008-09-07 Mark Probst <mark.probst@gmail.com>
3518 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
3519 until they're implemented properly.
3521 * exceptions-ppc.c: Use arch-independent exception-handling code
3522 instead of custom one.
3524 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
3527 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
3529 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
3530 applies when __powerpc__ is defined.
3532 2008-09-06 Zoltan Varga <vargaz@gmail.com>
3534 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
3535 methods to their code to avoid computing the full name of wrappers and
3536 doing a lookup in a string hash table.
3538 2008-09-05 Zoltan Varga <vargaz@gmail.com>
3540 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
3541 we identify bblocks before method_to_ir () is ran.
3543 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
3544 Also avoid optimizing branches pointing to themselves.
3546 * mini.c (mini_method_compile): Ditto. Fixes #422947.
3548 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
3550 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
3552 2008-09-05 Zoltan Varga <vargaz@gmail.com>
3554 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
3555 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
3556 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
3559 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
3560 jumped to the same entry in plt_jump_table.
3562 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3564 * method-to-ir.c (initialize_array_data): Handle field with RVA from
3567 2008-08-31 Zoltan Varga <vargaz@gmail.com>
3569 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
3570 other assignment can be if converted. Saves 1.5% on corlib size and fixes
3573 2008-08-29 Geoff Norton <gnorton@novell.com>
3575 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
3576 segment, and doesn't properly handle .space as .text. Fixes
3579 2008-08-29 Geoff Norton <gnorton@novell.com>
3581 * mini.c: Disable the mach exception handler when running on
3584 2008-08-29 Geoff Norton <gnorton@novell.com>
3586 * aot-compiler.c: Patch from Renaldas Zioma to properly register
3587 globals on Darwin/ARM
3589 2008-08-28 Zoltan Varga <vargaz@gmail.com>
3591 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
3592 since too many things depend on it. Instead, call
3593 mono_runtime_set_no_exec ().
3595 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
3598 * aot-compiler.c: Add an 'asm-only' AOT option.
3600 * mini.c: Avoid initializing the runtime when doing AOT compilation.
3602 * aot-compiler.c (compile_method): Disable gshared support for now as it
3605 2008-08-27 Bill Holmes <billholmes54@gmail.com>
3607 * mini-amd64.h : Fix a compiler warning.
3609 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
3610 Changed to use a callback function to retrieve the unwind info.
3611 This avoids problems observed when code blocks were removed by
3612 unloading an app domain.
3614 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
3615 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
3618 Contributed under MIT/X11 license.
3620 2008-08-27 Bill Holmes <billholmes54@gmail.com>
3622 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
3623 case to keep the stack aligned to 8.
3625 Contributed under MIT/X11 license.
3627 2008-08-26 Zoltan Varga <vargaz@gmail.com>
3629 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
3630 avoid repeated linear searches.
3632 2008-08-25 Zoltan Varga <vargaz@gmail.com>
3634 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
3635 methods it can't handle.
3637 * aot-compiler.c (add_method): Avoid adding a method twice.
3638 (add_wrappers): Add runtime invoke wrappers for all methods.
3640 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
3641 function to create an aot-compatible version of this trampoline.
3643 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
3645 2008-08-24 Zoltan Varga <vargaz@gmail.com>
3647 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
3649 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
3650 with a generic sharing failure.
3652 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
3654 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
3655 CEE_RETHROW. Fixes #419634.
3657 * mini.c (mono_method_to_ir): Ditto.
3659 * exceptions.cs: Add a new test.
3661 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
3662 to mono_type_stack_size_internal () since some callers might not pass in
3665 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
3666 instrument_prolog. Fixes #419878.
3668 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
3669 doubles in soft float mode volatile.
3671 2008-08-23 Zoltan Varga <vargaz@gmail.com>
3673 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
3675 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
3676 to handle soft float correctly.
3678 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
3681 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
3683 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
3684 to sp, since the generics catch code requires it.
3686 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
3689 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
3690 mono_arch_emit_imt_argument ().
3692 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
3694 * mini-arm.c tramp-arm.c: Generic sharing updates.
3696 2008-08-22 Zoltan Varga <vargaz@gmail.com>
3698 * mini-arm.c: Fix the arm build.
3700 * generic-sharing.c (mini_type_get_underlying_type): New helper function
3701 handling enums, generic instances and generic sharing.
3702 (mini_type_stack_size_full): Ditto.
3704 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
3706 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
3708 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
3710 * tramp-arm.c: Implement the rgctx fetch and the generic class init
3713 * mini-arm.c: Various small generic sharing changes.
3715 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
3717 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
3720 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
3721 helper function to return a generic class init trampoline.
3723 * method-to-ir.c mini.c: Use it.
3725 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
3726 arch-specfic function to return a generic class init trampoline.
3728 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
3729 the GENERIC_CLASS_INIT custom code.
3731 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
3732 a fatal error, not a sharing failure.
3734 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
3737 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
3738 trampoline argument from MONO_ARCH_VTABLE_REG.
3740 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3741 order of the arguments to the C trampoline: pass 'slot' as the trampoline
3742 argument, and pass the vtable in VTABLE_REG.
3744 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3745 order of the arguments to the C trampoline: pass 'slot' as the trampoline
3746 argument, and pass the vtable in VTABLE_REG.
3747 (mono_arch_create_trampoline_code_full): Remove some special casing for
3748 the rgctx fetch trampoline.
3750 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
3753 * iltests.il: Add a test for it.
3755 2008-08-21 Zoltan Varga <vargaz@gmail.com>
3757 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
3759 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
3762 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
3763 use mono_jit_info_table_find () to avoid recursion.
3764 (mono_delegate_trampoline): Add a sync wrapper here.
3766 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
3769 * mini.c (mono_method_to_ir): Ditto.
3771 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
3772 add_sync_wrapper argument. Don't add a sync wrapper here.
3773 (mono_create_jump_trampoline): Don't add a sync wrapper here.
3775 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
3777 2008-08-20 Bill Holmes <billholmes54@gmail.com>
3779 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
3780 of nonvolatile registers back from MonoContext to CONTEXT.
3782 Contributed under MIT/X11 license.
3784 2008-08-20 Bill Holmes <billholmes54@gmail.com>
3786 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
3787 arguments on Winx64 there are only 4 argument registers. For this
3788 logic to work the last argument must be pulled from the stack.
3790 Contributed under MIT/X11 license.
3792 2008-08-20 Zoltan Varga <vargaz@gmail.com>
3794 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3796 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
3797 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
3798 encode/decode_method_ref ().
3800 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
3802 * aot-runtime.c (decode_patch): Ditto.
3804 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
3805 MONO_PATCH_INFO_METHOD.
3807 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
3810 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
3813 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
3815 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
3816 one from the caller.
3818 * aot-runtime.c (decode_generic_inst): New function to decode and
3819 return a interned generic inst.
3820 (decode_klass_ref): Use it.
3821 (decode_method_ref): Ditto.
3823 * aot-compiler.c (emit_exception_debug_info): Save
3824 jinfo->has_generic_jit_info too.
3826 2008-08-19 Zoltan Varga <vargaz@gmail.com>
3828 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
3830 * iltests.il.in: Add a test for fconv_to_i.
3832 * liveness.c: Disable the liveness2 pass for now to save space.
3834 * regalloc2.c: Include mempool-internals.h to fix warnings.
3836 * aot-compiler.c (encode_method_ref): Encode the context of generic
3839 * aot-runtime.c (decode_method_ref): Inflate generic methods using
3840 the context saved in the aot file.
3842 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3844 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3846 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
3847 volatile so they won't be optimized away.
3849 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3855 * dominators.c: Remove duplicated functions that now are in
3856 mempool-internals.h.
3858 2008-08-19 Zoltan Varga <vargaz@gmail.com>
3860 * aot-compiler.c: Fix warnings.
3862 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
3864 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
3866 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
3869 * mini.c (mono_resolve_patch_target): Ditto.
3871 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
3872 (encode_klass_ref): Add support for encoding VARs/MVARs.
3874 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
3876 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
3877 the handling of the got entries into a separate 'decode_got_entry' function.
3878 Add support for RGCTX_FETCH.
3880 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
3881 clobbered by the trampoline code.
3883 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
3884 not clobbered by the indirect calling code.
3886 2008-08-18 Zoltan Varga <vargaz@gmail.com>
3888 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
3891 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3893 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
3894 signature using the compilation mempool otherwise we would leak it.
3896 2008-08-18 Zoltan Varga <vargaz@gmail.com>
3898 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
3899 mono_emit_abs_call ().
3901 * patch-info.h: Add GENERIC_CLASS_INIT.
3903 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
3905 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
3906 as their target as a near call.
3908 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
3910 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
3912 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
3913 call to a runtime function described by a patch.
3915 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
3916 mono_emit_abs_call, this has the advantage that the ABS handling code in
3917 mono_codegen () can handle them both, and can handle other stuff in the
3918 future without additional code.
3920 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
3922 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
3925 * mini.h: Add missing bblock related prototypes.
3927 * mini.h (MonoCompile): Remove unused reverse_inst_list and
3928 reverse_inst_list_len fields.
3930 * mini.c: Refactor this file a bit by moving branch optimizations to
3933 * method-to-ir.c: Merge generic sharing changes missed earlier.
3935 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
3937 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
3938 shared patches. Process METHODCONST as a shared patch.
3940 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
3941 as it crashes on the 2.0 mscorlib.
3943 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
3946 * aot-compiler.c: Use is_plt_patch () in a few additional places.
3947 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
3950 * aot-compiler.c: Reorganize the got handling code to be a bit more
3953 2008-08-17 Zoltan Varga <vargaz@gmail.com>
3955 * aot-compiler.c: Make the patch_to_plt_offset hash table use
3956 mono_patch_info_equals/hash, and use it to massively simplify
3959 * mini.c (mono_patch_info_hash): Simplify this and add support for
3962 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
3964 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
3965 handling code, since an offset is not enough to identify a trampoline.
3967 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
3969 2008-08-17 Mark Probst <mark.probst@gmail.com>
3971 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
3973 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
3975 * mini-ops.h: Argument and result types for OVF_CARRY ops.
3977 * decompose.c: PPC decompositions for various ops.
3979 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
3981 2008-08-17 Zoltan Varga <vargaz@gmail.com>
3983 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
3984 call the generic trampoline code using a call, instead of a jump, to
3985 remove some special casing from the generic trampoline code.
3987 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
3988 (mono_codegen): Ditto.
3990 * aot-compiler.c aot-runtime.c: Ditto.
3992 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
3994 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
3995 helper function to find the offset corresponding to a lazy fetch trampoline.
3997 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
3998 when doing generic sharing.
4000 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
4003 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
4004 mini-trampolines.c to be with the other trampoline creation functions.
4006 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
4007 as it is equal to method->signature in most cases, add a
4008 mono_emit_method_call_full variant which takes a signature and an imt
4011 2008-08-16 Zoltan Varga <vargaz@gmail.com>
4013 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
4014 to this function, since it could be computed easily from the method
4016 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
4019 * method-to-ir.c mini.c: Remove references to
4020 compile_generic_method_wo_context.
4022 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
4023 generic method calls.
4025 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
4026 dimensional non-szarrays.
4028 * mini.c (mini_init): Register mono_array_new_1.
4030 * jit-icalls.c (mono_array_new_1): New jit icall.
4032 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
4033 pointing to the method.
4035 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
4036 method addresses belonging to METHOD_JUMP patches in the
4037 jump_target_got_slot_hash.
4038 (mono_aot_load_method): Ditto.
4040 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
4041 METHOD_JUMP patches.
4043 * mini.c (mini_create_jit_domain_info): New helper function which
4044 initializes/frees domain->runtime_info.
4045 (mini_free_jit_domain_info): Ditto.
4046 (mini_init): Install the domain hook functions with the runtime.
4048 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
4049 information maintained by the JIT.
4051 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
4052 insertion into jump_table_hash into mono_codegen (), also implement proper
4055 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
4056 tail calls, it is already done by the aot code.
4058 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
4061 * iltests.il.in: Make the jmp test a bit more complex.
4063 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
4064 generic instances which doesn't have a token.
4066 * aot-runtime.c (decode_method_ref): Ditto.
4068 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
4069 can handle this case now.
4070 (handle_box): Ditto.
4072 2008-08-15 Geoff Norton <gnorton@novell.com>
4074 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
4077 2008-08-15 Zoltan Varga <vargaz@gmail.com>
4079 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
4080 calling generic methods.
4082 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
4084 * aot-runtime.c (decode_patch_info): Ditto.
4086 * mini.c (mono_resolve_patch_target): Ditto.
4088 * patch-info.h: Add METHOD_RGCTX.
4090 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
4092 2008-08-14 Zoltan Varga <vargaz@gmail.com>
4094 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
4095 arguments in registers.
4097 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
4098 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
4100 * mini.c (mini_method_compile): Abort aot compilation for generic
4101 methods if generic sharing is disabled.
4103 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
4106 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
4107 requiring an mrgctx.
4109 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
4110 store instructions when converting a vcall to a normal call.
4112 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
4113 mono_arch_find_jit_info.
4115 2008-08-13 Zoltan Varga <vargaz@gmail.com>
4117 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
4118 avoid calling mono_method_full_name () for every method even if the
4120 (check_inline_caller_method_name_limit): Ditto.
4122 2008-08-12 Zoltan Varga <vargaz@gmail.com>
4124 * driver.c (main_thread_handler): Allow AOT compilation of multiple
4125 assemblies in one run.
4127 * aot-compiler.c (mono_compile_assembly): Only print out a count of
4128 skipped methods if it is not 0.
4130 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
4132 2008-08-12 Bill Holmes <billholmes54@gmail.com>
4134 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
4135 MONO_ARCH_HAVE_UNWIND_TABLE.
4137 Contributed under MIT/X11 license.
4139 2008-08-12 Bill Holmes <billholmes54@gmail.com>
4141 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
4142 from default optimizaton list on Winx64.
4144 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
4146 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
4147 the LMF from the MonoJitTlsData structure.
4149 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
4151 Contributed under MIT/X11 license.
4153 2008-08-12 Zoltan Varga <vargaz@gmail.com>
4155 * mini.c (sigsegv_signal_handler): Fix the build.
4157 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
4158 assembly->aot_module.
4160 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
4161 hash table. This simplifies and speeds up a lot of code, and fixes support
4164 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
4167 * mini-exceptions.c: Ditto.
4169 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
4170 'native_offset' argument, since these are computed in the
4171 mono_find_jit_info () function.
4173 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
4174 is used by exceptions-ppc.c.
4176 * exceptions-ppc.c: Call mono_find_jit_info () instead of
4177 mono_arch_find_jit_info ().
4179 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
4180 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
4181 generic code in mini-exceptions.c.
4183 2008-08-11 Zoltan Varga <vargaz@gmail.com>
4185 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
4187 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
4189 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
4190 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
4191 called while holding the loader lock. Fixes #415608.
4192 (mono_aot_get_method_from_token_inner): Ditto.
4194 2008-08-09 Zoltan Varga <vargaz@gmail.com>
4196 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
4197 to reduce differences between this and the generic implementation in
4199 (ves_icall_get_frame_info): Ditto.
4201 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
4203 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
4206 * exceptions-ppc.c (arch_get_call_filter): Rename this to
4207 mono_arch_get_call_filter () and make it non-static, for consistency with the
4208 other architectures.
4210 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
4213 * local-propagation.c:
4214 * mini-x86.c: Correct the name of arch defines.
4216 2008-08-09 Zoltan Varga <vargaz@gmail.com>
4218 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
4219 NO_EMULATE_LONG_SHIFT_OPS define.
4221 2008-08-08 Zoltan Varga <vargaz@gmail.com>
4223 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
4224 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
4226 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
4227 MACH fixes. Merged from the 2.0 branch.
4229 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
4231 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
4232 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
4234 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
4236 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
4237 mono_marshal_get_native_wrapper () signature changes.
4239 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
4241 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
4242 conversion bug under arm.
4244 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
4246 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
4248 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
4249 with overflow checking.
4251 2008-08-05 Marek Habersack <mhabersack@novell.com>
4253 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
4254 to the genmdesc.pl file
4256 2008-08-05 Zoltan Varga <vargaz@gmail.com>
4258 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
4259 arg_array in the soft-float versions of the LOAD/STORE macros.
4261 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
4264 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
4266 2008-08-02 Zoltan Varga <vargaz@gmail.com>
4268 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
4269 a float HFA. Fixes #413621.
4271 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
4273 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
4274 frame_size to args_size. Fixes build.
4276 2008-08-02 Zoltan Varga <vargaz@gmail.com>
4278 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
4279 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
4281 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
4282 the stack are not unaligned. Fixes #413247.
4284 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
4286 * mini.c: update jitted methods performance counters.
4288 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4290 * mini-exceptions.c: increase the exceptions thrown performance
4291 counter in mono_handle_exception ().
4293 2008-07-29 Zoltan Varga <vargaz@gmail.com>
4295 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
4296 can work with netmodules.
4298 2008-07-28 Geoff Norton <gnorton@novell.com>
4300 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
4303 2008-07-28 Zoltan Varga <vargaz@gmail.com>
4305 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
4308 2008-07-28 Bill Holmes <billholmes54@gmail.com>
4310 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4311 The float param registers and other param registers must be the
4312 same index on Windows x64.
4314 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
4315 ArgValuetypeAddrInIReg argument case. Setting the argument
4316 op to OP_VTARG_ADDR (OP_REGOFFSET)).
4318 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
4319 variable computed above as the copy length for arguments of storage
4320 type ArgValuetypeAddrInIReg.
4322 * mini-amd64.c (mono_arch_emit_call) : Implementing the
4323 ArgValuetypeAddrInIReg argument case. This case will rely on
4324 mono_arch_emit_outarg_vt to emit the correct code later in the process.
4326 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
4327 a 32 byte stack allocation for all calls. We will omit the adjustment for
4328 jump and tail call instructoins as they do not follow the typical call behavior.
4330 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
4331 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
4332 local variable and pass the local variable by reference to the called method.
4334 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
4335 Implementing the ArgValuetypeAddrInIReg argument case. When the address
4336 of a struct is passed in a register it must be saved with the other
4337 volatile argument on the stack.
4339 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
4340 frame pointer the stack adjustment value must be saved to the unwind
4343 Contributed under MIT/X11 license.
4345 2008-07-28 Zoltan Varga <vargaz@gmail.com>
4347 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
4348 which got lost in the merge.
4350 2008-07-27 Zoltan Varga <vargaz@gmail.com>
4352 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
4355 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
4357 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
4358 icalls, since they won't be patched.
4360 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
4361 different code sequence when running under valgrind to prevent some valgrind
4364 * iltests.il.in: Add new regression test.
4366 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
4369 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
4370 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
4372 * iltests.il.in: Add new test.
4374 * aot-compiler.c: Fix some warnings.
4376 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
4379 2008-07-27 Zoltan Varga <vargaz@gmail.com>
4381 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
4382 (mini_usage_jitdeveloper): Add a missing --wapi option.
4384 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4386 * mini-codegen.c: Simplify the is_fp macros.
4387 (free_up_ireg): Remove, use free_up_reg instead.
4388 (free_up_reg): Fix the fp case.
4390 2008-07-26 Zoltan Varga <vargaz@gmail.com>
4392 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
4395 * exceptions-x86.c: Merge some changes which seemed to have got lost
4396 in the linear-ir merge.
4398 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
4400 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
4401 long vreg volatile even if the variable was already created.
4403 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
4406 2008-07-26 Zoltan Varga <vargaz@gmail.com>
4408 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
4410 * mini.c (mono_jit_compile_method_inner): Add support for
4411 MONO_EXCEPTION_BAD_IMAGE.
4413 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
4414 mini_method_get_context () returns NULL. Fixes #356531.
4416 * mini.c (mono_method_to_ir): Ditto.
4418 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
4419 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
4421 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4423 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
4424 in the LDFTN implementation.
4426 2008-07-25 Mark Probst <mark.probst@gmail.com>
4428 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
4429 code, patch calls to icalls, too, even if they're not in the
4430 shared generic code hash. Fixes #411962.
4432 2008-07-25 Zoltan Varga <vargaz@gmail.com>
4434 * cpu-x86.md: Increase the length of the fcall opcodes.
4436 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
4437 calls returning floats.
4439 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
4442 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
4445 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
4446 into the domain->method_code_hash.
4448 * aot-compiler.c: Fix win32 build.
4450 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
4452 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
4453 gshared NEWARR implementation.
4455 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
4457 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
4458 can be used outside of method_to_ir.
4460 * mini.h (MonoCompile): Add arg_types field.
4462 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
4464 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
4465 the values of the local arg_array and param_types array.
4467 2008-07-24 Zoltan Varga <vargaz@gmail.com>
4469 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
4470 got accesses might only get generated later when NEWOBJ is decomposed.
4472 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
4473 looking up the native code of the target method when a delegate is called
4476 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
4479 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
4481 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
4482 AOT work on platforms without a working dlsym implementation.
4484 * mini.h: Bump AOT image format version.
4486 2008-07-24 Mark Probst <mark.probst@gmail.com>
4488 * mini-exceptions.c: Free a MonoType with
4489 mono_metadata_free_type() instead of g_free().
4491 * aot-runtime.c: Free a MonoType.
4493 2008-07-24 Zoltan Varga <vargaz@gmail.com>
4495 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
4498 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
4501 2008-07-23 Massimiliano Mantione <massi@ximian.com>
4502 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
4505 2008-07-23 Zoltan Varga <vargaz@gmail.com>
4507 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
4508 NEWOBJ calls on valuetypes.
4510 * iltests.il.in: Add new test.
4512 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
4514 2008-07-22 Zoltan Varga <vargaz@gmail.com>
4516 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
4517 is no longer needed.
4519 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
4520 non register sized integer arguments.
4521 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
4522 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
4525 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
4528 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
4529 two a binop with different sized arguments is emitted.
4531 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
4532 instruction in the ins==NULL case.
4534 2008-07-23 Zoltan Varga <vargaz@gmail.com>
4536 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
4538 * mini-x86.c: Fix osx build.
4540 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
4543 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
4544 instruction for non int sized variables.
4546 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
4549 2008-07-23 Robert Jordan <robertj@gmx.net>
4551 * method-to-ir.c: Fix MSVC build.
4553 2008-07-22 Zoltan Varga <vargaz@gmail.com>
4555 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
4556 a non int sized type, widen it to an int since newer versions of gcc seem to
4557 generate code which needs this.
4559 * ssa2.c abcremoval2.c: Fix warnings.
4561 * *: Merge the Linear IR branch.
4563 The original branch is at trunk/branches/vargaz/mini-linear-il, and
4564 the ChangeLog file there describes all the changes done over the years.
4565 Further documentation can be found at www.mono-project.com/Linear_IL.
4567 2008-07-21 Bill Holmes <billholmes54@gmail.com>
4569 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4570 The float param registers and other param registers must be the
4571 same index on Windows x64.
4573 Contributed under MIT/X11 license.
4575 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
4577 * mini.c: Make the previous fix GC safe.
4579 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
4581 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
4583 2008-07-21 Bill Holmes <billholmes54@gmail.com>
4585 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
4586 on Winx64. This type will not be passed on the stack (ArgOnStack), but
4587 ArgValuetypeAddrInIReg instead.
4589 Contributed under MIT/X11 license.
4591 2008-07-21 Zoltan Varga <vargaz@gmail.com>
4593 * mini-codegen.c (get_register_spilling): Fix a warning.
4595 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
4597 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
4598 for types which the initialization fails. Raises the provided exception
4599 at the right stop after cleanup.
4601 2008-07-16 Zoltan Varga <vargaz@gmail.com>
4603 * aot-compiler.c: Free most of the memory allocated during compilation.
4605 * mini.c (mini_parse_debug_options): Fix a leak.
4607 * mini.c (mini_method_compile): Don't add the method to the jit info tables
4608 during aot compilation.
4610 2008-07-14 Zoltan Varga <vargaz@gmail.com>
4612 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
4613 it has too much register pressure.
4615 2008-07-13 Zoltan Varga <vargaz@gmail.com>
4617 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
4619 2008-07-12 Zoltan Varga <vargaz@gmail.com>
4621 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4624 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4625 on amd64 similar to the way it is done on arm.
4627 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4629 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
4630 consistency, normalize error messages, avoid loading aot-only modules in
4633 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
4636 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
4638 2008-07-11 Martin Baulig <martin@ximian.com>
4641 (MonoDebuggerInfo): Add `interruption_request'.
4643 2008-07-12 Zoltan Varga <vargaz@gmail.com>
4645 * aot-compiler.c (emit_plt): Remove some dead code.
4647 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
4649 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
4650 return the plt info offset belonging to a given plt entry.
4652 * mini-trampolines.c (mono_aot_plt_trampoline): Use
4653 mono_aot_get_plt_info_offset.
4655 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
4656 similar to the amd64 code by makeing jumps through a separate jump table
4657 instead of embedding the jump addresses into the code.
4659 2008-07-11 Zoltan Varga <vargaz@gmail.com>
4661 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
4664 2008-07-10 Martin Baulig <martin@ximian.com>
4666 * mini.c (mini_method_compile): Disable generics sharing when
4667 running in the debugger.
4669 2008-07-10 Zoltan Varga <vargaz@gmail.com>
4671 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
4673 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
4674 the local register allocator from running out of registers on x86 when
4677 2008-07-10 Bill Holmes <billholmes54@gmail.com>
4679 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
4680 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
4683 Contributed under MIT/X11 license.
4685 2008-07-10 Zoltan Varga <vargaz@gmail.com>
4687 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
4688 speed up the assembler.
4690 2008-07-09 Zoltan Varga <vargaz@gmail.com>
4692 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
4695 * mini.c: Move the soft float handling macros a bit earlier, add
4696 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
4699 * mini.h: Add prototype for mono_arch_fixup_jinfo.
4701 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
4702 read-only to help catch code allocation requests.
4704 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
4705 and turn it off when using --aot-only or when compiling with --aot=full.
4707 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
4708 jump table for switches from the normal domain mempool, not the code
4711 * mini-trampolines.c (get_unbox_trampoline): New function to return an
4712 unbox trampoline which handles aot-only mode too.
4714 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
4715 an AOTed unbox trampoline.
4717 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
4719 2008-07-09 Bill Holmes <billholmes54@gmail.com>
4721 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
4724 Contributed under MIT/X11 license.
4726 2008-07-09 Bill Holmes <billholmes54@gmail.com>
4728 * mini.c (mono_codegen): Allocate space at the end of the code block and store
4729 the unwind information for the method at the end of the allocated block.
4731 * mini-amd64.h: Added declarations for the unwind routines and adding field to
4732 MonoCompileArch to hold the unwind info for SEH on Winx64
4734 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
4735 frame pointer info for the method being compiled.
4737 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
4738 the call to mono_exception_from_token.
4740 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
4741 storing the method prolog information in a format that the Winx64 SEH can understand. This
4742 information is stored a the end of the method block because it is all 32-bit offset based.
4744 Contributed under MIT/X11 license.
4746 2008-07-09 Zoltan Varga <vargaz@gmail.com>
4748 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
4750 * wapihandles.c: Fix warnings.
4752 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
4755 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
4756 mono_jit_compile_method in aot-only mode since that calls the type
4759 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
4760 get_delegate_invoke_impl in aot-only mode.
4762 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
4764 2008-07-08 Zoltan Varga <vargaz@gmail.com>
4766 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
4768 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
4771 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
4773 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
4774 init trampoline from the AOT file as well.
4776 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
4777 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
4780 * mini.c (mini_init): Move the call to mono_exceptions_init () after
4783 * exceptions-amd64.c: Add _full variants for the remaining exception code
4784 creation functions as well, allow emission of relocatable code, remove
4785 caching since that is now done by the caller.
4787 * mini-exceptions.c: Add _full variants for the remaining exception code
4788 creation functions as well, add aot-only support.
4790 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
4791 if we can determine a proper token for them.
4792 (add_wrappers): Add a few more wrappers.
4793 (emit_method_code): Remove some dead code.
4794 (emit_trampolines): Emit exception code too.
4796 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
4798 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
4799 mono_array_new_va which avoids varargs.
4801 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
4803 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
4804 mono_arch_create_specific_trampoline () in all places.
4806 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
4807 a bit so it can be used for other things as well.
4809 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
4812 * exceptions-amd64.c: Rename the caching from the exception code creation
4813 functions, it is done by the caller instead.
4815 * exceptions-amd64.c: Change the signature of the exception code creation
4816 functions to allow the creation of relocatable code later.
4818 * mini-exceptions.c: Add a set of functions to query the various
4819 runtime-generated exception functions.
4821 * mini.c mini-exceptions.c: Use the newly added functions instead of the
4822 mono_arch_.. () functions.
4824 2008-07-07 Zoltan Varga <vargaz@gmail.com>
4826 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
4828 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
4830 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
4831 (mini_get_vtable_trampoline): Ditto.
4833 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
4834 code in the AOT case by returning the code size and a list of relocations to
4837 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
4839 2008-07-07 Bill Holmes <billholmes54@gmail.com>
4841 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
4844 Contributed under MIT/X11 license.
4846 2008-07-07 Zoltan Varga <vargaz@gmail.com>
4848 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
4849 so the buffer size can be computed correctly. Fixes #404735.
4851 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
4852 normally as cfg->debug_info is already freed.
4854 2008-07-06 Zoltan Varga <vargaz@gmail.com>
4856 * mini-amd64.c: For calls returning vtypes in registers, don't store
4857 the return address on the stack, instead allocate a separate local for
4860 2008-07-05 Mark Probst <mark.probst@gmail.com>
4862 * mini-trampolines.c, mini.h: Add an argument to
4863 mono_create_jit_trampoline_in_domain() for turning off the adding
4864 of the sync wrapper.
4866 * mini.c: Use the JIT trampoline without sync instead of
4867 ldftn_nosync in static RGCTX invoke wrappers so that the call can
4870 2008-07-04 Mark Probst <mark.probst@gmail.com>
4872 * driver.c: Turn on GSHARED optimization by default.
4874 2008-07-04 Zoltan Varga <vargaz@gmail.com>
4876 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
4877 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
4879 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
4880 create a variant of the generic trampoline code callable from AOTed trampolines.
4882 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
4883 trampoline code callable from AOTed trampolines.
4885 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
4887 2008-07-04 Mark Probst <mark.probst@gmail.com>
4889 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
4890 pass-through manner.
4892 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
4893 and don't fail sharing for them anymore.
4895 * mini-exceptions.c: Handle exceptions in shared generic methods.
4897 * generic-sharing.c: When checking the context of a generic
4898 method, also check its class's context. Don't treat wrappers as
4901 * mini-trampolines.c: Some code factored out to
4902 metadata/generic-sharing.c. Handle the MRGCTX case.
4904 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
4905 we must deal with the method being of another instantiation of the
4906 class. Add static rgctx invoke wrappers to generic methods.
4908 2008-07-04 Mark Probst <mark.probst@gmail.com>
4910 * mini.c: Provide all jit infos of generic shared methods with a
4913 * mini-exceptions.c: Handle the new situation that a generic info
4914 might be available, but not info about the this/vtable/mrgctx
4917 2008-07-03 Mark Probst <mark.probst@gmail.com>
4919 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
4922 2008-07-03 Zoltan Varga <vargaz@gmail.com>
4924 * dominators.c (check_dominance_frontier): Fix a warning.
4926 * mini.h: Add some missing prototypes.
4928 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
4930 * driver.c (mono_jit_init_version): Correct the comments since the first
4931 argument should be the name of the root domain, not a filename.
4933 * aot-runtime.c (make_writable): Error out if this is called while running
4935 (load_aot_module): Ditto.
4937 * aot-compiler.c: Really fix the computation of method indexes.
4939 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
4940 optimizations as this is no longer called frequently.
4942 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
4943 method and the invoke impl code and pass it to the delegate trampoline instead of
4944 just the delegate class.
4946 2008-07-02 Zoltan Varga <vargaz@gmail.com>
4948 * aot-compiler.c: Fixup the computation of method indexes.
4949 (add_wrappers): Create the base methods of the runtime invoke wrappers using
4950 the method builder infrastructure.
4952 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
4955 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
4956 mode, load the method right away instead of creating a trampoline.
4958 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
4960 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
4963 2008-07-01 Zoltan Varga <vargaz@gmail.com>
4965 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
4966 (mono_aot_load_method): Use method_index instead of method->token.
4968 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
4969 can handle icalls etc. properly.
4971 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4973 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
4975 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
4976 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
4977 JIT_ICALL_ADDR patch type.
4979 * patch-info.h: Add JIT_ICALL_ADDR patch type.
4981 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
4983 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
4985 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
4987 2008-06-30 Zoltan Varga <vargaz@gmail.com>
4989 * mini.c: Use domain->jit_code_hash_lock for controlling access to
4990 domain->jit_code_hash.
4992 2008-06-29 Zoltan Varga <vargaz@gmail.com>
4994 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
4996 2008-06-27 Zoltan Varga <vargaz@gmail.com>
4998 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
4999 get_this_arg_from_call, let it compute it when needed.
5001 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
5002 gsctx from code only when needed.
5004 * mini-trampolines.c (get_generic_context): Rename this to
5005 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
5006 it can be called by the arch backends.
5008 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
5010 2008-06-26 Zoltan Varga <vargaz@gmail.com>
5012 * driver.c (mono_main): Add experimental --aot-only command line option.
5014 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
5017 2008-06-26 Kornél Pál <kornelpal@gmail.com>
5019 * driver.c (DllMain): Remove mono_module_handle.
5021 Contributed under MIT/X11 license.
5023 2008-06-25 Zoltan Varga <vargaz@gmail.com>
5025 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
5026 for emitting methods which are not in the source assembly. Detect and report
5027 failure of assembling+linking.
5029 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
5031 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
5033 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
5035 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
5037 2008-06-24 Zoltan Varga <vargaz@gmail.com>
5039 * mini.h: Remove some obsolete prototypes.
5041 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
5043 2008-06-24 Mark Probst <mark.probst@gmail.com>
5045 * mini.c (get_object_generic_inst): Variable-sized arrays are not
5046 supported by Visual Studio, so use alloca().
5048 2008-06-23 Zoltan Varga <vargaz@gmail.com>
5050 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
5053 2008-06-23 Mark Probst <mark.probst@gmail.com>
5055 * mini.c: Fail sharing of a generic method if it contains an open
5056 catch clause (because we don't pass MRGCTXs yet).
5058 2008-06-23 Mark Probst <mark.probst@gmail.com>
5060 * mini.c: When compiling a method with generic sharing, insert the
5061 method instantiated with an all-Object generic context into the
5062 jit info table, instead of the context of the first instantiation
5063 of the method we happen to compile.
5065 2008-06-18 Martin Baulig <martin@ximian.com>
5067 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
5068 `major_version' and `minor_version'.
5070 2008-06-17 Mark Probst <mark.probst@gmail.com>
5072 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
5073 mono_method_is_generic_sharable_impl() takes an additional
5074 argument specifying whether to treat type variables as reference
5077 2008-06-17 Mark Probst <mark.probst@gmail.com>
5079 * mini.h: Removed obsolete prototypes.
5081 2008-06-17 Mark Probst <mark.probst@gmail.com>
5083 * mini.c: Don't fail generic sharing for initobj and sizeof - we
5084 already handle them.
5086 2008-06-17 Mark Probst <mark.probst@gmail.com>
5088 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
5089 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
5090 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
5091 tramp-x86.c: Added a MonoGenericContext* argument to
5092 mono_arch_get_unbox_trampoline() so that it can call other
5093 functions which require it.
5095 2008-06-17 Mark Probst <mark.probst@gmail.com>
5097 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
5098 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
5099 mono_arch_get_this_arg_from_call() takes a
5100 MonoGenericSharingContext* as well.
5102 2008-06-17 Mark Probst <mark.probst@gmail.com>
5104 * mini.c: Factor out code for emitting unbox into emit_unbox() and
5105 implement generic sharing of unbox.
5107 2008-06-17 Mark Probst <mark.probst@gmail.com>
5109 * mini.c: Don't compute the vtable to determine whether a field is
5110 special static, because it might not work for open types.
5112 2008-06-17 Mark Probst <mark.probst@gmail.com>
5114 * mini.c: Removed the unused token_type and token_source arguments
5115 from get_runtime_generic_context_ptr().
5117 2008-06-17 Marek Habersack <mhabersack@novell.com>
5119 * mini.c (ADD_BINOP): fix the build
5121 2008-06-16 Zoltan Varga <vargaz@gmail.com>
5123 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
5126 2008-06-16 Mark Probst <mark.probst@gmail.com>
5128 * mini.h: Removed class relations enum that's not used anymore.
5130 2008-06-16 Mark Probst <mark.probst@gmail.com>
5132 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
5134 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
5135 the lazy fetch trampoline access code.
5137 2008-06-15 Zoltan Varga <vargaz@gmail.com>
5139 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
5141 2008-06-14 Zoltan Varga <vargaz@gmail.com>
5143 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
5145 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
5147 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
5149 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5151 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
5154 * mini-ops.h: Add MIN/MAX_UN opcodes.
5156 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
5159 * basic-math.cs: Add more min/max tests.
5161 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5163 2008-06-13 Mark Probst <mark.probst@gmail.com>
5165 * mini.c: Small fix in the prologue of emit_castclass.
5167 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5169 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5171 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
5172 do not work even for unsigned types. Fixes #400014.
5174 * basic-math.cs: Add regression tests for unsigned Min/Max.
5176 2008-06-13 Mark Probst <mark.probst@gmail.com>
5178 * mini.c: Added additional context_used argument to several
5179 functions, which will be needed for sharing generic methods. Use
5180 GET_RGCTX macro wherever appropriate. Declare only one
5181 context_used in mono_method_to_ir().
5183 2008-06-13 Mark Probst <mark.probst@gmail.com>
5185 * mini.c, generic-sharing.c: Removed generic class relations.
5187 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
5188 functions due to MRGCTX changes.
5190 2008-06-13 Mark Probst <mark.probst@gmail.com>
5192 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
5193 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
5194 with calculated IMT.
5196 * mini.c: Generic sharing of calls via generic interfaces.
5198 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
5199 generic method with non-constant MonoGenericContext*. Instead,
5200 the context is taken out of the method itself.
5202 2008-06-13 Mark Probst <mark.probst@gmail.com>
5204 * mini.c: Generic sharing of ldvirtftn.
5206 2008-06-13 Mark Probst <mark.probst@gmail.com>
5208 * mini.c: Generic sharing of ldftn.
5210 2008-06-13 Mark Probst <mark.probst@gmail.com>
5212 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
5214 2008-06-13 Mark Probst <mark.probst@gmail.com>
5216 * mini.c: Generic sharing of the special case of ldtoken followed
5217 by a call to GetTypeFromHandle.
5219 2008-06-13 Mark Probst <mark.probst@gmail.com>
5221 * mini.c: Generic sharing of box for nullable types.
5223 2008-06-13 Zoltan Varga <vargaz@gmail.com>
5225 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
5226 are passed on the stack. Fixes #324807.
5228 2008-06-12 Bill Holmes <billholmes54@gmail.com>
5230 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
5231 for the ArgValuetypeAddrInIReg case.
5233 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
5234 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
5236 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
5237 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
5238 local variable and pass the local variable by reference to the called method.
5240 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
5241 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
5243 Contributed under MIT/X11 license.
5245 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
5247 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
5249 * debug-mini.c (mono_debug_print_vars): Release memory after printing
5252 2008-06-10 Martin Baulig <martin@ximian.com>
5255 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
5257 2008-06-09 Kornél Pál <kornelpal@gmail.com>
5259 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
5260 possible error when no arguments are passed.
5262 Contributed under MIT/X11 license.
5264 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
5266 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
5267 where the file name is NULL.
5269 2008-06-09 Zoltan Varga <vargaz@gmail.com>
5271 * mini.c: Fix s390 build.
5273 2008-06-08 Zoltan Varga <vargaz@gmail.com>
5275 * trace.c (mono_trace_parse_options): Fix warnings.
5277 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
5279 2008-06-07 Zoltan Varga <vargaz@gmail.com>
5281 * mini.c (remove_block_if_useless): Avoid printing the method name.
5283 * mini.c: Remove needless setting of ins->cil_code which is now done by
5286 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
5289 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
5290 translated code after it has been patched.
5292 2008-06-06 Zoltan Varga <vargaz@gmail.com>
5294 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
5295 avoid problems during code patching on SMP systems.
5296 (emit_call): Avoid adding a patch info which is already added by
5298 (mono_arch_emit_exceptions): Ditto.
5300 2008-06-05 Zoltan Varga <vargaz@gmail.com>
5302 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
5303 MONO_TYPE_ISSTRUCT already checks for it.
5305 2008-06-05 Bill Holmes <billholmes54@gmail.com>
5307 * mini-amd64.c:merge_argument_class_from_type: When marshaling
5308 structs with floats on Winx64 the float registers are not used.
5309 The integer registers are always used..
5310 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
5311 only one register will be used and only if the size of the struct
5312 is 1,2,4, or 8 bytes.
5314 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
5317 Contributed under MIT/X11 license.
5319 2008-06-05 Martin Baulig <martin@ximian.com>
5321 * debug-debugger.c (debugger_lookup_class): Also call
5322 mono_class_setup_methods() here; we're only called from RTI.
5324 2008-06-05 Andreas Färber <andreas.faerber@web.de>
5326 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
5327 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
5328 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
5329 Post-process object files and add dtrace-generated object, if necessary.
5331 Contributed under MIT/X11 license.
5333 2008-06-04 Mark Probst <mark.probst@gmail.com>
5335 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
5338 * mini.c: Generic sharing for unbox.any and castclass.
5340 2008-06-04 Mark Probst <mark.probst@gmail.com>
5342 * mini.c: Ignore tailcall prefix in shared generic code and when
5343 doing calls which require a vtable/rgctx argument.
5345 2008-06-04 Mark Probst <mark.probst@gmail.com>
5347 * mini.c: Don't free the JIT info.
5349 * driver.c: Changes in the JIT info table testing code.
5351 2008-06-03 Zoltan Varga <vargaz@gmail.com>
5353 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
5354 interruption. Fix some warnings.
5356 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
5357 interruption_checkpoint.
5359 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5361 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
5362 from embedding applications.
5364 2008-06-02 William Holmes <billholmes54@gmail.com>
5366 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
5367 reserving 32 bytes on the stack when making calls.
5369 Contributed under MIT/X11 license.
5371 2008-06-01 Zoltan Varga <vargaz@gmail.com>
5373 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
5374 the linear IL branch.
5376 * driver.c: Print out more information for --version on arm.
5378 2008-05-30 Zoltan Varga <vargaz@gmail.com>
5380 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
5381 bb_exit instead, since out of line bblocks might not actually be emitted
5384 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
5385 maximum epilog size for out of line bblocks if tracing is enabled.
5387 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
5389 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
5391 * arrays.cs: Regression tests for allocating arrays with negative sizes.
5393 2008-05-28 Zoltan Varga <vargaz@gmail.com>
5395 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
5396 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
5399 2008-05-27 Zoltan Varga <vargaz@gmail.com>
5401 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
5402 the 'value' to store is a constant.
5404 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
5406 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
5407 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
5409 2008-05-26 Zoltan Varga <vargaz@gmail.com>
5411 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
5412 for accessing method->generic_container.
5414 2008-05-24 Zoltan Varga <vargaz@gmail.com>
5416 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
5418 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
5420 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
5422 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
5425 2008-05-23 Zoltan Varga <vargaz@gmail.com>
5427 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
5429 * mini.c: Handle the case when mono_class_vtable () fails.
5431 2008-05-23 Massimiliano Mantione <massi@ximian.com>
5432 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
5435 2008-05-22 Mark Probst <mark.probst@gmail.com>
5437 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
5438 together with domain sharing.
5440 2008-05-22 Mark Probst <mark.probst@gmail.com>
5442 * mini.c: Treat callvirts to final methods like non-virtual calls
5443 when doing generic sharing, i.e. look them up in the runtime
5446 2008-05-22 Mark Probst <mark.probst@gmail.com>
5448 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
5449 with computed types (for generic sharing).
5451 * mini.c: Generic sharing for mkrefany and refanyval.
5453 2008-05-22 Zoltan Varga <vargaz@gmail.com>
5455 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
5458 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
5459 the generic sharing code.
5461 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
5464 2008-05-21 Zoltan Varga <vargaz@gmail.com>
5466 * mini.h: Remove the declaration of mono_aot_init_vtable ().
5468 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
5470 * driver.c: updated copyright date
5472 2008-05-21 Zoltan Varga <vargaz@gmail.com>
5474 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
5477 2008-05-19 Martin Baulig <martin@ximian.com>
5479 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
5480 pointing to the new `_mono_debug_using_mono_debugger' variable.
5483 (mono_main): Check mono_debug_using_mono_debugger() rather than
5484 the `MONO_INSIDE_MDB' environment variable to check whether we're
5485 inside the debugger.
5487 2008-05-19 Zoltan Varga <vargaz@gmail.com>
5489 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
5492 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
5494 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
5496 * mini.c: Added mini_assembly_can_skip_verification. This
5497 function checks if the assembly requested to skip verification.
5498 Fixes part of #387274.
5500 2008-05-07 Zoltan Varga <vargaz@gmail.com>
5502 * mini.c (mini_get_method): Disable the check for open generic classes when
5503 using generic sharing.
5505 * generics.cs: Add a test for #387034.
5507 * mini.c (mini_get_method): Check whenever the method class is an open generic
5508 type, and return NULL in that case, causing a verification error. Fixes
5511 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5513 * driver.c (mono_main): Revert r102623. The right
5514 thing to do is to enable the verifier under verifiable
5515 unless a --security flag was passed.
5517 We need this non-trivial behavior for --verify-all otherwise
5518 mcs-compileall won't be able to use it. As it needs everything to
5519 be verified under validil.
5521 2008-05-06 Martin Baulig <martin@ximian.com>
5525 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
5526 (mono_debugger_thread_cleanup): Likewise.
5527 (mono_debugger_extended_notification): Likewise.
5529 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5531 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
5532 against both inflated and non-inflated methods. We need to check against the
5533 generic definition for cases where the instantiated method is not visible.
5534 We need to check against the inflated types for cases where the instantiation
5535 changes any super type. This fixes #382986.
5537 Note that this doesn't need to be applied to other parts of mono_method_to_ir
5538 that check for visibiliy as generic params only appears as the type subject
5539 of tokens on call opcodes. Field manipulation and ldftn must always
5540 target an exact type.
5542 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5544 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
5545 if no related --security flag is passed.
5547 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5549 * mini-arch.h: Prepare support for ppc64.
5551 Contributed under MIT/X11 license.
5553 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5555 * aot-runtime.c: Prepare support for ppc64.
5557 Contributed under MIT/X11 license.
5559 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5561 * mini-ops.h: Prepare support for ppc64.
5563 Contributed under MIT/X11 license.
5565 2008-05-04 Andreas Färber <andreas.faerber@web.de>
5567 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
5569 Contributed under MIT/X11 license.
5571 2008-05-03 Zoltan Varga <vargaz@gmail.com>
5573 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
5574 assemblies, since aot_name is not a full path, causing us to load MS.NET
5575 assemblies on windows.
5577 2008-04-28 Kornél Pál <kornelpal@gmail.com>
5579 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
5580 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
5581 * main.c: Use UTF-8 encoded command line instead of Windows default code
5582 page on Windows to support Unicode.
5583 * driver.c (DllMain): New function for mixed-mode assembly support.
5584 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
5585 export __stdcall functions without decoration.
5587 Contributed under MIT/X11 license.
5589 2008-04-28 Mark Probst <mark.probst@gmail.com>
5591 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
5592 saving it very early.
5594 2008-04-28 Mark Probst <mark.probst@gmail.com>
5596 * mini.h, mini.c: Lots of code for accessing the old RGCTX
5597 deleted. The only way to access the new RGCTX is via the
5600 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
5601 vtable instead of the RGCTX to static methods.
5603 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
5604 accessing the new RGCTX.
5606 * generic-sharing.c: There is no separation between self, type
5607 arguments and other types in the RGCTX anymore.
5609 2008-04-25 Jonathan Chambers <joncham@gmail.com>
5611 * mini-amd64.c (add_general): Remove previous stack adjustment.
5612 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
5613 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
5614 for 32 bytes of stack space reserved for all calls.
5616 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
5617 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
5620 Code contributed under MIT/X11 license.
5622 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5624 * mini.c (mini_method_verify): Only verify non-inflated methods, check
5625 against the root definition, peeling out method and type instantiations.
5626 Cache verify success results, code that fails verification is still
5627 checked multiple times.
5629 2008-04-23 Zoltan Varga <vargaz@gmail.com>
5631 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
5633 2008-04-23 Jonathan Chambers <joncham@gmail.com>
5635 * mini-amd64.c (add_general): Always increment stack on Win64.
5636 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
5639 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
5640 stack based argument handling on Win64.
5642 Code contributed under MIT/X11 license.
5644 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
5646 * Makefile.am (version.h): Add support for git-svn.
5648 2008-04-22 Zoltan Varga <vargaz@gmail.com>
5650 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
5651 so instead of calling g_spawn_command_line_sync, we do everything by hand,
5652 avoiding allocations and libc functions which might deadlock.
5654 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
5655 'no-gdb-backtrace' option is set.
5657 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
5659 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
5661 2008-04-21 Martin Baulig <martin@ximian.com>
5663 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
5664 and `get_lmf_addr'; `notification_address' is no longer a pointer.
5666 2008-04-21 Martin Baulig <martin@ximian.com>
5668 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
5669 `thread_vtable', `event_handler_ptr' and `event_handler'.
5671 2008-04-21 Martin Baulig <martin@ximian.com>
5673 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
5674 allows delayed initialization of the `executable_code_buffer' when
5677 2008-04-21 Martin Baulig <martin@ximian.com>
5679 * mini.h (mono_debugger_create_notification_function): Removed.
5680 * tramp-*.c (mono_debugger_create_notification_function): Removed.
5682 * mdb-debug-info64.s
5683 (MONO_DEBUGGER__notification_function): Added this in the .text section.
5685 * mdb-debug-info32.s
5686 (MONO_DEBUGGER__notification_function): Added this in the .text section.
5688 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
5689 currently only works on x86 and x86_64, so don't create it on ppc.
5691 2008-04-21 Martin Baulig <martin@ximian.com>
5693 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
5696 (mini_method_compile): In the fp elimination check, check
5697 `debug_options.mdb_optimizations' in addition to
5698 mono_debug_using_mono_debugger().
5700 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
5701 disable some JIT optimizations which are only disabled when
5702 running inside the debugger.
5703 Added `--help-debug' option to describe the debugging options.
5704 (parse_debug_options): New static function to parse the `--debug'
5705 options, so we can easily add more stuff in future.
5707 2008-04-20 Zoltan Varga <vargaz@gmail.com>
5709 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
5710 the method has no body.
5712 2008-04-19 Jonathan Chambers <joncham@gmail.com>
5714 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
5715 assembly is not allowed in MSVC 64-bit compiler.
5716 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
5717 as we get floating point exceptions everywhere.
5719 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
5720 correctly align arguments for call to throw_exception.
5721 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
5723 Code contributed under MIT/X11 license.
5725 2008-04-19 Zoltan Varga <vargaz@gmail.com>
5727 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
5729 2008-04-17 Zoltan Varga <vargaz@gmail.com>
5731 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
5733 * mini-amd64.c (NEW_INS): Set cil_code.
5735 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
5736 from mini-amd64.c so all debugger related logic is in one place.
5738 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
5739 later won't have a random ip assigned to them.
5741 2008-04-16 Zoltan Varga <vargaz@gmail.com>
5743 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
5744 the arch specific function initializes code_size.
5745 (mono_create_delegate_trampoline): Ditto.
5747 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
5748 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
5751 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
5752 running under the debugger.
5754 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
5757 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
5758 debugger. Also move the disabling of optimizations here from driver.c.
5759 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
5762 * mini.h (MonoCompile): Add a few new flags.
5764 2008-04-15 Zoltan Varga <vargaz@gmail.com>
5766 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
5767 so the cil_code field of created MonoInst's is properly set.
5768 (mini_select_instructions): Ditto.
5770 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
5771 (MONO_INST_NEW_CALL): Ditto.
5773 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
5774 in many places so the ins->cil_code field is properly initialized.
5776 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
5779 2008-04-14 Zoltan Varga <vargaz@gmail.com>
5781 * mini.c (mini_method_compile): Print a different message when compiling a
5784 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
5787 2008-04-11 Zoltan Varga <vargaz@gmail.com>
5789 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
5792 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
5794 2008-04-11 Zoltan Varga <vargaz@gmail.com>
5796 * mini.c (handle_stack_args): Make this return void since its return value was
5797 never used. Also set cfg->unverifiable for invalid IL instead of calling
5800 2008-04-10 Mark Probst <mark.probst@gmail.com>
5802 * mini.c: Make sure "this" is live in catch clauses with type
5803 variables in shared generic code.
5805 2008-04-08 Mark Probst <mark.probst@gmail.com>
5807 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
5808 generic_class_is_reference_type() to ensure the proper behaviour
5809 when sharing generic code and the type in question is a type
5812 2008-04-08 Zoltan Varga <vargaz@gmail.com>
5814 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
5815 race conditions when printing thread dumps. Fixes #377738.
5817 2008-04-08 Massimiliano Mantione <massi@ximian.com>
5819 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
5820 shows up when both MonoInst arguments can cause aliasig.
5821 There is likely no way in the current JIT to trigger this problem, but
5822 it showed up in the development of generics sharing, when in a new
5823 opcode both args of an OP_GROUP can be aliases (addresses of a local).
5824 When the generics sharing code will be committed, its tests will be
5825 valid also for this bug.
5827 2008-04-08 Zoltan Varga <vargaz@gmail.com>
5829 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
5832 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
5835 2008-04-07 Zoltan Varga <vargaz@gmail.com>
5837 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
5838 use a more detailed exception message for InvalidCastException.
5840 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
5842 * driver.c (mono_main): Add --debug=casts option to turn on better
5843 InvalidCastException message details.
5845 * mini.c (mini_get_debug_options): New helper function to return the address of
5846 the debug_options variable.
5848 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
5849 the jit_tls TLS variable.
5851 * mini.c (mono_jit_tls): New TLS variable.
5853 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
5856 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
5858 * mini.h: Removed verifer related stuff. This code was moved to verify.c
5860 * mini.c: Removed verifer related stuff, code moved to verify.c.
5862 * driver.c: Using code from verify.c instead of mini.c.
5864 2008-04-05 Zoltan Varga <vargaz@gmail.com>
5866 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
5869 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
5871 * mini.c (check_for_method_verify): Enabling verification of
5872 corlib if mono_verify_all is set. Bugs in the verifier preventing that
5875 2008-04-04 Zoltan Varga <vargaz@gmail.com>
5877 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
5878 caller saved registers as well.
5880 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
5881 saved registers as well.
5883 2008-03-30 Zoltan Varga <vargaz@gmail.com>
5885 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
5887 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
5890 2008-03-27 Zoltan Varga <vargaz@gmail.com>
5892 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
5894 (get_call_info): Take a gsctx argument instead of 'cfg'.
5896 2008-03-26 Zoltan Varga <vargaz@gmail.com>
5898 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
5899 mono_verify_all is set.
5901 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
5903 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
5905 2008-03-25 Zoltan Varga <vargaz@gmail.com>
5907 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
5910 * driver.c mini.c mini.h: Add a --verify-all development option to test the
5911 verifier and the code generated by the compiler.
5913 2008-03-25 Mark Probst <mark.probst@gmail.com>
5915 * mini.c: Generic sharing of the non-nullable case of the box
5918 2008-03-24 Zoltan Varga <vargaz@gmail.com>
5920 * inssel.brg: Fix the build.
5922 * iltests.il.in: Add a test for lconv.ovf.u8.un.
5924 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
5926 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
5927 Array:Address. Fixes #372410.
5929 * iltests.il.in: New tests for readonly prefix.
5931 2008-03-23 Zoltan Varga <vargaz@gmail.com>
5933 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
5936 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
5939 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
5941 * mini.c (mono_decompose_op_imm): New helper function.
5943 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
5944 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5947 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
5948 mono_arch_output_basic_block. Fix warnings.
5950 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
5953 2008-03-22 Zoltan Varga <vargaz@gmail.com>
5955 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
5956 since the extra frame is now detected automatically inside the loop.
5958 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
5959 opts which are now in mono_peephole_ins ().
5961 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
5963 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
5964 frames and skip duplicate managed-to-native frames. Fixes #367665.
5966 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5967 opts which are now in mono_peephole_ins ().
5968 (mono_arch_peephole_pass_2): Ditto.
5970 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
5972 * mini-codegen.c (mono_peephole_ins): New helper function containing the
5973 arch independent peephole optimizations.
5975 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5976 opts which are now in mono_peephole_ins ().
5978 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
5980 * mini-s390.c (mono_arch_output_basic_block): Fix build.
5982 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
5985 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
5986 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
5989 2008-03-21 Zoltan Varga <vargaz@gmail.com>
5991 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
5992 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5995 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
5996 mono_arch_output_basic_block. Fix warnings.
5998 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6000 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6003 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6005 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6008 * iltests.il: Add new tests.
6010 2008-03-20 Kornél Pál <kornelpal@gmail.com>
6012 * mini.c: Removed Windows version macros.
6014 2008-03-20 Mark Probst <mark.probst@gmail.com>
6016 * generic-sharing.c: Put reflection types in the extensible part
6017 of the runtime generic context.
6019 * mini.c: Generic sharing of the GetTypeHandle special case of the
6020 ldtoken instruction.
6022 2008-03-20 Zoltan Varga <vargaz@gmail.com>
6024 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
6026 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
6028 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
6029 consistency with the other version on the linear IR branch.
6031 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
6033 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
6035 * iltests.il.in: Add new tests.
6037 2008-03-19 Zoltan Varga <vargaz@gmail.com>
6039 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
6041 * iltests.il.in: Add new tests.
6043 2008-03-19 Mark Probst <mark.probst@gmail.com>
6045 * mini.c: Two variables with the same name were declared in
6046 nesting contexts and one wasn't initialized. Fixed.
6048 2008-03-19 Mark Probst <mark.probst@gmail.com>
6050 * mini.c: Generic sharing of the initobj instruction.
6052 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6054 * mini.c: make the test to optimize ldtoken from typeof() more
6057 2008-03-18 Mark Probst <mark.probst@gmail.com>
6059 * mini.c: Generic sharing of the initobj instruction for reference
6062 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
6064 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
6065 the mono_breakpoint_clean_code() code to perform bound checks.
6067 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
6069 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
6070 mono_arch_patch_callsite() to include the start of the managed method
6071 to be able to perform bound checks.
6073 2008-03-17 Mark Probst <mark.probst@gmail.com>
6075 * mini.c: Generic sharing for the isinst instruction.
6077 2008-03-17 Mark Probst <mark.probst@gmail.com>
6079 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6080 inssel-long32-mips.brg: Added opcodes for doing indirect calls
6081 with the runtime generic context argument.
6083 * mini.c: Share calls to several types of unsharable methods by
6084 putting the address of the method code in the runtime generic
6085 context and doing an indirect call.
6087 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6090 2008-03-16 Mark Probst <mark.probst@gmail.com>
6092 * generic-sharing.c: Change due to a change in the runtime genric
6095 2008-03-15 Martin Baulig <martin@ximian.com>
6098 (mono_arch_nullify_class_init_trampoline): Add call to
6099 mono_breakpoint_clean_code() to make things work when running
6100 inside the debugger.
6103 (mono_arch_nullify_class_init_trampoline): Add call to
6104 mono_breakpoint_clean_code() to make things work when running
6105 inside the debugger.
6107 2008-03-14 Zoltan Varga <vargaz@gmail.com>
6109 * inssel-long.brg (reg): Fix 64 bit build.
6111 2008-03-14 Mark Probst <mark.probst@gmail.com>
6113 * mini.c, mini.h: Share static generic code by passing it an
6114 implicit argument pointing to the runtime generic context.
6116 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6117 inssel-long32-mips.brg: New opcodes for calling shared static,
6118 which need to be passed the runtime generic context.
6120 * mini-amd64.c, mini-x86.c: Save the runtime generic context
6121 argument on the stack in the prologue if needed. New function for
6122 finding the runtime generic context argument from the registers
6123 saved by the trampoline.
6125 * mini-amd64.h, mini-x86.h: Specify which register to use for the
6126 runtime generic context argument.
6128 * tramp-amd64.c: Also restore the register used for the runtime
6129 generic context argument.
6131 * mini-trampoline.c: Resolve shared static calls by consulting the
6132 runtime generic context via the new argument.
6134 * generic-sharing.c: Add an argument to sharability-checking
6135 functions that specifies whether type variables should be treated
6136 as sharable type arguments.
6138 * inssel-x86.brg: Removed a superfluous, buggy rule.
6140 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6143 2008-03-14 Martin Baulig <martin@ximian.com>
6145 * debug-debugger.c (main_thread_handler): Call
6146 mono_runtime_run_main() without sending any notifications.
6148 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
6150 2008-03-14 Zoltan Varga <vargaz@gmail.com>
6152 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
6154 2008-03-14 Mark Probst <mark.probst@gmail.com>
6156 * tramp-x86.c: Fixed register restore offsets in the trampoline
6157 code for ECX and EDX.
6159 2008-03-12 Geoff Norton <gnorton@novell.com>
6161 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
6162 different ucontext_t implementations.
6163 * exceptions-arm.c: Use the above defines to get exceptions working on
6164 iPhone (based on a patch by Luke Howard lukeh@padl.com)
6165 * mini-arm.c: Implement iPhone icache support (based on a patch by
6166 Luke Howard lukeh@padl.com)
6168 2008-03-12 Mark Probst <mark.probst@gmail.com>
6170 * mini.c: Enable generic sharing of calls to non-static
6171 non-interface non-generic non-value-type methods.
6173 * mini-trampolines.c: Resolve calls from shared generic code.
6175 2008-03-11 Zoltan Varga <vargaz@gmail.com>
6177 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
6179 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
6181 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
6183 * mini.c: some fixes for the AOT compiler.
6185 2008-03-07 Zoltan Varga <vargaz@gmail.com>
6187 * cpu-amd64.md: Add clob:1 to some float opcodes.
6189 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
6191 * mini.h: Added MiniVerifierMode enumeration.
6193 * mini.c: Added mini_verifier_set_mode to control
6194 the usage of the new verifier.
6196 * mini.c (mono_method): Integrated the new verifier.
6198 * driver.c: Extended --security option with validil and
6199 verifiable options to activate the new verifier.
6201 2008-03-07 Zoltan Varga <vargaz@gmail.com>
6203 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
6204 optimization to ctors taking 0 or 2 arguments too.
6206 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
6209 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
6211 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
6213 2008-03-06 Zoltan Varga <vargaz@gmail.com>
6215 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
6216 non-aot case as well.
6218 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
6220 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
6223 * aot-compiler.c (encode_patch): Ditto.
6225 * mini.h (G_MININT32): Fix the definition of this.
6227 2008-03-05 Zoltan Varga <vargaz@gmail.com>
6229 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
6231 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
6233 2008-03-04 Zoltan Varga <vargaz@gmail.com>
6235 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
6236 methods returning vtypes in registers.
6237 (mono_arch_allocate_vars): Ditto.
6239 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
6241 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
6243 * generics.cs: Add a test from the linear IR branch.
6245 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
6247 * mini.c (inline_method): Cache failed inline attempts.
6249 2008-03-04 Mark Probst <mark.probst@gmail.com>
6251 * mini.c: For shared methods of generic classes put the location
6252 of "this" into the MonoGenericJitInfo.
6254 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
6255 register out of a MonoContext by register number. Add the generic
6256 sharing context as an argument to mono_arch_find_this_argument().
6258 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
6259 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
6260 for new arch function.
6262 * mini-exception.c: Handle open exception clauses in shared
6265 * mini-trampolines.c: Supply additional argument to
6266 mono_arch_find_this_argument().
6268 2008-03-04 Zoltan Varga <vargaz@gmail.com>
6270 * Makefile.am (regtests): Run the bench.exe tests last.
6272 2008-03-03 Zoltan Varga <vargaz@gmail.com>
6274 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
6277 2008-03-02 Zoltan Varga <vargaz@gmail.com>
6279 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
6282 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
6284 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
6286 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
6287 whose class has no cctor.
6289 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
6291 2008-03-01 Zoltan Varga <vargaz@gmail.com>
6293 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
6296 2008-02-29 Zoltan Varga <vargaz@gmail.com>
6298 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
6299 to be in sync with the code on the linear IR branch.
6301 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
6303 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
6305 2008-02-27 Zoltan Varga <vargaz@gmail.com>
6307 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
6309 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
6311 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
6313 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
6315 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
6317 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
6320 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
6322 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
6323 OP_LOADR4_MEMBASE emission.
6325 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
6326 (mono_spillvar_offset_float): Ditto.
6328 * mini-mips.c (mono_arch_emit_prolog): Ditto.
6330 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
6333 * basic-long.cs: Add regression tests for them.
6335 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
6337 (mono_arch_allocate_vars): Fix representation of single-precision float
6339 (mono_arch_output_basic_block): Ditto.
6341 * inssel-mips.brg: Ditto, remove duplicate items.
6343 * mini-mips.c (emit_load_volatile_arguments): New function to handle
6344 arguments of tail calls as on other platforms.
6345 (mono_arch_output_basic_block): Handle tail calls.
6347 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
6350 * objects.cs (test_5_pass_static_struct): Add test for it.
6352 Contributed under MIT/X11 license.
6354 2008-02-26 Zoltan Varga <vargaz@gmail.com>
6356 * Makefile.am: Use gmcs for compiling the regression tests.
6358 * *.2.cs *.2.il: Rename to *.cs and *.il.
6360 2008-02-24 Zoltan Varga <vargaz@gmail.com>
6362 * regalloc.h: Make the vassign array smaller.
6364 * mini.c (mini_method_compile): Remove an unused field in cfg.
6366 * mini-codegen.c: Add a bunch of micro optimizations.
6368 2008-02-23 Zoltan Varga <vargaz@gmail.com>
6370 * regalloc.h: Remove some unused fields.
6372 2008-02-22 Zoltan Varga <vargaz@gmail.com>
6374 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
6376 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
6378 2008-02-22 Mark Probst <mark.probst@gmail.com>
6380 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
6382 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
6383 trampoline: Fetch an entry from the runtime generic context. If
6384 it's NULL, jump to the actual trampoline to fill the runtime
6385 generic context. Otherwise, return it.
6387 * mini.c: Call the lazy fetch trampoline to get entries out of the
6388 runtime generic context.
6390 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
6391 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
6392 tramp-sparc.c: Stubs for the lazy fetch trampoline.
6394 2008-02-21 Mark Probst <mark.probst@gmail.com>
6396 * mini.c: Fetch data out of the extensible part of the runtime
6397 generic context instead of calling a helper function.
6399 * generic-sharing.c: Some functions moved into
6400 metadata/generic-sharing.c. Helper function for fetching other
6401 types now checks and asserts against extensible rgctx (just for
6402 debugging purposes - the helper function isn't called anymore
6403 unless for debugging).
6405 2008-02-21 Zoltan Varga <vargaz@gmail.com>
6407 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
6408 for tail calls up to the point that the tests in iltests.exe run. Also add a
6409 dummy CKFINITE implementation.
6410 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
6411 needed for trampoline LMF frames.
6413 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
6414 trampoline LMF frames.
6416 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
6418 * mini.c (inline_method): clean any pending loader error when inlining fail.
6419 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
6421 2008-02-21 Zoltan Varga <vargaz@gmail.com>
6423 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
6425 * aot-runtime.c (decode_patch_info): Ditto.
6427 * mini.c (mono_resolve_patch_target): Ditto.
6429 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
6432 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
6434 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
6435 if it references an icall address.
6437 2008-02-20 Zoltan Varga <vargaz@gmail.com>
6439 * cpu-s390x.md: Remove some more unused opcodes.
6441 * cpu-s390x.md: Remove some unused opcodes.
6443 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
6444 mono_op_imm_to_op ().
6446 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
6447 instead of a switch statement.
6449 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
6450 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
6452 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
6454 * mini-codegen.c: Remove unused mono_regstate2_... functions.
6456 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
6459 2008-02-19 Zoltan Varga <vargaz@gmail.com>
6461 * driver.c (mono_main): Improve error reporting when an assembly cannot be
6462 opened. Fixes #362607.
6464 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
6466 * iltests.il.in: Add a test for static methods in interfaces.
6468 2008-02-18 Zoltan Varga <vargaz@gmail.com>
6470 * genmdesc.c (build_table): Fix a crash on older glib versions.
6472 * cpu-sparc.md: Remove some unused opcodes.
6474 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
6475 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
6477 * cpu-amd64.md: Remove some unused opcodes.
6479 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
6480 like the other opcodes.
6482 2008-02-17 Zoltan Varga <vargaz@gmail.com>
6484 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
6486 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
6488 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
6489 variables 'cfg' instead of 'm' for consistency.
6491 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
6493 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
6494 argument holding the vtype return address, to avoid the ambigious use of
6495 cfg->ret for this purpose.
6497 * mini.c (NEW_RETLOADA): Use vret_addr if set.
6499 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
6501 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
6502 new mono_print_ins () function which only takes one argument.
6504 2008-02-15 Zoltan Varga <vargaz@gmail.com>
6506 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
6509 2008-02-14 Zoltan Varga <vargaz@gmail.com>
6511 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
6513 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
6515 * mini-x86.c: Sync with the version on the linear IR branch by adding new
6516 opcodes and other small changes.
6518 * mini-ops.h: Add some new opcodes from the linear IR branch.
6520 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
6522 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
6523 opcodes, use the REG_MEMBASE opcodes instead.
6525 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
6526 opcodes, use the REG_MEMBASE opcodes instead.
6528 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
6531 * mini.c (mono_op_imm_to_op): New helper function.
6533 * mini-ops.h: Add some opcodes from linear IR branch.
6535 2008-02-13 Zoltan Varga <vargaz@gmail.com>
6537 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
6540 2008-02-12 Zoltan Varga <vargaz@gmail.com>
6542 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
6545 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
6547 2008-02-09 Zoltan Varga <vargaz@gmail.com>
6549 * aot-compiler.c (emit_method_code): Add an assert.
6551 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
6552 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
6555 2008-02-08 Zoltan Varga <vargaz@gmail.com>
6557 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
6558 some load/store opcodes so they are consistent.
6559 (mono_arch_emit_prolog): Simplify some code.
6561 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
6563 * objects.cs: Add tests for large argument offsets on ARM.
6565 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
6566 stack offsets. Fixes #359651.
6568 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
6570 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
6572 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
6574 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
6576 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
6578 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
6579 rid of CEE_CONV_R_UN.
6581 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
6583 2008-02-07 Zoltan Varga <vargaz@gmail.com>
6585 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
6587 * mini.c (mono_normalize_opcodes): Add some more opcodes.
6589 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
6591 * cpu-amd64.md: Remove some unused opcodes.
6593 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
6595 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
6597 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
6598 arch specific functions for its parts. Call the peephole pass after local
6599 regalloc so the prolog can compute a more accurate max_offset.
6601 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
6602 the corresponding OP_I/OP_L opcodes.
6604 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
6606 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
6608 2008-02-06 Zoltan Varga <vargaz@gmail.com>
6610 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
6611 as they are handled in mini.c.
6613 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
6615 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
6616 case since it is handled in mini.c.
6618 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
6620 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
6622 * *.c: Use the new opcodes in the IR and back end code.
6624 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
6626 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
6628 2008-02-06 Mark Probst <mark.probst@gmail.com>
6630 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
6631 an assert because it has a race condition.
6633 2008-02-06 Zoltan Varga <vargaz@gmail.com>
6635 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
6637 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
6639 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
6641 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
6642 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
6644 2008-02-05 Zoltan Varga <vargaz@gmail.com>
6646 * cpu-amd64.md (move): Correct the maximum size of move.
6648 2008-02-05 Mark Probst <mark.probst@gmail.com>
6650 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
6651 the generic class init trampoline to return quickly if the class
6654 2008-02-04 Zoltan Varga <vargaz@gmail.com>
6656 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
6657 issues where an 32 bit callsite cannot be patched by a 64 bit address.
6659 2008-02-03 Zoltan Varga <vargaz@gmail.com>
6661 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
6664 2008-01-31 Zoltan Varga <vargaz@gmail.com>
6666 * objects.cs: Add some soft-float tests.
6668 * mini.c: Fix a couple more soft-float issues.
6670 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
6672 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
6675 2008-01-30 Zoltan Varga <vargaz@gmail.com>
6677 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
6678 exception happens while compiling a virtual method.
6680 2008-01-29 Zoltan Varga <vargaz@gmail.com>
6682 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
6684 * mini-sparc.c: Fix build.
6686 * mini-sparc.c (get_call_info): Add support for generic sharing.
6688 * mini-exceptions.c: Add a FIXME.
6690 2008-01-27 Zoltan Varga <vargaz@gmail.com>
6692 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
6693 altstack handling code.
6695 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
6697 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
6699 * mini-s390.c: Add support for generic sharing.
6701 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
6703 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6705 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
6707 * mini-s390x.c: Add support for generic sharing.
6709 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
6711 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6713 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
6714 can be used since it takes a 16 bit signed immediate.
6716 * inssel-s390x.brg: Fix OP_SETRET.
6718 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
6720 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
6722 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
6724 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
6726 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
6729 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
6732 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
6733 of the unused mono_arch_patch_delegate_trampoline stuff.
6735 2008-01-26 Zoltan Varga <vargaz@gmail.com>
6737 * basic-long.cs: Move the fp related tests to basic-float.cs.
6739 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
6741 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
6743 * basic-calls.cs: Add a test for proper float argument passing.
6745 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
6746 if the context corresponds to an exception received through a signal.
6748 * exceptions.cs: Add a test for nullref handling at the start of a try
6751 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
6753 * jit-icalls.c (mono_break): New JIT icall.
6755 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
6757 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
6759 2008-01-25 Zoltan Varga <vargaz@gmail.com>
6761 * cpu-*.md: Get rid of unused opcodes.
6763 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
6765 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
6768 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
6771 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
6772 the arch independent trampoline code in mini-trampolines.c.
6774 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
6776 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
6778 * mini-s390.h: Remove an unused define.
6780 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
6781 the arch independent trampoline code in mini-trampolines.c.
6783 * mini-arm.c (mono_arch_emit_prolog): Fix build.
6785 2008-01-24 Zoltan Varga <vargaz@gmail.com>
6787 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
6789 * mini-s390.c (mono_arch_emit_prolog): Fix build.
6791 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
6793 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
6795 * cpu-amd64.md: Use smaller sizes for int opcodes.
6797 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
6799 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
6802 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
6805 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
6806 instead of though a pointer to save an indirection when accessing elements of
6809 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
6811 (NOT_IMPLEMENTED): New helper macro.
6812 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
6815 * *.c: Use the new helper macro.
6817 2008-01-21 Zoltan Varga <vargaz@gmail.com>
6819 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
6821 2008-01-20 Zoltan Varga <vargaz@gmail.com>
6823 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
6826 2008-01-18 Zoltan Varga <vargaz@gmail.com>
6828 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
6829 profiling is enabled.
6831 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
6833 (mono_arch_emit_prolog): Add more first bblock optimizations.
6835 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
6836 in order if possible.
6837 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
6838 bblock, since the arguments are still in their original registers.
6840 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
6842 2008-01-17 Zoltan Varga <vargaz@gmail.com>
6844 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
6847 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
6850 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
6852 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
6853 process async exceptions received while in unmanaged code.
6855 * mini.c (mini_init): Install a callback with the runtime which will be called
6856 when a thread receives an async exception while in unmanaged code.
6858 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
6860 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
6862 2008-01-16 Wade Berrier <wberrier@novell.com>
6869 2008-01-16 Zoltan Varga <vargaz@gmail.com>
6871 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
6872 compilation with sun cc.
6874 * cpu-*.md: Fix the build.
6876 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
6878 * mini-amd64.h: Add some comments to the MonoLMF structure.
6880 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
6882 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
6883 in the LMF structure if possible. This saves two instructions in the
6884 managed->native wrappers.
6886 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
6888 2008-01-16 Mark Probst <mark.probst@gmail.com>
6890 * generic-sharing.c: New type argument lookup code which uses the
6891 runtime generic context template.
6893 2008-01-15 Zoltan Varga <vargaz@gmail.com>
6895 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
6897 * mini-arm.c (add_general): Fix arm eabi parameter passing.
6898 (mono_arch_output_basic_block): Fix localloc implementation.
6900 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
6902 * mini-ia64.c (peephole_pass): Fix ia64 build.
6904 * mini-amd64.c (peephole_pass): Fix a warning.
6906 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
6907 at a constant offset from sp/fp.
6909 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
6910 instead of obtaining it from *lmf in the managed method case.
6912 2008-01-14 Zoltan Varga <vargaz@gmail.com>
6914 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
6916 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
6918 * mini.h (MonoInstList): New type.
6919 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
6920 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
6921 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
6922 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
6923 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
6924 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
6925 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
6926 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
6927 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
6928 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
6929 MONO_INST_LIST_FOR_EACH_ENTRY,
6930 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
6931 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
6932 mono_inst_list_first, mono_inst_list_last,
6933 mono_inst_list_next, mono_inst_list_prev): New instruction
6934 list handling interfaces.
6935 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
6936 list head 'ins_list'.
6937 (MonoInst): Replace next pointer with list head 'node'.
6938 (MonoCallInst): Make 'out_args' a MonoInstList.
6939 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
6940 (MonoCompile): Delete reverse_inst_list and
6941 reverse_inst_list_len.
6942 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
6943 mono_arch_lowering_pass, mono_arch_local_regalloc,
6944 mono_arch_output_basic_block, mono_arch_emit_prolog):
6945 Convert to new instruction lists.
6946 (insert_after_ins): Delete.
6947 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
6949 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
6950 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
6951 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
6952 mono_emulate_opcode, mono_emit_load_got_addr,
6953 inline_method, mono_method_to_ir, mono_print_bb_code,
6954 print_dfn, decompose_pass, nullify_basic_block,
6955 replace_out_block_in_code, remove_block_if_useless,
6956 merge_basic_blocks, move_basic_block_to_end,
6957 try_unsigned_compare, optimize_branches, mono_print_code,
6958 mini_select_instructions, remove_critical_edges): Likewise.
6959 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
6960 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
6961 mono_arch_output_basic_block, mono_arch_emit_prolog):
6963 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
6964 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6965 mono_arch_output_basic_block): Likewise.
6966 (inst_list_prepend, insert_after_ins): Delete.
6967 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
6968 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
6970 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
6971 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
6972 mono_arch_emit_prolog): Likewise.
6973 * cfold.c (mono_constant_fold): Likewise.
6974 * liveness.c (visit_bb, mono_analyze_liveness,
6975 optimize_initlocals): Likewise.
6976 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
6977 * graph.c (mono_draw_code_cfg): Likewise.
6978 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
6979 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
6980 mono_ssa_cprop): Likewise.
6981 * abcremoval (get_relations_from_previous_bb, process_block):
6983 * local-propagation (mono_cprop_invalidate_values,
6984 mono_local_cprop_bb): Likewise.
6985 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
6986 peephole_pass, mono_arch_output_basic_block,
6987 mono_arch_emit_prolog): Likewise.
6988 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
6989 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6990 mono_arch_emit_prolog): Likewise.
6991 (insert_after_ins): Delete.
6992 * aliasing.c (print_code_with_aliasing_information,
6993 mono_build_aliasing_information, mono_aliasing_deadce):
6994 Convert to new instruction lists.
6995 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
6996 peephole_pass, NEW_INS, mono_arch_lowering_pass,
6997 mono_arch_local_regalloc, mono_arch_output_basic_block):
6999 (insert_after_ins): Delete.
7000 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
7001 peephole_pass, mono_arch_output_basic_block): Convert to
7002 new instruction lists.
7003 * mini-codegen (InstList, inst_list_prepend,
7004 insert_after_ins): Delete.
7005 (insert_before_ins, get_register_force_spilling,
7006 get_register_spilling, free_up_ireg, free_up_reg,
7007 create_copy_ins, create_spilled_store, alloc_int_reg,
7008 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
7009 to new instruction lists.
7010 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
7011 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7012 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
7013 (insert_after_ins): Delete.
7014 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
7015 mono_arch_local_regalloc, mono_arch_output_basic_block,
7016 mono_arch_call_opcode): Convert to new instruction lists.
7017 (insert_after_ins): Delete.
7018 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
7019 peephole_pass, mono_arch_output_basic_block,
7020 mono_arch_emit_prolog): Convert to new instruction lists.
7022 2008-01-11 Zoltan Varga <vargaz@gmail.com>
7024 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
7026 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
7029 * Makefile.am (version.h): Make this work with non-bash shells.
7031 2008-01-10 Zoltan Varga <vargaz@gmail.com>
7033 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
7035 2008-01-08 Zoltan Varga <vargaz@gmail.com>
7037 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
7038 the InitializeArray optimization.
7040 2008-01-06 Zoltan Varga <vargaz@gmail.com>
7042 * mini.c driver.c: Don't include os/gc_wrapper.h.
7044 2008-01-05 Zoltan Varga <vargaz@gmail.com>
7046 * mini.c (print_jit_stats): Print GC statistics if available.
7048 2008-01-04 Zoltan Varga <vargaz@gmail.com>
7050 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
7052 2007-12-29 Zoltan Varga <vargaz@gmail.com>
7054 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
7056 2007-12-26 Zoltan Varga <vargaz@gmail.com>
7058 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
7060 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7062 * driver.c (mono_main): Ditto.
7064 2007-12-23 Zoltan Varga <vargaz@gmail.com>
7066 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
7068 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
7069 in the vtable can't be encoded.
7070 (compile_method): Ditto.
7072 2007-12-21 Zoltan Varga <vargaz@gmail.com>
7074 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
7077 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
7080 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
7081 the top LMF entry belongs to the current method.
7083 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
7085 2007-12-20 Zoltan Varga <vargaz@gmail.com>
7087 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
7089 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
7091 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
7093 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
7095 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
7097 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
7100 * basic-float.cs: Add an ulong->double cast test.
7102 2007-12-15 Zoltan Varga <vargaz@gmail.com>
7104 * mini.c (mono_method_to_ir): Fix a warning.
7106 2007-12-14 Zoltan Varga <vargaz@gmail.com>
7108 * mini-ops.h: Add OP_SWITCH.
7110 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
7111 CEE_SWITCH in back-end code, use OP_SWITCH instead.
7113 2007-12-11 Geoff Norton <gnorton@novell.com>
7115 * mini-s390x.c: Minor change to the MAX() define to allow
7116 it to compile with other gcc versions.
7118 2007-12-11 Geoff Norton <gnorton@novell.com>
7121 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
7123 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
7125 exceptions-arm.c (mono_arch_get_restore_context): Restore
7128 exceptions-arm.c (throw_exception): Save the frame pointer.
7129 This is a partial fix for #323747. Only the client side is
7132 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
7134 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
7135 was using an unrelated variable to log the class which
7136 needed the cctor to be called. This was crashing on arm.
7138 2007-12-09 Robert Jordan <robertj@gmx.net>
7140 * mini-x86.c (mono_arch_emit_epilog):
7141 Consider all kinds of 64-bit types. Fixes #323114.
7143 2007-12-08 Zoltan Varga <vargaz@gmail.com>
7145 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
7147 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7149 * mini-amd64.c (peephole_pass): Add a missing instruction check.
7151 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7153 * mini.c: run type ctor before allocating an object, not only
7154 when running it's constructor method (fixes at least part of bug #342507).
7156 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7158 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
7160 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
7161 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
7164 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
7165 mono_generic_class_init_trampoline () the same as it is done with the other
7168 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
7169 aot-runtime.c aot-compiler.c: Implement AOT support.
7171 2007-12-07 Mark Probst <mark.probst@gmail.com>
7173 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
7174 build for archs which don't have the vtable trampoline defined
7177 2007-12-07 Zoltan Varga <vargaz@gmail.com>
7179 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
7181 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
7183 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
7185 * tramp-<ARCH>.c: Use the new helper function.
7187 2007-12-07 Mark Probst <mark.probst@gmail.com>
7189 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
7190 trampoline call, which takes a vtable argument.
7192 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
7193 OP_TRAMPCALL_VTABLEs like other calls.
7195 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
7196 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
7197 call. Implemented a support function which fetches the vtable
7198 from a register set.
7200 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
7201 Implemented a generic class init trampoline, using the
7202 OP_TRAMPCALL_VTABLE opcode.
7204 * mini.c: Implemented static field access when sharing generic
7205 code. This implies initing the class using the new
7206 OP_TRAMPCALL_VTABLE call.
7208 2007-12-07 Mark Probst <mark.probst@gmail.com>
7210 * mini.c: Don't compile methods with sharing enabled if their
7211 classes are disabled for sharing.
7213 2007-12-06 Zoltan Varga <vargaz@gmail.com>
7215 * inssel.brg: Add a missing sign extension to the GETCHR and array access
7216 opcodes. Fixes #346563.
7218 * objects.cs: Add a new test.
7220 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
7222 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
7223 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
7225 2007-12-06 Zoltan Varga <vargaz@gmail.com>
7227 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
7229 2007-12-03 Zoltan Varga <vargaz@gmail.com>
7231 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
7234 2007-12-02 Zoltan Varga <vargaz@gmail.com>
7236 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
7238 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
7239 optimization in the AOT case.
7241 2007-11-30 Zoltan Varga <vargaz@gmail.com>
7243 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
7245 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
7247 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
7249 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
7251 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
7252 is created by the inlined delegate ctor.
7254 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7256 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
7258 2007-11-29 Zoltan Varga <vargaz@gmail.com>
7260 * cpu-x86.md: Fix the length of ckfinite.
7262 2007-11-28 Zoltan Varga <vargaz@gmail.com>
7264 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7266 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
7267 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
7269 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
7271 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
7272 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
7274 2007-11-28 Martin Baulig <martin@ximian.com>
7277 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
7278 after creating the trampoline.
7280 2007-11-27 Zoltan Varga <vargaz@gmail.com>
7282 * aot-runtime.c (load_aot_module): Check runtime version if needed.
7284 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
7287 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
7288 instead of the calling method to help AOT.
7290 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
7292 2007-11-26 Zoltan Varga <vargaz@gmail.com>
7294 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
7297 2007-11-23 Zoltan Varga <vargaz@gmail.com>
7299 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
7301 * aot-compiler.c (compile_method): Correct check for generic method definitions.
7302 (encode_method_ref): No need to handle generic method definitions specially.
7304 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
7306 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
7309 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
7311 (compile_method): Enable generic sharing.
7313 2007-11-22 Zoltan Varga <vargaz@gmail.com>
7315 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
7316 (mini_method_compile): Add preliminary support for AOTing shared generic code.
7318 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
7321 * mini-trampolines.c: Fix a warning.
7323 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
7325 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
7326 (generic_class_is_reference_type): Remove unused function.
7328 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
7329 in the generic vtable trampoline case.
7331 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
7333 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
7334 return an AOT method based on a vtable slot.
7336 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
7338 * mini.c (mini_get_vtable_trampoline): Export this.
7340 2007-11-22 Martin Baulig <martin@ximian.com>
7343 (MonoDebuggerInfo): Move `debugger_version' up.
7345 2007-11-22 Martin Baulig <martin@ximian.com>
7348 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
7350 * mini-trampolines.c
7351 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
7352 after compiling the method.
7354 2007-11-20 Martin Baulig <martin@ximian.com>
7357 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
7358 (mono_debugger_remove_breakpoint): Likewise.
7359 (mono_debugger_check_breakpoints): Likewise.
7361 * debug-debugger.c: Implement the new breakpoint interface here.
7363 2007-11-18 Zoltan Varga <vargaz@gmail.com>
7365 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
7366 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
7368 * mini-x86.c (mono_arch_output_basic_block): Ditto.
7370 2007-11-17 Zoltan Varga <vargaz@gmail.com>
7372 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
7374 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
7377 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
7380 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
7381 returning a vtype in a register.
7383 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
7384 here from the arch specific code.
7386 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
7389 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
7390 (mono_arch_emit_prolog): Increment maximum prolog size.
7392 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
7393 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
7395 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
7396 MonoGenericSharingContext.
7398 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
7399 MonoGenericSharingContext. Allocate memory from the cfg mempool.
7401 2007-11-15 Mark Probst <mark.probst@gmail.com>
7403 * mini.c, mini.h, generic-sharing.c: Functions for producing code
7404 which extract fields out of the runtime generic context. Full
7405 sharing of the NEWARR opcode.
7407 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
7409 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
7410 --enable-minimal=ssa.
7412 2007-11-13 Zoltan Varga <vargaz@gmail.com>
7414 * mini-trampolines.c (mono_delegate_trampoline): Update after
7415 mono_marshal_get_delegate_invoke () signature change.
7417 2007-11-13 Mark Probst <mark.probst@gmail.com>
7419 * mini.c: Removed the shared context in favor of the generic
7420 sharing context. Allocate the MonoJitInfo structure with room for
7421 the generic sharing context if it's needed.
7423 * mini.h: Remove MonoGenericSharingContext declaration. It's in
7424 domain-internals.h now.
7426 * mini-x86.c: Pass the generic sharing context to get_call_info ().
7428 * generic-sharing.c: Several changes for working without a shared
7429 context and instead operating on open types instead.
7431 2007-11-12 David S. Miller <davem@davemloft.net>
7433 * inssel-sparc.brg: Fix double instruction emit.
7435 2007-11-12 Zoltan Varga <vargaz@gmail.com>
7437 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
7438 Get/Set/Address methods.
7440 * mini.c debug-debugger.c mini-trampolines.c: Update after
7441 mono_marshal_get_delegate_invoke signature change.
7443 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
7445 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
7446 This can happens with dynamic methods. Fixes the other bug in #322722.
7448 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
7450 * tramp-arm.c (mono_arch_patch_callsite): Support patching
7453 * mini-arm.c (arm_patch): Implement patching of BX call
7454 sequence. Fixes one of the bugs in #322722.
7456 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
7458 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
7459 under Linux. We only need to flush every 32-byte cache line.
7461 2007-11-07 Massimiliano Mantione <massi@ximian.com>
7464 move_basic_block_to_end: Add branches when needed, eventually creating
7466 optimize_branches: added a parameter that tells if it's ok to create
7467 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
7468 and avoid calling move_basic_block_to_end when it's not ok.
7471 2007-11-07 Mark Probst <mark.probst@gmail.com>
7473 * mini.c: Abort inlining call to InitializeArray if something
7474 looks wrong. Let the icall handle it, which now has proper safety
7477 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
7479 * mini.c (mono_spill_call): add support for soft-float.
7481 * mini.c (mono_method_to_ir): add support for soft-float
7482 to inlined functions that return float.
7484 * mini.c (mono_method_to_ir): add support for soft-float
7485 to cee_stsfld opcode on float fields.
7487 2007-11-05 Geoff Norton <gnorton@novell.com>
7489 * mini-x86.h: Fix the structure access for X86 Leopard.
7492 2007-11-05 Martin Baulig <martin@ximian.com>
7494 * mini-trampolines.c
7495 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
7496 after compiling the method to notify the debugger.
7498 2007-11-05 Martin Baulig <martin@ximian.com>
7500 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
7502 2007-11-02 Zoltan Varga <vargaz@gmail.com>
7504 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
7505 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
7507 2007-11-01 Zoltan Varga <vargaz@gmail.com>
7509 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
7510 native-to-managed wrappers.
7512 2007-11-01 Geoff Norton <gnorton@novell.com>
7514 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
7517 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7519 * mini.c, mini-x86.c: when getting back from unmanaged code
7520 to managed via a marshaled delegate we also need to set the
7523 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7525 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
7528 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7530 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
7531 let the debugger or other external agents to tell the JIT when
7532 a sw breakpoint has been inserted in the code that the JIT needs
7533 to be able to inspect.
7535 2007-10-31 Martin Baulig <martin@ximian.com>
7538 (MonoDebuggerInfo): Remove `runtime_class_init'.
7540 2007-10-30 Martin Baulig <martin@ximian.com>
7543 (mono_debugger_thread_created): Added `MonoThread *' argument.
7544 (mono_debugger_extended_notification): New public method.
7545 (mono_debugger_trampoline_compiled): New public method.
7548 (MonoDebuggerThreadInfo): Added `thread' and
7549 `extended_notifications' fields.
7552 (debugger_executable_code_buffer): New static variable.
7555 (MonoDebuggerInfo): Added `executable_code_buffer',
7556 `executable_code_buffer_size', `breakpoint_info_area',
7557 `breakpoint_table' and `breakpoint_table_size'.
7559 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
7561 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
7562 that IP either is an unused value or the vtable pointer. IMT
7563 calls use vtable + offset now. Reduced by almost half the size
7566 2007-10-26 Jonathan Chambers <joncham@gmail.com>
7568 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
7569 defines to access param registers. Replace long usage with
7570 gsize as sizeof(long) != sizeof(void*) on Win64.
7572 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
7573 on Win64. Fix intrinsic, use _AddressOfReturnAddress
7574 instead of non-existant _GetAddressOfReturnAddress.
7576 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
7577 param registers. Save/restore %rdi and %rsi in MonoLMF.
7579 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
7580 param registers. Modify (throw_exception) signature to take
7581 %rdi and %rsi on Win64.
7583 Code is contributed under MIT/X11 license.
7585 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7587 * helpers.c: unlink debugging output files.
7589 2007-10-25 Zoltan Varga <vargaz@gmail.com>
7591 * mini.c: Move mono_create_ftnptr () to object.c.
7593 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
7595 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
7596 optional. This function can now be used to disassemble code generated
7597 outside the JIT such as trampolines and IMT thunks.
7599 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
7601 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
7602 vtable pointer from a ldr instruction.
7604 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
7605 new IMT call sequence.
7607 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
7608 call sequence for interface invocations.
7610 * mini-arm.c (mono_arch_emit_imt_argument): added, required
7611 for imt support. This function is empty since IMT on ARM requires no
7612 special handling on the IR side.
7614 * mini-arm.c (mono_arch_find_imt_method): added, required for
7617 * mini-arm.c (mono_arch_find_this_argument): added, required
7620 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
7621 a ldr instruction to load a value stored in the code stream.
7623 * mini-arm.c (mono_arch_build_imt_thunk):added, required
7627 2007-10-23 Zoltan Varga <vargaz@gmail.com>
7629 * mini.c (mini_init): Install the jump trampoline callback.
7631 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7633 * mini-trampolines.c: handle synchronized methods with the common
7634 vtable trampoline (bug #335601).
7636 2007-10-17 Zoltan Varga <vargaz@gmail.com>
7638 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
7640 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
7643 * mini-ia64.h mini-ia64.c: Add support for IMT.
7645 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
7646 prolog. Fixes #331958.
7648 2007-10-15 Zoltan Varga <vargaz@gmail.com>
7650 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
7652 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7654 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
7657 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7659 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
7662 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
7664 * mini-x86.c, mini-x86.h: x86 support for the common vtable
7667 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
7669 * mini-trampolines.c: changed the magic rampoline to understand
7670 the common vtable trampoline method: the method to invoke is
7671 determined by the vtable displacement of the call.
7673 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7675 * mini.c, mini.h: register the common vtable trampoline if the
7676 architecture supports it.
7678 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7680 * cpu-amd64.md: use the correct max length for tls_get.
7682 2007-10-14 Zoltan Varga <vargaz@gmail.com>
7684 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
7685 CEE_STELEM_ANY. Fixes #333696.
7687 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7689 * exceptions-x86.c: provide more graceful handling of the case where
7690 we followed a bogus function pointer from managed code (bug #332866).
7692 2007-10-11 Mark Probst <mark.probst@gmail.com>
7694 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
7695 replaces the generic_shared flag and will carry more information
7698 * generic-sharing.c: Added mini_type_stack_size() which allows
7699 allows open types if given a generic sharing context.
7700 mini_get_basic_type_from_generic() takes a
7701 MonoGenericSharingContext* instead of a MonoCompile* now.
7703 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
7704 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
7705 mini-sparc.c, mini-x86.c: Trivial changes required by the two
7706 changes above. Just passing arguments through to the right
7709 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7711 * mini-arm.c: unify the call emission to emit_code_seq().
7713 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
7715 * tramp-arm.c: reduced the trampoline size.
7717 2007-10-10 Mark Probst <mark.probst@gmail.com>
7719 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
7720 variable handling out of arch-specific code.
7722 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7724 * mini-arm.c: implemented fast delegate dispatch.
7726 2007-10-09 Zoltan Varga <vargaz@gmail.com>
7728 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
7729 that fp elimination is turned off if the space required by locals is too
7732 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7734 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
7735 ARM to the new style trampoline.
7737 2007-10-09 Zoltan Varga <vargaz@gmail.com>
7739 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
7741 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
7743 2007-10-09 Martin Baulig <martin@ximian.com>
7746 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
7747 `field_info_offset_offset'.
7749 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7751 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
7752 removed more internal usage of the r11 register and made it available
7753 to the register allocator.
7755 2007-10-08 Mark Probst <mark.probst@gmail.com>
7757 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
7758 when sharing generics and treat type variables as references.
7760 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7762 * mini-ppc.c: started removing the internal uses of register r11
7763 to eventually allow the register allocator to manage it as an
7764 additional available register.
7766 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7768 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
7770 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7772 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
7773 specific trampolines as they are not performance critical as a jump
7774 target (maybe align as before only for AOT code?). This saves about
7775 200 KB of native code on x86 for monodevelop startup.
7777 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7779 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
7780 monodevelop startup.
7782 2007-10-06 Zoltan Varga <vargaz@gmail.com>
7784 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
7786 * mini-sparc.h mini-sparc.c: Implement IMT support.
7788 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
7789 its smaller and doesn't clobber sparc_g1.
7791 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
7793 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7795 * mini-ppc.c: optimized the size of the IMT thunks a bit.
7797 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7799 * mini-ppc.c: implemented fast delegate invocation.
7801 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
7803 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
7805 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7807 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
7808 code to the new style trampoline in preparation for IMT support.
7810 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
7812 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
7813 systems already. This also reduces the specific trampiline sizes and
7814 prepares for the use of r12 as the IMT identifier register.
7816 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7818 * mini-mips.h: endianess fix (simplified from a patch by
7819 Thomas Kunze <thommy@tabao.de>, bug #323737).
7821 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7823 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
7824 to access ucontext fields and enable netbsd support
7825 (partially from Magnus Henoch <mange@freemail.hu>).
7827 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7829 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
7830 use the preprocessor from the CPP env var if it is set.
7832 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7834 * mini-trampolines.c: fixed an assertion and moved it earlier in the
7835 code, before interface_offset gets used.
7837 2007-10-02 Zoltan Varga <vargaz@gmail.com>
7839 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
7840 mono_class_setup_vtable () before accessing klass->vtable.
7842 2007-10-01 Zoltan Varga <vargaz@gmail.com>
7844 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
7847 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7849 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
7850 IMT slots (this saves hundreds of KB of memory in programs like
7851 IronPython and Monodevelop).
7853 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
7855 * mini.c: print the delegate counter.
7857 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
7859 * mini-x86.c: make it easier to enable the debugging code for IMT
7862 2007-09-28 Martin Baulig <martin@ximian.com>
7865 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
7866 `mono_method_klass_offset' and `mono_method_token_offset'.
7868 2007-09-20 Mark Probst <mark.probst@gmail.com>
7870 * mini.c: First generics sharing implementation. Can only share
7871 in very simple cases. If sharing doesn't work it falls back to
7872 dedicated compilation.
7874 * mini.h: Flag in MonoCompile to specify whether generic
7875 compilation is shared. Flags enum for marking which generic inst
7876 of a context is used. Prototypes for helper functions.
7878 * generic-sharing.c: Helper functions for generic method sharing.
7880 * optflags-def.h: Optimization flag (gshared) for enabling generic
7881 method sharing added.
7883 * Makefile.am: generic-sharing.c added.
7885 2007-09-19 Daniel Nauck <dna@mono-project.de>
7887 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
7889 2007-09-19 Massimiliano Mantione <massi@ximian.com>
7890 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
7893 2007-09-19 Martin Baulig <martin@ximian.com>
7895 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
7896 mono_debug_cleanup() is now part of mono_cleanup().
7898 2007-09-18 Zoltan Varga <vargaz@gmail.com>
7900 * driver.c (mono_main): Fix a warning.
7902 2007-09-17 Zoltan Varga <vargaz@gmail.com>
7904 * aot-compiler.c: Optimize various parts when processing large assemblies.
7907 * mini.c (mono_patch_info_hash): Improve hash function.
7909 2007-09-14 Jonathan Chambers <joncham@gmail.com>
7911 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
7913 Code is contributed under MIT/X11 license.
7915 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7917 * mini.c (mini_init): Fix a leak.
7919 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
7921 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7923 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
7925 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7927 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
7929 2007-09-13 Zoltan Varga <vargaz@gmail.com>
7931 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
7934 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
7936 * mini.c (handle_alloc): Enable managed allocators in AOT code.
7938 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
7940 * aot-runtime.c (decode_patch_info): Ditto.
7942 2007-09-12 Jonathan Chambers <joncham@gmail.com>
7944 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
7945 static case. Cache delegates in architecture specific code,
7946 based on number of parameters.
7948 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
7949 in architecture specific code, based on number of parameters.
7951 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
7952 caching happen in architecture specific code now.
7954 Code is contributed under MIT/X11 license.
7956 2007-09-12 Jonathan Chambers <joncham@gmail.com>
7958 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
7959 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
7960 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
7962 Code is contributed under MIT/X11 license.
7964 2007-05-15 Massimiliano Mantione <massi@ximian.com>
7965 * mini.c: (mono_thread_abort) Fixed bug #82416.
7967 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7969 * mini.: hook the new managed GC allocation feature into the JIT.
7971 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7973 * mini.c: implementation for the new runtime tls opcode.
7975 2007-09-11 Martin Baulig <martin@ximian.com>
7978 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
7979 `mono_method_inflated_offset'.
7981 2007-09-07 Zoltan Varga <vargaz@gmail.com>
7983 * driver.c mini.h mini.c: Add a new devel command line option for injecting
7984 async exceptions into a method.
7986 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
7987 purpose of testing whenever the unwinder works at every instruction.
7989 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
7991 * mini.c: check accessibility of method used in ldftn (fixes
7994 2007-09-04 Zoltan Varga <vargaz@gmail.com>
7996 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
7998 * inssel.brg: Fix a warning.
8000 2007-09-03 Martin Baulig <martin@ximian.com>
8002 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
8003 now takes the `main_method' as argument.
8005 2007-09-02 Zoltan Varga <vargaz@gmail.com>
8007 * cpu-sparc.md (endfilter): Add missing src1:i argument.
8009 2007-08-30 Jonathan Chambers <joncham@gmail.com>
8011 * driver.c: include the cil-coff.h header on Windows.
8013 Code is contributed under MIT/X11 license.
8015 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8017 * mini.c, driver.c: don't include the cil-coff.h header.
8019 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8021 * mini.c: flag places that needs fixes fo soft-float support.
8023 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
8025 * mini.h, inssel-float.brg: fix soft-float constant loads on big
8026 endian systems (partially from Dean Jenkins, bug #81924).
8028 2007-08-28 Mark Probst <mark.probst@gmail.com>
8030 * mini.c (check_linkdemand): Remove embedded reference object in
8031 call to LinkDemandSecurityException.
8032 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
8033 with an IntPtr instead of a reference object.
8035 2007-08-28 Zoltan Varga <vargaz@gmail.com>
8037 * mini.c (handle_initobj): Handle alignment properly.
8039 * inssel.brg (mini_emit_memset): Ditto.
8041 * inssel.brg (mini_emit_memcpy): Ditto.
8043 * inssel-sparc.brg: Ditto.
8045 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
8047 2007-08-26 Zoltan Varga <vargaz@gmail.com>
8049 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
8050 exceptions raised in unmanaged code. Fixes part of #82594.
8052 2007-08-24 Mark Probst <mark.probst@gmail.com>
8054 * mini.c (mono_method_to_ir), declsec.c
8055 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
8057 2007-08-22 Martin Baulig <martin@ximian.com>
8060 (MonoDebuggerThreadInfo): New typedef.
8061 (mono_debugger_thread_table): New global variable.
8062 (mono_debugger_thread_created): New public function.
8063 (mono_debugger_thread_cleanup): New public function.
8067 - removed `get_current_thread' and `lookup_assembly'.
8068 - removed `data_table'.
8069 - added `thread_table'.
8072 (mono_thread_start_cb): Call mono_debugger_thread_created().
8073 (mono_thread_attach_cb): Likewise.
8074 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
8075 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
8078 * driver.c (mono_main): Move mono_debug_init() up, before calling
8079 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
8081 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8083 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
8084 together when passing several arguments of type double (gives a small
8085 speedup and saves a few bytes of generated code).
8087 2007-08-20 Jb Evain <jbevain@novell.com>
8089 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
8091 2007-08-20 Jb Evain <jbevain@novell.com>
8093 * mini.c (mono_method_to_ir): throw MethodAccessException
8094 and FieldAccessException instead of InvalidProgramException.
8096 2007-08-20 Mark Probst <mark.probst@gmail.com>
8098 * mini.c: CoreCLR security checks.
8100 * mini.h: Removed MonoSecurityMode (moved to
8101 metadata/security-manager.h) and mono_security_mode global var
8102 (replaced by set/get functions in security-manager.h).
8104 * driver.c: Added "core-clr-test" security mode for testing. Used
8105 set-function for setting security mode.
8107 2007-08-17 Mark Probst <mark.probst@gmail.com>
8109 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
8110 the new jit_info_table.
8112 * driver.c: Test code for the new jit_info_table (enabled by the
8113 define MONO_JIT_INFO_TABLE_TEST).
8115 2007-08-14 Zoltan Varga <vargaz@gmail.com>
8117 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8118 detection of call <REG> instruction sequence. Fixes build on freebsd.
8120 2007-08-13 Zoltan Varga <vargaz@gmail.com>
8122 * mini-exceptions.c: Fix a warning.
8124 2007-08-11 Zoltan Varga <vargaz@gmail.com>
8126 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
8127 stack overflow handling code on amd64 too.
8129 * mini-exceptions.c (mono_setup_altstack): Make this use
8130 mono_thread_get_stack_bounds ().
8132 * mini-x86.h: Disable sigaltstack on solaris x86.
8134 2007-08-10 Zoltan Varga <vargaz@gmail.com>
8136 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
8138 2007-08-10 Geoff Norton <gnorton@customerdna.com>
8140 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
8142 2007-08-08 Zoltan Varga <vargaz@gmail.com>
8144 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
8146 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
8148 2007-08-03 Neale Ferguson <neale@sinenomine.net>
8150 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
8153 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8155 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
8156 to be emitted (bug #82281).
8158 2007-08-01 Martin Baulig <martin@ximian.com>
8160 Merged the `debugger-dublin' branch.
8162 * debug-debugger.h (MonoDebuggerInfo):
8163 Removed the `old_*' compatibility entries.
8164 Added `debugger_version' and `data_table'.
8165 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
8166 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
8169 (MiniDebugMethodBreakpointInfo): Add `address_list'.
8170 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
8171 instead of a `gconstpointer'.
8172 (mono_debugger_insert_method_breakpoint): Return a
8173 `MonoDebugMethodAddressList *'.
8175 2007-06-28 Martin Baulig <martin@ximian.com>
8177 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8179 2007-08-01 Zoltan Varga <vargaz@gmail.com>
8181 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
8182 __builtin_frame_address () since it is broken on older gcc versions.
8184 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8186 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
8187 on the stack overflow handling and made the managed stack overflows
8188 catchable in most cases using soft guard pages.
8189 * exceptions-x86.c: added code to restore the protection in the soft
8190 guard pages at the end of exception handling.
8192 2007-07-31 Zoltan Varga <vargaz@gmail.com>
8194 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
8196 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8198 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
8201 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8203 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
8204 signal handling support until it has been ported to the new mechanism.
8205 * mini.c: fixed stack overflow detection and use the new
8206 architecture code to handle signals on the altstack.
8208 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8210 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
8211 stack overflows on the alt stack.
8213 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
8215 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
8216 stack overflows on the alt stack.
8218 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
8220 * exceptions-ppc.c: cleanup preparing for altstack support.
8222 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8224 * exceptions-arm.c: cleanup preparing for altstack support.
8226 2007-07-27 Mark Probst <mark.probst@gmail.com>
8228 * mini.c (print_jit_stats): Output hazard pointer stats.
8230 2007-07-26 Mark Probst <mark.probst@gmail.com>
8232 * driver.c, mini.c: Replaced security mode flags with a single
8235 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8237 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
8239 2007-07-25 Mark Probst <mark.probst@gmail.com>
8241 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
8242 (which doesn't do anything yet) for activating Core CLR
8243 (Silverlight) security.
8245 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8247 * mini-codegen.c: work around a possible gcc bug on arm.
8249 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8251 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
8252 message for platforms that don't support AOT compilation.
8254 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8256 * mini.h, mini.c, driver.c: temporary smcs hack.
8258 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
8260 * mini-arm.h, mini-arm.c: arm EABI fixes.
8262 2007-07-22 Zoltan Varga <vargaz@gmail.com>
8264 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
8267 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
8268 trampolines taking a method argument.
8270 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
8272 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
8273 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
8275 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
8276 JIT compilation throws an exception. Fixes #82050.
8278 2007-07-19 Mark Probst <mark.probst@gmail.com>
8280 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
8281 with the MONO_EXCEPTION_ defines.
8283 2007-07-17 Zoltan Varga <vargaz@gmail.com>
8285 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
8288 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
8289 the cause of an assertion.
8291 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
8293 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
8296 2007-07-15 Zoltan Varga <vargaz@gmail.com>
8298 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
8299 assert. Should fix #82103.
8301 2007-07-14 Zoltan Varga <vargaz@gmail.com>
8303 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
8304 here too. Fixes #82095.
8306 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
8309 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
8311 * mini-amd64.h: Enable IMT for amd64.
8313 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
8315 2007-07-12 Zoltan Varga <vargaz@gmail.com>
8317 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
8319 2007-07-12 Mark Probst <mark.probst@gmail.com>
8321 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
8322 as soon as check_linkdemand sets an exception_type.
8324 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8326 * mini-x86.c: fixed offsets for IMT call sequence.
8327 * mini-x86.h: enable IMT again.
8329 2007-07-11 Zoltan Varga <vargaz@gmail.com>
8331 * trace.c (mono_trace_enter_method): Decode MonoType too.
8333 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
8335 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
8337 * mini-amd64.c: Add preliminary IMT implementation.
8339 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8341 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
8342 understand the new IMT-base interface invocation (thanks to
8343 Daniel Nauck for the report and the remote debugging session).
8345 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8347 * mini-x86.c: size and speed optimizations for the IMT bsearch.
8349 2007-07-11 Zoltan Varga <vargaz@gmail.com>
8351 * Makefile.am (aotcheck): Make this actually use the AOTed code.
8353 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
8355 * mini-trampolines.c: implement AOT IMT support.
8356 * mini-x86.h: enable IMT support for wider testing.
8358 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8360 * inssel.brg (emit_imt_argument): Add aot support here.
8362 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
8364 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8366 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
8367 of the IMT implementation, partially from massi, with my
8368 implementation of the bsearch sequence. Disabled by default until
8369 the AOT code is implemented.
8371 2007-07-10 Zoltan Varga <vargaz@gmail.com>
8373 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
8375 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
8377 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8379 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
8380 arch-independent IMT JIT code from Massimiliano
8381 Mantione (massi@ximian.com) with small cleanups from me.
8383 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8385 * Makefile.am: fix svn invocation to get the svn revision to be
8386 independent of the local language (build fix).
8388 2007-07-09 Mark Probst <mark.probst@gmail.com>
8390 * mini.c (inline_method): Reset cfg->exception_type if the
8391 inlining is aborted. Fixes: 82049.
8393 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
8395 * mini.c: remove assert from exception handling code when exception_ptr
8398 2007-07-05 Zoltan Varga <vargaz@gmail.com>
8400 * mini.c (mono_codegen): Add an assert.
8402 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
8403 enter and leave code.
8404 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
8406 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8408 * mini-ppc.c: fixed memory corruption for localloc(0)
8411 2007-07-05 Zoltan Varga <vargaz@gmail.com>
8413 * mini.c: Fix warnings.
8415 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
8417 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
8418 to emit better double->int conversions.
8420 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8422 * mini.c: the provided Min/Max optimizations are valid for unisgned
8425 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
8427 * 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
8429 2007-06-28 Miguel de Icaza <miguel@novell.com>
8431 * mini.c (mono_running_on_valgrind): Add support for reporting the
8432 method and its boundaries to valgrind.
8434 2007-06-28 Martin Baulig <martin@ximian.com>
8436 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8438 2007-06-25 Zoltan Varga <vargaz@gmail.com>
8440 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
8442 * generic.2.cs: Add new test case.
8444 2007-06-25 Martin Baulig <martin@ximian.com>
8446 Merged the `debugger-dublin' branch.
8449 (mono_debugger_insert_method_breakpoint): New public method.
8450 (mono_debugger_remove_method_breakpoint): Likewise.
8451 (mono_debugger_check_breakpoints): New static method.
8452 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
8454 * debug-debugger.h (MonoDebuggerInfo):
8455 Renamed (to keep backward compatibility in the vtable):
8456 `insert_breakpoint' -> `old_insert_breakpoint'.
8457 `remove_breakpoint' -> `old_remove_breakpoint'.
8458 `create_string' -> `old_create_string'.
8459 `lookup_class' -> `old_lookup_class'.
8460 `lookup_type' -> removed; changed into a dummy field.
8461 `lookup_assembly' -> `old_lookup_assembly'.
8462 Added (same functionality, but different signature):
8463 `create_string', `lookup_class', `lookup_assembly'
8465 `get_method_addr_or_bpt', `remove_method_breakpoint',
8466 `runtime_class_init'.
8468 * debug-debugger.c: Merged the `debugger-dublin' branch.
8470 2007-06-23 Zoltan Varga <vargaz@gmail.com>
8472 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
8474 (peephole_pass): Likewise.
8476 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
8478 * driver.c: hopefully make setaffinity work also for ancient
8481 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
8483 * driver.c : win32 build fix.
8485 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8487 * driver.c: check for the MONO_NO_SMP env var and bind to a single
8488 processor if it is set.
8490 2007-06-21 Martin Baulig <martin@ximian.com>
8492 * debug-mini.h: New file.
8495 (mono_debugger_insert_breakpoint_full): Moved here from
8496 ../metadata/mono-debug-debugger.c.
8497 (mono_debugger_remove_breakpoint): Likewise.
8498 (mono_debugger_breakpoint_callback): Likewise.
8500 2007-06-15 Raja R Harinath <rharinath@novell.com>
8502 * jit-icalls.c (mono_helper_compile_generic_method): Update to
8503 changes in MonoGenericClass.
8505 2007-06-14 Zoltan Varga <vargaz@gmail.com>
8507 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
8509 2007-06-14 Raja R Harinath <rharinath@novell.com>
8511 * jit-icalls.c (mono_helper_compile_generic_method): Update to
8512 removal of MonoGenericMethod.
8514 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8516 * mini-exceptions.c: hooks for the exception events profiling API.
8518 2007-06-14 Randolph Chung <tausq@debian.org>
8520 * Makefile.ma: Add hppa target.
8521 * mini-arch.h: Include mini-hppa.h
8522 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
8523 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
8524 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8526 2007-06-14 Randolph Chung <tausq@debian.org>
8528 * inssel.brg: Add rules for "chained" compare-branch operations so that
8529 a single compare op can affect multiple branches. Adjust cost for
8530 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
8531 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
8532 cost for some rules so that they can more easily be overridden by
8533 per-arch rules (with fixes from lupus).
8534 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8536 2007-06-13 Randolph Chung <tausq@debian.org>
8538 * mini-ops.h: Reorder branch ops so that they match the order of the
8539 corresponding CEE_* ops. The code expects them this way.
8540 Add new ops for HPPA target.
8541 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8543 2007-06-13 Randolph Chung <tausq@debian.org>
8545 * mini-exceptions.c: Handle cases where the stack grows towards
8547 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8549 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8551 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
8553 * driver.c: explain where a non-matching corlib is found.
8555 2007-06-13 Mark Probst <mark.probst@gmail.com>
8557 * mini.c (print_jit_stats): Output dynamic code allocation stats.
8559 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
8561 * mini-exceptions.c: Generate a method profile leave event during
8562 an exception to ensure that the profiler gets notified.
8564 2007-06-07 Zoltan Varga <vargaz@gmail.com>
8566 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
8569 * cpu-amd64.md: Add long_and/or/xor opcodes.
8571 2007-06-06 Wade Berrier <wberrier@novell.com>
8573 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
8574 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
8575 length of instruction shr_imm (expected 8, got 10)
8577 2007-06-06 Zoltan Varga <vargaz@gmail.com>
8579 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
8581 2007-06-06 Mark Probst <mark.probst@gmail.com>
8583 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8584 MonoInternalHashTable again (fixed bug in the internal hash table
8587 2007-06-06 Mark Probst <mark.probst@gmail.com>
8589 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
8590 Have to figure out what makes it crash the SWF regression.
8592 2007-06-05 Zoltan Varga <vargaz@gmail.com>
8594 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
8596 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8598 * mini.c: optimize out the type check when storing null in a
8601 2007-06-04 Mark Probst <mark.probst@gmail.com>
8603 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8604 MonoInternalHashTable.
8606 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8608 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
8609 signed integer methods.
8611 2007-06-02 Zoltan Varga <vargaz@gmail.com>
8613 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
8614 permanently since the current approach doesn't work.
8616 2007-06-02 Zoltan Varga <vargaz@gmail.com>
8618 * inssel.brg (stmt): Only call delegate->invoke_impl if
8619 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
8621 2007-06-01 Zoltan Varga <vargaz@gmail.com>
8623 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
8624 the sreg2==rdx case.
8626 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
8627 account if it contains a rex prefix.
8628 (peephole_pass): Handle OP_FMOVE as well.
8630 2007-06-01 Zoltan Varga <vargaz@gmail.com>
8632 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
8633 as it causes regressions.
8635 2007-05-31 Zoltan Varga <vargaz@gmail.com>
8637 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
8638 static case as well.
8640 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
8642 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8643 (mono_arch_get_this_arg_from_call): Ditto.
8645 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
8647 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
8650 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8651 (mono_arch_get_this_arg_from_call): Ditto.
8653 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
8655 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
8656 try to create optimized invoke code and use that for further invocations.
8657 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
8659 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
8661 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
8663 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
8664 sealed classes or methods.
8665 *devirtualization.cs: tests for the new optimization
8667 2007-05-29 Zoltan Varga <vargaz@gmail.com>
8669 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
8670 by the update_volatile () function.
8672 2007-05-27 Zoltan Varga <vargaz@gmail.com>
8674 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
8677 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
8679 2007-05-24 Jonathan Chambers <joncham@gmail.com>
8681 * mini.c: Add configure checks for header files.
8682 * mini-x86.c: Add configure checks for header files.
8683 * trace.c: Add configure checks for header files.
8684 * aot-runtime.c: Add configure checks for header files.
8685 * aot-compiler.c: Add configure checks for header files.
8686 * driver.c: Add configure checks for header files.
8687 * mini-codegen.c: Add configure checks for header files.
8689 Code is contributed under MIT/X11 license.
8691 2007-05-22 Zoltan Varga <vargaz@gmail.com>
8693 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
8694 icompare_imm -128 + op_iclt. Fixes #81703.
8696 2007-05-19 Zoltan Varga <vargaz@gmail.com>
8698 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
8700 2007-05-15 Massimiliano Mantione <massi@ximian.com>
8702 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
8703 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
8704 so that all isinst checks now use "interface_bitmap".
8706 2007-05-15 Zoltan Varga <vargaz@gmail.com>
8708 * cpu-amd64.md (jmp): Fix a warning.
8710 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
8712 * basic.cs: Add new regression test.
8714 * basic.cs: Remove test which is now in basic-long.cs.
8716 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
8718 * basic-long.cs: Add new test.
8720 2007-05-13 Zoltan Varga <vargaz@gmail.com>
8722 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
8724 2007-05-12 Zoltan Varga <vargaz@gmail.com>
8726 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
8728 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
8731 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
8732 throwing code a bit.
8734 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
8735 the exception throwing code a bit.
8737 * mini-x86.c (get_call_info): Allocate result from a mempool.
8739 2007-05-11 Zoltan Varga <vargaz@gmail.com>
8741 * aot-compiler.c (find_typespec_for_class): Fix the assert.
8743 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8745 * mini.h (MonoCompile): Add 'token_info_hash' field.
8747 * mini.c: Save token->method associations during compilation so the AOT
8748 compiler can use it.
8750 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
8751 which reference generic classes and methods.
8753 2007-05-10 Zoltan Varga <vargaz@gmail.com>
8755 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
8757 * aot-compiler.c (compile_method): Fix a typo in a comment.
8759 * aot-runtime.c (decode_cached_class_info): Skip generic types.
8761 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
8764 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
8766 2007-05-09 Zoltan Varga <vargaz@gmail.com>
8768 * mini.h (MonoCompile): Add 'args' field.
8770 * mini.c (mono_compile_create_vars): Store variables representing the arguments
8773 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
8775 2007-05-08 Zoltan Varga <vargaz@gmail.com>
8777 * mini.c (mono_compile_get_interface_var): Remove this unused function.
8779 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
8781 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
8782 opcodes for some opcodes.
8784 * mini.h *.brg *.c: Use the new opcodes.
8786 2007-05-08 Massimiliano Mantione <massi@ximian.com>
8788 * mini.h: Bumped aot revision.
8790 * inssel.brg: modified code generation of type checks for interfaces
8791 to use the new "MonoClass.interface_bitmap" instead of the old
8792 "MonoClass.interface_offsets".
8794 2007-04-30 Zoltan Varga <vargaz@gmail.com>
8796 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
8798 2007-04-29 Zoltan Varga <vargaz@gmail.com>
8800 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
8803 2007-04-27 Neale Ferguson <neale@sinenomine.net>
8805 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
8807 2007-04-27 Wade Berrier <wberrier@novell.com>
8809 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
8810 mini.h) to fix build.
8812 2007-04-26 Zoltan Varga <vargaz@gmail.com>
8814 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
8816 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
8817 causes the corlib unit tests to fail.
8819 2007-04-25 Zoltan Varga <vargaz@gmail.com>
8821 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
8823 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
8825 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
8826 opcodes to the comparison relations.
8828 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
8829 opcodes to their types.
8831 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
8833 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
8834 it in cfg->arch.cinfo.
8836 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
8838 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
8839 cfg->cil_offset_to_bb.
8841 2007-04-24 Zoltan Varga <vargaz@gmail.com>
8843 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
8844 created becase of initlocals.
8846 2007-04-23 Zoltan Varga <vargaz@gmail.com>
8848 * mini-alpha.c cpu-alpha.md: More alpha port work from
8849 Sergey Tikhonov <tsv@solvo.ru>.
8851 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
8853 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
8855 2007-04-19 Zoltan Varga <vargaz@gmail.com>
8857 * cpu-s390.md (break): Correct the length of break instruction.
8859 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8861 * mini.c: fix a couple of soft-float issues and comments.
8863 2007-04-15 Miguel de Icaza <miguel@novell.com>
8865 * trace.c (is_filenamechar): - is also a filename char.
8867 2007-04-15 Neale Ferguson <neale@sinenomine.net>
8869 * mini-s390.c: Correct checking for enum type in return value processing.
8871 2007-04-14 Raja R Harinath <rharinath@novell.com>
8873 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
8874 (version.h): Makefile is in the build directory.
8876 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
8878 * mini-amd64.h: fix for assertion failure on Solaris/amd64
8880 2007-04-11 Martin Baulig <martin@ximian.com>
8882 * mini.c (can_access_member): Fix handling of generic classes;
8885 2007-04-10 Zoltan Varga <vargaz@gmail.com>
8887 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
8889 2007-04-05 Zoltan Varga <vargaz@gmail.com>
8891 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
8893 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
8895 * mini-codegen.c: make sure the right spill amount is
8896 used for fp or integer registers (fixes the float_sub_spill() on ppc).
8898 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
8900 * mini-ppc.c: fixes for the fp_branch_nan test.
8902 2007-03-23 Zoltan Varga <vargaz@gmail.com>
8904 * basic.cs: Comment out new test which still fails on ia64.
8906 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8908 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
8910 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8912 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
8914 2007-03-22 Zoltan Varga <vargaz@gmail.com>
8916 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
8917 on 64 bit machines. Fixes part of #80738.
8919 * basic.cs: Add regression test.
8921 2007-03-17 Zoltan Varga <vargaz@gmail.com>
8923 * inssel.brg basic.cs: Revert previous change to fix build.
8925 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
8928 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
8930 * basic.cs: Add new regression test.
8932 2007-03-17 Zoltan Varga <vargaz@gmail.com>
8934 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
8937 2007-03-16 Neale Ferguson <neale@sinenomine.net>
8939 * cpu-s390x.md: Correct length of break instruction.
8941 2007-03-16 Neale Ferguson <neale@sinenomine.net>
8943 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
8944 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
8946 2007-03-15 Jonathan Chambers <joncham@gmail.com>
8948 * *.c: Begin WIN64 port.
8949 * mini.c: Use correct register in profiler.
8950 * mini-amd64.c: No inline assembly on Win64.
8951 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
8952 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
8953 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
8954 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
8955 mono_arch_ip_from_context for Win64.
8957 Contributed under MIT/X11 license.
8959 2007-03-15 Zoltan Varga <vargaz@gmail.com>
8961 * exceptions-amd64.c (seh_handler): Ditto.
8963 * exceptions-x86.c (seh_handler): Fix a memory leak.
8965 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
8967 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
8968 mini-s390x.c: fixed peephole optimizations to deal
8969 correctly with 1 and 2 byte reload avoidance.
8971 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
8973 * cpu-s390.md, cpu-s390x.md: update localloc length.
8975 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
8977 * cpu-g4.md: added missing descriptions.
8979 2007-03-14 Miguel de Icaza <miguel@novell.com>
8981 * Makefile.am: Add support so the tail tests are not executed on
8982 PowerPC as that is a known limitation of the PowerPC port.
8984 2007-03-13 Jonathan Chambers <joncham@gmail.com>
8986 * runmdesc.bat: Move to msvc directory.
8988 2007-03-13 Jonathan Chambers <joncham@gmail.com>
8990 * runmdesc.bat: Run executable that was produced by the current
8991 target and sent via an argument.
8993 2007-03-11 Zoltan Varga <vargaz@gmail.com>
8995 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
8998 * generics.2.cs: Add regression test.
9000 2007-03-09 Wade berrier <wberrier@novell.com>
9002 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
9004 2007-03-09 Zoltan Varga <vargaz@gmail.com>
9006 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
9007 AOT code depends on this.
9009 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9011 * mini.c: more precise tracking of types in the eval stack
9012 (part of fix for bug #81044).
9014 2007-03-07 Zoltan Varga <vargaz@gmail.com>
9016 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
9018 * aot-compiler.c (encode_patch): Remove an obsolete comment.
9020 2007-03-06 Zoltan Varga <vargaz@gmail.com>
9022 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
9024 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
9026 2007-02-22 Zoltan Varga <vargaz@gmail.com>
9028 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
9029 a pointer on 64 bit systems. Fixes #80190.
9031 * iltests.il: Add new regression test.
9033 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9035 * mini.c: inline a constant for Environment.IsRunningOnWindows.
9037 2007-02-19 Geoff Norton <gnorton@customerdna.com>
9039 * trace.c: Remove an erroneous alignemnt check when tracing.
9040 Fixes --trace on OSX86.
9042 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9044 * mini-$(arch).h: initialize SP in context for all the archs.
9046 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
9048 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
9049 regressions in the thread tests.
9051 2007-02-14 Zoltan Varga <vargaz@gmail.com>
9053 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
9054 - fixed implementation of LOCALLOC opcode
9055 - implemented non-un compare for floats
9057 - implementation of FDIV and CKFINITE opcodes
9058 - fixes for latest mono updates
9059 - additional arch opcodes
9061 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9063 * Makefile.am: simplify and merge rules for cross-compilation.
9065 2007-02-07 Massimiliano Mantione <massi@ximian.com>
9067 * local-propagation.c: Actually *apply* the fix for bug 80591...
9069 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9071 * mini-exceptions.c: backuot part of the last change
9072 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
9074 2007-02-06 Massimiliano Mantione <massi@ximian.com>
9075 * inssel.brg: Fix bug 59286.
9078 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
9080 * mini-exceptions.c: patch from Zoltan to correctly check for
9081 stack boundaries (using the stack register, not the frame register),
9082 fixes bugs #80724, #79717.
9084 2007-02-03 Zoltan Varga <vargaz@gmail.com>
9086 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
9087 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
9089 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
9090 presence of frame pointer elimination.
9092 2007-02-01 Geoff Norton <gnorton@customerdna.com>
9094 * mini-x86.h: NetBSD UCONTEX_REG defines.
9096 2007-02-01 Zoltan Varga <vargaz@gmail.com>
9098 * inssel-amd64.brg: Fix amd64 build.
9100 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
9102 * mini.h: remove extern to workaround what looks likes gcc bug 26905
9105 2007-01-31 Zoltan Varga <vargaz@gmail.com>
9107 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
9110 * mini-<ARCH>.c: Use mono_is_regsize_var ().
9112 2007-01-30 Mark Mason <mason@broadcom.com>
9114 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
9115 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
9116 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
9117 beginning support for CEE_JMP [not quite working yet]
9118 * tramp-mips.c: LMF handling now works
9120 2007-01-30 Zoltan Varga <vargaz@gmail.com>
9122 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
9124 * mini.h (NULLIFY_INS): New macro.
9126 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9128 * mini.c: statistical profiler fix for windows, patch
9129 from Tor Lillqvist (tml@novell.com).
9131 2007-01-30 Massimiliano Mantione <massi@ximian.com>
9132 * local-propagation.c: Fix bug 80591.
9134 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9136 * Makefile.am: put back the --export-dynamic option as with
9137 the previous gmodule flags (thanks to Robert Jordan).
9139 2007-01-28 Zoltan Varga <vargaz@gmail.com>
9141 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
9143 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
9144 simplify and speed up the local register allocator. Also rename some fields
9145 like iassign->vassign.
9147 * regalloc.c: Remove some functions which are no longer used since their
9148 inlined version is in mini-codegen.c.
9150 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
9152 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
9154 2007-01-27 Zoltan Varga <vargaz@gmail.com>
9156 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
9157 narrowing. Fixes #80622.
9159 * iltests.il: Add new regresssion test.
9161 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9163 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
9164 debug-debugger.c, debug-debugger.h: warning fixes.
9165 * driver.c: updated copyright year and made it fit in one line.
9167 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
9169 * aot-runtime.c: updated to use mono-dl instead of gmodule.
9171 2007-01-25 Zoltan Varga <vargaz@gmail.com>
9173 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
9175 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
9177 * iltests.il: Add new test for bug #80507.
9179 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9181 * mini-arm.h: use soft-float also on vfp for now.
9183 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9185 * mini.c: fix some more soft-float issues.
9187 2007-01-24 Zoltan Varga <vargaz@gmail.com>
9189 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
9191 2007-01-24 Massimiliano Mantione <massi@ximian.com>
9192 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
9193 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
9194 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
9196 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
9198 * mini-arm.c: typo fix.
9200 2007-01-23 Neale Ferguson <neale@sinenomine.net>
9202 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
9204 2007-01-21 Zoltan Varga <vargaz@gmail.com>
9206 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
9207 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
9209 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
9211 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
9213 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
9215 * inssel.brg: Fix a warning.
9217 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
9219 * abcremoval.c ssa.c ssapre.c: Update after this change.
9221 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
9223 * dominators.c (df_set): Use mono_bitset_union_fast.
9225 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9227 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
9228 mini-codegen.c: reduce relocations and memory usage for the cpu
9231 2007-01-20 Zoltan Varga <vargaz@gmail.com>
9233 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
9235 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
9236 to reduce their size.
9238 2007-01-19 Mark Mason <mason@broadcom.com>
9240 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
9241 * mini-mips.c: more configuration macros, support long conditional branches, additional
9242 asserts, fix epilog instrumentation.
9243 * mini-mips.h: use standard stack walk
9244 * cpu-mips.md: increase size of div, rem and conditional branches
9246 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
9248 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
9251 2007-01-19 Zoltan Varga <vargaz@gmail.com>
9253 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
9254 (compile_method): Ditto.
9256 * aot-runtime.c (decode_klass_info): Ditto.
9258 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
9259 needed by the code generated by inssel.brg. Also fix a warning.
9261 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
9263 * mini.c: deal with enums that become genericinsts by
9264 being nested in a generic class (bug #79956).
9266 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9268 * mini.c: match the generic definition to check for
9269 private access with generic types (bug #78431).
9271 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9273 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
9274 to make life easier for people cross-compiling that insist on not
9277 2007-01-17 Mark Mason <mason@broadcom.com>
9279 * inssel-long.brg: patch to deal with mips missing flags
9280 * inssel-long32-mips.brg: implement overflow checks
9281 * insset-mips.brg: implement overflow checks
9282 * mini-mips.h: implement conditional exception handling
9283 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
9284 Remove unused code, minor cleanups.
9285 * exceptions-mips.c: minor cleanups
9286 * mini-ops.h: add mips conditional exception ops
9287 * cpu-mips.md: add mips conditional exception ops
9290 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9292 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
9293 to deal with mips missing of flags.
9295 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9297 * exceptions-ppc.c: execute fault handlers.
9299 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
9301 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
9303 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9305 * mini.c: handle also floating point values in initialize_array.
9307 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9309 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
9310 array initialization and make it conditional on the intrins option.
9312 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9314 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
9315 relocations and put the patch info names close to the enum definition.
9317 2007-01-15 Mark Mason <mason@broadcom.com>
9319 * basic.cs, exceptions.cs: break up large tests to increase debugability.
9321 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9323 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
9325 2007-01-12 Raja R Harinath <rharinath@novell.com>
9327 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
9329 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9331 * Makefile.am: distribute the mips sources.
9333 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9335 * mini-codegen.h: handle bug #80489 here, by excluding ecx
9338 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
9340 * cpu-x86.md: back out for now as this triggers other regressions.
9342 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9344 * cpu-x86.md: force src1 and dest regpair for long shift instructions
9345 to eax:edx, so ecx can't get allocated to them (bug #80489).
9347 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
9349 * mini.c, mini-exceptions.c: enabled running fault handlers
9352 2007-01-03 Miguel de Icaza <miguel@novell.com>
9354 * driver.c: If nothing fail, do not use the string "failed",
9355 because it makes it very annoying to view test result logs on the
9358 2006-12-30 Miguel de Icaza <miguel@novell.com>
9360 * debug-debugger.c (mono_debugger_main): Rename "main" to
9361 "main_method" to prevent a warning.
9363 Remove a warning for unused field.
9365 2006-12-28 Martin Baulig <martin@ximian.com>
9368 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
9370 2006-12-22 Martin Baulig <martin@ximian.com>
9372 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
9373 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
9374 seperate `.mdb_debug_info' section, so we can access it from the
9375 debugger even if the binary is stripped.
9377 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
9378 from the `.mdb_debug_info' here to prevent the linker from
9379 removing that section.
9381 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
9384 2006-12-19 Robert Jordan <robertj@gmx.net>
9386 * mini-x86: enable the code to return small structures in
9387 registers for FreeBSD as well. Fixes bug #80278.
9388 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
9390 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9392 * mini-x86.c: align the stack when calling the profiler
9393 function instrumenting the prolog (on OSX).
9395 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9397 * mini.c: emit a break opcode where Debugger.Break () is called.
9399 2006-12-13 Miguel de Icaza <miguel@novell.com>
9401 * mini.c (mono_method_to_ir): Provide useful information on this
9402 assert, to prevent others from debugging like I did.
9404 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9406 * mini.c: enable code which was incorrectly commented
9409 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9411 * mini-x86.c: enable on OSX, too, the code to return small
9412 structures in registers.
9414 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9416 * mini-x86.c: remove the use of the dynamic code manager here, too.
9418 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9420 * mini.h, debug-debugger.c, tramp-*.c: fixed
9421 mono_debugger_create_notification_function() to use
9422 mono_global_codeman_reserve () instead of a dynamic code manager.
9424 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
9426 * mini.c, jit-icalls.h, jit-icalls.c: remove the
9427 ves_array_element_address() jit icall and use a generated
9428 managed method instead (which is about 4 times faster for a rank 3
9431 2006-11-29 Mark Mason <mason@broadcom.com>
9433 * basic-calls.cs: additional tests for passing
9434 structures as function arguments.
9436 2006-11-29 Mark Mason <mason@broadcom.com>
9438 * mini-mips.h: disable custom exception handling
9439 * mini-mips.c: throw/rethrow should use jalr to call
9440 exception stubs. Fixed bug with passing structures
9441 by value. More support for tracing floating point
9444 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9446 * mini.c: fixed typo in the soft-float ldind.r4 handling
9449 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9451 * mini.c, mini.h, driver.c: added --runtime command line
9452 option to select a different runtime than the autodetected one.
9453 * jit.h: added API for embedders to initialize with a specific
9456 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9458 * mini.c: handle also boxing of r4 values (bug #80024).
9460 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9462 * mini-ppc.c: force indirect calls until we reserve
9463 enough address space for all the generated code.
9465 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
9467 * exceptions-arm.c: workaround bugs in the libc definition
9470 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9472 * inssel.brg: fixes from me and Mark Mason.
9474 2006-11-23 Dick Porter <dick@ximian.com>
9476 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
9477 semaphore display now we've fixed the initial value
9479 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9481 * inssel.brg: partially revert the last change to fix the build.
9483 2006-11-21 Mark Mason <mason@broadcom.com>
9485 * inssel.brg: Add and use compare-and-branch macros to support
9486 architectures that do not have condition code registers (ie. MIPS).
9487 * *-mips.{c,brg,md}: Fix copyright statements
9489 2006-11-20 Mark Mason <mason@broadcom.com>
9491 * Makefile.am: remove mini-codegen.c from list of MIPS sources
9492 * mini.c: Allow GET_CONTEXT to be specified by the arch port
9493 * mini.h: Added declaration for mono_print_ins()
9494 * mini-codegen.c: added ins_spec initializer for MIPS
9495 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
9496 vreg to be virtual and hreg to be non-virtual.
9497 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
9498 is not yet working/implemented correctly.
9499 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
9500 non-static, fixup calls to print_ins() from other parts in the file.
9502 2006-11-20 Mark Mason <mason@broadcom.com>
9504 * basic-calls.cs: added tests for passing structures as arguments
9507 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9509 * inssel-long32.brg: optimize signed division by power of two.
9511 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9513 * mini-arm.c: added support for interworking with thumb code
9514 (mono must be still be built using the ARM instruction encoding).
9516 2006-11-19 Miguel de Icaza <miguel@novell.com>
9518 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
9519 verifier has different rules for it. Fixes a few verifier issues
9522 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
9523 at the end, so people know what happened.
9525 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9527 * brach-opts.c: in optimize_exception_target() make sure we
9528 are in a catch clause (fixes bug #79871).
9530 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9532 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
9533 more soft-float support fixes.
9535 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
9537 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
9538 that are passed half on the stack and half in registers.
9540 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
9542 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
9543 more mips integration work from Mark E Mason
9544 <mark.e.mason@broadcom.com>.
9546 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9548 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
9549 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
9550 tramp-mips.c: added sources for the mips port, not
9551 integrated in the build yet. Contributed by
9552 Mark E Mason <mark.e.mason@broadcom.com>.
9554 2006-11-14 Neale Ferguson <neale@sinenomine.net>
9556 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
9558 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9560 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
9561 put the soft-float rules in its own file since it seems to
9562 break s390 compilation.
9564 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9566 * mini-arm.c: fixed wrnings.
9568 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
9570 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
9571 inssel-arm.brg: ARM support for soft-float.
9573 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9575 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
9576 loads and stores of 32 bit fp values.
9578 2006-11-10 Zoltan Varga <vargaz@gmail.com>
9580 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
9582 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
9583 works. Fixes #79852 and #79463.
9585 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9587 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
9588 more soft-float support WIP and fixes.
9590 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
9592 * mini-arm.c: some VFP updates.
9594 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9596 * mini-exceptions.c: 0 is a valid local var offset in some
9597 architectures, don't assert (bug #78508).
9599 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
9601 * exceptions-arm.c: fixed off by one error in stack walk code.
9603 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9605 * mini.h, mini.c: more precise tracking of type load exceptions.
9607 2006-11-03 Robert Jordan <robertj@gmx.net>
9609 * Makefile.am: [WIN32] Add monow.exe target.
9610 * driver.c: [WIN32] Don't detach the console when debugging.
9613 2006-10-30 Miguel de Icaza <miguel@novell.com>
9615 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
9617 2006-10-23 Zoltan Varga <vargaz@gmail.com>
9619 * aot-compiler.c (emit_method_info): Add a case missed earlier.
9621 * driver.c (mini_regression): Fix --regression with AOT.
9623 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
9625 2006-10-17 Zoltan Varga <vargaz@gmail.com>
9627 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
9629 * mini-sparc.h: Don't use sigaction on sparc/linux.
9631 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
9633 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
9635 * mini-exceptions.c: Add proper include files for getpid ().
9637 2006-10-16 Zoltan Varga <vargaz@gmail.com>
9639 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
9640 address instead of a MonoJitInfo* to avoid decoding the exception info for the
9643 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
9644 name cache to reduce its size.
9646 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9648 2006-10-15 Zoltan Varga <vargaz@gmail.com>
9650 * mini-x86.c: Save/restore the current LMF structure more efficiently using
9651 the mono_lmf TLS variable.
9653 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
9654 trampoline lmf frames.
9656 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
9658 2006-10-14 Zoltan Varga <vargaz@gmail.com>
9660 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
9661 the mono_lmf TLS variable.
9663 * mini-exceptions.c: Access the LMF structure through accessors.
9665 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
9666 variable instead of in jit_tls->lmf.
9668 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
9670 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
9671 trampoline lmf frames.
9673 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
9675 2006-10-12 Zoltan Varga <vargaz@gmail.com>
9677 * mini.c trace.c mini-x86.c: Revert these too.
9679 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
9682 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
9684 * genmdesc.c: removed now dead code.
9686 2006-10-09 Robert Jordan <robertj@gmx.net>
9688 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
9690 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9692 * mini.h: do not leave gaps in the opcode values.
9694 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
9696 * jit-icalls.h: flag functions as internal here, too.
9698 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
9700 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
9701 functions with the internal attribute.
9703 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
9705 * aot-compiler.c: fclose the file descriptor in the profile read loop.
9707 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
9709 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
9712 2006-10-05 Zoltan Varga <vargaz@gmail.com>
9714 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
9715 tail calls as on other platforms.
9717 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
9719 * iltests.il: Add a few tailcall tests.
9721 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9723 * driver.c: fix loop for old compilers (bug #79521).
9725 2006-10-02 Zoltan Varga <vargaz@gmail.com>
9727 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
9729 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
9731 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
9732 metadata without any code.
9734 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
9735 more precise debugging information using gdb.
9737 2006-09-30 Zoltan Varga <vargaz@gmail.com>
9739 * inssel-ia64.brg: Make the helper methods static.
9741 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9743 * inssel-x86.brg: make the helper methods static.
9745 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
9747 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
9749 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9751 * mini.c: updates for monoburg changes.
9752 * inssel.brg: make a few helper functions static as they should.
9754 2006-09-27 Zoltan Varga <vargaz@gmail.com>
9756 * Makefile.am: Move mini-codegen.c to common_sources.
9758 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9760 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
9762 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
9763 mini-ppc.h: port to use the common local register allocator.
9765 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9767 * mini.h: Remove the comment too then.
9769 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
9771 * mini.h: put back backend.data which is to be used shortly and
9772 doesn't increase the size of MonoInst. If any 64 bit arch aligned
9773 pointers on 4 byte boundaries it'd have much bigger issues running
9774 and you can ifdef it out anyway.
9776 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9778 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
9779 MonoInst size by 4 bytes on 64 bit machines.
9781 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9783 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
9784 replacement with more meaningful field names. Arch maintainers, please
9785 check the assigned names are good enough for your arch.
9787 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9789 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
9790 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
9792 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
9794 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
9795 relocations and memory requirements, put the optimization flags
9796 definitions in their own file.
9798 2006-09-24 Zoltan Varga <vargaz@gmail.com>
9800 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
9802 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
9804 2006-09-22 Zoltan Varga <vargaz@gmail.com>
9806 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
9808 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
9810 * inssel.brg: use the correct function to get the size of an item
9811 in an array, given an element class.
9812 * aot-compiler.c: do not access class->class_size directly.
9814 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
9816 * mini.h, debug-mini.c: added a debugging function to print
9817 info about local variables and arguments in a jitted method.
9819 2006-09-20 Zoltan Varga <vargaz@gmail.com>
9821 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9823 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
9825 2006-09-19 Zoltan Varga <vargaz@gmail.com>
9827 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
9828 inner and outer loops when passing vtypes.
9830 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
9832 * mini-ppc.c: take into account the cpu errata for cache flushing
9833 which caused some random errors (bug #79381).
9835 2006-09-19 Zoltan Varga <vargaz@gmail.com>
9837 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
9838 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
9840 2006-09-17 Zoltan Varga <vargaz@gmail.com>
9842 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
9845 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
9848 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
9849 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
9851 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
9854 2006-09-13 Zoltan Varga <vargaz@gmail.com>
9856 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
9858 2006-09-12 Zoltan Varga <vargaz@gmail.com>
9860 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
9861 macro does not have to be changed during debugging.
9863 * 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>.
9865 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
9867 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
9869 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
9870 MONO_ARCH_NO_EMULATE_MUL is defined.
9872 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
9874 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
9876 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
9878 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
9880 2006-09-11 Zoltan Varga <vargaz@gmail.com>
9882 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
9883 stuff to mini-exceptions.c where it is used.
9885 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
9886 setup code, the real one is in mini-exceptions.c.
9888 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
9889 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
9890 some changes from the freebsd ports tree.
9892 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
9895 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
9897 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
9899 * mini.c: on Linux, check for /proc to be mounted
9900 (bug# 79351, novell bug#201204).
9902 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
9904 * mini.c: handle cases where pthread_attr_getstack() behaves
9905 incorrectly (bug #78096).
9907 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
9909 * mini-arm.c: support larger stack frames (bug #79272).
9911 2006-09-08 Zoltan Varga <vargaz@gmail.com>
9913 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
9915 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
9918 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
9919 mono_class_from_name () to find a class from its name.
9921 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
9923 2006-09-07 Zoltan Varga <vargaz@gmail.com>
9925 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
9927 2006-09-05 Kornél Pál <kornelpal@gmail.com>
9929 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
9931 2006-09-04 Zoltan Varga <vargaz@gmail.com>
9933 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
9934 callinfo->trampoline.
9936 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
9938 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
9941 2006-09-03 Zoltan Varga <vargaz@gmail.com>
9943 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
9945 2006-09-02 Zoltan Varga <vargaz@gmail.com>
9947 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
9948 stats.method_trampolines, it is already done by the generic trampoline code.
9950 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
9952 2006-09-01 Zoltan Varga <vargaz@gmail.com>
9954 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
9956 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
9958 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
9960 * mini.c (print_jit_stats): Print mscorlib mempool size too.
9962 * mini.c (print_jit_stats): Print new stats.
9964 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9966 2006-08-31 Zoltan Varga <vargaz@gmail.com>
9968 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
9969 Address on two dimensional arrays. Fixes #78729.
9971 * mini.h (MonoCompile): Add a 'skip_visibility' field.
9973 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
9976 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
9978 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
9981 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
9983 (mini_get_ldelema_ins): Ditto.
9985 2006-08-30 Zoltan Varga <vargaz@gmail.com>
9987 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
9988 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
9991 2006-08-29 Neale Ferguson <neale@sinenomine.net>
9993 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
9994 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
9996 * exceptions-s390x.c: Cosmetic change.
9998 * tramp-s390.c: Fix warning.
10000 * cpu-s390.md: Correct length of mul_imm.
10002 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
10004 * aot-compiler.c: added binary writer with ELF backend
10005 implementation (only on Linux/x86 for now).
10007 2006-08-18 Zoltan Varga <vargaz@gmail.com>
10009 * Makefile.am: Don't run net 2.0 AOT tests.
10011 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
10012 (mono_compile_assembly): Skip net 2.0 assemblies as well.
10014 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
10016 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10018 * aot-compiler.c: simplified and refactored the asm-writing code
10019 to allow different backends.
10021 2006-08-18 Zoltan Varga <vargaz@gmail.com>
10023 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10025 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
10026 little. Share patches of type TYPE_FROM_HANDLE as well.
10028 * mini.c (mono_patch_info_equal): New helper function.
10029 (mono_patch_info_hash): Ditto.
10031 * aot-compiler.c (emit_method_code): Fix s390 build.
10033 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
10034 is not handled because it is stored as a flag and not as a type ctor. Fixes
10037 2006-08-17 Zoltan Varga <vargaz@gmail.com>
10039 * aot-compiler.c: Fix computation of GOT slot statistics.
10041 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
10042 Also remove support for not PIC AOT.
10044 * mini.h: Bump AOT file format version.
10046 * objects.cs: Add a test for #78990.
10048 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
10049 (peter.dettman@iinet.net.au). Fixes #79087.
10051 * basic-long.cs: Add a test for the above.
10053 2006-08-16 Zoltan Varga <vargaz@gmail.com>
10055 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
10057 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
10060 2006-08-15 Zoltan Varga <vargaz@gmail.com>
10062 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
10065 2006-08-10 Jonathan Chambers <joncham@gmail.com>
10067 * mini.c: Don't verify COM proxy invoke calls
10070 2006-08-10 Dick Porter <dick@ximian.com>
10072 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
10073 which process is holding semaphores locked.
10075 2006-08-08 Zoltan Varga <vargaz@gmail.com>
10077 * mini-ia64.c mini-amd64.c: Fix #79027.
10079 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
10081 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
10083 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
10084 implicit arguments in a vararg call. Fixes #79027.
10086 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
10088 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
10089 (mono_get_array_new_va_signature): Ditto.
10091 2006-08-05 Zoltan Varga <vargaz@gmail.com>
10093 * aot-runtime.c: Call init_plt lazily.
10095 * inssel-long.brg: Fix unsigned long->int conversion.
10097 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
10099 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
10100 that most data is now in the .rss/.data section.
10102 2006-08-04 Zoltan Varga <vargaz@gmail.com>
10104 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
10106 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
10108 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
10110 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
10112 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
10113 virtual call. Fixes #79010.
10115 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
10116 and use the result as the this argument in the real call.
10118 * generics.2.cs: Add a new test for #79010.
10120 2006-08-03 Zoltan Varga <vargaz@gmail.com>
10122 * mini-x86.c: Fix a warning.
10124 * aot-compiler.c: Add a bunch of statistics.
10126 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
10128 2006-08-02 Zoltan Varga <vargaz@gmail.com>
10130 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
10132 2006-08-01 Zoltan Varga <vargaz@gmail.com>
10134 * 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>.
10136 2006-07-13 Miguel de Icaza <miguel@novell.com>
10138 * mini.c (mono_method_to_ir): Obtain the original method in the
10139 CIL stream and use this to perform validation.
10143 2006-07-19 Zoltan Varga <vargaz@gmail.com>
10145 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
10146 (mono_arch_call_opcode): Ditto.
10148 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
10151 * mini.c (mono_patch_info_dup_mp): New helper function.
10153 * aot-compiler.c (compile_method): Fix some of the memory allocated during
10154 compilation. Fixes #78827.
10156 2006-07-18 Kornél Pál <kornelpal@gmail.com>
10158 * declsec.c: Use original security informations for
10159 MONO_WRAPPER_MANAGED_TO_MANAGED.
10161 2006-07-15 Jonathan Chambers <joncham@gmail.com>
10163 * mini.c: Allow Com Interop methods/classes and
10164 don't verify COM wrapper calls
10167 2006-07-13 Zoltan Varga <vargaz@gmail.com>
10169 * inssel-long32.brg: Fix long->i4 checked conversion.
10171 * exceptions.cs: Add a test for the above.
10173 2006-07-08 Zoltan Varga <vargaz@gmail.com>
10175 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
10177 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
10180 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
10183 2006-07-03 Zoltan Varga <vargaz@gmail.com>
10185 * mini.c: Fix solaris/x86 exception handling.
10187 * Makefile.am: Get rid of $(ICU_LIBS).
10189 2006-07-02 Zoltan Varga <vargaz@gmail.com>
10191 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
10192 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
10193 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
10195 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
10197 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
10198 this function causes a SIGSEGV.
10200 2006-06-22 Zoltan Varga <vargaz@gmail.com>
10202 * mini.c: Remove unused solaris/x86 includes.
10204 2006-06-21 Zoltan Varga <vargaz@gmail.com>
10206 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
10208 2006-06-20 Jb Evain <jbevain@gmail.com>
10210 * cpu-g4.md: fix max length of start_handler instruction.
10212 2006-06-20 Massimiliano Mantione <massi@ximian.com>
10213 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
10215 2006-06-16 Massimiliano Mantione <massi@ximian.com>
10216 * ssa.c: Fixed bug 78653 for SSA based deadce.
10217 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
10218 MonoInst.flags, used in SSA based deadce.
10219 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
10220 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
10222 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
10224 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
10225 it can end up using non executable memory on ppc64 systems
10226 running ppc32 userspace (fix from Johannes Berg).
10228 2006-06-14 Dick Porter <dick@ximian.com>
10230 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
10233 2006-06-13 Massimiliano Mantione <massi@ximian.com>
10234 * mini.c: Made so that inline is locally disabled if it would
10235 trigger a .cctor, because too many apps depend on this behavior
10236 (which seems to be also the one of the MS CLR).
10238 2006-06-13 Zoltan Varga <vargaz@gmail.com>
10240 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
10241 No idea why this worked before.
10243 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
10244 which branch to outer exception clauses since they could skip the
10245 inner finally clauses. Fixes #78633.
10247 * exceptions.cs: Add a test for the above.
10249 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
10252 * iltests.il: Add a test for the above.
10254 2006-06-12 Zoltan Varga <vargaz@gmail.com>
10256 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
10257 after the end of a try bblock, to prevent asserts in mini_method_compile ().
10259 * iltests.il: Add a test for the above.
10261 2006-06-10 Zoltan Varga <vargaz@gmail.com>
10263 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
10265 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
10266 methods as instrinsics.
10268 2006-06-09 Wade Berrier <wberrier@novell.com>
10270 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
10271 (simple-cee-ops.h ssapre-mini-ops.h)
10273 2006-06-09 Neale Ferguson <neale@sinenomine.net>
10275 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
10276 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
10278 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
10279 * cpu-s390x.md: Fix max. length values for a couple of instructions.
10281 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
10283 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
10285 2006-06-08 Massimiliano Mantione <massi@ximian.com>
10287 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
10288 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
10289 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
10290 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
10291 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
10292 of opcodes, so that bug 78549 should not happen again.
10293 * ssapre.c: Updated to use the renamed files.
10295 2006-06-08 Zoltan Varga <vargaz@gmail.com>
10297 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
10298 in OP_ATOMIC_EXCHANGE_I4.
10300 2006-06-07 Wade Berrier <wberrier@novell.com>
10302 * tramp-s390.c: Fix s390 build (add missing pointer declarations
10303 in mono_debugger_create_notification_function)
10305 2006-06-06 Zoltan Varga <vargaz@gmail.com>
10307 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
10309 * mini.c (type_from_stack_type): Disable some changes which do not
10312 * driver.c: Reenable opts.
10314 * mini.h (MonoStackSlot): New structure to keep track of the verification state
10315 of the evaluation stack.
10317 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
10318 evaluation stack trace at entry to the bblock.
10320 * mini.c (merge_stacks): New function to perform verification of stack merges.
10321 Turned off by default.
10323 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
10326 2006-06-06 Massimiliano Mantione <massi@ximian.com>
10328 * local-propagation.c: Fixed bug 78549.
10330 2006-06-04 Zoltan Varga <vargaz@gmail.com>
10332 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
10334 2006-06-02 Miguel de Icaza <miguel@novell.com>
10336 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
10337 tramp-arm.c, tramp-ia64.c
10338 (mono_debugger_create_notification_function): Update signature to
10339 new signature and use new protocol for creating the notification
10342 Should fix the build.
10344 2006-06-02 Geoff Norton <gnorton@customerdna.com>
10346 * exceptions-ppc.c (mono_jit_walk_stack)
10347 (ves_icall_get_frame_info): Fix the build
10349 2006-06-02 Zoltan Varga <vargaz@gmail.com>
10351 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
10353 2006-05-31 Raja R Harinath <rharinath@novell.com>
10355 * il2tests.2.il: New file for generics CIL tests. Add test for
10357 * Makefile.am: Update.
10360 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
10363 2006-05-30 Massimiliano Mantione <massi@ximian.com>
10365 * aliasing.c: Fixed bug 78311.
10367 2006-05-29 Martin Baulig <martin@ximian.com>
10369 * mini-exceptions.c (mono_find_jit_info): When computing the
10370 native offset, check whether we're actually inside the method's
10371 code; call mono_debug_print_stack_frame() to format the frame.
10372 (ves_icall_System_Exception_get_trace): Call
10373 mono_debug_print_stack_frame() to format the stack frame.
10374 (ves_icall_get_trace): Update to the new debugging API.
10375 (mono_jit_walk_stack_from_ctx): Likewise.
10376 (ves_icall_get_frame_info): Likewise.
10378 * mini.c (get_method_from_ip): Use the new debugging API.
10379 (mono_print_method_from_ip): Likewise.
10382 (mono_jit_walk_stack): Use the new debugging API.
10383 (ves_icall_get_frame_info): Likewise.
10385 2006-05-27 Zoltan Varga <vargaz@gmail.com>
10387 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
10389 2006-05-25 Massimiliano Mantione <massi@ximian.com>
10391 * mini.c: Added "limitator" to inline for debugging.
10393 2006-05-24 Martin Baulig <martin@ximian.com>
10395 * debug-debugger.c (mono_debugger_init): Create a private,
10396 malloc()-based code manager for the notification function and
10397 intentionally leak it on exit. This fixes the crash-on-exit race
10401 (mono_debugger_create_notification_function): Added
10402 `MonoCodeManager *' argument.
10405 (mono_debugger_create_notification_function): Added
10406 `MonoCodeManager *' argument.
10408 2006-05-23 Massimiliano Mantione <massi@ximian.com>
10410 * aliasing.c: Fixed 64 bit issue.
10411 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10412 default since all known bugs are fixed (one more time!).
10414 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10416 * mini.c: write barrier support.
10418 2006-05-23 Martin Baulig <martin@ximian.com>
10420 * debug-debugger.c: Revert Paolo's change. Add comment and #error
10421 check at the top of the file.
10423 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10425 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
10426 reverting changes without reason and without changelog entries.
10428 2006-05-18 Zoltan Varga <vargaz@gmail.com>
10430 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
10431 to a few opcodes. Fixes #78439.
10433 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
10434 consistency with other archs.
10436 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
10438 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10440 * debug-debugger.c: fix the build.
10442 2006-05-17 Martin Baulig <martin@ximian.com>
10445 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
10446 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
10447 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
10448 (debugger_attach): Call GC_mono_debugger_add_all_threads().
10450 2006-05-11 Zoltan Varga <vargaz@gmail.com>
10452 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
10454 2006-05-10 Zoltan Varga <vargaz@gmail.com>
10456 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
10457 MONO_TYPE_GENERICINST.
10459 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
10460 MONO_TYPE_GENERICINST.
10462 2006-05-09 Zoltan Varga <vargaz@gmail.com>
10464 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
10467 2006-05-08 Zoltan Varga <vargaz@gmail.com>
10469 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
10471 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
10473 2006-05-06 Zoltan Varga <vargaz@gmail.com>
10475 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
10476 mono_trace_cleanup ().
10478 * iltests.il: Fix problem with the newly added test.
10480 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
10481 due to register constraints, free up the previous hreg. Fixes #78314.
10483 * iltests.il: Add new test for #78314.
10485 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
10486 Interlocked.Add. Fixes #78312.
10488 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
10490 2006-05-05 Zoltan Varga <vargaz@gmail.com>
10492 * inssel.brg (mini_emit_virtual_call): Fix a warning.
10494 2006-05-05 Martin Baulig <martin@ximian.com>
10496 * debug-mini.c (mono_debug_open_block): New method.
10499 (mono_arch_output_basic_block): Call mono_debug_open_block() at
10500 the beginning of each basic block.
10503 (mono_arch_output_basic_block): Call mono_debug_open_block() at
10504 the beginning of each basic block.
10506 2006-05-04 Massimiliano Mantione <massi@ximian.com>
10508 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10509 default until I understand why they break the build on amd64.
10511 2006-05-04 Zoltan Varga <vargaz@gmail.com>
10513 * mini.c (mini_cleanup): Call mono_cleanup ().
10515 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
10518 2006-05-04 Massimiliano Mantione <massi@ximian.com>
10520 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
10521 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10522 default since all known bugs are fixed, and I cannot reproduce bug
10523 77944... I'm asking Matt Hargett to test again after this commit.
10525 2006-04-28 Massimiliano Mantione <massi@ximian.com>
10527 * mini-codegen.c: Fixed typo that thrashed inline.
10529 2006-04-28 Zoltan Varga <vargaz@gmail.com>
10531 * dominators.c (compute_dominators): Avoid using a worklist since
10532 it is not correct in some cases. Instead, iterate over all bblocks as
10533 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
10535 2006-04-28 Miguel de Icaza <miguel@novell.com>
10537 * mini.c (mono_jit_compile_method_inner): Use
10538 mono_prepare_exception_from_error that resets the value
10541 2006-04-27 Miguel de Icaza <miguel@novell.com>
10543 * mini.c: Move the mini_loader_error_to_exception to metadata.
10545 2006-04-27 Massimiliano Mantione <massi@ximian.com>
10547 * aliasing.c: Fixed bug 78210.
10549 2006-04-27 Massimiliano Mantione <massi@ximian.com>
10551 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10552 default until all their problems (or the ones they trigger) are fixed.
10554 2006-04-26 Zoltan Varga <vargaz@gmail.com>
10556 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
10558 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
10559 as loaded only after resolving patches since that could invoke the same method.
10561 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
10563 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
10566 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
10569 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
10572 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
10573 made from AOT code through the PLT table.
10575 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
10576 holding the plt offset when a call is made to the aot plt trampoline.
10578 2006-04-25 Zoltan Varga <vargaz@gmail.com>
10580 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
10583 * Makefile.am (common_sources): Fix build breakage.
10585 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
10586 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
10587 intra-assembly calls if possible.
10589 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
10591 * mini-trampolines.c: Handle PLT entries.
10593 * mini.c: Avoid creating a GOT var for calls.
10595 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
10596 from mscorlib code.
10598 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
10599 from mscorlib code.
10601 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
10604 * mini.h: Bump AOT file format version.
10606 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
10609 2006-04-25 Martin Baulig <martin@ximian.com>
10611 * driver.c: Disable copyprop, consprop and inline when running
10612 inside the debugger.
10614 2006-04-25 Martin Baulig <martin@ximian.com>
10616 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
10617 with `get_current_thread' and added `detach'.
10618 (MonoDebuggerMetadataInfo): Added `thread_size',
10619 `thread_tid_offset', `thread_stack_ptr_offset' and
10620 `thread_end_stack_offset'.
10622 2006-04-25 Zoltan Varga <vargaz@gmail.com>
10624 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
10627 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
10628 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
10630 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
10632 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
10634 * aot.c: Add support for ADJUSTED_IID.
10636 2006-04-24 Zoltan Varga <vargaz@gmail.com>
10638 * aot.c (emit_method_order): Don't align method_order_end.
10640 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
10641 the interface ID changes.
10643 2006-04-21 Dick Porter <dick@ximian.com>
10645 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
10646 cleaning up a thread. Fixes the new part of bug 77470.
10648 2006-04-20 Geoff Norton <gnorton@customerdna.com>
10650 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
10651 to managed wrapper.
10653 2006-04-19 Zoltan Varga <vargaz@gmail.com>
10655 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
10657 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
10658 SIGSEGV. Fixes #78072.
10660 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
10661 unregister our SIGABRT handler.
10663 2006-04-19 Massimiliano Mantione <massi@ximian.com>
10665 * mini.c: Disabled inline where it can alter the call stack in a
10666 way visible from managed code.
10667 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
10670 2006-04-16 Zoltan Varga <vargaz@gmail.com>
10672 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
10673 on other platforms. Fixes #78089.
10675 2006-04-13 Martin Baulig <martin@ximian.com>
10677 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
10678 determine whether we're inside the debugger.
10681 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
10683 2006-04-12 Zoltan Varga <vargaz@gmail.com>
10685 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
10686 handler clauses. Fixes #78024.
10688 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
10689 in the CALL_MEMBASE opcodes. Fixes #78088.
10690 (mono_arch_get_vcall_slot_addr): Ditto.
10692 2006-04-10 Martin Baulig <martin@ximian.com>
10694 * debug-debugger.c: The thread handling code has now been moved
10695 into ../metadata/threads.c.
10697 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10699 * driver.c (mono_main): Fix --with-gc=none build.
10701 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
10702 (mono_spillvar_offset_float): Ditto.
10703 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
10704 hreg, not when its !global, since on ia64, there is a third category: stacked
10707 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
10709 * mini.c: set MonoInst->klass for load field address and a few other
10712 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10714 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
10716 2006-04-07 Zoltan Varga <vargaz@gmail.com>
10718 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
10719 the branch opt changes.
10721 2006-04-06 Dick Porter <dick@ximian.com>
10723 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
10725 * wapihandles.c (mini_wapi_seminfo):
10726 * driver.c (mono_main): Add semaphore info option
10728 2006-04-05 Zoltan Varga <vargaz@gmail.com>
10730 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
10731 branch optimization changes. Fixes #78009.
10733 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10735 * mini.c: ignore accessibility of methods in managed->native wrappers.
10737 2006-04-04 Zoltan Varga <vargaz@gmail.com>
10739 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
10741 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
10743 2006-04-03 Zoltan Varga <vargaz@gmail.com>
10745 * mini.c: Modify the branch optimizations to preserve the invariant that
10746 the entries inside the in_bb and out_bb arrays are unique.
10747 (mono_unlink_bblock): Avoid creation of new arrays.
10749 2006-04-02 Zoltan Varga <vargaz@gmail.com>
10751 * mini.c (mono_unlink_bblock): Fix regression caused by previous
10754 2006-04-01 Zoltan Varga <vargaz@gmail.com>
10756 * mini.c (optimize_branches): Remove the "optimizations" in
10757 the cbranch1/cbranch2 -> branch cases which were causing several
10758 problems in the past. Fixes #77986.
10760 2006-03-31 Chris Toshok <toshok@ximian.com>
10762 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
10763 default optimizations :(
10765 2006-03-31 Zoltan Varga <vargaz@gmail.com>
10767 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
10770 2006-03-31 Massimiliano Mantione <massi@ximian.com>
10772 * local-propagation.c: Added comments to structs and removed
10773 "Mono" prefixes from local tree mover types.
10775 2006-03-30 Zoltan Varga <vargaz@gmail.com>
10777 * Makefile.am (arch_sources): Define this for each architecture so
10778 libmono_la_SOURCES is defined in one place.
10780 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
10782 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
10785 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
10787 * driver.c: print the GC name supplied by configure.
10789 2006-03-29 Massimiliano Mantione <massi@ximian.com>
10791 * local-propagation.c: Added tree mover, and moved here all the
10792 local propagation code from mini.c
10793 * mini.c: Added support for treeprop, and moved all the local
10794 propagation code to local-propagation.c
10795 * mini.h: Added support for treeprop
10796 * driver.c: Added support for treeprop, enabled consprop, copyprop,
10797 treeprop, inline and deadce by default
10798 * Makefile.am: Added local-propagation.c
10800 2006-03-25 Zoltan Varga <vargaz@gmail.com>
10802 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
10804 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
10806 * debug-debugger.c: make it compile without the Boehm GC.
10808 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10810 * mini.c: fixed issue with mismatch when an icall is registered
10811 with multiple names but same address.
10813 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
10815 * declsec.c, mini-exceptions.c: use write barrier to set reference
10816 fields of managed objects.
10818 2006-03-19 Zoltan Varga <vargaz@gmail.com>
10820 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
10821 (can_access_internals): Fix a warning.
10823 * mini.c (print_method_from_ip): Rename this to
10824 mono_print_method_from_ip so it gets exported.
10826 * trace.c: Deal with strings inside StringBuilder's containing garbage
10827 and fix memory leaks. Fixes #77848.
10829 2006-03-19 Zoltan Varga <vargaz@gmail.com>
10831 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
10834 2006-03-16 Neale Ferguson <neale@sinenomine.net>
10836 * mini-s390.c: Remove OP_X86_TEST_NULL.
10838 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
10840 * mini.c: use the correct GetHashCode() for the moving collector.
10842 2006-03-16 Massimiliano Mantione <massi@ximian.com>
10844 * liveness.c: Regalloc spill cost tuning.
10846 2006-03-15 Neale Ferguson <neale@sinenomine.net>
10848 * mini-s390x.h: Correct S390_LONG macro.
10850 * mini-s390x.c: Cleanup unused code.
10852 2006-03-15 Zoltan Varga <vargaz@gmail.com>
10854 * jit-icalls.h: New file.
10856 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
10857 icalls and include that instead of including jit-icalls.c.
10859 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
10862 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
10864 * mini.c: when checking for member accessibility, also check for
10865 friend assemblies and for explicit interface implementations.
10867 2006-03-14 Zoltan Varga <vargaz@gmail.com>
10869 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
10871 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
10873 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10874 common cases are done first.
10876 * mini-ops.h: Only define platform specific opcodes on the given platform.
10878 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
10881 2006-03-14 Martin Baulig <martin@ximian.com>
10883 Revert Paolo's change from r57348:
10885 * mini.h: don't use gboolean for bitfields.
10886 * mini.c: verifier changes for fields and methods accessibility.
10888 2006-03-13 Neale Ferguson <neale@sinenomine.net>
10890 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
10892 * mini-s390x.c: Fix conv_r_un.
10894 * cpu-s390, cpu-s390x.md: Fix lengths.
10896 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
10898 * mini.c: nested types have access to all the nesting
10899 levels, not just the enclosing types.
10901 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10903 * mini.c: added a few more verification checks.
10905 2006-03-12 Zoltan Varga <vargaz@gmail.com>
10907 * liveness.c: Merge optimizations from the linear-il branch.
10909 2006-03-11 Zoltan Varga <vargaz@gmail.com>
10911 * mini-ia64.c (emit_call): Add a comment.
10913 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
10915 * tramp-ia64.c: Fix some warnings.
10917 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10919 * mini.h: don't use gboolean for bitfields.
10920 * mini.c: verifier changes for fields and methods accessibility.
10922 2006-03-11 Zoltan Varga <vargaz@gmail.com>
10924 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
10925 lazy icall wrapper changes.
10927 * dominators.c: Replace all the dominator algorithms with faster
10928 ones from the linear-il branch.
10930 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
10933 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10934 common cases are done first.
10936 * mini-amd64.c: Fix some warnings.
10938 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
10941 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
10944 * mini.h: Add a missing prototype.
10946 2006-03-10 Zoltan Varga <vargaz@gmail.com>
10948 * mini.c: Compile icall wrappers lazily.
10950 * mini-codegen.c: Use printf instead of g_print since its much faster.
10952 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
10955 * mini.c (optimize_branches): Cache the negative result from
10956 remove_block_if_useless ().
10958 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
10959 Also fix some bblock linking issues.
10961 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
10964 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
10966 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
10967 accessed fields first, for better cache behavior.
10969 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10971 * mini.c: speedup IList<T> array accesses.
10973 2006-03-09 Zoltan Varga <vargaz@gmail.com>
10975 * mini.c (mono_method_to_ir): Handle large methods overflowing the
10976 inline_costs counter. Fixes #77190.
10978 2006-03-06 Zoltan Varga <vargaz@gmail.com>
10980 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
10981 trace messages. Fixes #77706.
10983 2006-03-04 Martin Baulig <martin@ximian.com>
10985 * tramp-amd64.c, tramp-x86.c
10986 (mono_debugger_create_notification_function): Use
10987 mono_global_codeman_reserve() to allocate a buffer at runtime and
10990 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
10992 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
10993 notification function at runtime and then call `initialize' in the
10994 `MONO_DEBUGGER__debugger_info' vtable.
10996 2006-03-04 Zoltan Varga <vargaz@gmail.com>
10998 * iltests.il: Fix a visibility problem.
11000 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11002 * driver.c, mini.c: add hooks for the counters API.
11004 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11006 * driver.c: show disabled options.
11008 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11010 * linear-scan.c: always use cost-driven selection.
11012 2006-02-28 Raja R Harinath <rharinath@novell.com>
11014 * jit-icalls.c (helper_compile_generic_method): Revert change from
11017 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
11019 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
11021 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
11023 * inssel.brg: style fixes, mostly to force the updated monoburg
11024 to run for people using svn.
11026 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11028 * mini.c: match monoburg changes.
11030 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11032 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
11033 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
11034 declaration in the header file.
11036 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11038 * helpers.c: reduce relocations and mem usage.
11040 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11042 * mini.h, mini-codegen.c: disable logging features if
11043 requested by configure.
11045 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
11047 * mini.c: tiny verifier changes.
11049 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11051 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
11052 cpu-pentium.md: stack alignment changes for osx/x86,
11053 partially from Geoff Norton <gnorton@customerdna.com>.
11055 2006-02-24 Raja R Harinath <harinath@gmail.com>
11057 * jit-icalls.c (helper_compile_generic_method): Update to changes
11058 in metadata/class.c.
11060 2006-02-24 Zoltan Varga <vargaz@gmail.com>
11062 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
11064 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
11065 interface calls with large offsets.
11067 2006-02-23 Raja R Harinath <rharinath@novell.com>
11069 * jit-icalls.c (helper_compile_generic_method): Document the
11070 special-case we depend on so that we can inflate the method twice
11071 with the same context with no bad side-effects.
11073 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
11075 * mini-x86.c, mini-amd64.c: fix for case when xen support
11078 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
11080 * mini-x86.c, mini-amd64.c: generate code to access tls items
11081 in a faster way for Xen systems.
11083 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11085 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
11086 updates and compilation fixes for the OSX/x86 port, mostly from
11087 Geoff Norton <gnorton@customerdna.com>.
11089 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11091 * inssel.brg: faster interface call implementation
11092 to sync with the interface_offsets MonoVTable changes.
11094 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11096 * mini.c: more verification checks.
11098 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
11100 * mini.c: added a few more verification checks.
11102 2006-02-17 Neale Ferguson <neale@sinenomine.net>
11104 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
11105 facility on the processor and use it if available.
11107 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11109 * driver.c, aot.c, mini.c: throw exception if the IL code is
11110 invalid or unverifiable.
11112 2006-02-17 Raja R Harinath <rharinath@novell.com>
11114 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
11117 2006-02-16 Zoltan Varga <vargaz@gmail.com>
11119 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
11121 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11123 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
11124 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
11125 handling of instantiated generic valuetypes.
11127 2006-02-11 Zoltan Varga <vargaz@gmail.com>
11129 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
11130 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
11133 * generics.2.cs: Revert the nullable reftypes tests.
11135 2006-02-10 Zoltan Varga <vargaz@gmail.com>
11137 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
11138 using __builtin_frame_address (1) as it doesn't work in the presence
11139 of optimizations. Hopefully fixes #77273.
11141 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
11142 -> generics.cs change as it doesn't work with some automake versions.
11144 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11146 * mini.c: handle systems that sue a different way to
11147 retrieve the stack address of the current thread.
11149 2006-02-09 Zoltan Varga <vargaz@gmail.com>
11151 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
11152 it specially in the makefile.
11154 * generics.2.cs: Add tests for nullable reference types.
11156 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11158 * mini.c: always handle the case when mono_jit_init()
11159 is called in a thread different from the main thread,
11160 confusing libgc (bug #77309).
11162 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
11164 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
11166 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11168 * mini.c: change optimize_branches () to use a single loop
11169 and introduce a new optimization to simplify some range checks.
11171 2006-02-03 Martin Baulig <martin@ximian.com>
11173 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
11174 and merged with debugger_thread_manager_add_thread().
11175 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
11176 inform the debugger about the main thread.
11178 2006-02-03 Zoltan Varga <vargaz@gmail.com>
11180 * basic.cs: Add test for div.un/rem.un constant folding.
11182 2006-02-03 Neale Ferguson <neale@sinenomine.net>
11184 * cpu-s390x.md: correct int_xor_imm length
11186 2006-02-03 Zoltan Varga <vargaz@gmail.com>
11188 * generics.2.cs: New test for #77442.
11190 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
11193 2006-02-02 Martin Baulig <martin@ximian.com>
11195 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
11196 <mono/metadata/mono-debug-debugger.h>
11198 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
11200 2006-02-02 Martin Baulig <martin@ximian.com>
11202 * debug-debugger.h: New header file for debug-debugger.c.
11204 * debug-debugger.c: Big API cleanup; don't run the managed Main()
11205 function is a separate thread anymore; add support for attaching.
11207 2006-02-01 Zoltan Varga <vargaz@gmail.com>
11209 * tramp-x86.c: Fix a warning.
11211 2006-01-31 Zoltan Varga <vargaz@gmail.com>
11213 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
11214 on very large methods.
11216 * aot.c (load_patch_info): Fix a warning.
11218 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11220 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
11221 mini-ops.h: alu membase optimizations.
11223 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
11225 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
11226 to speedup StringBuilder.
11228 2006-01-27 Zoltan Varga <vargaz@gmail.com>
11230 * dominators.c (mono_compute_natural_loops): Fix detection of
11231 loop body start blocks.
11233 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
11235 2006-01-26 Zoltan Varga <vargaz@gmail.com>
11237 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
11240 2006-01-25 Massimiliano Mantione <massi@ximian.com>
11242 * aliasing.c: Fixed aliasing issue on 64 bit archs.
11244 2006-01-25 Martin Baulig <martin@ximian.com>
11246 * debug-debugger.c: Moved the `MonoDebuggerManager' and
11247 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
11248 started to cleanup this file a little bit.
11250 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
11252 * mini.c: optimize a codepath frequently happening in generics code.
11254 2006-01-23 Martin Baulig <martin@ximian.com>
11256 * Makefile.am: Only compile debug-debugger.c on supported platforms.
11258 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
11259 functions directly.
11261 * driver.c: debug-debugger.c is only available if
11262 `MONO_DEBUGGER_SUPPORTED' is defined.
11264 2006-01-23 Martin Baulig <martin@ximian.com>
11266 * debug-debugger.c: Only enable this on platforms where the Mono
11267 Debugger is working (x86 and x86_64).
11269 2006-01-21 Martin Baulig <martin@ximian.com>
11271 The Mono Debugger is now using the normal `mono' instead of the
11272 `mono-debugger-mini-wrapper' when executing managed code.
11274 * debug-debugger.c: New file; previously known as
11275 debugger/wrapper/wrapper.c.
11277 * debug-mini.c (mono_init_debugger): Removed.
11279 * driver.c (mono_main): Added new `--inside-mdb' command line
11280 argument which is used when running inside the debugger.
11282 2006-01-20 Zoltan Varga <vargaz@gmail.com>
11284 * liveness.c (mono_analyze_liveness): Remove some unused data
11287 2006-01-17 Zoltan Varga <vargaz@gmail.com>
11289 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
11291 2006-01-16 Zoltan Varga <vargaz@gmail.com>
11293 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
11294 depends on implementation details of monobitset.
11296 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
11299 2006-01-15 Zoltan Varga <vargaz@gmail.com>
11301 * liveness.c: Update after monobitset changes.
11303 2006-01-14 Zoltan Varga <vargaz@gmail.com>
11305 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
11307 2006-01-11 Neale Ferguson <neale@sinenomine.net>
11309 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
11311 * mini-s390x.c: Remove warning messages.
11313 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
11315 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
11317 2006-01-10 Zoltan Varga <vargaz@gmail.com>
11319 * generics.2.cs: Add ldelem/stelem_any test.
11321 2006-01-10 Neale Ferguson <neale@sinenomine.net>
11323 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
11325 2006-01-07 Zoltan Varga <vargaz@gmail.com>
11327 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
11329 2006-01-06 Zoltan Varga <vargaz@gmail.com>
11331 * generics.2.cs: Reenable vtype tests.
11333 * inssel-x86.brg: Remove an icorrect valuetype rule.
11335 2006-01-06 Neale Ferguson <neale@sinenomine.net>
11337 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
11338 initial support for OP_ABS.
11340 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11342 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
11344 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11346 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
11347 conversion and implement LADD/LSUB.
11349 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
11352 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11354 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
11356 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
11359 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11361 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
11362 localloc is encountered. Fixes crash in test-183.cs when using gmcs
11363 (stack walk problem).
11365 2006-01-04 Zoltan Varga <vargaz@gmail.com>
11367 * aot.c (mono_aot_load_method): Fix a warning.
11369 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11371 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
11373 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11375 * iltests.il: Add test for #77148.
11377 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
11380 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11382 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
11384 2006-01-03 Neale Ferguson <neale@sinenomine.net>
11386 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
11387 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
11389 * basic-long.cs: Add lconv-to-r4/r8 tests.
11391 2006-01-03 Zoltan Varga <vargaz@gmail.com>
11393 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
11395 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
11396 here as on other archs.
11398 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11400 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
11402 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11404 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
11406 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
11408 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
11409 instrument_prolog; Add memory_barrier instruction.
11411 2005-12-26 Zoltan Varga <vargaz@gmail.com>
11413 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
11415 2005-12-23 Zoltan Varga <vargaz@gmail.com>
11417 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
11419 * aliasing.c inssel.brg: Fix warnings.
11421 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
11422 could skip initialization of some parts of memory.
11424 * mini.c mini-ia64.c: Fix warnings.
11426 * inssel-sparc.brg: Add an implementation of lneg which actually works.
11428 2005-12-22 Zoltan Varga <vargaz@gmail.com>
11430 * aliasing.c (mono_build_aliasing_information): Add a workaround for
11431 a crash seen on sparc.
11433 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
11435 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
11437 2005-12-21 Neale Ferguson <neale@sinenomine.net>
11439 * mini-ops.h: Add s390_backchain instruction
11441 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
11443 * cpu-s390.md: Add s390_backchain instruction
11445 * mini-s390.c: Significant ABI changes
11447 * mini-s390.h: Cater for zero length structures
11449 2005-12-20 Neale Ferguson <neale@sinenomine.net>
11451 * mini-s390.c: ABI fixes
11453 * inssel-s390.brg: Remove debug statements
11455 * cpu-s390.md: Fix length of ATOMIC_xx operations
11457 2005-12-19 Zoltan Varga <vargaz@gmail.com>
11459 * basic-float.cs: Add float<->long conversion tests.
11461 2005-12-16 Neale Ferguson <neale@sinenomine.net>
11463 * mini-s390.c: Fix LOCALLOC processing.
11465 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
11467 2005-12-15 Zoltan Varga <vargaz@gmail.com>
11469 * iltests.il: Add tests for some opcodes not covered by the other
11472 2005-12-15 Neale Ferguson <neale@sinenomine.net>
11474 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
11475 register loading for Tail processing; Correct trace output.
11477 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
11479 * cpu-s390.md: Correct size of jmp instruction.
11481 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11483 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
11485 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11487 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
11488 Bring s390 up to current level.
11490 2005-12-12 Zltan Varga <vargaz@gmail.com>
11492 * generics.2.cs: Disable the newly added tests as they do not work yet.
11494 * generics.2.cs: Add valuetype tests.
11496 2005-12-09 Zoltan Varga <vargaz@gmail.com>
11498 * basic-long.cs: Add i4->u8 test.
11500 * objects.cs: Add tests for JIT intrinsic.
11502 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
11503 optimizations lost by a mistake.
11505 2005-12-07 Zoltan Varga <vargaz@gmail.com>
11507 * basic-long.cs: Remove a test moved to objects.cs.
11509 * arrays.cs: Add more array tests.
11511 2005-12-06 Zoltan Varga <vargaz@gmail.com>
11513 * arrays.cs: Add new tests for multi-dimensional arrays.
11515 2005-12-06 Raja R Harinath <rharinath@novell.com>
11517 * Makefile.am (test_sources2): Add generics.2.cs.
11518 (EXTRA_DIST): Add test_sources2.
11520 2005-12-05 Ben Maurer <bmaurer@ximian.com>
11522 Support for boxing and unboxing nullable types as well as the
11523 isinst operation on nullables, per the CLI ammendment.
11525 * inssel.brg (CEE_ISINST): Special case for nullable
11527 * mini.c (handle_unbox_nullable): new method
11528 (handle_box): Special case for nullable types
11529 (mono_method_to_ir): Call handle_unbox_nullable in correct
11532 * generics.2.cs: New test suite
11534 * Makefile.am: Support for regression tests with generics.
11536 2005-12-03 Zoltan Varga <vargaz@gmail.com>
11538 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
11539 allocated to registers. Fixes #76800.
11541 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
11543 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
11545 2005-11-30 Zoltan Varga <vargaz@gmail.com>
11547 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
11550 2005-11-29 Zoltan Varga <vargaz@gmail.com>
11552 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
11555 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
11557 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
11558 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
11560 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
11561 single precision before storing to a single precision location.
11563 2005-11-28 Raja R Harinath <rharinath@novell.com>
11565 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
11567 2005-11-27 Zoltan Varga <vargaz@gmail.com>
11569 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
11572 * basic.cs: Remove test_0_byte_compares test which was moved to
11573 objects.cs a long time ago.
11575 2005-11-22 Massimiliano Mantione <massi@ximian.com>
11577 * aliasing.c: Fixed aliasing issue on 64 bit archs.
11579 2005-11-20 Zoltan Varga <vargaz@gmail.com>
11581 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
11582 handlers are called.
11584 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
11587 * mini-ia64.c: Add support for the throw->branch exception
11590 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
11592 2005-11-18 Massimiliano Mantione <massi@ximian.com>
11594 * mini.c: Enabled "fastpath" deadce :-)
11596 2005-11-18 Massimiliano Mantione <massi@ximian.com>
11598 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
11599 alias analysis pass to support it.
11600 * mini.h: Likewise.
11602 * liveness.c: Likewise (liveness computation can use aliasing
11603 information to be more accurate).
11604 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
11605 moreover made so that "--compile-all" uses the given optimization
11606 flags and not the default ones.
11607 * aliasing.c: Alias analysis (new file).
11608 * aliasing.h: Likewise.
11609 * Makefile.am: added "aliasing.c" and "aliasing.h".
11611 2005-11-17 Zoltan Varga <vargaz@gmail.com>
11613 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
11616 2005-11-13 Zoltan Varga <vargaz@gmail.com>
11618 * mini-exceptions.c (mono_handle_exception_internal): Remove the
11619 fp >= end_of_stack exit condition, as it is not needed, and it might
11620 become true for fp eliminated frames.
11622 2005-11-11 Zoltan Varga <vargaz@gmail.com>
11624 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
11627 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
11629 * mini-arm.c: fixed alignment of doubles/longs to match
11630 the C ABI (bug #76635).
11632 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
11634 * aot.c: fix compilation with --enable-minimal=aot.
11636 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
11638 * mini-arm.c: fixed compatibility with the new
11639 floating point emulator package for compares.
11641 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
11643 * mini.c : reverted sig->pinvoke changes (r51396-51397).
11645 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
11647 * mini-exceptions.c (print_stack_frame): Output to stderr.
11648 (mono_handle_native_sigsegv): Ditto.
11650 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
11652 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
11653 OP_LCONV_TO_OVF_I implementation.
11655 * mini-amd64.c: Add support for the throw->branch exception
11658 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
11659 when the catch clause catches a more general exception, i.e. Object.
11661 2005-10-30 Zoltan Varga <vargaz@gmail.com>
11663 * cpu-ia64.md: Remove unused opcodes.
11665 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
11666 specific defines for architectures defining USE_SIGACTION.
11668 * mini-ia64.c: Fix some warnings.
11670 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
11671 version seemed to skip a frame.
11673 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
11675 * mini.c: Clean up the usage of sig->pinvoke flag. Now
11676 only calls which are made to native code use this flag.
11678 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
11680 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
11681 varargs methods as well.
11683 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
11684 which have save_lmf set. Reorganize methods prologs a bit.
11686 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
11687 debugger to the proper place.
11689 2005-10-29 Martin Baulig <martin@ximian.com>
11691 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
11692 when running inside the debugger until the debugger has support
11695 2005-10-26 Zoltan Varga <vargaz@gmail.com>
11697 * mini.h: Fix a warning.
11699 2005-10-24 Miguel de Icaza <miguel@novell.com>
11701 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
11702 we expose publicly, this returns the string.
11704 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
11706 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
11707 with fp elimination.
11709 2005-10-21 Zoltan Varga <vargaz@gmail.com>
11711 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
11712 native stacktrace using the glibc 'backtrace' function if available.
11714 2005-10-20 Zoltan Varga <vargaz@gmail.com>
11716 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
11718 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
11719 handle SIGSEGVs received while in native code.
11721 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
11722 code, call mono_handle_native_sigsegv which will abort the runtime
11723 after printing some diagnostics, instead of converting it into a
11724 confusing NullReferenceException.
11726 2005-10-18 Zoltan Varga <vargaz@gmail.com>
11728 * cpu-pentium.md: Remove unused opcodes.
11730 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
11732 * mini-amd64.h (MonoLMF): Add rsp field.
11734 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
11737 2005-10-17 Zoltan Varga <vargaz@gmail.com>
11739 * mini-codegen.c (get_register_spilling): Fix some warnings.
11741 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
11743 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
11744 elimination during exception handling. Enable fp elimination by
11747 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
11750 2005-10-16 Martin Baulig <martin@ximian.com>
11752 * mini-exceptions.c
11753 (mono_debugger_run_finally): New public method for the debugger.
11755 2005-10-10 Zoltan Varga <vargaz@gmail.com>
11757 * debug-mini.c (mono_debug_init_method): Fix warning.
11759 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
11760 the 'exname' parameter const to fix some warnings.
11762 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
11764 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
11765 introduced by the previous patch.
11767 2005-10-08 Zoltan Varga <vargaz@gmail.com>
11769 * basic-float.cs: Add test for precision of float arithmetic.
11771 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
11772 when loading/storing single values from/to memory.
11774 * mini.c (mono_jit_compile_method_with_opt): Create the function
11775 pointers in the correct domain.
11777 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
11779 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
11780 introduced by previous patch.
11782 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
11783 when out_filter_idx is NULL.
11785 * mini-exceptions.c: Don't run filter clauses twice during exception
11786 handling. Fixes #75755.
11788 2005-10-07 Zoltan Varga <vargaz@gmail.com>
11790 * aot.c: Add support for ldflda wrappers.
11792 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
11795 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
11797 * mini.c, mini.h: do not consider exception handlers blocks when
11798 setting up interface variables.
11800 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
11802 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
11804 2005-10-03 Zoltan Varga <vargaz@gmail.com>
11806 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
11807 causes a regression.
11809 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
11811 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
11813 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
11814 of the OP_P definitions.
11816 * TODO: Add a proposal for dealing with the CEE/OP mess.
11818 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
11819 optimizations from the x86 port.
11821 * cpu-amd64.md: Ditto.
11823 * basic.cs basic-long.cs: Add tests.
11825 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
11827 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
11828 Patrik Torstensson's implementation of my exception-handling
11829 optimization idea, when the exception object is not used
11832 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
11834 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
11835 of the mul_imm optimizations from the old jit.
11837 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
11839 * mini.c, liveness.c: patch by Patrik Torstensson and
11840 Zoltan Varga to improve performance in methods with
11843 2005-09-30 Zoltan Varga <vargaz@gmail.com>
11845 * driver.c: Remove 'Globalization' entry from --version.
11847 2005-09-28 Zoltan Varga <vargaz@gmail.com>
11849 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
11850 there is a profiler interested in JIT events.
11852 * aot.c: Load profile files produced by the AOT profiling module, and
11853 reorder methods based on the profiling info. Add a 'method_order' table
11854 to the AOT file to make mono_aot_find_jit_info work with the reordered
11857 * mini.h: Bump AOT file version info.
11859 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
11861 * mini-arm.h: work around what looks like a gcc bug when optimizations
11864 2005-09-28 Raja R Harinath <rharinath@novell.com>
11866 * Makefile.am (AM_CFLAGS): Don't use += to append inside
11867 conditionals. Use ...
11868 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
11870 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
11872 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
11873 to determine the amount of memory to copy when passing valuetypes.
11875 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
11876 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
11878 2005-09-27 Zoltan Varga <vargaz@gmail.com>
11880 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
11881 information about aot.
11883 2005-09-27 Ben Maurer <bmaurer@ximian.com>
11885 * *.c: Replace the use of {Enter,Leave}CriticalSection with
11886 macros. This will allow a deadlock debugger to easily be plugged
11889 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
11891 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
11893 2005-09-27 Raja R Harinath <rharinath@novell.com>
11895 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
11896 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
11897 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
11898 ($(arch_built)) [CROSS_COMPILING]: Error out.
11900 2005-09-26 Zoltan Varga <vargaz@gmail.com>
11902 * aot.c: Add support for the no_special_static flag for classes.
11904 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
11906 * Reapply reverted patches.
11908 * *: Revert r50174 as well.
11910 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
11912 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
11914 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
11916 2005-09-23 Miguel de Icaza <miguel@novell.com>
11918 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
11919 part of the SIG_HANDLER_SIGNATURE.
11921 2005-09-23 Zoltan Varga <vargaz@gmail.com>
11923 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
11926 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
11927 introduced by previous patch.
11929 2005-09-21 Zoltan Varga <vargaz@gmail.com>
11931 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
11932 saved registers too.
11934 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
11935 upon the information returned by get_call_info ().
11937 * mini-x86.c (add_float): Fix stack size calculation.
11938 (mono_arch_call_opcode): Rewrite this so it works based up the
11939 information returned by get_call_info ().
11940 (mono_arch_get_this_vret_args): Ditto.
11942 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
11944 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
11945 in cinfo to determine the registers which need to be used.
11947 2005-09-20 Miguel de Icaza <miguel@novell.com>
11949 * driver.c (mono_main): Add --server and --desktop flags.
11951 2005-09-16 Zoltan Varga <vargaz@gmail.com>
11953 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
11954 registers as global registers.
11956 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
11957 longer needed with the new register allocator.
11959 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
11961 * cpu-ia64.md: Remove unused opcodes.
11963 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
11965 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
11967 * cpu-amd64.md: Remove unused opcodes.
11969 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
11970 needed with the new register allocator.
11972 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
11975 2005-09-16 Raja R Harinath <rharinath@novell.com>
11977 * Makefile.am (check-local): Don't invoke semdel-wrapper.
11979 2005-09-16 Martin Baulig <martin@ximian.com>
11981 * exceptions-amd64.c
11982 (throw_exception): Don't call mono_debugger_throw_exception() if
11983 we're a rethrow - see the FIXME in the code.
11985 2005-09-15 Geoff Norton <gnorton@customerdna.com>
11987 * mini.c (mono_init_exceptions): This only works on some architectures.
11989 2005-09-15 Zoltan Varga <vargaz@gmail.com>
11991 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
11994 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
11996 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
11997 now in mini-exceptions.c.
11999 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
12001 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
12002 now in mini-exceptions.c.
12004 2005-09-15 Zoltan Varga <vargaz@gmail.com>
12006 * exceptions-x86.c: Applied patch from Patrik Torstensson
12007 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
12009 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
12010 code into mini-exceptions.c. Add some assertions to it.
12012 2005-09-12 Zoltan Varga <vargaz@gmail.com>
12014 * aot.c (emit_section_change): Applied patch from "The Software Team"
12015 (<software@solmersa.com>). Fix as errors on windows.
12017 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
12019 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
12020 method info into the LMF.
12022 2005-09-11 Zoltan Varga <vargaz@gmail.com>
12024 * mini-ia64.c: Add proper unwind info for method epilogs.
12026 * exceptions-ia64.c: Add some code to help debugging.
12028 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
12030 * mini-exceptions.c: Fix warning.
12032 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
12034 * mini.c: Really fix build.
12036 * mini-x86.c mini-amd64.c: Fix build.
12038 2005-09-11 Zoltan Varga <vargaz@gmail.com>
12040 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
12042 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
12043 some Interlocked methods as intrinsics.
12045 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
12046 for Thread methods as well.
12048 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
12050 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
12052 * mini-ia64.c mini-x86.c mini-amd64.c
12053 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
12056 * mini.c (mono_init_exceptions): Fix build breakage.
12058 2005-09-10 Zoltan Varga <vargaz@gmail.com>
12060 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
12061 of instructions. Use the new ia64_unw_op macros for emitting unwind
12064 * mini.c (mono_init_exceptions): Initialize exception handling
12065 related trampolines at startup.
12067 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
12069 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
12071 2005-09-09 Zoltan Varga <vargaz@gmail.com>
12073 * mini.c: Handle type loading errors gracefully during compilation and
12074 throw the appropriate exception.
12076 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
12078 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
12079 for the mono binary.
12081 2005-09-09 Martin Baulig <martin@ximian.com>
12083 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
12086 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12088 * mini-arm.h: use emulation for conv.r.un for the release.
12090 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12092 * mini-arm.c, objects.cs: more fixes and tests for them.
12094 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12096 * mini-arm.c: align structures to at least 4 bytes to be able
12097 to keep our current optimized memcpy.
12099 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
12101 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
12103 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12105 * mini.c: ignore SIGPIPE.
12107 2005-09-04 Zoltan Varga <vargaz@gmail.com>
12109 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
12111 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
12113 2005-09-02 Zoltan Varga <vargaz@gmail.com>
12115 * mini.h: Add prototype for mono_allocate_stack_slots_full.
12117 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12119 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
12120 exception handling support.
12121 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
12122 patch by Brian Koropoff <briank@marakicorp.com>).
12124 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
12126 * mini.c: revert another 'optimization' which breaks when
12127 items on the eval stack need to be saved at a basic block end
12130 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12132 * jit-icalls.c: for arrays, ensure we always provide
12135 2005-08-30 Zoltan Varga <vargaz@gmail.com>
12137 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
12139 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
12141 2005-08-29 Zoltan Varga <vargaz@gmail.com>
12143 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
12144 arguments in their original register.
12146 2005-08-28 Zoltan Varga <vargaz@gmail.com>
12148 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
12151 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
12152 when ssapre is enabled.
12154 * inssel-long.brg: Fix bug in previous patch.
12156 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
12157 multiplication by a constant.
12159 2005-08-27 Zoltan Varga <vargaz@gmail.com>
12161 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
12164 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
12167 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
12169 * inssel-arm.brg: apply changes tested by Brian Koropoff
12170 <briank@marakicorp.com>.
12172 2005-08-25 Zoltan Varga <vargaz@gmail.com>
12174 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
12176 2005-08-24 Zoltan Varga <vargaz@gmail.com>
12178 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
12179 to the same register if dreg is just a base register.
12180 (print_ins): Improve printing of membase opcodes.
12182 * inssel-x86.brg: Add optimized ldind(reg) rules.
12184 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
12186 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
12188 * mini.c: when running under valgrind, set the stack bottom for
12189 the GC at the actual approximate stack for the app (fixes running
12190 mono with valgrind).
12192 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
12194 * mini.c: do no break at the first valuetype to init found
12195 (fixes bug #75791).
12197 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
12199 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
12201 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
12203 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
12205 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
12207 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
12209 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12211 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
12213 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
12216 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
12219 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
12222 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
12224 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
12226 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12228 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
12229 in the tail recursion optimization.
12231 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
12232 debug info into the assembly file.
12234 * iltests.il: Add test for filter regions.
12236 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
12237 initial stack of filter regions. Fixes #75755.
12239 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
12241 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
12242 stack requirements.
12244 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
12246 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
12247 the check for an already compiled method on non-ia64 platforms.
12248 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
12251 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
12253 * inssel-x86.brg: Add some optimized call rules.
12255 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
12257 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
12260 * mini.h mini-trampolines.c: Pass the trampoline argument to
12261 mono_arch_patch_delegate_trampoline.
12263 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
12265 * mini-trampolines.c: Fix build.
12267 * mini-amd64.h: Add delegate trampolines.
12269 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
12271 * inssel-amd64.brg: Add optimized call rules.
12273 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
12275 * inssel-ia64.brg: Add optimized ldind(reg) rules.
12277 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
12279 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
12282 * mini-ia64.c: Remove LMF fixmes.
12284 * mini-ia64.h: Remove most fields from LMF.
12286 * inssel-ia64.brg (stmt): Fix unaligned access errors.
12288 * mini-trampolines.c: Add support for IA64 function descriptors.
12290 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
12291 for IA64 function descriptors.
12293 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
12295 * tramp-arm.c: patch the vtable for virtual calls. Added
12296 support code to register/unregister the LMF.
12297 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
12300 2005-08-19 Dick Porter <dick@ximian.com>
12302 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
12303 bit value if needed.
12305 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
12307 * mini.c (mini_get_method): Move handling of wrapper data here.
12309 * mini.c (mono_method_to_ir): Add support for dynamic methods.
12311 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
12314 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
12315 bblock->code does not remain empty.
12317 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
12319 * arrays.cs: Add regression test for #75832.
12321 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
12322 rules. Fixes #75832.
12324 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
12325 instruction scheduling.
12327 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
12329 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
12331 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
12333 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
12335 * mini-codegen.c: Fix VC build.
12337 * cpu-pentium.md: Increase length of atomic_exhange_i4.
12339 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12341 * mini.h: fix signature for mono_register_opcode_emulation.
12343 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
12345 * mini.c: Get rid of most of the helper_sig_... constants using
12346 mono_create_icall_signature ().
12348 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
12350 * jit-icalls.c (helper_ldstr): New helper function.
12352 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
12354 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
12355 throw, load the string using a helper call instead of creating a string object.
12357 * aot.c: Update after LDSTR changes.
12359 * mini.h: Bump AOT file version.
12361 * aot.c: Save class size info into the AOT file. Print more statistics during
12364 * mini.h: Bump AOT file version.
12366 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
12367 ordering of disasm cases. Fixes #74957.
12369 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
12371 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
12372 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
12373 the generic code needed for the ARM port.
12375 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
12377 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
12378 inssel-arm.brg: more ARM features and fixes.
12380 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
12382 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
12383 ARM port work in progress.
12385 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
12387 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
12389 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
12391 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
12393 * inssel.brg (mini_emit_memset): Add support for unaligned access.
12395 * *-ia64.*: Ongoing IA64 work.
12397 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
12399 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
12401 * TODO: Remove out-of-data todo stuff.
12403 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
12406 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
12408 * mini.h: Bump corlib version.
12410 2005-07-27 Martin Baulig <martin@ximian.com>
12413 (create_copy_ins): Added `const unsigned char *ip' argument; set
12414 `copy->cil_code' from it.
12416 2005-07-27 Martin Baulig <martin@ximian.com>
12418 * mini-exceptions.c (mono_handle_exception): Don't call
12419 mono_debugger_handle_exception() for filters.
12421 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
12423 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
12426 2005-07-26 Martin Baulig <martin@ximian.com>
12428 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
12430 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
12431 helper_compile_generic_method() if the method is actually virtual
12434 2005-07-26 Martin Baulig <martin@ximian.com>
12437 (trampoline_code): Renamed to `mono_trampoline_code' and made it
12438 public; this is now accessed directly by the debugger.
12439 (mono_generic_trampoline_code): Removed.
12442 (mono_debug_init_method): Also add interncalls and wrappers.
12444 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
12446 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
12448 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
12450 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
12452 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
12454 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
12456 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
12458 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
12459 getting TLS offsets on AMD64 too.
12461 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
12463 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
12465 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
12467 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
12468 inssel-arm.brg, mini-arm.h: ARM port work in progress.
12470 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
12472 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
12474 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
12477 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
12478 mono_sparc_is_virtual_call ().
12480 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
12482 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
12483 trampoline parameters.
12485 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
12487 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
12488 to mono_arch_get_vcall_slot_addr.
12490 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
12493 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
12495 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
12497 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
12499 2005-07-19 Martin Baulig <martin@ximian.com>
12501 * exceptions-amd64.c (throw_exception): Call
12502 mono_debugger_throw_exception() here like we're doing it on i386.
12504 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
12506 * mini-ia64.c: Add optimized TLS access support.
12508 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
12510 * mini-exceptions.c: Ongoing IA64 work.
12512 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
12514 * mini.c: Use the default optimization set when embedding. Fixes
12517 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
12519 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
12520 of trampolines to a separate file.
12522 * mini-trampolines.c: New file.
12524 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
12527 * tramp-x86.c: Reorganize the trampoline code to be similar to the
12530 * mini-codegen.c: Fix cygwin build.
12532 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
12534 * mini.c: Add some minor changes needed by the IA64 port.
12536 * *-ia64.*: Ongoing IA64 work.
12538 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
12540 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
12541 trampolines into arch-independent and arch-dependent parts.
12543 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
12545 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
12547 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
12549 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
12550 the xp-regalloc-branch for amd64.
12552 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
12553 xp-regalloc-branch for x86.
12555 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
12557 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
12559 2005-07-06 Martin Baulig <martin@ximian.com>
12562 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
12563 (mono_jit_runtime_invoke): Likewise.
12565 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
12567 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
12570 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
12571 without loading their metadata. Reorganize the file format so exception handling+
12572 debug info is kept separate from normal method info. Create MonoJitInfo
12573 structures for methods lazily.
12575 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
12577 (x86_class_init_trampoline): Patch AOT class init trampolines too.
12579 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
12581 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
12584 * mini.h: Bump AOT file version.
12586 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
12588 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12590 2005-07-01 Raja R Harinath <rharinath@novell.com>
12592 * Makefile.am (check-local): Call semdel-wrapper.
12594 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
12596 * mini-x86.c: Revert the last change as it seems to break the build..
12598 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
12600 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12602 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
12604 2005-06-27 Ben Maurer <bmaurer@ximian.com>
12606 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
12607 outside of the macro, so strange stuff doesn't happen with gcc4
12608 (NEW_AOTCONST_TOKEN): Likewise.
12610 2005-06-28 Martin Baulig <martin@ximian.com>
12612 * mini.c (mini_class_is_system_array): New static method; use this
12613 instead of `klass->parent == mono_defaults.array_class' everywhere
12614 since this also works for the new generic array class.
12616 2005-06-26 Ben Maurer <bmaurer@ximian.com>
12618 * inssel.brg: Remove warnings.
12620 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
12622 * mini-ia64.c: Ongoing IA64 work.
12624 * basic-float.cs: Add float->i1 conversion test.
12626 * iltests.il: Add conv.u4 test.
12628 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
12630 * inssel-long.brg: Fix bug caused by last change.
12632 2005-06-23 Geoff Norton <gnorton@customerdna.com>
12634 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
12635 BSDs. Allows the x86 JIT to work on OSX86
12637 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
12639 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
12642 * mini-ia64.c: Ongoing IA64 work.
12644 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
12646 * mini-ia64.c: Ongoing IA64 work.
12648 * driver.c: Clean up jit_code_hash as well when using --regression.
12650 * inssel-long.brg: Fix long->i4/u4 conversion rules.
12652 * basic-long.cs: Add tests for long->u4 conversion.
12654 2005-06-18 Ben Maurer <bmaurer@ximian.com>
12656 * mini.c: Take mono_get_domainvar out of macros. This makes sure
12657 that we do not depend on undefined C behavior: the order stuff
12658 gets evaluated within an expression. Fixes mono when compiled on
12661 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
12663 * *-ia64.*: Ongoing IA64 work.
12665 * aot.c: Lower memory usage while loading AOT methods.
12667 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
12669 * mini.h: Bump AOT file format version.
12671 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
12673 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
12675 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
12677 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
12678 not on callee assembly). Fixed some comments.
12680 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
12682 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
12683 it gets proper disassembly.
12684 (emit_method_info): Remove some dead code.
12686 * mini.c (mini_method_compile): Allways allocate the GOT var in
12687 mono_method_to_ir for emulating opcodes.
12689 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
12691 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
12692 before freeing the code memory. Fixes #74990.
12694 * objects.cs: Add regression test for #74992.
12696 * liveness.c: Extend live ranges of arguments to the beginning of the
12697 method. Fixes #74992.
12699 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
12700 so it points into the faulting instruction.
12702 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
12704 * jit-icalls.c (mono_imul_ovf): Add exception handling.
12706 * *-ia64.*: Ongoing IA64 work.
12708 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
12710 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
12712 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
12714 * *-ia64.*: Ongoing IA64 work.
12716 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
12718 * basic-long.cs: Add tests for add/sub.ovf.
12720 * basic.cs: Add tests for sub.ovf.
12722 * *-ia64.*: Ongoing IA64 work.
12724 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
12726 * *-ia64.*: Ongoing IA64 work.
12728 * basic.cs: Add conv.ovf.i4.un test.
12730 2005-06-09 Massimiliano Mantione <massi@ximian.com>
12732 * mini.c: (remove_block_if_useless) Fixed bug 75061.
12734 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12736 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
12738 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
12740 * *-ia64.*: Ongoing IA64 work.
12742 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12745 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
12747 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
12749 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
12751 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
12753 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
12755 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
12756 of a call is callable by a near call.
12758 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
12760 * mini-ia64.c: Ongoing IA64 work.
12762 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
12764 * genmdesc.c: Make the generated array non-static.
12766 * inssel-long.brg: Fix LSHR_IMM rule.
12768 * *-ia64.*: Ongoing IA64 work.
12770 * *-ia64.*: Ongoing IA64 work.
12772 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
12774 * *-ia64.*: Ongoing IA64 work.
12776 * *-ia64.*: Ongoing IA64 work.
12778 * mini-ia64.c: Ongoing IA64 work.
12780 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
12782 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
12784 * objects.cs basic-calls.cs: Move some tests to objects.cs.
12786 * objects.cs basic-long.cs: Move some tests to objects.cs.
12788 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
12790 * *-ia64.*: Ongoing IA64 work.
12792 * iltests.il: Add a new test.
12794 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
12795 newobj. Fixes #75042.
12797 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
12799 * *-ia64.*: Ongoing IA64 work.
12801 * *-ia64.*: Ongoing IA64 work.
12803 * *-ia64.*: Ongoing IA64 work.
12805 * basic.cs objects.cs: Move tests accessing static variables as well.
12807 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
12809 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
12811 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
12813 * driver.c: Always print failed tests.
12815 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
12818 * *ia64*: Ongoing IA64 work.
12820 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
12822 * basic.cs: Add tests for add.ovf. Fix warnings.
12824 2005-05-18 Miguel de Icaza <miguel@novell.com>
12826 * driver.c (mono_main): Avoid crash if no argument is passed to
12827 --break; Do not use g_error, but f_printf. And fix all other
12828 ocurrences of the same crash.
12830 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
12832 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
12833 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
12836 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
12838 * *-ia64.*: Add beginnings of IA64 backend.
12840 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
12842 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
12844 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
12847 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
12849 * mini-amd64.c: Fix a warning.
12851 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
12853 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
12854 in float_neg. Fixes #74897.
12856 * mini-amd64.c (emit_call): Fix another near call bug.
12858 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
12860 * declsec.c: Keep the appdomain information in the structure. Added a
12861 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
12862 value gets overwritten).
12863 * declsec.h: Set the default MonoArray for the the stack to 6. Added
12864 an MonoAppDomain member to MonoSecurityFrame.
12865 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
12866 used in the stack walk. Now use a MonoArray which grow (double) when
12869 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
12871 * mini.c: Re-enabled runtime cleanup, since running threads should
12872 now properly stop when exiting.
12874 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
12876 * mini-codegen.c: New file contaning the arch-independent local
12877 register allocator. Not used by any architectures yet.
12879 * mini.h linear-scan.c: Merge some changes from the
12880 mini-xp-local-regalloc branch.
12882 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
12884 * mini-amd64.c (emit_call): Fix calls to native functions when the
12885 runtime is compiled as a shared library. Fixes #74756.
12887 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
12888 on a literal field. Fixes #74751.
12890 2005-04-25 Raja R Harinath <rharinath@novell.com>
12892 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
12894 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
12896 * objects.cs: Add missing null casting test.
12898 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
12900 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
12901 in wrapper methods. Also rename 'address' variable to 'offset'.
12903 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
12905 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
12908 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
12910 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
12913 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12915 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
12917 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
12919 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
12920 just the last bytes.
12922 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
12924 * aot.c (mono_compile_assembly): Fix warning.
12926 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
12927 by the _MSC_VER stuff.
12929 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
12931 * inssel-long.brg: Fix #74588.
12933 * cpu-amd64.md: Fix #74591.
12935 * iltests.il: Add new regression tests.
12937 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
12939 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
12942 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
12944 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
12946 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
12947 from Bill Middleton <flashdict@gmail.com>.
12949 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
12951 * arrays.cs: Add new regression test. Fix warnings.
12953 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
12955 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
12956 and leakage in CKFINITE.
12958 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
12959 this to a null op since it is called on amd64 too.
12961 * exceptions-amd64.c (get_throw_trampoline): Align stack.
12963 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
12964 body since this is not used on amd64.
12966 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
12968 * mini-amd64.c: Remove obsolete fixmes.
12970 * mini.c (print_method_from_ip): Fix debugging support.
12972 2005-2-1 Massimiliano Mantione <massi@ximian.com>
12974 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
12975 so that expressions that don't give much gain are not reduced.
12976 * ssapre.h: Likewise.
12978 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
12980 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
12982 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
12984 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
12986 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
12988 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
12990 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
12992 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
12994 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
12997 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
12999 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
13001 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
13003 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
13004 MONO_ARCH_USE_SIGACTION. Fixes #74252.
13006 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
13008 * mini-x86.c: Fix up stack overflow handling.
13010 * exceptions.cs: Add new regression test.
13012 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
13014 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
13015 mono_jit_thread_attach.
13017 * mini.c (mono_method_to_ir): Verify called method is not abstract.
13019 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
13021 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
13022 avoid calling constructors using callvirt.
13024 * inssel.brg: Fix #74073.
13026 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
13028 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
13029 compilation with non-GCC compilers.
13030 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
13031 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
13033 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13035 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
13036 klass->interface_offsets (will likely fix bug#74073).
13038 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
13040 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
13042 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
13044 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
13045 to amd64_div_reg_size ().
13047 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
13049 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
13051 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
13053 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
13055 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
13057 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
13059 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
13061 * mini.c (mono_precompile_assembly): Load and precompile referenced
13062 assemblies as well. Fixes #74015.
13064 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
13066 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
13068 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
13070 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
13071 a lot of checks and (anyway) permissions cannot work until corlib is
13074 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
13076 * mini-ppc.c: fixed ABI issue on sysv/ppc.
13078 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
13080 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
13081 calls (fixes bug#72824).
13083 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13085 * mini.c: fix tail recursion elimination (see test in bug#73936).
13087 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
13089 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
13090 some fp functions in sse2 mode.
13092 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
13094 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
13096 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
13098 * mini.h mini.c: Add mono_get_jit_tls_key ().
13100 * mini-x86.c: Enable fast TLS support on windows.
13102 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
13104 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
13105 * mini.c: Check for p/invoke method when generating code. If a
13106 p/invoke method, or it's class, isn't decorated with [Suppress
13107 UnmanagedCodeSecurity] then generate code to call System.Security.
13108 UnmanagedDemand (only if the security manager is active).
13110 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
13112 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
13113 last change as it seems to cause strange crashes.
13115 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13117 * *.c: handle unsafe function pointers where needed.
13119 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
13121 * mini.c (mono_jit_free_method): Remove the fixme too.
13123 2005-03-15 Miguel de Icaza <miguel@novell.com>
13125 * mini.c: As discussed, make the code actually free the delegate
13126 thunk now, to enable the debugging of delegate problems, use
13127 MONO_DEBUG=1 when running Mono.
13129 This takes also care of parts of the leaks as seen by Joe.
13131 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
13133 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
13134 thread_tls_offset calculation.
13136 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
13138 * declsec.c: Reworked linkdemand checks for icall. The previous code
13139 was using the declaration code (untrusted) and didn't work as expected
13140 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
13143 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
13145 * iltests.il: Add new localloc test.
13147 * mini-amd64.c: Handle large stack allocations the same way as on
13148 windows if stack overflow handling is working.
13150 * mini-amd64.c: Allocate the signal stack using mmap.
13152 * mini.c (sigsegv_signal_handler): Fix reading of context.
13154 * mini-exceptions.c: Fix up stack overflow handling.
13156 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
13158 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
13160 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
13162 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
13164 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
13165 tramp_init functions as they are no longer needed.
13167 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
13169 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
13171 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
13173 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
13175 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
13178 * mini-ops.h: Add OP_LMUL_IMM.
13180 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
13181 long mul/div opcodes as intrinsic.
13183 * mini-amd64.c (emit_call): Handle the case when the callee might be
13186 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
13188 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
13191 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
13193 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
13195 2005-03-09 Ben Maurer <bmaurer@ximian.com>
13197 * mini.c (mono_codegen): Don't leak here, to help people running
13200 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
13202 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
13203 conversions in sse2 mode.
13205 * basic-float.cs: Add regression test.
13207 * mini-amd64.c: Reenable sse2.
13209 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
13211 * mini-amd64.c: Disable sse2 until some regressions are fixed.
13213 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
13215 * driver.c: Copyright text should include 2005.
13217 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
13219 * cpu-amd64.md (load_membase): Fix more max lengths.
13221 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
13223 * cpu-amd64.md (load_membase): Fix max length.
13225 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
13227 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
13229 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
13230 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
13232 * basic-float.cs: Add rounding regression test.
13234 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
13236 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
13238 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
13239 structures in registers for pinvoke wrappers.
13241 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
13243 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
13245 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
13247 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
13248 wrapper to mono_jit_thread_attach.
13250 * mini.c (mini_jit_thread_attach): New jit icall.
13252 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
13253 native->managed wrappers.
13255 * exceptions.cs: Add new regression test.
13257 * mini.c (optimize_branches): Check regions in the cbranch to throw
13258 block case as well. Fixes #73242.
13260 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13262 * mini.c: thread safety fixes.
13264 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
13266 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
13267 patching stuff, since delegates use jump trampolines so there is
13270 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
13273 * tramp-amd64.c: Fix build.
13275 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
13276 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
13278 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
13279 Rename this to mono_arch....
13280 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
13282 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
13284 * mini-amd64.c (emit_call): If both the caller and the callee is
13285 guaranteed to have 32 bit addresses, emit a normal call.
13287 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
13289 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
13290 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
13291 method_ptr inside delegates.
13293 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
13295 * mini.c (mono_jit_free_method): Free the method info even if the native code is
13296 invalidated. Fixes #73001.
13298 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
13300 * mini-x86.c: Only use stdcall for pinvokes on windows.
13302 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13304 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
13305 * mini-x86.c: remove unreliable __thread var offset detection,
13306 use the correct accessors and enable by default.
13308 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
13310 * mini.c (mono_jit_free_method): Fix memory leak.
13312 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
13314 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
13316 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
13318 * cpu-amd64.md: Fix lengths of atomic opcodes.
13320 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13322 * driver.c: try to not imply using ICU is any good.
13324 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
13326 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
13327 functions as inline ops.
13329 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
13330 some Interlocked functions as inline ops.
13332 * mini.c (move_basic_block_to_end): Fix bug in last patch.
13334 * mini.h (MonoBasicBlock): Reorganize fields a bit.
13336 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
13338 * mini.c: Add support for OP_NOT_TAKEN.
13340 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
13341 structures in registers for pinvoke wrappers.
13343 * mini-amd64.c: Fix warnings.
13345 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
13347 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
13349 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
13351 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
13352 address instead of loading the address from it.
13354 * mini-x86.c: Add support for returning small structs in registers
13355 on Win32. Fixes part of #70864.
13357 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
13359 * trace.c (get_token): Improve error checking.
13361 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
13363 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
13365 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
13367 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
13368 it can be reused for MonoClass.
13369 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
13372 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
13374 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
13375 instead of a MonoReflectionMethod. The method information wasn't used
13376 when displaying SecurityException details (but will be now).
13378 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
13380 * Makefile.am : windows build fix.
13382 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
13384 * iltests.il: Add new regression test.
13386 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
13389 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
13391 * mini.c: Moved linkdemand check into helper function check_linkdemand
13392 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
13395 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
13397 * declsec.c: Added statistics counter for different kinds of
13399 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
13400 (and commented) declaration.
13401 * mini.c: Added statistics counter for security Demand code
13402 generation. Added display of security statistics.
13404 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
13406 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
13407 Fix compilation errors under gcc-2.95.
13409 2005-02-12 Ben Maurer <bmaurer@ximian.com>
13411 * mini.c, driver.c: Use the new jit trampoline hashtable
13413 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13415 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
13417 2005-02-11 Martin Baulig <martin@ximian.com>
13419 * debug-mini.c (mono_debug_close_method): Free the line number array.
13421 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
13423 * aot.c: Break up large methods into smaller ones. Share GOT slots for
13426 * mini.h: Bump AOT file format version.
13428 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
13430 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
13432 * declsec.h: Added macros to get/set lazyly initialized security
13433 informations about assemblies. Added new enum for different type of
13434 possible LinkDemand violation. Added function to check LinkDemands.
13435 * mini.h: Added a field to MonoCompile to hold any security violation
13436 detected when JITting a method (so it can be thrown later).
13437 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
13438 and CEE_CALLVIRT. Added code to throw exception at the end of
13439 mini_method_compile (note: the exception is unhandled right now).
13441 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13443 * mini.c, jit-icalls.c: use the managed implementation of
13444 memset for initobj and memset, to avoid managed <-> unmanaged
13447 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
13449 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
13450 optimization if it would need a GOT var.
13452 * basic.cs: Add tests for constant propagation and switch statements.
13454 * ssa.c: Fix out-of-range constant propagation and switch statements.
13456 2005-02-09 <vargaz@freemail.hu>
13458 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
13460 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
13462 * cpu-amd64.md (load_membase): Fix max length of load_membase.
13464 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13466 * mini.c: update to new signature of mono_class_get_allocation_ftn().
13468 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
13470 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
13471 arithmetic operations.
13473 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
13475 * mini-ppc.c: add a workaround for broken user code that
13476 DllImports vararg functions with non-vararg signatures.
13478 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
13480 * mini.c (mono_jit_compile_method_inner): Add detection and a
13481 meaningfull error message for assemblies written in Managed C++.
13483 * tramp-amd64.c mini-amd64.h: Add support for
13484 create_trampoline_from_token ().
13486 * aot.c mini-x86.c abcremoval.c: Applied patch from
13487 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
13489 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
13491 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
13492 which takes a MonoImage/token as parameter instead of a MonoMethod.
13494 * aot.c: Use the new trampoline for initializing vtables.
13496 * aot.c: Add support for ldfld/stfld_remote wrappers.
13498 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
13499 rules for compare <MEM>, IMM.
13501 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
13503 * aot.c: Handle inherited finalizers correctly.
13505 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
13507 * inssel.brg (stmt): Add a missing _setup_... ().
13509 * aot.c: Save some parts of the class state to the AOT file and use it
13510 to recompute that state when a class is initialized.
13512 * mini.c: Install AOT hooks into the runtime.
13514 * mini.h: Bump AOT file format version.
13516 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
13519 * iltests.il: Add new test.
13521 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
13523 * mini.c: fix typo.
13525 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
13527 * mini.c: setup the statistical profiler in the thread attach
13528 callback to cope with the new single thread code.
13530 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
13532 * mini-ppc.c: ensure we have enough room for the profiler
13533 calls (fixed bug#72084).
13535 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
13537 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
13540 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13542 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
13544 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13546 * ssapre.c: Fixed an issue with down safety (this allows IronPython
13547 to succesfully execute parrotbench).
13548 * ssapre.h: Likewise.
13550 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13552 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
13553 variable for stores to method arguments (fixes a SSAPRE issue).
13555 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13557 * mini.c: handle value types in dup, fixes gen-112.cs.
13559 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
13561 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
13562 sequence for calls in dynamic methods to avoid thunks.
13564 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13566 * mini.c: correctly remove dynamic methods from the hashtable.
13568 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13570 * driver.c: Disabled SSAPRE until fix the bug that appears
13571 in IronPython's parrotbench.
13573 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
13575 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
13577 * mini.c (mono_method_to_ir): Revert the previous change.
13579 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
13580 when AOT compiling.
13582 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
13583 mono_jit_info_table_find () etc. when running under valgrind.
13585 * inssel.brg: Fix warnings.
13587 * mini-exceptions.c: Fix warnings.
13589 2005-01-31 Martin Baulig <martin@ximian.com>
13591 * driver.c (compile_all_methods_thread_main): Don't try to compile
13592 generic methods or anything which has type parameters.
13594 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
13596 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
13598 * TestDriver.cs: Add --verbose flags.
13600 * graph.c ssa.c: Fix 64 bit warnings.
13602 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
13603 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
13604 Fix 64 bit warnings.
13606 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
13607 variable not spotted by gcc.
13609 * mini-amd64.c inssel-amd64.brg: Applied patch from
13610 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
13611 X86_COMPARE_MEMBASE opcodes.
13613 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
13615 2005-01-29 Ben Maurer <bmaurer@ximian.com>
13617 * *: MonoMethod->signature might be NULL now. You *MUST* use
13618 mono_method_signature.
13620 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13622 * driver.c (compile_all_methods_thread_main): Compile the methods
13623 without invoking cctors.
13625 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13627 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
13628 * basic-calls.cs: test for the above.
13630 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13632 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
13633 MonoJitInfo changes.
13635 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
13637 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
13638 eagerly if it contains dynamic methods.
13640 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
13642 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
13643 trace, it is now computed by an icall from trace_ips.
13645 * mini-exceptions.c: Fix a warning.
13647 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
13649 * mini-exceptions.c: don't bother getting stack trace info if
13650 it's not going to be used.
13652 2005-01-27 Raja R Harinath <rharinath@novell.com>
13654 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
13657 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
13659 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
13661 * aot.c: Avoid calling mono_method_get_header () if not needed.
13663 * mini.h: Bump AOT file format version.
13665 * mini.c (mono_emit_native_call): Allocate a GOT var here.
13667 * mini.c (mono_print_tree): Print more info for calls.
13669 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
13671 * declsec.h: Remove warning by adding missing include for marshal.h
13673 2005-01-26 Martin Baulig <martin@ximian.com>
13675 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
13678 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
13680 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
13683 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
13685 * aot.c (mono_compile_assembly): Fix a warning.
13687 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
13689 * declsec.c: Look for security attributes on the original MonoMethod
13690 (and not the wrapped one). This fix permissions on icalls.
13692 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
13694 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13696 * mini.c (mono_allocate_stack_slots): Add a fixme.
13698 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13700 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13702 * inssel.brg: optimize casts of sealed types (more
13703 optimizations waiting for fixes in remoting).
13705 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
13707 * inssel.brg (stmt): Add another dummy rule.
13709 * driver.c: Fix warnings.
13711 * driver.c (mono_main): If running under valgrind, instruct glib to use
13712 the system allocation functions so valgrind can track the memory
13713 allocated by the g_... functions.
13715 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
13717 * mini-ops.h: Add OP_DUMMY_STORE opcode.
13719 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
13721 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
13722 variables in try regions.
13724 * mini.c (mini_method_compile): Don't disable optimizations on large
13725 methods when AOT compiling.
13727 * mini.c (mono_allocate_stack_slots): New arch independent method to
13728 allocate stack slots. Not yet used.
13730 2005-01-22 Ben Maurer <bmaurer@ximian.com>
13732 * debug-mini.c (mono_debug_close_method): Plug some leaks.
13734 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
13736 * mini-ppc.c: make the branch info relative as the code
13737 buffer can be reallocated.
13739 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
13741 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
13742 * driver.c: Removed the AOT/security restriction. Now initialize the
13743 security manager (in metadata) if --security is used.
13744 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
13745 rather than the pointer to declarative security, when AOT is used.
13747 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
13749 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
13750 basic blocks, reduced intrinsic exception throwing code size.
13752 2005-01-22 Miguel de Icaza <miguel@ximian.com>
13754 * driver.c (mini_usage): Reorder the usage screen.
13756 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
13758 * mini.c (mono_resolve_patch_target): Fix warning.
13760 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
13762 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
13765 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
13767 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
13768 breaks the amd64 build.
13770 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
13771 register allocation. Fixes #71454.
13773 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
13775 * arrays.cs: Add new regression test.
13777 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13779 * ssapre.c: Turned usage of snprintf to GString.
13780 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
13781 (I left it on by mistake in my previous commit).
13783 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
13785 * mini.c, cfold.c, basic-calls.cs: preserve side effects
13786 on cond branch optimization (fixes bug# 71515).
13788 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13790 * abcremoval.c: Fixed bug 71062.
13791 * abcremoval.h: Likewise.
13793 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13795 * mini.c: Added a new functionality to optimize_branches, the removal
13796 of useless basic blocks, and fixed some problem in the removal of
13797 critical edges; some utility functions added for both purposes.
13798 * ssapre.c: Added complex expression support, and fixed bug 70637.
13799 * ssapre.h: Likewise.
13800 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
13802 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
13803 * driver.c: Re-enabled SSAPRE.
13805 2005-01-19 Martin Baulig <martin@ximian.com>
13807 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
13808 the result of mono_get_method_constrained().
13810 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
13812 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
13815 2005-01-18 Geoff Norton <gnorton@customerdna.com>
13817 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
13818 be detected. Fixes #59296.
13820 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
13822 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
13823 which can happen. Fixes #71361.
13825 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
13827 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
13830 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
13832 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
13833 appdomain-unload.exe to fail.
13835 * mini.c: Fix some memory leaks.
13837 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
13839 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
13840 Fixed bug and sped up some codepaths.
13842 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
13844 * mini.c: Fix some memory leaks.
13846 * exceptions.cs basic-long.cs: Add test for checked ulong->int
13849 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
13851 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
13854 * iltests.il: Add regression test for #71320.
13856 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
13858 * mini.c (mono_codegen): Fix installation of profiler hooks.
13860 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
13862 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
13864 * mini.h, mini.c, cfold.c: optimize access to enum
13865 readonly fields, too. Eval conditional branches if possible
13866 to perform unreachable code removal in more cases.
13868 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
13870 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
13872 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
13875 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
13876 WinXP DEP. Fixes #71244.
13878 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
13880 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
13882 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
13884 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
13886 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
13888 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
13891 * mini.h: Bump AOT version.
13893 * mini.h (MonoCompile): Change exvar to a hash table.
13895 * mini.c: Allocate a separate exvar for each handler block.
13897 * mini.c: Get rid of the computation of filter_lengths, its not needed.
13899 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
13900 ex var with the pending exception and only throw if the two are equal.
13903 * exceptions.cs: Add tests for rethrow and nested catch clauses.
13905 * mini-x86.c: Fix warnings.
13907 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
13908 used by all the ports now.
13910 * aot.c: Add write-symbols and save-temps options.
13912 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
13914 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
13916 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
13918 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
13921 * tramp-s390.c: Check vtable slot belongs to the domain.
13923 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
13924 as per other platforms.
13926 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
13928 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
13930 * driver.c: we don't run the Main() code in a subthread anymore.
13932 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
13934 * mini.c: added experimental rtc support in the statistical
13935 profiler: if the user has the permission, more accurate statistics
13936 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
13937 The MONO_RTC value must be restricted to what the linux rtc allows:
13938 power of two from 64 to 8192 Hz.
13940 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
13942 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
13944 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
13946 * mini-ppc.c: better icache flush for smp.
13948 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
13950 * mini-amd64.c (emit_move_return_value): Fix memory leak.
13952 * mini-x86.c (get_call_info): Add the get_call_info () code from the
13953 amd64 port, not yet used.
13955 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
13957 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
13960 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
13962 * driver.c: Added --security option to activate the security manager.
13963 Right now this will allow code generation for declarative demands and
13964 is disabled when AOT is specified.
13965 * mini.c: Add code generation for declarative security demands.
13966 * mini.h: Add mono_use_security_manager as an extern gboolean.
13968 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
13970 * aot.c (mono_compile_assembly): Speed up compilation a bit by
13971 emitting more dense assembly code.
13973 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
13974 exception throwing stuff.
13976 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
13978 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
13981 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
13982 left in by mistake.
13984 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
13987 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
13989 * tramp-*.c: Only patch vtable slots if the object is in the current
13990 domain. Fixes appdomain-unload.exe.
13992 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
13994 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
13997 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
13999 * mini.c (reverse_branch_op): New helper function.
14001 * mini.c (optimize_branches): Run the new optimization only on
14002 platforms which support it. Also reverse all kinds of branches.
14004 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
14006 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
14009 * mini.c (optimize_branches): Reverse not-equals branches if the false
14010 bblock is a throw. This happens a lot of time with argument checking in
14013 * mini.c (mono_codegen): Add support for placing basic blocks after
14014 the function epilogue.
14016 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
14019 2005-01-05 Miguel de Icaza <miguel@ximian.com>
14021 * mini.c (setup_stat_profiler): Only set this up if the platform
14022 supports ITIMER_PROF.
14024 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
14026 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
14029 * inssel.brg: Fix a warning.
14031 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
14033 * mini.c: added support for statistical profiler
14034 (run with: --profile=default:stat).
14036 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
14038 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
14040 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
14042 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
14043 related to global registers from the amd64 port.
14045 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
14047 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
14049 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
14050 with global registers.
14051 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
14053 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
14055 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
14057 * debug-mini.c (encode_value): Fix off-by-one.
14059 * aot.c (encode_value): Likewise.
14061 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
14063 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
14065 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
14068 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
14070 * aot.c (emit_method_info): Increase size of temp buffer.
14072 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
14075 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
14077 * aot.c (emit_method_info): Fix build.
14079 * aot.c: Further rework of the AOT file format to reduce the size of
14080 the method info data.
14082 * mini.h: Bump AOT file format version.
14084 2004-12-27 Martin Baulig <martin@ximian.com>
14086 * mini.c (mini_get_method): New static method; call
14087 mono_get_method_full() and mono_get_inflated_method().
14088 (mono_method_to_ir): Use mini_get_method() instead of
14089 mono_get_method_full().
14091 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
14093 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
14095 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
14097 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
14099 * inssel-amd64.brg: Add some optimization rules.
14101 2004-12-24 Ben Maurer <bmaurer@ximian.com>
14103 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
14104 standard not GC'd stuff is fine.
14106 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
14108 * aot.c: Rework the AOT file format to get rid of most of the global
14109 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
14111 * mini.h: Bump AOT file format version.
14113 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
14115 * mini.h: Bump AOT file format version.
14117 * aot.c (mono_aot_is_got_entry): New function to determine if an
14118 address is inside a GOT.
14120 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
14122 * cpu-pentium.md: Increase the maximum size of some instructions which
14123 might involve a got access.
14125 * mini.c (get_method_from_ip): Another debug helper function.
14127 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
14128 when got var accesses are created during the decompose phase.
14130 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
14132 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
14133 argument mini_compile_method and to MonoCompile, and use this to
14134 determine whenever a given method is compiled for AOT. This allows the
14135 other methods compiled during AOT compilation to be free of AOT stuff,
14136 so the backends does not need to add special support for them by
14137 creating a fake GOT etc.
14139 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
14142 2004-12-21 Ben Maurer <bmaurer@ximian.com>
14144 * mini.c (mono_method_to_ir): It turns out that some of the
14145 x-appdomain wrappers are lax with types, so just ignore this for
14148 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
14149 at the vtable->klass. If it is non-shared code we can just use the
14152 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
14154 * mini-ppc.c: access MonoDomain from tls, too.
14156 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
14158 * declsec.c: Removed unused variable (and related warning ;-)
14160 2004-12-21 Ben Maurer <bmaurer@ximian.com>
14162 * iltests.il: New test for LDELEMA on an array of ref types.
14164 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
14165 all ldelema's on reftypes.
14166 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
14167 it was the wrong place to put it.
14169 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
14170 register to pop to make this cleaner, at the request of Paolo.
14172 2004-12-20 Ben Maurer <bmaurer@ximian.com>
14174 * mini-ops.h (OP_GETHASHCODE): New op.
14176 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
14178 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
14181 For a microbenchmark, this reduces the cost of Hashtable.get_Item
14184 * mini-x86.c (mono_arch_output_basic_block): Rather than
14192 The first is 3 bytes while the second is 1. This saves 36 kb on
14193 mscorlib, quite a big saving. When bootstraping mcs, I was able to
14194 see a small boost because of icache locality.
14196 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
14198 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
14200 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
14201 started code sharing with the generic code.
14203 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
14205 * mini-ppc.c, cpu-g4.md: added code for direct access to
14208 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
14210 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
14211 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
14214 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
14216 * declsec.c|h: Added functions to cache the declarative stack modifiers
14217 in MonoJitInfo and to create a security frame from a MonoJitInfo
14219 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
14220 created. Register internal calls for System.Security.SecurityFrame::
14221 _GetSecurityFrame and _GetSecurityStack.
14222 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
14223 the definitions for the new stack walk/callback mechanism.
14224 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
14225 first security frame for LinkDemands and InheritanceDemands) and
14226 GetSecurityStack for Demands. Both use the new mono_walk_stack code
14228 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
14229 walk initialization (lupus).
14231 2004-12-20 Ben Maurer <bmaurer@ximian.com>
14233 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
14235 (handle_loaded_temps): Do not create a temporary variable for
14236 things that we know are temps. They will never be modified.
14237 (mono_spill_call): Set MONO_INST_IS_TEMP
14238 (mono_emulate_opcode): ditto
14240 (mono_method_to_ir.CEE_DUP): ditto
14242 2004-12-19 Ben Maurer <bmaurer@ximian.com>
14244 * mini.c (type_to_eval_stack_type): Make this handle the void type
14245 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
14246 (emit_tree): use ip_in_bb to special case some common idioms
14247 Update all callers to pass in the IP.
14248 (mono_method_to_ir): Make CEE_CALL* do the above as well.
14250 This gives us a nice 2% speedup in mcs bootstrap.
14252 * mini-x86.c (peephole_pass): Peephole pass to make
14261 * mini.c (ip_in_bb): new method.
14262 (mono_method_to_ir): use this method rather than doing the hash
14265 * linear-scan.c (mono_linear_scan): When expiring actives, you
14266 don't need to keep around variables that expire on this
14267 instruction. This makes it so that:
14270 store (ebx add (ebx, 1))
14274 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
14276 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
14277 combination to avoid doing two copies. Fix up problems with previous
14280 * mini.c: Fix 64 bit warnings.
14282 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
14284 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
14286 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
14287 changes from the x86 code.
14289 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
14291 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
14293 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
14294 throwing code to reduce its size, unify the AOT and non-aot code and
14295 get rid of relocations in the AOT case.
14297 * mini-x86.h mini.c exceptions-x86.c
14298 (mono_arch_get_throw_corlib_exception): New arch specific function to
14299 raise corlib exceptions which doesn't require relocations in the
14302 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
14304 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
14306 * mini.c (mono_emit_method_call): Only allocate the got var when it is
14309 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
14312 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14314 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
14315 with add function when used from Inc/dec atomic
14316 functions. Re-enabled optimization on x86.
14317 * mini-ops.h: renamed atomic_add functions to
14318 allow _add to match the Interlocked::Add and
14319 _add_next to match Interlocked::Inc/Dec.
14321 2004-12-15 Massimiliano Mantione <massi@ximian.com>
14323 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
14324 linking of BBs to the end BB, and enabled SSAPRE also with
14325 consprop and copyprop (which was prevented by that bug).
14327 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14329 * mini-x86.c: disabling the Interlocked optimizing code.
14331 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
14333 * aot.c (load_aot_module): Move reading of got_addr after the AOT
14334 file version check.
14336 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
14338 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
14339 interlocked optimization due lack of support on x86, rewrote
14340 exchange to take into account that base may be in eax.
14342 xsp works again; activated Interlocked optimizing code.
14344 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
14346 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
14348 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
14350 * mini-ops.h: Add new opcodes.
14352 * mini.h: Add new patch types. Add got_var to MonoCompile.
14354 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
14355 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
14356 make it work with all kinds of patchable code.
14358 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
14359 address of the GOT, and referencing entries in the GOT.
14361 * mini.c: Add code to load the GOT address if needed by an opcode.
14363 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
14364 independent AOT code on the x86 using an elf-style Global Offset Table.
14366 2004-12-14 Raja R Harinath <rharinath@novell.com>
14368 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
14370 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14372 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
14375 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
14377 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
14378 of Interlocked:Increment/Decrement/Add as inline ops.
14379 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
14381 2004-12-12 Geoff Norton <gnorton@customerdna.com>
14383 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
14384 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
14386 2004-12-12 Duncan Mak <duncan@ximian.com>
14388 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
14389 again. `patch_info->table_size' is no longer valid after Zoltan's
14392 2004-12-12 Martin Baulig <martin@ximian.com>
14394 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
14395 if we are the "real" method, ie. not an inlined method inside it.
14397 2004-12-11 Ben Maurer <bmaurer@ximian.com>
14399 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
14400 before we look in the special fields table. This fixes
14401 ../tests/thread-static-init.cs.
14403 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14405 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
14406 for Array get_Rank and get_Length. Fixes bug #70465.
14408 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
14410 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
14411 separate structure to reduce the size of MonoJumpInfo.
14413 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14415 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
14417 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
14419 * mini.c (mini_get_inst_for_method): Changed to allow ports
14420 to return a MonoInst instead of opcode
14421 (renamed mini_get_opcode_for_method to better reflect the new functionality)
14423 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
14424 Allow ports to return a created MonoInst instead of op-code, will enable
14426 (renamed mini_get_opcode_for_method to better reflected the functionality)
14428 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
14430 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
14432 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
14434 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
14437 2004-12-08 Martin Baulig <martin@ximian.com>
14439 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
14440 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
14442 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
14444 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
14447 * exceptions.cs: Disable some tests which depend on properties of x86 fp
14450 2004-12-08 Raja R Harinath <rharinath@novell.com>
14452 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
14454 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
14456 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
14457 bug introduced by the previous patch.
14459 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14461 * mini-ppc.c, objectc.cs: handle large structs passed by value
14462 (fixes bug #69972).
14464 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
14466 * mini-ppc.c: OP_ARGLIST implementation from
14467 Geoff Norton <gnorton@customerdna.com>.
14469 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14471 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
14472 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
14474 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14476 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
14478 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14480 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
14483 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
14485 * mini-sparc.c: Zero out localled-ed memory.
14487 * iltests.il: Add tests for zeroing out localloc-ed memory.
14489 2004-12-04 Martin Baulig <martin@ximian.com>
14491 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
14492 mono_method_get_signature_full().
14494 2004-12-03 Massimiliano Mantione <massi@ximian.com>
14496 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
14497 and some utility functions (always for SSAPRE), integrated SSAPRE.
14498 * mini.h: Likewise.
14499 * driver.c: Added ssapre option.
14500 * ssa.c: Small fix on OP_ARG handling.
14501 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
14502 * Makefile.am: Likewise.
14504 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
14506 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
14507 now in the xp code.
14509 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
14512 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14514 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
14516 * cpu-s390.md : Increase instruction length of oparglist.
14518 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
14520 2004-11-30 Martin Baulig <martin@ximian.com>
14522 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
14523 virtual generic methods. We call a special helper_compile_generic_method()
14524 icall to retrieve the method from the vtable, inflate and compile
14525 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
14527 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
14529 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
14531 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
14533 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
14535 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
14538 2004-11-27 Ben Maurer <bmaurer@ximian.com>
14540 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
14541 platforms with PIC aot.
14543 2004-11-28 Martin Baulig <martin@ximian.com>
14545 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
14548 2004-11-28 Martin Baulig <martin@ximian.com>
14550 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
14551 the result of mono_type_get_underlying_type() to check whether
14554 2004-11-26 Martin Baulig <martin@ximian.com>
14557 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
14560 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
14562 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
14563 the same way as the other arguments so they won't get clobbered.
14565 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
14566 calls through R11 since it is clobbered by the trampoline code.
14568 2004-11-26 Raja R Harinath <rharinath@novell.com>
14570 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
14571 pick up in-tree mscorlib.dll.
14573 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
14575 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
14577 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
14578 runtime data/code are now stored in a table similar to the GOT in ELF.
14579 This allows the code itself to be position independent.
14581 * aot.c: Fix loading of referenced assemblies after the lazy assembly
14584 * aot.c: Attach ELF type (object/function) directives to all global
14587 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
14589 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
14591 * mini-amd64.h: Turn on PIC AOT code.
14593 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
14594 returning the offset within an OP_AOTCONST instruction where the GOT
14595 offset needs to be added.
14597 * mini.h: Bump AOT file format version.
14599 2004-11-25 Martin Baulig <martin@ximian.com>
14601 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
14602 uninflated generic methods.
14604 2004-11-25 Martin Baulig <martin@ximian.com>
14606 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
14608 2004-11-24 Martin Baulig <martin@ximian.com>
14610 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
14611 original klass (this only applies for generic instances).
14613 2004-11-24 Martin Baulig <martin@ximian.com>
14615 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
14616 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
14619 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
14621 * mini.c (mono_method_to_ir): Disable inlining for methods containing
14622 localloc. Fixes #69678.
14624 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
14626 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
14628 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
14629 used SSE registers on pinvoke calls. Fixes #69774.
14631 2004-11-23 Geoff Norton <gnorton@customerdna.com>
14633 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
14634 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
14636 2004-11-23 Raja R Harinath <rharinath@novell.com>
14638 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
14639 Refer directly to the mcs/ tree.
14641 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14643 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
14644 Check if a trampoline for a synchronized method is required.
14646 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
14648 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
14649 with localloc if needed. Throe arithmetric exception in
14650 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
14651 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
14653 2004-11-19 Geoff Norton <gnorton@customerdna.com>
14655 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
14656 types before switching on type. Fixes #69622.
14658 2004-11-19 Raja R Harinath <rharinath@novell.com>
14660 * Makefile.am (check-local): New. Integrate into 'make check'.
14661 (MCS,RUNTIME): Define using in-tree mono and mcs.
14663 (%.exe): Use $(ILASM).
14665 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
14667 * mini-ppc.c: adjust initial prolog size (bug #69691).
14669 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
14671 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
14674 2004-11-17 Raja R Harinath <rharinath@novell.com>
14676 * Makefile.am (clean-local): Rename from 'clean'.
14678 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14680 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
14681 to mono_arch_is_int_overflow.
14682 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
14685 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
14687 * declsec.c|h: New files to support declarative security attributes.
14688 Added function to check if a method has (applicable) security.
14689 * mini.c|h: Add check for declarative security attributes in
14690 mono_method_check_inlining.
14691 * Makefile.am: Added declsec.c and declsec.h to the build.
14693 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
14695 * mini.c, mini.h: update to keep dynamic code info per-domain.
14697 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
14699 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
14700 (mini_init): Get rid of it from here too.
14702 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14704 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
14705 implemented OP_RETHROW (patch by Geoff Norton
14706 <gnorton@customerdna.com>).
14708 2004-11-10 Geoff Norton <gnorton@customerdna.com>
14710 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
14711 between appdomains. Fixes appdomain-unload on PPC.
14713 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
14715 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14716 mini-exceptions.c: handle the new wrapper types.
14717 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
14718 token value as a MonoClass* when compiling a wrapper.
14719 mono_jit_create_remoting_trampoline now takes an additional
14720 MonoRemotingTarget parameter.
14722 2004-11-10 Martin Baulig <martin@localhost>
14724 * mini.c (mono_method_to_ir): Use `generic_container->context'
14725 rather than creating a new one.
14727 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14729 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
14731 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
14733 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
14735 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
14736 the experimental aot cache stuff.
14738 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14740 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14741 mini-exceptions.c: update to exception clause structure changes.
14743 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14745 * exceptions-x86.c (throw_exception): Fix warnings.
14747 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
14750 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14752 * exceptions-sparc.c (get_throw_exception): Really fix this.
14754 2004-11-07 Ben Maurer <bmaurer@ximian.com>
14756 * tramp-*.c: we no longer support icalls without wrappers, so
14757 a bit of code can be removed here
14759 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
14761 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
14764 * cpu-sparc.md: Add op_rethrow.
14766 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
14768 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
14770 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
14771 * mini-ops.h: Add OP_RETHROW.
14773 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
14775 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
14777 2004-11-05 Geoff Norton <gnorton@customerdna.com>
14779 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
14780 Makes the output much easier to read
14782 2004-11-05 Ben Maurer <bmaurer@ximian.com>
14784 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
14785 prevents another huge leak when compiling with ssa. Secondly, the
14786 performance of doing this rather than freeing the lists is much
14787 better. GList does a lock every time you allocate a list link,
14788 so that it can use a memory pool. So, it is better to just use
14789 a memory pool of our own.
14791 * ssa.c, linear-scan.c: replace g_list_remove_link with
14792 g_list_delete. The remove one does not free the GList, so we were
14793 leaking memory. On -O=all --compile-all with corlib, this cut down
14794 3 MB of allocations.
14796 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
14798 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
14800 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
14802 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
14803 into a new function mono_create_jit_trampoline ().
14805 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
14807 * trace.c (get_spec): Allow tracing of classes without a namespace.
14809 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
14811 * mini.c: Fix pointer overwrite in mini_method_compile.
14813 2004-11-2 Geoff Norton <gnorton@customerdna.com>
14815 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
14816 The darwin ABI needs some special handling for 1 and 2 byte structs
14817 Lets use lbz/lhz instead of lwz everywhere.
14818 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
14819 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
14820 Use stb/sth for the former, and put the latter always on stack instead of in
14821 argument registers.
14823 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
14825 * trace.c (is_filenamechar): Add '_'.
14827 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14829 * mini-s390.c: Fix prolog length to allow for large trace requirements.
14831 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
14833 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
14835 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
14836 depends on libmonogc. Fixes #68805.
14838 2004-10-26 Miguel de Icaza <miguel@ximian.com>
14840 * mini.c (mono_jit_free_method): Provide extra information for
14841 this error. Currently this leaks, but will be turned into a
14842 developer option in the future.
14844 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
14846 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
14848 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
14850 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
14851 boundary. Fixes reading of PATCH_INFO_R4 and R8.
14852 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
14854 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
14856 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
14857 trampolines for AOT code.
14859 2004-10-22 <vargaz@freemail.hu>
14861 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
14862 constructed types. Fixes #68136.
14864 2004-10-21 Martin Baulig <martin@ximian.com>
14866 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
14867 if it returns true, unwind the stack to the call instruction.
14869 2004-10-21 <vargaz@freemail.hu>
14871 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
14873 * mini.h: Bump AOT version number.
14875 * objects.cs: Add another test for unbox trampolines.
14877 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
14880 2004-10-20 <vargaz@freemail.hu>
14882 * driver.c: Add SHARED to the set of optimizations tested.
14884 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
14886 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
14887 used by CEE_NEWARR.
14889 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
14891 2004-10-20 Martin Baulig <martin@ximian.com>
14893 * mini-exceptions.c (mono_handle_exception): Call
14894 mono_debugger_handle_exception() to tell the debugger about
14895 catch/finally clauses.
14897 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
14899 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
14901 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
14904 2004-10-15 Geoff Norton <gnorton@customerdna.com>
14906 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
14907 methods as their native size, fixed bug #57543, #57545.
14908 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
14909 This saves a temporary register and mullw call down into 1 (minor perf
14910 increase for cases like sum = sum * 5; This use to translate into:
14913 It now translates to
14916 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
14918 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
14921 2004-10-11 Martin Baulig <martin@ximian.com>
14923 * mini.c (mono_method_to_ir): If we're a generic method, get the
14924 MonoGenericContainer from our MonoMethodNormal and create a
14925 MonoGenericContext from it.
14927 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
14929 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
14931 * basic-long.cs: Add test for checked i8->i2 cast.
14933 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14935 * inssel-ppc.brg: added a couple of speedup rules.
14937 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
14939 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
14940 to speed up rebuilds.
14942 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14944 * mini-s390.c: Minor fix to OP_OR_IMM.
14946 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
14948 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
14949 better. Fixes appdomain-unload.exe on sparc.
14951 2004-10-02 Massimiliano Mantione <massi@ximian.com>
14953 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
14954 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
14957 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
14959 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
14961 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
14963 * mini.c: Always generate a field read/write wrapper for members
14964 of the class MarshalByRefObject since the actual instance could
14967 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
14969 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
14971 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
14973 * driver.c mini.h trace.c: Move the setting of the main assembly into
14974 a separate function called mono_trace_set_assembly () and call it after
14975 actually loading the main assembly. Fixes #66872.
14977 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
14979 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
14980 using the code manager.
14982 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
14984 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
14986 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
14988 * cpu-amd64.md: Fix bug in previous patch.
14990 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
14993 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
14995 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14996 mini-exceptions.c: updates for changed stack walk interface.
14998 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15000 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
15002 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
15004 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
15006 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
15008 * driver.c (mini_regression_list): Do not call mono_assembly_close
15009 since assemblies can't be unloaded.
15011 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
15013 * cpu-amd64.md: Fix more instruction lengths.
15015 * cpu-amd64.md: Fix lengths of some instructions.
15017 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
15019 * inssel.brg: Make the array ldelema check aot friendly.
15021 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
15023 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
15025 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
15027 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
15029 * mini-x86.c: Fix build.
15031 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
15032 mono_type_get_underlying_type () helper function to simplify code.
15034 2004-09-09 Martin Baulig <martin@ximian.com>
15036 * mini-amd64.c: Don't access `type->data.klass' directly, call
15037 mono_class_from_mono_type() instead since the type may be a
15040 2004-09-09 Martin Baulig <martin@ximian.com>
15042 * mini-amd64.c (get_call_info): Fix support for generic instances.
15043 (add_valuetype): Use mono_class_from_mono_type() to get the class
15044 since we can be a generic instance.
15046 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
15048 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
15050 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
15052 * liveness.c: reset spill costs on each scan: bug 62107
15054 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
15056 * exceptions-sparc.c (mono_arch_find_jit_info): remove
15057 unnecessary line that doesn't compile
15059 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
15061 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
15062 trampolines, make them call an error function so people can fix their
15065 2004-09-06 Martin Baulig <martin@ximian.com>
15067 * mini.c (mono_method_to_ir): When initializing locals, handle a
15068 generic instances like a valuetype if it's a valuetype and like a
15069 class if it's a class.
15071 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15073 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
15074 stack. Fixes #64674.
15076 * exceptions.cs: Add test for unwinding of call arguments.
15078 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
15080 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
15081 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
15082 set the carry/borrow flag). The sparc and s390 implementations
15083 can now use optimized versions (and simplify the code). ppc bugfixes.
15085 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
15087 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
15089 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
15091 * inssel-amd64.brg: Remove leftover 32 bit rule.
15093 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
15095 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
15097 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
15098 mono_arch_find_jit_info functions into a new function. Fix a memory
15101 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
15104 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15106 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
15109 * exceptions.cs: Add array size tests.
15111 * mini.c: Allocate a separate icall wrapper for each arity of
15112 mono_array_new_va. Fixes #59509.
15114 * exceptions.cs: Add testcase for 64578.
15116 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
15118 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
15120 2004-09-02 Martin Baulig <martin@ximian.com>
15122 * mini.c (mono_method_to_ir): When initializing the locals, call
15123 handle_initobj() on the generic instance itself, not its
15126 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
15128 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
15129 MonoJitInfo for dynamic methods.
15131 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
15133 * mini.c: Add support for freeing JIT data for dynamic methods.
15135 2004-09-01 Martin Baulig <martin@ximian.com>
15137 * mini-x86.c (is_regsize_var): Added support for generic
15139 (mono_arch_emit_prolog): Make this compile again, use
15140 `x86_push_imm_template (code)'.
15142 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
15144 * mini-x86.c: make all push_imm instructions that get
15145 patched always emit the long form
15147 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
15149 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
15150 in a per-domain hash.
15152 * mini-amd64.c (merge_argument_class_from_type): Handle generic
15155 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
15157 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
15160 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
15163 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
15164 Beginnings of SSE2 support.
15166 * exceptions.cs: Add more tests for checked int<->uint casts.
15168 2004-08-28 Martin Baulig <martin@ximian.com>
15170 * mini-x86.c (mono_arch_instrument_epilog): Added support for
15174 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
15175 Handle generic instances recursively.
15177 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15179 * iltests.il: test for conv.u8 on a constant
15181 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15183 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
15184 LCONV_x4 (shrun_32 (membase)).
15186 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
15188 * inssel-x86.brg: c&p rules for push/setret of long
15190 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
15192 * inssel-x86.brg: c&p rules for compare (base, regvar) and
15193 compare (regvar, base)
15195 * inssel-x86.brg: more burg love
15197 * inssel.brg: more cleanup
15199 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
15201 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
15203 * basic-long.cs, basic-calls.cs: new tests for optimization.
15205 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
15207 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
15210 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
15212 * mini-amd64.c (read_tls_offset_from_method): Add another case.
15214 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
15216 * inssel.brg (mini_emit_memcpy): use
15217 NO_UNALIGNED_ACCESS to disable memcpy optimization
15219 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
15221 * mini-amd64.c: Handle generic types in various places.
15223 * mini.c (mono_method_to_ir): Handle generic types in init locals.
15225 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
15227 * mini.c (handle_box): Fix warning.
15229 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
15231 * mini-amd64.h: Enable the emit_state optimization.
15233 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
15235 * mini-amd64.c: Add some new 64 bit peephole opts.
15237 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
15239 * cpu-amd64.md: sreg1 of div instructions must be %rax.
15241 * mini-amd64.c: Register allocator fixes.
15243 * mini.c: Add an optimization to emit_state to avoid allocation of new
15244 registers on some platforms.
15246 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
15248 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
15250 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
15251 allocation. Fixes #63085.
15253 * basic-long.cs: Add new regression test.
15255 * mini-amd64.c: Register allocator improvements.
15257 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
15259 * mini-amd64.c (read_tls_offset_from_method): Add another code
15262 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
15263 instruction sequence for nullifying class init trampolines.
15265 * objects.cs: Add new regalloc test.
15267 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
15269 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
15271 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
15273 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
15276 * driver.c: Fix profiling after TLS changes.
15278 * driver.c (mono_main): Set mono_stats.enabled if needed.
15280 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
15283 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
15285 * mini-x86.c: use a 1 op rather than a 2 op tls access
15286 instruction -> faster.
15288 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
15290 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15293 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
15295 * exceptions-sparc.c (throw_exception): fix typo
15297 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
15299 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
15300 set tree->dreg correctly with tls. Allow any
15301 register to be used.
15303 * mini-x86.c (read_tls_offset_from_method): add new code
15304 generation pattern seen with GCC.
15307 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15309 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
15310 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15311 exceptions-sparc.c: fix some performance issues in exception
15312 handling and setting of the stack trace for exceptions that were
15315 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
15317 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15320 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
15323 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
15325 This patch inlines tls access, when possible.
15327 * mini.h: new arch functions for TLS intrinsics.
15328 All platforms updated with a stub.
15330 * mini.c: use the new intrinsics
15332 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
15333 arch specific intrinsic for tls variables
15335 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
15337 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
15340 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
15342 * mini.c: thread local allocation
15344 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
15346 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
15348 * Makefile.am: Link against the static version of libmonogc.
15350 * Makefile.am: Link the static versions of the convenience libraries
15351 into the mono executable.
15353 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
15355 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
15357 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
15358 on integer overflow.
15360 * mini-amd64.c: Reorganize function call code.
15362 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
15364 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15366 * inssel-x86.brg: use xor eax,eax.
15368 * basic.cs: new tests
15370 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15372 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
15373 in exception throwing code.
15375 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15377 * inssel-x86.brg: use xor esi,esi.
15379 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15381 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
15382 can trace methods compiled during mini_init () too.
15384 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
15387 2004-08-14 Ben Maurer <bmaurer@ximian.com>
15389 * Makefile.am: static link on x86 (r=zoltan)
15391 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
15393 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
15394 code since it causes some programs to fail.
15396 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
15398 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
15400 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
15402 * mini.c: ovfops_op_map - add STACK_OBJ case for
15404 * basic.cs: add test_0_pin_string as test
15407 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
15409 * Makefile.am: build C# if srcdir != builddir
15411 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15413 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
15414 fall-through blocks.
15416 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15418 * driver.c: enable loop by default again and include abcrem in -O=all.
15420 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
15422 * iltests.il: Add some localloc tests.
15424 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
15426 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
15429 * inssel-amd64.brg: Add some optimizations.
15431 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
15434 * Makefile.am: Statically link mono against libmono on AMD64.
15436 * mini-amd64.c inssel-amd64.brg: Optimizations.
15438 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
15440 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
15442 * tramp-amd64.c: Patch calling code in trampolines.
15444 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
15446 * mini-amd64.c: pinvoke struct passing fixes.
15448 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
15450 * mini-sparc.c: redo change, make mono_arch_cpu_init call
15451 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
15453 2004-08-05 Duncan Mak <duncan@ximian.com>
15455 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15458 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15460 * mini-amd64.c (emit_move_return_value): Move return value for normal
15463 2004-08-05 Martin Baulig <martin@ximian.com>
15465 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
15466 `type->type'; just modify `type' itself when dealing with enums
15467 and generic instances.
15468 (check_call_signature): Make `simple_type' a `MonoType *'.
15470 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15472 * mini.c: Use OP_PADD to add offsets to addresses.
15474 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
15476 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
15478 * mini-sparc.c (mono_arch_emit_epilog): fix check
15479 for folding last op into restore instruction
15481 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
15483 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
15484 helper methods using the code manager.
15486 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
15488 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
15490 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15492 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
15493 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
15495 * mini-s390.c: fix tail processing
15497 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
15499 * mini-ppc.c: mul.ovf.un exception name fix.
15501 2004-08-03 Martin Baulig <martin@ximian.com>
15503 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
15504 instances; before jumping to `handle_enum', also modify `ptype'.
15506 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
15508 * cpu-sparc.md: fcall maximal length too small.
15510 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
15512 * mini-amd64.c mini.h: Add initial support for passing/returning
15513 structures to/from pinvoked methods.
15515 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
15517 * mini-ppc.c: reg allocator fix.
15519 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
15521 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
15523 * inssel.brg: Optimize memset on 64 bit machines.
15525 * mini-amd64.c: Fix some vararg cases.
15527 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15529 * mini-s390.c: Corrected macro in emit_float_to_int
15531 * s390-abi.cs: Tests to exercise the s390 ABI
15533 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15535 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
15538 * basic.cs: Add a test for add.ovf.un.
15540 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
15542 * mini-sparc.c: add case for OP_IDIV_UN
15544 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15546 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
15548 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
15550 2004-07-30 Ben Maurer <bmaurer@ximian.com>
15552 * basic.cs: regression tests.
15554 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
15557 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15559 * basic.cs: Add a new test.
15561 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
15562 and AOT. Various fixes and optimizations.
15564 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
15566 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15568 * mini-ppc.c: make sure temp regs are not used for global reg
15571 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
15573 * cpu-sparc.md: conv_i8 fix for 64bits
15575 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
15577 2004-07-29 Ben Maurer <bmaurer@ximian.com>
15579 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
15580 add opcode for cmp BYTE PTR [eax], imm.
15582 * inssel.brg: Make memcpy and memset takes bases.
15584 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
15586 * *-amd64.*: More AMD64 work.
15588 2004-07-28 Ben Maurer <bmaurer@ximian.com>
15590 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
15591 add a compare-not-equal opcode.
15593 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
15595 * mini.c: Use mono_init_from_assembly instead of mono_init.
15597 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
15599 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
15601 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
15603 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
15605 * inssel.brg: 64 bit fixes.
15607 * mini.h (MonoCallInst): Add some AMD64 specific data.
15609 * mini.h: Add some OP_P opcodes.
15611 2004-07-28 Ben Maurer <bmaurer@ximian.com>
15613 * basic.cs: tests for 61797 and 61740
15615 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15617 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
15618 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
15620 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
15622 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
15624 * *-amd64*.*: Ongoing AMD64 work.
15626 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
15628 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
15630 * *-amd64*: Ongoing AMD64 work.
15632 * mini-arch.h: Add AMD64 support.
15634 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
15636 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
15638 * mini-ops.h: Add new opcodes.
15640 * Makefile.am: Add AMD64 support.
15642 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
15643 rules into the inssel-long*.brg files.
15645 * *-amd64.*: Add beginnings of AMD64 backend.
15647 2004-07-22 Ben Maurer <bmaurer@ximian.com>
15649 * mini.c (print_dfn): commenting out the code that prints
15650 the cil. With -O=deadce, this makes -v -v crash.
15652 * cpu-pentium.md: make checkthis have a length of 2
15654 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
15656 * mini-sparc.h: fix implementations of __builtin
15657 functions for Sun compiler for V9.
15659 2004-07-16 Ben Maurer <bmaurer@ximain.com>
15661 * mini.c: use the new stelem.ref wrapper
15662 * exceptions.cs, arrays.cs: new stelem.ref tests
15664 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15666 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
15667 new XSP should work with these changes).
15669 2004-07-14 Ben Maurer <bmaurer@ximain.com>
15671 * inssel-{long32,x86,}.brg: trivial optimizations.
15673 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15675 * mini.c: load value when emitting box operation in
15678 2004-07-12 Ben Maurer <bmaurer@ximian.com>
15680 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
15681 is one byte shorter than cmp DWORD PTR [eax], 0.
15683 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15685 * inssel-ppc.brg: arguments on the stack are always
15686 relative to the stack pointer (spotted by Neale Ferguson).
15688 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15690 * exceptions-x86.c: delay appending the method name to the trace until
15691 after mono_jit_info_table_find is called, as this gets the real
15694 2004-07-09 Ben Maurer <bmaurer@ximian.com>
15696 * aot.c: register roots
15698 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15700 * aot.c : I could just use PLATFORM_WIN32 flag.
15702 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15704 * aot.c : Reverting the previous fix. This time it broke linux build.
15706 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15708 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
15710 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
15712 * mini.c (handle_stack_args): Remove some more debugging code.
15714 * mini.c (handle_stack_args): Remove debug output left in by mistake.
15716 * driver.c mini.h aot.c: Allow additional options to be specified with
15717 --aot and pass them to mono_compile_assembly.
15719 * aot.c: Add experimental code to AOT compile all loaded assemblies
15720 on demand and save the code into a cache in the filesystem.
15722 * aot.c: Add support for more wrapper methods.
15724 * mini.c (handle_stack_args): Handle some corner cases. Fixes
15727 * cpu-*.md: Remove removed opcodes.
15729 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
15730 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
15731 related icalls to marshal.c.
15733 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
15735 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
15737 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
15739 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
15741 2004-07-06 Ben Maurer <bmaurer@ximian.com>
15742 * liveness.c: If liveness is recomputated we need to reset the information
15743 for each variable. This way, if the liveness range has been narrowed
15744 by optimizations that happened after the last computation, we can return
15747 For example, if you have
15752 // Tons of code that does not affect i
15758 i = 0 is dead code and will be removed by SSA. However, when
15759 linear scan gets to the code, i will still appear to be live
15760 throughout the entire block. This prevents good register allocation.
15762 2004-07-06 Martin Baulig <martin@ximian.com>
15764 * debug-mini.c (mono_debug_init_method): Allow
15765 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
15766 (mono_debug_add_icall_wrapper): New method.
15768 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
15770 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
15772 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
15775 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
15777 * aot.c (mono_aot_load_method): Fix loading of debug info.
15779 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15781 * aot.c: Add logging support.
15783 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
15785 * mini.h: Add prototype for mono_print_method_from_ip.
15787 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
15789 * inssel.brg: 64 bit fixes.
15791 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
15794 * Makefile.am: Add SPARC64 support.
15796 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15798 * aot.c: Fix alignment problems on 32 bit platforms.
15800 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
15802 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
15805 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
15808 * mini.h: Bump AOT file version. Some 64 bit fixes.
15810 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
15812 * inssel-sparc.brg: Add new rule to avoid register moves.
15814 * inssel.brg: Add ldind_to_load_membase helper function.
15816 2004-06-30 Ben Maurer <bmaurer@ximian.com>
15818 * mini.c: OffsetToStringData intrinsic.
15820 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
15822 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
15824 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
15827 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
15828 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15830 * mini.c: reinstated mono_compile_get_interface_var()
15831 on x86, too, since the change breaks the Gtk# build there as well.
15833 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15835 * driver.c: remove loop from the default optimizations: it seems to
15836 interact badly with some of the other options (see bug #60613).
15838 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
15840 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
15841 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
15843 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
15845 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
15846 vararg-using methods.
15848 2004-06-21 Martin Baulig <martin@ximian.com>
15850 * mini/mini-exceptions.c
15851 (mono_handle_exception): Added `gpointer original_ip' argument.
15852 After calling mono_unhandled_exception(), call
15853 mono_debugger_unhandled_exception() and if that returns true,
15854 restore the context and return.
15856 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
15858 * mini-ppc.c: prefer the use of relative branches so
15859 they won't need to be patched in aot code (patch from Patrick Beard).
15861 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
15863 * aot.c: patch from Patrick Beard to make the output assembly
15864 more correct for the MacOSX assembler. Small tweak to
15865 generate sane images on Linux/PPC, too.
15867 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15869 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
15870 case until bug #59509 is fixed (shows up in #60332).
15872 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15874 * mini.c: make sure the needed wrappers are compiled, too, with
15877 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
15879 * driver.c: remove NPTL reference in --version output.
15881 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15883 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
15884 generate valid assembly for the Mach-O assembler.
15886 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
15888 * driver.c: don't include abcrem in the all optimization specifier
15889 since it slows down jit compilation too much for now.
15891 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
15893 * mini.c: use BIGMUL only if both operands have the same signage.
15894 * iltests.il: Test for bug 60056. (errors related to signage in
15899 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
15901 * mini.c, aot.c: memory leak fixes.
15903 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15905 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
15907 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
15909 * Makefile.am: remove the -static hack completely, it links in
15910 statically glib as well.
15912 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
15914 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
15915 * exceptions.cs: make it compile with new mcs/csc.
15917 2004-06-03 Massimiliano Mantione <massi@ximian.com>
15918 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
15919 and added relevant test case.
15921 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
15923 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
15924 regressions in gtk-sharp.
15926 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
15928 * exceptions.cs: New regression tests.
15930 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
15932 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
15934 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
15936 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
15938 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
15940 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
15942 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
15944 * mini.c (mono_jit_runtime_invoke): Init class in this
15945 method instead of trusting mono_jit_compile_method to
15946 do the work (because wrappers can be in object class)
15948 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
15950 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
15952 * basic-long.cs: New regression test.
15954 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
15956 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
15957 and div/rem checks.
15959 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
15961 * Makefile.am: fix miguel's change to build mono statically against
15962 libmono (track build dependencies).
15964 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
15966 * cfold.c: Some glib versions do not have G_MININT32.
15968 2004-05-26 Massimiliano Mantione <massi@ximian.com>
15970 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
15971 with precision of tan, atan, sin and cos, and implemented related
15972 regressions tests (fixes bug 54467, but one new problem appeared and
15975 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
15977 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
15979 * exceptions.cs: Add test for constant folding && division by zero.
15981 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
15982 since driver.c is in libmono too, so the optimization was useless.
15984 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
15985 variable to driver.c so the compiler can emit more efficient code to
15988 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15990 * Makefile.am: don't distribute generated inssel.[ch] files.
15992 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
15994 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
15995 into the default appdomain. Fixes #58707.
15997 * jit-icalls.c: Remove the broken approximation for truncl, doing
15998 no conversion is better.
16000 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
16003 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16005 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
16006 of the mcrxr instruction which is not available on some processors
16007 even if it's documented to be. Implement add and sub overflow correctly
16008 (still not complete for long unsigned). Speed up icalls a bit.
16010 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
16012 * mini.c (mono_jit_compile_method_with_opt): Make sure that
16013 we run .cctor in the current domain instead of target_domain.
16015 Fixes bug #58558, .cctor not being called in -O=shared.
16017 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16019 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
16021 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
16023 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
16024 which can be done with an imm8, do it that way.
16025 (mono_arch_output_basic_block): ditto for a jmp
16026 (mono_arch_emit_prolog): Computate maximum offset of a label.
16028 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
16030 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
16031 now tries to allocate prefered physical reg's for virtual
16032 regs. This reduces the number of emited spills/loads with
16033 20-30% on our core assemblies.
16035 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16037 * jit-icalls.c: truncl() is not needed and trunc() is
16038 the correct thing to do anyway (bug #58287).
16040 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
16042 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
16045 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16047 * driver.c: enable loop optimizations by default.
16049 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16051 * mini-x86.c: fix calc of max loop size when aligning loops start.
16053 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
16055 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
16058 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
16060 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
16063 * basic-long.cs: Add tests for add/subtract of immediates with carry.
16065 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
16067 * mini.c (inline_method): Allways inline some wrappers even if the cost
16068 is too large. Fixes #58785.
16070 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
16072 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
16074 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
16075 (crichton@gimp.org). Beginning of support for sparc/linux.
16077 * mini-sparc.c: Optimize retrieval of LMF address.
16079 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
16081 * exceptions-ppc.c: handle alloca in methods with clauses.
16083 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
16085 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
16087 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
16089 * mini.c: Delegate most of the abort signal work to
16090 mono_thread_request_interruption, which also handles Stop and Suspend
16093 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
16095 * mini.c mini.h: Allow inlining of icall wrappers if the backend
16096 supports the save/restore lmf opcodes.
16098 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
16100 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
16101 by gcc-3.4 as well.
16103 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
16105 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
16107 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
16108 methods which contain array accesses.
16110 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
16111 boundaries. Fixes #58537.
16113 * iltests.il: Add regression test for #58537.
16115 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
16117 * mini-x86.c (mono_arch_local_regalloc): Last part of
16118 fix for bug #58633 (releasing register to early).
16120 2004-05-18 Miguel de Icaza <miguel@ximian.com>
16122 * basic-long.cs: Add new regression test.
16124 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
16126 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
16127 register too early on the chain.
16129 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
16131 * mini.c (create_helper_signature): Use a helper function to reduce
16132 the code which needs to be written. Also set the calling convention of
16133 icalls on windows. Fixes #57840.
16135 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16137 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
16138 exceptions-ppc.c: added helper function to get the instruction address
16139 from a signal handler context.
16141 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
16143 * helpers.c: use g_get_tmp_dir. Invokes happyness
16146 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
16148 * helpers.c: Add new env variable to pass args to objdump.
16149 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
16151 2004-05-17 Radek Doulik <rodo@ximian.com>
16153 * Makefile.am (common_sources): added abcremoval.h so it get
16154 disted and daily mono packages on go-mono.com will build again
16156 2004-05-17 Massimiliano Mantione <massi@ximian.com>
16158 * abcremoval.c: Fixed coding style, added copyright header.
16160 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
16162 * mini.h: Added prototype for abc removal main function.
16164 * build_relations_propagation_table.pl: Added copyright header.
16166 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
16168 * basic-long.cs: reg test for complex ceq_long bug.
16170 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
16172 * mini-x86.c (mono_arch_local_regalloc): Correctly free
16173 reg in long and clob case (bug #58343). Fixed/added comments.
16175 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
16177 * mini.c (mono_jit_runtime_invoke): Follow new convention
16178 of calling the invoke method with an function pointer.
16180 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
16182 * ChangeLog: Fix author of memory leak patch.
16184 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
16186 * Makefile.am: fix make dist as well...
16189 2004-05-14 Massimiliano Mantione <massi@ximian.com>
16191 * cfold.c: Made so that conversions from pointer to int4 are no-ops
16192 on archs where pointers are 4 bytes long.
16194 * Makefile.am: Added abcremoval.c source file.
16196 * abcremoval.c: Added abcremoval.c.
16198 * abcremoval.h: Added abcremoval.h.
16200 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
16202 * inssel.brg: Enabled bounds check removal.
16204 * mini.c: Added support for abcrem optimization.
16206 * mini.h: Added abcrem optimization label.
16208 * driver.c: Added support for abcrem optimization.
16210 * propagated_relations_table.def: Added propagated_relations_table.def.
16212 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
16214 * mini.c, cfold.c: fix style.
16216 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16218 * mini.c: handle issue with the low-level implementation of
16219 some long opcodes (bug #54209).
16221 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
16223 * basic.cs: test for my new cmov stuff.
16225 2004-05-13 Patrik Torstensson
16227 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
16228 opt and added peephole documentation.
16230 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
16232 * tramp-ppc.c: rewrote the generic trampoline code.
16234 2004-05-11 Patrik Torstensson
16236 * mini-x86.c: optimize long shl/shr asm code (one less branch)
16238 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
16240 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
16242 * mini.h mini.c dominators.c: Applied patch from Derek Woo
16243 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
16245 * mini.c: Add new icalls for AsAny marshalling.
16247 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16249 * tramp-ppc.c, mini-ppc.c: more cleanups.
16251 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16253 * mini.c: no warnings.
16255 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16257 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
16259 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
16261 * mini.c: In the thread abort signal handler, if the thread is in the
16262 process of being stoped, don't throw the Abort exception, just stop the
16265 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
16267 * tramp-ppc.c: removed old code.
16269 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16271 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
16272 do some simple speed optimizations on ppc.
16274 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16276 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
16277 and large offsets in load/store.
16279 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
16281 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
16282 it causes regressions.
16284 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
16286 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
16289 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16291 * jit-icalls.c: remove warnings.
16292 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
16293 speedups for unsafe code.
16295 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
16297 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
16299 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
16301 * basic-calls.cs: Add new regression test.
16303 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
16306 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
16308 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
16311 2004-05-06 Patrik Torstensson
16313 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
16314 long reg allocation in any reg (not only eax:edx) and implemented
16315 long shl/shr ops in asm instead of helpers.
16317 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
16319 * mini-sparc.h: Fix warnings.
16321 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
16324 * mini-exceptions.c (mono_handle_exception): Call the filter in a
16325 separate statement for clarity.
16327 * mini-sparc.c: Update status.
16329 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
16331 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
16334 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16336 * inssel-ppc.brg: another small pre-release workaround:
16337 we don't do overflow detection for long_sub_un.
16339 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16341 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
16342 (also works around a weird ppc bug: 57957).
16344 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
16346 * tramp-ppc.c: trampoline fixes.
16348 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
16350 * mini-ppc.c: fixed typos.
16352 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16354 * mini-ppc.c, exceptions-ppc.c: more code saves registers
16355 at the top of the stack. Fixed typos. Use a frame registers
16356 for all the methods with exception clauses.
16358 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16360 * exceptions-ppc.c: restore fp registers.
16362 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16364 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
16365 order from the stack top (moved the stack room to save the
16366 return value for trace after the param area). Fixed corruption
16367 in restoring registers on unwind.
16369 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16371 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
16373 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16375 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
16376 and prolog/epilog for methods that use it. Allow
16377 enough param area room for varargs methods. Fix miguel's
16378 breakage in exception handling.
16380 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16382 * Makefile.am: run genmdesc only on current arch.
16384 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16386 * exceptions-x86.c:
16387 * mini-x86.h: fix the build on windows.
16389 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
16391 * 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.
16393 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
16395 * mini-exceptions.c: New file.
16397 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
16398 Move some parts of the x86 exception handling code to an
16399 arch-independent file so it can be shared with other ports.
16401 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16403 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
16405 2004-04-26 David Waite <mass@akuma.org>
16407 * driver.c: remove comma from end of enumeration declaration
16409 2004-04-26 Jackson Harper <jackson@ximian.com>
16411 * driver.c: parse config file before loading first assembly. This
16412 allows the user gac to be enabled/disabled.
16414 2004-04-23 Miguel de Icaza <miguel@ximian.com>
16416 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
16417 simpler mechanism: we do not care what is encoded initially
16418 (branch absolute or relative), we care about the code and its
16419 target. I kept the old code for reference for now.
16421 The new code tries first to determine if the jump is anywhere in
16422 the -/+32 absolute meg range, if it succeeds, it encodes using the
16423 absolute branch; If not, it tried to find something in the
16424 relative range, if not, it uses the handle_thunk code.
16426 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
16428 * exceptions-ppc.c: use the correct ip register on macosx.
16430 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
16432 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
16434 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
16436 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
16437 Raise exception on integer divide by zero by hand since the hw
16438 doesn't support it. Handle NaNs in FP compares.
16440 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
16442 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
16443 code reducing duplication between the platforms and enabled
16444 signal exception handling (on linux for now).
16446 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
16448 * exceptions-ppc.c: more macosx support.
16450 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16452 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
16454 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
16456 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
16458 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
16460 * iltests.il: more tests.
16462 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
16464 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
16467 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16469 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
16471 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
16473 * liveness.c: Mark variables as volatile in all basic blocks reachable
16474 from exception clauses.
16476 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
16478 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
16481 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
16483 * iltests.il, basic.cs: more tests for regalloc.
16485 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
16487 * iltests.il: Some tests for register allocation modifications
16490 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
16492 * exceptions.cs: Add regression test for bug #56782.
16494 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
16495 original stack trace if an exception is rethrown. Fixes #56782. Oh,
16496 the beauty of fixing the same thing in 5 different files...
16498 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
16500 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
16503 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
16505 * mini.c: Add support for STRWLPARRAY marshalling convention.
16507 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16509 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
16510 to init the context to setup the regs pointer).
16512 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16514 * exceptions-ppc.c: more exceptions work.
16516 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16518 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
16521 2004-04-13 Miguel de Icaza <miguel@ximian.com>
16523 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
16524 can use the memory directly.
16526 * cpu-pentium.md: Update documentation from a post from Zoltan.
16528 add x86_add_membase, x86_sub_membase, x86_mul_membase
16530 2004-04-13 Miguel de Icaza <miguel@ximian.com>
16532 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
16533 GENERAL_REGS they were also hardcoded for all PPC ports.
16535 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
16537 Remove hard-coded limit for floating point registers, use
16538 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
16540 Notice that in MacOS X calling conventions you can fit a lot more
16541 floating point values in registers, so I should update the PInvoke
16542 test to excercise the passing of floating point values on the
16543 stack (currently broken).
16545 2004-04-06 Miguel de Icaza <miguel@ximian.com>
16547 * tramp-ppc.c (create_trampoline_code): Added
16548 JUMP_TRAMPOLINE_SIZE.
16549 (ppc_magic_trampoline): Follow the pattern from
16550 x86_magic_trampoline: if code is set to zero, return.
16551 (create_trampoline_code): Always pass MonoMethod to the jump
16552 trampoline, before it was passing a null.
16553 (mono_arch_create_jump_trampoline): Implement the jump stub, could
16554 share the code with mono_arch_create_jit_trampoline.
16556 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
16558 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
16561 * cpu-g4.md: Added length for jmp instruction, the worst case
16562 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
16565 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
16567 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
16569 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
16571 * mini.c: Only set bblock->real_offset when adding a new bblock, and
16572 before each IL instruction.
16574 * mini.c (CEE_BOX): Fix warnings.
16576 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16578 * mini.c: removed a few unused vars and extra whitespace.
16580 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
16582 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
16584 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
16586 (OP_GETCHR): use the above
16587 (CEE_LDELEMA): use the above.
16589 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
16590 version of the generic impl.
16591 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
16592 (CEE_LDELEMA): use the above.
16594 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
16596 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
16599 * iltests.il: Added new regression test for #56317.
16601 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
16603 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
16604 under NetBSD. Fixes #56450.
16606 * liveness.c (update_gen_kill_set): Fix previous patch.
16608 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16610 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
16612 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
16614 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
16615 ldsfld and ldsflda.
16617 * inssel-sparc.brg: Add more optimizations.
16619 * mini-sparc.c: Replace multiply/divide with shifts if possible.
16621 2004-04-01 Martin Baulig <martin@ximian.com>
16623 * mini.c (handle_box): New static function; moved the
16624 implementation of CEE_BOX here.
16625 (mono_method_to_ir): Added `constrained_call' variable.
16626 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
16627 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
16628 mono_method_get_constrained() to get the method.
16630 2004-04-01 Martin Baulig <martin@ximian.com>
16632 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
16633 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
16634 (mono_method_to_ir): We don't need these macros anymore since
16635 mono_class_get_full() already takes care of it.
16637 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16639 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
16640 use @function (as doesn't accept #function here) and check the return
16641 value of system and stop if fails.
16643 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16645 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
16647 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
16649 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
16651 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
16653 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
16656 * basic-long.cs: Add test for negation of Int64.MinValue.
16658 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
16660 * mini-sparc.c: Update status.
16662 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
16664 * exceptions-sparc.c: Fix return value in filters.
16666 * inssel-sparc.brg: Fix register allocation in some rules.
16668 2004-03-28 Martin Baulig <martin@ximian.com>
16670 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
16673 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
16675 * mini-x86.c (mono_arch_patch_code): Fix warnings.
16677 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
16678 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
16679 remove unused conv_u4 opcode.
16681 * mini-x86.c: Remove valgrind workaround since it slows down things
16682 even when mono is not run under valgrind.
16684 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
16686 * mini-sparc.c: Update status.
16688 * inssel-sparc.brg: Add some optimizations.
16690 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
16691 future delay slot filling. Add support for varargs, tail calls and JMP.
16693 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
16694 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
16696 * inssel.brg: Fix register allocation in OP_ARGLIST.
16698 * inssel.brg: Fix warnings.
16700 2004-03-25 Martin Baulig <martin@ximian.com>
16702 * mini.c (inflate_generic_field): Removed.
16703 (mini_get_method): Removed, use mono_get_method_full(),
16704 (mini_get_class): Removed, use mono_class_get_full().
16705 (mono_method_to_ir): Pass our generic context to
16706 mono_field_from_token().
16708 2004-03-25 Martin Baulig <martin@ximian.com>
16710 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
16711 of a `MonoMethod *'.
16712 (mini_get_method): Take a `MonoGenericContext *' instead
16713 of a `MonoMethod *'.
16714 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
16715 a new local variable called `generic_context' which holds the
16716 current `MonoGenericContext *'; use it to lookup things.
16718 2004-03-24 Martin Baulig <martin@ximian.com>
16720 * mini.c (mini_get_class): New static method; if we're inside a
16721 generic instance, inflate the class if neccessary.
16722 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
16724 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
16726 * iltests.il: New regression test for #55976.
16728 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
16731 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
16733 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
16736 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
16738 * liveness.c: Consider SSA stores as well as loads when making vars
16741 * exceptions.cs: New regression tests for register allocation.
16743 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
16745 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
16746 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
16747 domain lock only to protect puntual access to data structures.
16748 Added access lock for sighash, jit_icall_hash_name,
16749 jit_icall_hash_addr and domain->code_mp.
16751 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
16753 * driver.c: Print SIGSEGV handling method.
16755 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
16757 * mini.c (setup_jit_tls_data): Handle case when this is called
16758 multiple times for a thread.
16760 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
16761 is different from fbxx_un. Fixes #54303. Also use constants instead of
16762 magic numbers in a lot of places.
16764 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
16766 * exceptions.cs: Fix cctor test when --regression is used.
16768 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
16770 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
16773 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16775 * inssel-ppc.brg: fixed register assignments for some rules.
16777 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
16779 * exceptions.cs: Add test for exceptions in static constructors.
16781 * mini.c (mono_jit_compile_method_with_out): Move the calling of
16782 static constructors outside the domain lock. Fixes #55720.
16784 2004-03-17 Martin Baulig <martin@ximian.com>
16786 * mini.c (get_generic_field_inst): Removed, this'll never happen.
16787 (inflate_generic_field): Take the `MonoMethod *' instead of the
16788 `MonoClass *' and added support for generic method.
16789 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
16790 have a `field->parent->gen_params', only inflate the field if it's
16791 an open constructed type.
16793 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
16795 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
16796 exception object instead of the preconstructed ones.
16798 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16800 * mini.c: reverted changed to sigsegv_signal_handler commited
16801 accidentally in the previous patch.
16803 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16806 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
16807 running --aot with an old assembly.
16809 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
16811 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
16814 * mini-sparc.c: Add support for v9 branches with prediction.
16816 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
16818 * mini.c (mini_init): #warning is GNUC only
16820 * mini-sparc.h: implement __builtin_frame_address
16821 and __builtin_return_address for Sun C compiler
16823 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
16825 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
16827 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
16829 * basic-calls.cs: Add test for unaligned byref long argument passing.
16831 * mini-ops.h: Add sparcv9 compare and branch instructions.
16833 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
16834 v9 instructions if we have a v9 cpu.
16836 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
16837 registers for global allocation.
16839 * exceptions-sparc.c: Fixes.
16841 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
16843 * liveness.c (mono_analyze_liveness): Optimized version.
16845 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
16847 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
16850 * basic-float.cs basic-calls.cs: New regression tests.
16852 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
16854 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
16855 sigaltstack implementation.
16857 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
16859 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
16860 stuff if SIGSEGV_ON_ALTSTACK is not defined.
16862 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
16864 * mini.c: Fix warnings.
16866 * mini.c (mono_resolve_patch_target): New function which contains the
16867 arch independent part of the patching process.
16869 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
16870 patching code to a separate function.
16872 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
16874 * mini.c (add_signal_handler): ifdef out on Windows
16876 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
16878 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
16879 cpu-sparc.md: Add exception handling support + other fixes.
16881 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
16882 typed GC detection in --version.
16884 * basic.cs exceptions.cs: New regression tests.
16886 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
16887 the arch specific code can store data during a compilation.
16889 * mini-ops.h: Add OP_SETFRET.
16891 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
16892 function, register a separate icall for each arity, so the icalls can
16895 * mini.c (mono_print_tree): Print negative offsets in a more readable
16898 * mini.c: Make signal handling work on sparc.
16900 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
16902 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
16904 * jit-icalls.c: Emulate truncl by aintl on solaris.
16906 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
16908 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
16910 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
16912 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
16914 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
16915 a MarshalByRef type, inline a method that performs the check, taking into
16916 account that the object can be a proxy. Also implemented tow new opcodes:
16917 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16918 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
16919 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16921 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16923 * mini-ppc.c: if a relative branch displacement is too big
16924 but it points to and area reachable with an absolute branch,
16927 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16929 * mini.c: optimize small copies in cpblk.
16931 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
16933 * basic-calls.cs basic-float.cs: New regression tests.
16935 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
16936 negative offsets from %fp. Implement localloc. Fix local register
16937 allocation. Fix the case when the this argument needs to be saved to
16938 the stack. Implement some missing opcodes.
16940 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
16942 * mini.c (mini_method_compile): Reenable global regalloc in methods
16943 with exception handlers.
16945 * linear-scan.c (mono_varlist_sort): Fix warning.
16947 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
16949 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
16952 * liveness.c: Make all variables uses in exception clauses volatile, to
16953 prevent them from being allocated to registers. Fixes #42136.
16955 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
16957 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
16958 causes regressions.
16960 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
16961 argument to mono_arch_regalloc_cost.
16963 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
16966 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
16968 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
16969 Make the cost of allocating a variable to a register arch dependent.
16971 * basic-calls.cs: Fix compilation of tests.
16973 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
16974 helper function to cut back on the number of #ifdefs needed.
16976 * mini-ppc.c: Fix compilation.
16978 * basic-calls.cs: New regression tests.
16980 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
16982 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
16983 of l0 since that is callee saved.
16985 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
16988 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
16989 of delay instruction.
16991 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
16993 * mini.h (MonoCallInst): Add 'virtual' flag.
16995 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
16997 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
16999 * *.cs: New regression tests.
17001 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
17004 * mini.c (mono_runtime_install_handlers): Fix build.
17006 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
17007 'signal_stack_size' members.
17009 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
17010 alternate signal stack.
17012 * exceptions-x86.c: Add stack overflow handling.
17014 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
17015 functions to arch independent code.
17017 * mini.c (mono_print_tree): Print more detailed info for load_membase
17020 2004-02-23 Martin Baulig <martin@ximian.com>
17022 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
17024 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
17026 * mini-x86.c: fixed reg allocation for div/rem.
17028 2004-02-22 Miguel de Icaza <miguel@ximian.com>
17030 * driver.c (mono_main): Report some configuratio options on --version.
17032 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
17034 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
17035 low in the address space. Correctly flush memory in thunks where we
17036 output native code.
17038 2004-02-20 Martin Baulig <martin@ximian.com>
17040 * mini.c (mini_get_method): New static method; inflate all generic
17041 methods and methods in open generic instances.
17042 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
17043 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
17045 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
17047 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
17049 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
17051 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
17053 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
17055 * mini-sparc.c (flushi mono_arch_output_basic_block): make
17056 it compile using Sun's compiler.
17058 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
17060 * 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.
17062 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
17064 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17066 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
17068 * mini-ppc.c: handle calls outside of the allowed range with thunks
17069 allocated using the code manager.
17070 * tramp-ppc.c: use the code manager to hold generated native code.
17071 Fixed the magic trampoline to just patch vtable entries.
17073 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
17075 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
17078 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
17080 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
17083 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
17084 if we have a working __thread implementation.
17086 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
17087 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
17089 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
17091 * mini-x86.c: Fix compilation under gcc 2.
17093 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
17095 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
17096 contains a call to the wrapped function.
17098 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
17099 OP_<CALL>_IMM opcodes, and use them under X86.
17101 * mini.c (mono_jit_find_compiled_method): Fix warning.
17103 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
17105 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
17107 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
17108 functionality to mini.c.
17110 * mini.c (mono_create_jump_trampoline): New function to create a jump
17111 trampoline. Return a compiled method instead of a trampoline if it
17112 exists. Add a cache for jump trampolines.
17114 * mini.c (mono_jit_find_compiled_method): New function to return a
17115 compiled method if it exists.
17117 * mini-x86.c: Call mono_create_jump_trampoline instead of
17118 mono_arch_create_jit_trampoline.
17120 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
17121 a jump trampoline. Fixes #52092.
17123 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
17125 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
17126 which is not up-to-date. Add check_corlib_version () instead.
17128 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
17131 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
17132 since newer valgrind versions do not need it.
17134 * mini.c (mono_jit_compile_method_with_opt): New helper function to
17135 compile a method with a given set of optimizations.
17137 * mini.c: Compile icall wrappers on-demand instead of at startup.
17139 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
17140 wrapper for an icall.
17142 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
17144 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
17147 * iltests.il: Add test for non-empty stack before switch instruction.
17149 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
17151 * mini.c: Add support for new stringbuilder marshalling conventions.
17153 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
17155 2004-02-01 Martin Baulig <martin@ximian.com>
17157 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
17158 in `ginst->mtype_argv'.
17160 2004-01-31 Miguel de Icaza <miguel@ximian.com>
17162 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
17163 facilitate grepping.
17165 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
17167 * mini.c: fixed buglet in initobj generic implementation for references.
17169 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
17171 * Makefile.am: make the version script conditional.
17172 * jit-icalls.c: handle missing truncl().
17174 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
17176 * exceptions.cs: Add more tests for double->int conversion.
17178 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
17179 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
17181 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
17183 * driver.c: make --verbose --version emit an error
17184 if the loaded corlib doesn't match the runtime version.
17186 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17188 * mini-ppc.h: export ppc_patch().
17189 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
17190 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
17191 on par or better than on MacOSX.
17193 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
17195 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
17196 mono_lookup_pinvoke_call.
17198 * mini-x86.c: Under windows, the default pinvoke calling convention is
17199 stdcall. Fixes #52834.
17201 * mini.c (optimize_branches): Add an upper bound to the number of
17202 iterations to prevent infinite loops on strange loops. Fixes #53003.
17204 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
17206 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
17207 and ISINST. Fixes #52093.
17209 * objects.cs (test_0_vector_array_cast): New tests.
17211 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
17213 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
17214 checking in Array.Set ().
17216 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
17219 * object.cs (test_0_multi_array_cast): New regression test.
17221 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
17223 * exceptions-ppc.c: fix build on Linux/PPC.
17225 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
17227 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
17228 running under valgrind.
17229 (x86_magic_trampoline): Fix build bustage.
17231 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
17232 negative values as well. This is needed for the encoding of the line number
17233 info, since sometimes the line numbers are not in increasing order.
17235 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
17237 * cpu-pentium.md (localloc): Increase the size of the localloc
17238 instruction since it is a loop under Win32.
17240 * debug-mini.c (record_line_number): Get rid of unneccesary memory
17243 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
17245 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
17246 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
17247 Max Horn (max@quendi.de). Fix file names in comments.
17249 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
17251 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
17252 avoid stack overflow.
17253 (replace_usage): Avoid uninitialized variable warnings.
17255 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
17256 and taking the address of valuetype variables.
17258 2004-01-03 Patrik Torstensson
17260 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
17261 for other purposes than FP later on.
17263 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
17265 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
17268 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17270 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
17272 2003-12-30 Patrik Torstensson <p@rxc.se>
17274 * mini-x86.h: Decreased number of availiable fp regs.
17275 Solves corner cases with FP spilling.
17277 2003-12-23 Patrik Torstensson <p@rxc.se>
17279 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
17280 for floating point stack tracking / spilling on x86.
17283 * basic-float.cs: added float mul overflow test.
17285 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
17287 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
17289 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17291 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
17292 supports for cond branches that overflow the immediate
17293 overflow offset. mcs can compile simple programs.
17295 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17297 * exceptions-ppc.c: exception handling support wip:
17298 finally handlers get run on exception.
17300 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
17302 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
17305 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17307 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
17308 initial support for stack walking and unwinding.
17310 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
17312 * driver.c (mono_main): Make corlib-out-of-sync message more
17313 descriptive. Also remove verify_corlib call.
17315 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17317 * mini.c: make CEE_NEWARR calls and other emulated opcodes
17318 not overlap with other call's arguments, too.
17320 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
17322 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
17323 move to arch-specific code the choice of arch-specific
17324 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
17325 * mini.c: ensure emulation calls will not interleave
17328 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
17330 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
17331 the magic trampoline stack frame is dropped before executing
17334 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17336 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
17337 and integer to fp conversions. Added support for overflowing
17338 arguments on the stack. Reserve a couple more registers as temps.
17339 Added support for aot compilation (as output still needs to be
17342 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17344 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
17345 Don't overwrite return register in some corner cases.
17347 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
17349 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
17350 static constructors when AOT compiling.
17352 * driver.c (mono_main): Call mono_check_corlib_version.
17354 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17356 * cpu-g4.md, basic.cs: fixed div target register.
17358 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
17360 * mini-ppc.c, basic.cs: shl_imm fix with test.
17362 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17364 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
17365 structures by value. Misc fixes.
17366 * objects.cs: more tests.
17368 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
17370 * mini-ppc.c: lconv.ovf.i implemented.
17372 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17375 (mini_init): don't error out if someone already called g_thread_init.
17377 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17379 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
17380 to be any type per the spec. Fix abnormal memory usage when
17381 the same object is repeatedly thrown.
17383 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
17385 * mini.c: check for overruns in IL code.
17387 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
17389 * TODO: Add/remove some todo entries.
17391 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
17393 * driver.c (mono_main): Call mono_verify_corlib.
17395 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
17397 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
17398 This has been moved to mini.c
17399 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
17400 type being casted is marshalbyref it could be a proxy, so instead of
17401 emitting the type check code, emit a call to a runtime method that will
17402 perform the check by calling CanCastTo if needed.
17404 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
17406 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
17407 methods with large stack frames under Win32.
17409 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
17411 * Makefile.am: Distribute regression tests.
17413 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
17414 at the end instead of inserting each variable into the sorted list.
17416 * linear-scan.c (mono_varlist_sort): New helper function.
17418 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17420 * mini.c: ensure arguments and locals are within bounds.
17422 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17424 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
17427 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
17429 * mini.c (mono_cprop_copy_values): Fix crash.
17431 * aot.c: Set verbosity back to 0.
17433 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17435 * regalloc.c: complete memory leak fix by Laurent Morichetti
17438 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
17440 * driver.c (main_thread_handler): Revert the previous patch.
17442 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
17445 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
17446 memory from the memory pool.
17448 * driver.c (main_thread_handler): Turn on all optimizations when
17451 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
17452 an array for better performance.
17454 * regalloc.c (mono_regstate_assign): Fix memory leak.
17456 * debug-mini.c (mono_debug_serialize_debug_info): New function to
17457 serialize the debug info.
17459 * debug-mini.c (mono_debug_add_aot_method): New function to load the
17460 debug info from the serialized representation.
17462 * aot.c: Save debug info into the generated file and load it when
17465 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17467 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17469 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
17470 More FP-related fixes.
17472 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17474 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
17475 and register allocation buglet. Hello world now runs.
17477 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17479 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
17480 * tramp-ppc.c: fixed class init trampoline.
17481 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
17483 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17485 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
17486 mini.c: more ppc changes/fixes.
17488 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
17490 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
17491 Also optimize the case when the arguments are the same in the caller
17494 * iltests.il: Add tests for tail calls with valuetype arguments.
17496 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17498 * mini-ppc.c: fixes for struct return type.
17500 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
17502 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17503 mono_spillvar_offset() to arch-specific code.
17505 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17507 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
17509 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
17511 * exceptions-x86.c: Fix stack space leaks.
17513 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
17514 registers from the lmf if the method has save_lmf set.
17516 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
17518 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
17519 of icall wrappers into InvokeInDomain, since these are now per-domain.
17521 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
17523 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
17524 make some opcode emulation and intrinsic ops enabled/disabled
17525 according to the architecture. More fixes.
17527 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17529 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
17531 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17533 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17534 arch-specific handling for 'this' and struct return type to
17535 arch-specific code.
17537 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17539 * aot.c: prevent divide by zero error when reporting (it happened with
17540 Accessibility.dll).
17542 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
17544 * mini.h (inst_switch): Remove unused macro.
17546 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17549 (load_aot_module): free 'info->methods' and 'info' properly. No more
17550 "free(): invalid pointer blah" messages when you have an old aot
17553 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
17555 * jit-icalls.c, mini.c: Added support for context static fields.
17557 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
17559 * mini.c (mono_method_blittable): Methods which set LastError are not
17560 blittable either. Fixes #51108.
17562 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17564 * mini.c: flush icache.
17565 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
17567 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
17569 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
17571 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
17573 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
17576 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
17579 * inssel.brg (CEE_MKREFANY): Fix AOT case.
17581 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
17583 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
17584 instruction when the result is discarded.
17586 * iltests.il (test_0_div_regalloc): New regression test.
17588 * arrays.cs: Fix compilation error.
17590 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
17592 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
17593 float rules to inssel-x86.brg: sane architectures with FP registers
17594 don't need to implement these rules.
17596 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17598 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
17600 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17602 * mini.h, inssel-long32.brg: fixed endianess issues in int64
17603 implementation of 32 bit systems.
17605 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17607 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
17608 (Jeroen Zwartepoorte).
17610 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
17612 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
17613 the caller and the callee matches.
17615 * mini.c (mono_method_to_ir): Add comment.
17617 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
17618 signbit is missing on some platforms.
17620 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
17622 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
17624 * mini.c (setup_jit_tls_data): Call the new function.
17626 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
17628 * mini-x86.c: Add experimental support for fast access to the lmf
17629 structure under NPTL/Linux 2.6.x.
17631 2003-11-06 Martin Baulig <martin@ximian.com>
17633 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
17634 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
17637 2003-11-02 Martin Baulig <martin@ximian.com>
17639 * mini.c (inflate_generic_field): New static method.
17640 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
17641 generic instance and the field is declared in a generic type, call
17642 inflate_generic_field() to inflate it. Fixes gen-28.cs.
17644 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
17646 * mini.h mini.c (mono_method_same_domain): New function to return
17647 whenever the caller and the callee are in the same domain.
17649 * tramp-x86.c (x86_magic_trampoline): Use the new function.
17651 2003-10-30 Martin Baulig <martin@ximian.com>
17653 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
17654 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
17656 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
17657 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
17659 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
17661 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
17664 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
17665 object here, so it is in the correct appdomain etc.
17667 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
17669 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
17671 (mono_method_to_ir): Avoid freeing the type created returned from
17672 mono_type_create_from_typespec, since it is put into an internal cache
17673 by the function. Fixes pointer.exe.
17675 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
17676 trampolines for icalls and pinvokes as well. Fixes #33569.
17678 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
17680 * mini.c: Update after appdomain changes.
17682 * mini.c (mono_jit_compile_method_inner): Allways compile native
17683 method wrappers in the root domain, since there can only be one
17684 instance of them, whose address is stored in method->info.
17686 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
17688 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
17689 environment variable. Instead detect automatically whenever running
17690 under valgrind using the magic macro RUNNING_ON_VALGRIND from
17693 2003-10-16 Miguel de Icaza <miguel@ximian.com>
17695 * trace.c, trace.h: New files that implement the new trace option
17698 * driver.c: Document new --trace options.
17700 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
17703 - if (mono_jit_trace_calls)
17704 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
17706 * mini.h: prototypes.
17708 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
17710 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
17712 * mini.c inssel.brg: Implement typedefbyref opcodes.
17714 * mini.c (mono_jit_compile_method): Remove unused local variable.
17716 * mini.c (mono_jit_compile_method_inner): Ditto.
17718 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
17720 * tramp-x86.c (x86_class_init_trampoline): Fix build.
17722 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
17724 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
17726 * mini.c (mono_no_aot): Remove unused global variable.
17728 * mini.c: Thread safety fixes.
17730 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
17732 * mini.c (mono_create_class_init_trampoline): Add a lock around
17733 class_init_hash_addr.
17735 * arrays.cs (test_0_newarr_emulation): Add new regression test for
17738 * mini.c: Decompose the NEWARR instruction before decomposing its
17739 arguments. Fixes #30073.
17741 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
17743 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
17746 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
17748 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
17750 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
17752 * driver.c: Add support for compiling icall wrappers to --compile.
17754 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
17756 * inssel.brg: The empty value in class->interface_offsets is -1, not
17759 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
17761 * objects.cs: New test for 'is' operator on an array of interfaces.
17763 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17765 * tramp-ppc.c: update trampoline code to support jumps
17766 and class initialization.
17768 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
17770 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
17772 * inssel.brg (OP_UNBOXCAST): Fix #46027.
17774 * inssel.brg (OP_UNBOX): Remove unused rule.
17776 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
17777 region instead of one for each method. Fixes #47813.
17779 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
17781 * exceptions.cs (test_0_nested_finally): New regression test for
17782 nested exception handlers.
17784 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
17786 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
17788 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
17791 * mini.c (mono_method_check_inlining): Make the inlining limit
17792 configurable by an environment variable.
17794 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
17796 * mini.h: Bump AOT file version.
17798 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
17799 token, store the image along with the token, since the token might not
17800 refer to the same image as the method containing the relocation,
17801 because of inlining.
17803 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
17805 * mini.c (mono_precompile_assemblies): New function to compile
17806 all methods in all loaded assemblies.
17808 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
17810 * regalloc.h regalloc.c (MonoRegState): Change the type of
17811 iassign and fassign to int*, since they can contain large negative
17812 values if the register is spilled. Also added some comments. Fixes
17815 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
17816 under Win32. Fixes #42964.
17818 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
17820 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
17822 * aot.c: Added support for AOT compiling methods which contain calls
17823 to wrappers. Currently, only remoting-invoke-with-check wrappers are
17826 * driver.c (compile_all_methods): Run the compilation in a thread
17827 managed by mono. Fixes #44023.
17829 * mini.c (mono_codegen): Print full method name in verbose output.
17831 * mini-x86.c (mono_arch_patch_code): Fix warning.
17833 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
17834 jumps, since the method we are jumping to might be domain-specific.
17836 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
17838 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17840 * inssel.brg: string chars are unsigned.
17842 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
17844 * TODO: New todo item.
17846 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
17847 which calls mono_runtime_class_init and patches the call site to
17848 avoid further calls.
17849 (mono_arch_create_class_init_trampoline): New arch specific function
17850 to create a class init trampoline.
17851 (create_trampoline_code): Generalized so it can create
17852 class init trampolines as well.
17854 * mini.c (helper_sig_class_init_trampoline): New helper variable.
17855 (mono_create_class_init_trampoline): New function to create and cache
17856 class init trampolines.
17857 (mono_find_class_init_trampoline_by_addr): New function to lookup the
17858 vtable given the address of a class init trampoline. Used by the
17860 (mono_codegen): Generate a call to a trampoline instead of
17861 mono_runtime_class_init in LDSFLD[A].
17862 (mono_codegen): Add relocations for the new trampoline.
17864 * mini.h mini-x86.c aot.c: Added a new relocation type:
17865 MONO_PATCH_INFO_CLASS_INIT.
17867 * mini.h: Bump AOT version number.
17869 * aot.c: Create a copy of the loaded code instead of using the original
17870 so methods which call each other will be close in memory, improving
17873 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
17874 patch since it breaks the regression tests.
17876 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
17877 for the register saving instruction sequence since the
17878 frame_state_for function in glibc 2.3.2 don't seem to detect it.
17880 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
17882 * TODO: Fix todo item && remove another.
17884 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
17886 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
17889 * aot.c: Moved the check for MONO_LASTAOT into the initialization
17890 function of the module.
17892 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
17893 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
17894 --no-aot command line option.
17896 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
17898 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
17899 by Bernie Solomon (bernard@ugsolutions.com).
17901 * inssel.brg: Refactor the interface offset table related code into
17902 its separate functions and add support for the AOT case.
17904 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
17906 * aot.c (mono_aot_get_method_inner): Fix memory leak.
17908 * aot.c: Added mono_aot_verbose variable and made all debugging
17909 output depend on the value of this variable.
17911 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
17912 method_label and info_label.
17914 * mini.h mini-x86.c aot.c: Added a new relocation type
17915 MONO_PATCH_INFO_IID for klass->interface_id.
17917 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
17918 the MonoJitInfo structure.
17920 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
17921 a non-root appdomain in shared mode.
17923 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17925 * aot.c: make aot loader less verbose. Remove free of unused variable.
17927 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
17929 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
17931 * .cvsignore: Added *.dll.
17933 * mini.c (mono_print_tree_nl): New function callable while debugging.
17935 * mini.c (mono_print_code): Export this.
17937 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
17940 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
17942 * mini.h (MonoCompile): Added 'jit_info' field.
17944 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
17945 the cfg structure, since it is needed by the AOT compiler.
17947 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17949 * aot.c: A major rewrite. Changes include:
17950 - save exception tables for methods which have them.
17951 - cache failed lookups in aot_get_method () to avoid the (slow) calls
17952 to g_module_symbol.
17953 - reworked the file format so it is now much smaller and needs
17954 fewer relocation entries.
17956 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
17958 * aot.c (load_aot_module): Fix build bustage on platforms without
17961 2003-09-04 Martin Baulig <martin@ximian.com>
17963 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
17965 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
17967 * TODO: Some new optimization ideas.
17969 * aot.c: Move AOT module loading logic here from mono_assembly_open.
17971 * aot.c: Save the optimization flags used to compile the code into
17974 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
17975 support emitting domain specific code.
17977 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
17978 no longer domain neutral. It can be made domain neutral by compiling
17979 with --optimize=shared.
17981 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
17982 between appdomains.
17984 * driver.c mini.h mini.c: New --no-aot debugging option which disables
17985 loading of AOT code.
17987 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
17989 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
17990 if there is no domain neutrality information.
17992 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
17994 * aot.c (mono_compile_assembly): Emit a symbol containing the file
17995 format version into the generated library.
17997 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
17998 callee method into the caller since one of them could be shared.
18000 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
18001 system exceptions from AOT code now works.
18003 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
18004 method if it is domain neutral and the callee is not.
18006 * graph.c (cfg_emit_one_loop_level): Fix warning.
18008 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
18010 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
18013 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
18015 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
18016 is needed by code which is executed before mono_runtime_init ().
18017 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
18019 * mini.c (mono_thread_abort): Fix warning.
18020 (mono_jit_compile_method): Call static constructor in the AOT case too.
18022 * aot.c (mono_compile_assembly): Fix warning.
18024 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18026 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
18028 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
18030 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
18032 * cpu-pentium.md: Fix the length of call opcodes so they include the
18033 ESP restoring instruction. Fixes #47968.
18035 2003-08-28 Martin Baulig <martin@ximian.com>
18037 * mini-x86.c (mono_arch_call_opcode): Added support for
18038 MONO_TYPE_GENERICINST.
18040 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
18042 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
18044 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
18045 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
18047 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
18050 2003-08-26 Martin Baulig <martin@ximian.com>
18052 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
18053 when reporting an error, set this to the actual error location.
18054 (mono_method_to_ir): Report the correct error location if
18055 get_basic_blocks() returned an error.
18057 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
18059 * mini.c (mono_type_blittable): OBJECT is not blittable.
18060 (mono_method_blittable): Methods which have marshalling descriptors
18061 are not blittable either. Fixes #47842.
18063 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
18065 * driver.c mini.c: Use an environment variable instead of a global
18066 variable. Also fix the build.
18068 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
18069 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
18072 * driver.c mini.c: Added --with-valgrind option to turn off some
18073 code which prevents mono from running under valgrind.
18075 * mini.c (mono_emit_call_args): Fixed warning.
18077 * mini.c (mono_emulate_opcode): Fixed warning.
18079 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18081 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
18082 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
18083 regalloc.c, regalloc.h: specify available registers in arch-specific
18084 code and support floats in the regallocator (patch by Laurent Morichetti
18087 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18089 * mini.c: mono_thread_current() can be called only after
18090 mono_runtime_init(): rearrange code to not call it early on.
18092 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18094 * mini.c: allocate jump tables in the code mempools.
18096 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18098 * mini.c, mini.h: make sure per-thread data allocated by the jit is
18101 2003-08-10 Miguel de Icaza <miguel@ximian.com>
18103 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
18104 12 to 16. This fixes bug #47453.
18107 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18109 * mini-ppc.c: fixed indexed load and unsigned compares.
18111 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
18113 * mini.c: reenabled installation of handler for
18114 thread abort signal.
18116 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18118 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
18119 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
18120 until it's fixed and actually useful.
18122 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18124 * inssel-long32.brg: couple more opcodes implemented.
18126 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18128 * mini-sparc.c: Even more opcodes implemeted.
18130 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
18132 * mini-sparc.c: More opcodes implemented.
18134 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
18136 * mini-sparc.c: More opcodes implemented.
18138 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18140 * inssel-sparc.brg: Add some needed rules. Direct
18142 * Makefile.am: Use inssel-sparc.brg
18143 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
18144 an assert happy for now.
18146 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
18148 * mini-sparc.c: Fixed compile errors.
18149 * exceptions-sparc.c: Same. We now produce a mono binary
18150 on sparc-linux. Yea.
18152 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
18154 * mini-sparc.c: Renamed registers. Also some macro cleanups.
18155 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
18156 They compile, but do not work.
18158 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18160 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
18161 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
18162 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
18165 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18167 * mini.c: more opcodes implemented and better support for generics.
18169 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18171 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
18172 * mini.c, mini.h: first cut at generics support: some new instructions
18173 added and changed the behaviour of some of the existing ones.
18175 2003-07-21 Miguel de Icaza <miguel@ximian.com>
18177 * mini.c: Removed definition of metadata_shared mutex here.
18179 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18181 * mini-x86.c: make vararg calls work for instance methods.
18183 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18185 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
18186 returns the arguments in a separte list, now.
18188 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18190 * aot.c, mini.c: updates for array type representation changes.
18192 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
18194 * mini.c: register function to perform jit shutdown.
18196 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18198 * mini.c: use a faster allocator if possible.
18200 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18202 * aot.c: some cleanups and portability changes.
18204 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18206 * mini.c: use faster allocation for CEE_BOX if possible.
18208 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18210 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
18211 Moved inlined mempcy code to its own function so that is can be
18212 reused. Added an inline memset function as well (optimized initobj).
18213 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
18215 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18217 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
18219 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18221 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
18222 arch code can setup the cpu for CLR execution, if needed.
18223 We use it on x86 to set the precision of FP operations.
18225 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18227 * mini.c: disable some optimizations if we can guess they'll cost too
18228 much for a given method.
18230 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18232 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
18234 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
18235 * mini.h mini.c mini-x86.c: Added instruction level coverage
18236 info collection support.
18238 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18240 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
18241 is now implemented in the profiling API. Get rid of a couple of
18242 unnecessary global variables.
18244 2003-06-15 Nick Drochak <ndrochak@gol.com>
18246 * basic-long.cs: tests for negative values for bigmul, and unsigned.
18247 * cpu-g4.md: add op_bigmul and op_bigmul_un
18248 * cpu_pentium.md: add op_bigmul_un
18249 * inssel-long32.brg: add rule for unsigned bigmul
18250 * mini-ops.h: define OP_BIGMUL_UN
18251 * mini-x86.c: THE BUG: handle (un)signed properly
18252 * mini.c: choose unsigned opcode if needed.
18253 This set of patches fixes bug #44291
18255 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
18257 * mini.c (optimize_branches): improved to handle all kinds of
18258 conditional branches.
18260 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18262 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
18263 don't raise exceptions.
18265 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18267 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
18268 to arch-specific files.
18270 2003-06-09 Martin Baulig <martin@ximian.com>
18272 * Makefile.am (libs): Added $(LIBGC_LIBS).
18274 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
18276 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
18277 and OP_ATAN (fixes bug#44293).
18279 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
18281 * Makefile.am, mini-x86.c: rename cpu description array to
18282 pentium_desc, since some compilers define the 'pentium' preprocessor
18285 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
18287 * mini.c (mini_select_instructions): add explicit branch if the
18288 following block is not the false target of a conditional branch -
18289 we need this with any optimization that reorder or remove bblocks
18291 * mini.c (optimize_branches): bug fixes
18293 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
18295 * mini.c (mono_method_to_ir): inline static readonly fields
18297 * ssa.c (fold_tree): start cfold support for long (very simple
18300 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
18302 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18304 * inssel.brg: fixed memcpy (bug #44219).
18306 2003-06-05 Dick Porter <dick@ximian.com>
18308 * driver.c: Set the glib log levels to not abort if g_message
18311 g_set_prgname() has to happen before mini_init() so that the
18312 process handle gets the info.
18314 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18316 * driver.c: add intrins to the default optimizations to get wider
18319 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18321 * mini.h: some large basic blocks will overflow a 16-bit
18322 integers for symbolic registers.
18324 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
18326 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
18327 (mono_arch_output_basic_block): fix bug 43499
18329 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18331 * mini.c: kill duplicated definition of mono_debug_format.
18333 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18335 * mini-x86.c, arrays.cs: fixed register allocation bug.
18337 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
18339 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
18341 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
18343 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18346 (print_method_from_ip): also print source location information if
18349 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
18351 * mini.c (mono_find_block_region): bug fix in region code
18352 (mini_method_compile): enable removing unreachable code again, but
18353 only in methods without exception clauses.
18355 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18357 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
18358 Implemented arglist opcode and handling of TypedReference type.
18359 Fixed x86 call convention when a structure is returned.
18360 Minimal support for calling static vararg methods.
18362 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
18364 * mini.c (mini_method_compile): always remove unreachable code,
18365 because the code in them may be inconsistent (access to dead
18366 variables for example).
18368 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18370 * driver.c, debug-mini.c: warning fixes.
18372 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
18374 * Makefile.am, jit.h, mini.h: install header for embedding mono.
18376 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
18378 * mini.c: thread-static fields are registered in mono_class_vtable(),
18379 so ensure the function is called before checking for them.
18381 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
18383 * mini.c (optimize_branches): fix for bug 43586
18385 * jit-icalls.c (mono_llmult_ovf): added an additional check for
18386 overflow (fixes Bug #43639)
18388 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18390 * mini.c, objects.cs: allow the use of stobj for primitive types.
18392 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18394 * mini.c: be less strict about argument checking until we support
18395 running the verifier.
18397 2003-05-27 Nick Drochak <ndrochak@gol.com>
18399 * basic-long.cs: tests for (ulong)int * (ulong)int also
18400 * mini.c: use the same trick for (ulong)int * (ulong)int
18402 2003-05-27 Nick Drochak <ndrochak@gol.com>
18404 * basic-long.cs: add regression test for (long)int * (long)int
18405 * cpu-pentium.md: add op_bigmul specification
18406 * inssel-long32.brg: add OP_BIGMUL rule
18407 * mini-ops.h: add OP_BIGMUL
18408 * mini-x86.c: register allocator: handle case where src1 needs to be
18410 * mini.c: substitute special BIGMUL opcode in the tree for
18411 (long)int * (long)int
18413 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18415 * jit-icalls.c: call the type ctor on field access if needed.
18417 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18419 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
18420 to a method (including results of ldelema, bug#43207).
18422 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
18424 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
18425 colors to show exception handler blocks.
18427 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
18428 (fix for pinvoke7.cs).
18430 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18432 * mini.h, mini.c: ensure correct initialization order for types that
18433 require it. Prepare for lazy compilation of jit icall wrappers.
18434 Provide a name for opcode emulation to reduce unneeded mallocing.
18436 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18438 * mini-x86.c: better register restoring code and profiling
18439 support for tail calls.
18441 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18443 * mini.h, driver.c: prepare for leaf methods optimization.
18445 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18447 * mini.c: get targets of branches before converting a method.
18449 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
18451 * mini.c (optimize_branches): added some experimental code (disbaled)
18453 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
18455 * mini.c (optimize_branches): fix branch to branch optimization
18457 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
18459 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
18461 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
18463 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
18466 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
18468 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
18469 enable use of interface variables again.
18471 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
18472 I1 to registers because there is no simply way to sign extend 8bit
18473 quantities in caller saved registers on x86.
18475 * inssel-float.brg: set costs of some rules to 2 so
18476 that monobure always select the arch. specific ones if supplied,
18477 regardless of the order we pass the files to monoburg.
18479 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18481 * mini.c, mini-x86.c: since the magic trampoline for jumps
18482 can't patch the code directly, we do it as soon as the
18483 method gets compiled.
18485 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18487 * mini-x86.c, mini.h: introduce a new patching method
18488 to support CEE_JMP and tail calls.
18489 * mini.c: obey tail.call. Don't precompile methods target
18491 * tramp-x86.c: new trampoline code to handle methods
18492 reached through a jump.
18494 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
18496 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
18497 bit values to registers
18499 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
18501 * mini.c (mono_compile_get_interface_var): share interface
18502 variables if possible.
18504 2003-05-16 Martin Baulig <martin@ximian.com>
18506 * debug-mini.c (mono_init_debugger): New function to initialize
18507 the debugger. This is not in the debugger since it needs to
18508 access some of mini's internals.
18510 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
18512 * mini.c (mono_method_to_ir): inlining fixes/cleanups
18514 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
18516 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
18517 for value type handling.
18519 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
18521 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
18522 (mono_method_check_inlining): enable inlining of all kinds of wrappers
18524 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
18526 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
18527 the constructor through a proxy.
18529 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18531 * jit-icalls.c, inssel.brg: fixes to array element address
18534 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
18536 * mini-x86.c (is_regsize_var): allocate pointer to registers
18538 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18540 * driver.c: fixed typo, added intrins to the set of optimizations
18541 tested with regressions.
18543 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18545 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
18546 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
18549 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
18551 * inssel.brg: remove some common pop instructions without side effects
18553 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18555 * inssel-x86.brg: fixed thinko in int to double conversions.
18557 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18559 * mini.c, jit-icalls.c: added runtime thread-static variable support.
18561 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18563 * inssel-long32.brg: two more missing instructions.
18565 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
18567 * mini.c (mono_emit_call_args): set the cil_code for all arguments
18568 if not already set.
18570 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
18572 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
18575 * basic-float.cs: Added tests for negative zero.
18577 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18579 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
18580 a couple of missing operations for long casts, with test cases.
18582 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18584 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
18586 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
18588 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
18589 code size estimation.
18591 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
18593 * mini.c (mono_jit_create_remoting_trampoline): make it work with
18594 abstract methods (fix bug 42542)
18596 * aot.c: add ability to handle array types
18598 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
18600 * mini.c: Call the _specific versions of the object allocation
18601 functions if possible.
18603 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18605 * driver.c: call setlocale ().
18607 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18609 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
18612 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
18614 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
18616 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
18617 wrappers (fix bug 42122)
18619 2003-05-04 Martin Baulig <martin@ximian.com>
18621 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
18623 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
18624 s/mini_set_defaults/mono_set_defaults/g.
18626 2003-05-04 Martin Baulig <martin@ximian.com>
18628 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
18630 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18632 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
18633 (reported by Don Roberts).
18635 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18637 * mini.c: temporarily work around two bugs for this release.
18639 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18641 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
18642 that contains -export-dynamic and it makes using the ld script
18644 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
18646 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18648 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
18651 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18653 * mini.c: make sure leave calls all the needed finally blocks,
18654 even when the target jumps out of multiple exception clauses.
18656 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18658 * ldscript, Makefile.am: add linker script to reduce the number of
18659 exported symbols (should also fix the issues with libwine defining
18660 some of the same symbols in io-layer).
18662 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
18664 * driver.c (mini_main): Avoid assertion when no file name is given on
18667 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
18669 * driver.c: added --version/-V command line option.
18670 Added the inline optimization in the regression tests.
18672 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18674 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
18675 to the type in the method signature (fixes bug#42134).
18677 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
18679 * mini.c: when inlining, check this is not null only when needed (bug #42135).
18681 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
18683 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
18685 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18687 * driver.c: fixed bug #42100.
18689 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
18691 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
18693 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18695 * mini.c: moved most of the code required to do inlining to its own
18696 function so it can be reused. Inline also ctors if appropriate.
18698 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
18700 * Makefile.am: Link with -export-dynamic so shared libs loaded by
18701 the runtime can call mono API functions.
18703 2003-04-27 Martin Baulig <martin@ximian.com>
18705 * debug-mini.c (mono_debug_init_method): Added
18706 `guint32 breakpoint_id' argument; if the method has a breakpoint,
18707 send a notification to the debugger.
18709 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
18710 running in the Mono Debugger, just pass the breakpoint number to
18711 mono_debug_init_method().
18713 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
18715 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
18717 * mini.c: allow some more unsafe compares.
18719 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18721 * mini-x86.c, Makefile.am: make distcheck works (partially from
18722 a patch by Richard Lee <r.h.lee@attbi.com>).
18723 * regset.c, regset.h: removed, they are unused.
18725 2003-04-25 Dick Porter <dick@ximian.com>
18727 * driver.c: Usage reports the name as 'mono' not 'mini'
18728 * exceptions-x86.c: Build and run on freebsd
18730 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18732 * Makefile.am: install the program with the 'mono' name and
18733 the library as libmono instead of mini and libmini.
18735 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18737 * driver.c: provide the APIs for the embedding interface of the old jit.
18739 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
18741 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
18743 2003-04-23 Martin Baulig <martin@ximian.com>
18745 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
18747 * driver.c: Added `--debug' command line argument to enable
18750 2003-04-23 Martin Baulig <martin@ximian.com>
18752 * debug.[ch]: Removed. The code is now in
18753 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
18755 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
18758 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
18760 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
18762 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18765 (mini_cleanup): moved mono_runtime_cleanup call after the call to
18766 mono_domain_finalize.
18767 (mini_method_compile): use mono_method_profile* if the the option is
18770 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
18772 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18773 methods with their wrapper.
18775 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18776 methods with their wrapper.
18778 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
18781 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
18784 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
18787 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
18789 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
18791 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
18793 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
18794 of the mempool. This is slightly faster and uses less memory
18796 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18798 * mini.c: avoid O(n) allocation for variables.
18800 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18802 * mini.c: handle items on the stack after inlining methods.
18804 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18806 * mini.c: make the method->opcode optimization dependent
18807 on MONO_OPT_INSTRINS and do it lazily.
18809 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18811 * driver.c: print overall results at the end of regression run.
18813 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
18815 * inssel.brg: don't overwrite symbolic registers.
18817 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18819 * inssel-x86.brg: fix conversion from long to float.
18821 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
18823 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
18825 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
18827 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
18829 * driver.c: Added --print-vtable option as in the old JIT.
18831 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18833 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
18835 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18837 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
18839 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
18841 * mini.c regalloc.c regalloc.h: Fix memory leak.
18843 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
18845 * aot.c (mono_aot_get_method): register all used strings
18847 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18849 * mini.c: always intern strings references with ldstr at compile time.
18851 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18853 * Makefile.am: add BUILT_SOURCES.
18855 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18857 * driver.c: give a better error message when the assembly to execute
18858 doesn't have an entry point.
18860 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
18862 * Makefile.am: added hack for automake
18864 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
18867 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
18869 22003-04-07 Martin Baulig <martin@ximian.com>
18871 * Makefile.am: Added Makefile.am.
18873 * debugger-main.c: Removed, this is now in the debugger where it
18876 * mini.pc.in: Call this package `mini' for the moment.